query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Call this to construct a BlueMeshService object once all the configurations have been specified
public BlueMeshService build(){ BlueMeshService bms = new BlueMeshService(); bms.setUUID(uuid); bms.setDeviceId(deviceId); bms.enableBluetooth(bluetoothEnabled); bms.setup(); return bms; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Fog_Services createFog_Services();", "public BlueMeshServiceBuilder bluetooth( boolean enabled ){\n bluetoothEnabled = enabled;\n return this;\n }", "private void initService() {\r\n\t}", "private void initService() {\n \tlog_d( \"initService()\" );\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) return;\n // Initialize the BluetoothChatService to perform bluetooth connections\n if ( mBluetoothService == null ) {\n log_d( \"new BluetoothService\" );\n \t\tmBluetoothService = new BluetoothService( mContext );\n\t }\n\t\tif ( mBluetoothService != null ) {\n log_d( \"set Handler\" );\n \t\tmBluetoothService.setHandler( sendHandler );\n\t }\t\t\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 }", "@Override\n\t\tpublic void init(final DaemonContext daemonContext) throws Exception {\n\t\t\tloadConfigFile(null);\n\t\t\t// create service options from configuration\n\t\t\tfinal VertxOptions vertxOptions = createVertxOptions(clustered);\t\t\n\t\t\tfinal DeploymentOptions deploymentOptions = createDeploymentOptions();\n\t\t\t// configure and start the service manager\n\t\t\tserviceManager = new ServiceManager(newHashSet(new VertxService(newArrayList(), vertxOptions, deploymentOptions, new SingleNodeLoadBalancer())));\t\t\n\t\t\tsuper.init(daemonContext);\n\t\t}", "public void initialize() throws Exception{\r\n\t\tfor (Constraint c:constraints){\r\n\t\t\tconstraintMap.put(c.getModel(), c);\r\n\t\t}\r\n\t\tservices.add(this);\r\n\t\t//System.out.println(\"constraints=\"+constraintMap);\r\n\t\tif (LightStr.isEmpty(dsId)){\r\n\t\t\tif (BeanFactory.getBeanFactory().getDataService(\"default\")==null) dsId=\"default\"; else dsId=LightUtil.getHashCode();\r\n\t\t}\r\n\t\tBeanFactory.getBeanFactory().addDataService(dsId, this);\r\n\t}", "public Service(){\n\t\t\n\t}", "public void loadAndWait()\n {\n injector.addConfigurationInstances(this.configClassInstances);\n\n // load all @Services from @Configuration classes\n injector.activateFailOnNullInstance();\n injector.load();\n\n // detect duplicates and crash on matches\n injector.crashOnDuplicates();\n\n // branch out the dependencies, such that Service A, with dependency B, is\n // aware of all dependencies of B.\n injector.branchOutDependencyTree();\n\n // sort the services, based on dependency requirements\n injector.sortByDependencies();\n\n // instantiate services/clients and crash if any nil instances are detected\n injector.instantiateComponents();\n injector.crashOnNullInstances();\n\n // add the component instances to the ServiceContext\n injector.installServices(ctx);\n\n // instantiate clients\n //injector.instantiateClients();\n\n // invoke DepWire methods with required services & clients\n injector.findDepWireMethodsAndPopulate();\n }", "public BlueMeshServiceBuilder uuid( UUID a_uuid ){\n uuid = a_uuid;\n return this;\n }", "public DepControlar() {\n \n initComponents();\n depservice = new DepService();\n }", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3 };\n\t\tmesh = new StaticMesh(gl, vertices, null, texCoords, indices);\n\t\tmesh.setPositionIndex(shader.getAttributeLocation(\"aVertexPosition\"));\n\t\tmesh.setNormalIndex(-1);\n\t\tmesh.setTexCoordIndex(shader.getAttributeLocation(\"aTextureCoord\"));\n\t\tmesh.setBeginMode(BeginMode.TRIANGLE_STRIP);\n\t}", "public PAServiceImpl (BundleContext bc) {\n this.bc = bc;\n \n // Read the default configuration file\n // TODO: Refactor the XSD schema and XML data file name constructors\n configReader = new XMLConfigParser(\n CWD_PATH + FILE_SEP + CONF_DIR + FILE_SEP + \"plugins.xml\",\n CWD_PATH + FILE_SEP + CONF_DIR + FILE_SEP + \"plugins.xsd\");\n // ... and retrieve all available metrics configurations\n if (configReader != null) {\n metricConfigurations = configReader.getMetricsConfiguration();\n }\n \n // Collect information about pre-existing metric services\n this.collectMetricsInfo();\n \n // Attach this object as a listener for metric services\n try {\n bc.addServiceListener(this, SREF_FILTER_METRIC);\n } catch (InvalidSyntaxException e) {\n logError(INVALID_FILTER_SYNTAX);\n }\n \n // Register an extension to the Equinox console, in order to\n // provide commands for managing metric services\n bc.registerService(\n CommandProvider.class.getName(),\n new PACommandProvider(this) ,\n null);\n }", "private void setupBTService(){\n btService = new BluetoothService(this, mHandler);\n\n // Initialize the buffer for outgoing messages\n outStringBuffer = new StringBuffer(\"\");\n\t}", "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 void service_INIT(){\n }", "public CMSFormClientServices() {\n // Set up the configuration manager.\n config = new ConfigMgr(\"form.cfg\");\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 }", "public GhostService(List<IDictionaryProvider> dictionaries,\n\t\t\tList<IGhostStrategy> strategies) {\n\t\tthis.dictionaries = dictionaries;\n\t\tthis.strategies = strategies;\n\t}", "public HangerSubsystem() {\n // WRITE CODE BETWEEN THESE LINES -------------------------------------------------------- //\n // TODO: configure and initialize motor (if necessary)\n\n // TODO: configure and initialize sensor (if necessary)\n\n // ^^-----------------------------------------------------------------------------------^^ //\n }", "protected void setup() {\n\t\t\t\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\t\t\t\tdfd.setName(getAID());\n\t\t\t\t\tServiceDescription sd = new ServiceDescription();\n\t\t\t\t\tsd.setType(\"wHOST\");\n\t\t\t\t\tsd.setName(\"wumpus-host-\" + Math.random());\n\t\t\t\t\tdfd.addServices(sd);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tDFService.register(this, dfd);\n\t\t\t\t\t\thostMap = new WumpusMapHost();\n\t\t\t\t\t\tSystem.out.println(\"Registered as a host in the DF Service.\");\n\t\t\t\t\t\tlogic = new WumpusLogic();\n\t\t\t\t\t\tlogic.setHostMap(hostMap.getMap());\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\tcatch (FIPAException fe) {\n\t\t\t\t\t\tfe.printStackTrace();\n\t\t\t\t\t}\n\t\t\n\t\t// Printing out a message stating that the agent is ready for service.\n\t\tSystem.out.println(\"Wumpus host \"+getAID().getName()+\" is ready.\");\n\t\t\n\t\taddBehaviour(new TickerBehaviour(this, 1000) {\n\t\t\tprotected void onTick() {\n\t\t\t\tmyAgent.addBehaviour(new HandleRequest());\n\t\t\t}\n\t\t});\n\t \t\n\t\t\n\t}", "public void InitService() {\n\t\ttry {\r\n\t\t\tgetCommManager().register(this); \r\n\t\t} catch (CommunicationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n protected void createMesh() {\n rayLight.getScope().add(camera);\n\n light = new PointLight(Color.GAINSBORO);\n light.setTranslateX(-300);\n light.setTranslateY(300);\n light.setTranslateZ(-2000);\n\n light2 = new PointLight(Color.ALICEBLUE);\n light2.setTranslateX(300);\n light2.setTranslateY(-300);\n light2.setTranslateZ(2000);\n\n light3 = new PointLight(Color.SPRINGGREEN);\n light3.setTranslateY(-2000);\n //create a target\n target1 = new Sphere(180);\n target1.setId(\"t1\");\n target1.setDrawMode(DrawMode.LINE);\n target1.setCullFace(CullFace.NONE);\n target1.setTranslateX(500);\n target1.setTranslateY(500);\n target1.setTranslateZ(500);\n target1.setMaterial(red);\n // create another target\n target2 = new Sphere(150);\n target2.setId(\"t2\");\n target2.setDrawMode(DrawMode.LINE);\n target2.setCullFace(CullFace.NONE);\n target2.setTranslateX(-500);\n target2.setTranslateY(-500);\n target2.setTranslateZ(-500);\n target2.setMaterial(blue);\n\n origin = new Box(20, 20, 20);\n origin.setDrawMode(DrawMode.LINE);\n origin.setCullFace(CullFace.NONE);\n \n model = new Group(target1, target2, origin, light, light2, light3, rayLight);\n }", "public static void setupServicesAndParameters(){\n\t\t//replace services in use, e.g.:\n\t\t/*\n\t\tMap<String, ArrayList<String>> systemInterviewServicesMap = new HashMap<>();\n\t\t\n\t\t//CONTROL DEVICES\n\t\tArrayList<String> controlDevice = new ArrayList<String>();\n\t\t\tcontrolDevice.add(MyDeviceControlService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.CONTROL, controlDevice);\n\t\t\n\t\t//BANKING\n\t\tArrayList<String> banking = new ArrayList<String>();\n\t\t\tbanking.add(MyBankingService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.BANKING, banking);\n\t\t\t\n\t\tInterviewServicesMap.loadCustom(systemInterviewServicesMap);\n\t\t*/\n\t\t\n\t\t//defaults\n\t\tStart.setupServicesAndParameters();\n\t\t\n\t\t//add\n\t\t//e.g.: ParameterConfig.setHandler(PARAMETERS.ALARM_NAME, Config.parentPackage + \".parameters.AlarmName\");\n\t}", "public InitService() {\n super(\"InitService\");\n }", "public FlightGearModel(Config config) {\n\t\tsuper();\n\t\tthis.config = config;\n\t}", "Service newService();", "public MeshPart() {\n\t}", "public TestService(ServiceConfiguration config) {\n this.config = config;\n System.out.println(\"starting service...\");\n this.start();\n }", "private MeshUtil() {}", "public DiscMesh() {\n this(1f, 25);\n }", "@Inject\n public BluetoothProbeFactory() {\n }", "public Farmerko()\n {\n Config.parseConfig();\n \n if (init_db())\n {\n initComponents();\n initSize();\n auto_log_in();\n }\n }", "public BudgetAccountServiceImpl() {\r\n\t}", "private void construct(){\n TriangleMesh mesh;\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/bunny.obj\");\n mesh.setMaterial(new MaterialNode(0.1f, 0.1f, .5f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/cube.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 0, 0));\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/teddy.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 0, 1, 0));\n mesh.setMaterial(new MaterialNode(0.1f, .5f, 0.1f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/sphere.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 1, 0));\n mesh.setMaterial(new MaterialNode(1, 0, 0, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n scene.calculateNormals();\n scene.setupRendering();\n }", "public BeerServiceClient(RestTemplateBuilder restTemplateBuilder) {\n this.restTemplate = restTemplateBuilder.build();\n }", "private void initiate(){\n carDef = new BodyDef();\n\t carDef.type = BodyType.DynamicBody;\n\n\t shape = new PolygonShape();\n\t shape.setAsBox(width*0.8f, height*0.9f, new Vector2(0,0),0);\t\n\n\t // fixture \t\n\t fixture = new FixtureDef();\n\t fixture.shape = shape;\n\t fixture.restitution = 0.75f; \n\t fixture.friction = 0.75f;\n\t fixture.density = 1;\n\n\t}", "private ModuleServiceImpl(){\n\t\t//initialize local data.\n\t\tfactories = new ConcurrentHashMap<String, IModuleFactory>();\n\t\tstorages = new ConcurrentHashMap<String, IModuleStorage>();\n\t\tcache = new ConcurrentHashMap<String, Module>();\n\t\tmoduleListeners = new ConcurrentHashMap<String, IModuleListener>();\n\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"Created new ModuleServiceImplementation\");\n\t\t}\n\n\t\tConfigurationManager.INSTANCE.configure(this);\n\t}", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void create() {\n\t\tthis.mesh = new Mesh(VertexDataType.VertexArray, false, 4, 6, \n\t\t\t\tnew VertexAttribute(VertexAttributes.Usage.Position, 3, \"attr_position\"));\n\n\t\tmesh.setVertices(new float[] {\n\t\t\t\t-8192f, -512f, 0,\n\t\t\t\t8192f, -512f, 0,\n\t\t\t\t8192f, 512f, 0,\n\t\t\t\t-8192f, 512f, 0\n\t\t});\n\t\tmesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\n\n\t\t// creates the camera\n\t\tcamera = new OrthographicCamera(CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\n\t\t// Sets the positions of the camera\n\t\tcamera.position.set(CoordinateConverter.getCameraWidth()/2, CoordinateConverter.getCameraHeight()/2, 0);\n\t\tcamera.update();\n\n\t\t// Sets how much of the map that is shown on the screen\n\t\tglViewport = new Rectangle(0, 0, CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\t\t\n\t}", "public ServiceAccessBean constructServices() throws Exception {\n\n\tif (services == null) {\t\n\t\t// Construct services bean\n\t\tif (getServicecode() != null) {\n\t\t\tservices = new ServiceAccessBean();\n\t\t\tservices.setInitKey_division(getServicecode().intValue());\n\t\t\tservices.refreshCopyHelper();\n\t\t}\n\t}\n\treturn services;\n}", "public BackendService build() {\n return new BackendService(super.buildUnknownFields());\n }", "public ServiceCompte() {\n\t\tsuper();\n\t}", "public Component(Reference xmlConfigReference) {\r\n this();\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n dbf.setNamespaceAware(false);\r\n dbf.setValidating(false);\r\n \r\n try {\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document document = db.parse(new FileInputStream(\r\n new LocalReference(xmlConfigReference).getFile()));\r\n \r\n // Look for clients\r\n NodeList clientNodes = document.getElementsByTagName(\"client\");\r\n \r\n for (int i = 0; i < clientNodes.getLength(); i++) {\r\n Node clientNode = clientNodes.item(i);\r\n Node item = clientNode.getAttributes().getNamedItem(\"protocol\");\r\n Client client = null;\r\n \r\n if (item == null) {\r\n item = clientNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (item != null) {\r\n String[] protocols = item.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n client = new Client(getContext(), protocolsList);\r\n }\r\n } else {\r\n client = new Client(getContext(), getProtocol(item\r\n .getNodeValue()));\r\n }\r\n \r\n if (client != null) {\r\n this.getClients().add(client);\r\n }\r\n }\r\n \r\n // Look for servers\r\n NodeList serverNodes = document.getElementsByTagName(\"server\");\r\n \r\n for (int i = 0; i < serverNodes.getLength(); i++) {\r\n Node serverNode = serverNodes.item(i);\r\n Node node = serverNode.getAttributes().getNamedItem(\"protocol\");\r\n Node portNode = serverNode.getAttributes().getNamedItem(\"port\");\r\n Server server = null;\r\n \r\n if (node == null) {\r\n node = serverNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (node != null) {\r\n String[] protocols = node.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n int port = getInt(portNode, Protocol.UNKNOWN_PORT);\r\n \r\n if (port == Protocol.UNKNOWN_PORT) {\r\n getLogger()\r\n .warning(\r\n \"Please specify a port when defining a list of protocols.\");\r\n } else {\r\n server = new Server(getContext(), protocolsList,\r\n getInt(portNode, Protocol.UNKNOWN_PORT),\r\n this.getServers().getTarget());\r\n }\r\n }\r\n } else {\r\n Protocol protocol = getProtocol(node.getNodeValue());\r\n server = new Server(getContext(), protocol, getInt(\r\n portNode, protocol.getDefaultPort()), this\r\n .getServers().getTarget());\r\n }\r\n \r\n if (server != null) {\r\n this.getServers().add(server);\r\n }\r\n \r\n // Look for default host\r\n NodeList defaultHostNodes = document\r\n .getElementsByTagName(\"defaultHost\");\r\n \r\n if (defaultHostNodes.getLength() > 0) {\r\n parseHost(this.getDefaultHost(), defaultHostNodes.item(0));\r\n }\r\n \r\n // Look for other virtual hosts\r\n NodeList hostNodes = document.getElementsByTagName(\"host\");\r\n \r\n for (int j = 0; j < hostNodes.getLength(); j++) {\r\n VirtualHost host = new VirtualHost();\r\n parseHost(host, hostNodes.item(j));\r\n this.getHosts().add(host);\r\n }\r\n }\r\n \r\n // Look for internal router\r\n NodeList internalRouterNodes = document\r\n .getElementsByTagName(\"internalRouter\");\r\n \r\n if (internalRouterNodes.getLength() > 0) {\r\n Node node = internalRouterNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\r\n \"defaultMatchingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setDefaultMatchingMode(\r\n getInt(item, getInternalRouter()\r\n .getDefaultMatchingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"maxAttempts\");\r\n if (item != null) {\r\n this.getInternalRouter().setMaxAttempts(\r\n getInt(item, this.getInternalRouter()\r\n .getMaxAttempts()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"routingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setRoutingMode(\r\n getInt(item, this.getInternalRouter()\r\n .getRoutingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"requiredScore\");\r\n if (item != null) {\r\n this.getInternalRouter().setRequiredScore(\r\n getFloat(item, this.getInternalRouter()\r\n .getRequiredScore()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"retryDelay\");\r\n if (item != null) {\r\n this.getInternalRouter().setRetryDelay(\r\n getLong(item, this.getInternalRouter()\r\n .getRetryDelay()));\r\n }\r\n \r\n // Loops the list of \"attach\" instructions\r\n setAttach(getInternalRouter(), node);\r\n }\r\n \r\n // Look for logService\r\n NodeList logServiceNodes = document\r\n .getElementsByTagName(\"logService\");\r\n \r\n if (logServiceNodes.getLength() > 0) {\r\n Node node = logServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"logFormat\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLogFormat(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"loggerName\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLoggerName(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getLogService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"identityCheck\");\r\n \r\n if (item != null) {\r\n this.getLogService().setIdentityCheck(\r\n getBoolean(item, true));\r\n }\r\n }\r\n \r\n // Look for statusService\r\n NodeList statusServiceNodes = document\r\n .getElementsByTagName(\"statusService\");\r\n \r\n if (statusServiceNodes.getLength() > 0) {\r\n Node node = statusServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"contactEmail\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setContactEmail(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"homeRef\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setHomeRef(\r\n new Reference(item.getNodeValue()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"overwrite\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setOverwrite(getBoolean(item, true));\r\n }\r\n }\r\n } catch (Exception e) {\r\n getLogger().log(Level.WARNING,\r\n \"Unable to parse the Component XML configuration.\", e);\r\n }\r\n }", "public DemoComponentManager() {\n this(PROJECT_ROOT_PATH, DEFAULT_EFFECTS_PATHS, DEFAULT_CALCULATORS_PATHS);\n }", "public void init()\n {\n boolean tHotspot = true;\n // Figures below valid for 1000TPS\n double tGcRateFactor = 1000.0D / ((1000.0D * 1000.0) * cClientTransPerMicro) ;\n if (tHotspot)\n {\n // tax average 6ms, max 65, every 20 seconds\n // me1 27ms, max 83ms, every 20 seconds\n // me1s 27ms, max 87, every 22seconds\n mTaxJvm = new GcService(9908.0D*1000 * tGcRateFactor, 9.0D*1000); \n mMeJvm = new GcService(2509.0D*1000 * tGcRateFactor, 17.0D*1000); \n mMeStandbyJvm = new GcService(2257.0D*1000 * tGcRateFactor, 15.0D*1000);\n }\n else\n {\n // Metronome \n mTaxJvm = new GcService(100*1000, 500);\n mMeJvm = new GcService(100*1000, 500);\n mMeStandbyJvm = new GcService(100*1000, 500);\n }\n\n String tName;\n mClient.init(new ServerConfig(mClient, mClientTaxNwDelay, \"Client\", cClientCount, cClientCount, 0.1));\n {\n mClientTaxNwDelay.init(new ServerConfig(mClientTaxNwDelay, mTaxTcp, \"ClientTaxNwDelay\", 1, 1, 0.1)); \n {\n tName = \"TaxServer\";\n mTaxTcp.init(new ServerConfig(mTaxJvm, mTaxTcp, mTaxPool, tName + \"_Tcp\", 1, 1, 22)); \n mTaxPool.init(new ServerConfig(mTaxJvm, mTaxPool, mTaxMeNwDelay, tName + \"_ServerPool\", 5, 150, 11)); \n\n {\n mTaxMeNwDelay.init(new ServerConfig(mTaxMeNwDelay, mMePrimaryTcp, \"TaxMeNwDelay\", 1, 1, 100)); \n {\n tName=\"MatchingEngine\";\n mMePrimaryTcp.init(new ServerConfig(mMeJvm, mMePrimaryTcp, mMePrimaryServerPool, tName + \"Tcp\", 1, 1, 14));\n mMePrimaryServerPool.init(new ServerConfig(mMeJvm, mMePrimaryServerPool, mMePrimarySorter, tName + \"_ServerPool\", 5, 150, 12)); \n mMePrimarySorter.init(new ServerConfig(mMeJvm, mMePrimarySorter, mMePrimaryChainUnit0, tName + \"_Sorter\", 1, 1, 13));\n mMePrimaryChainUnit0.init(new ServerConfig(mMeJvm, mMePrimaryChainUnit0, mMePrimaryPostChain, tName + \"_ChainUnit0\", 1, 1, 59)); \n mMePrimaryBatchSender.init(new ServerConfig(mMeJvm, mMePrimaryBatchSender, mMeMesNwDelay, tName + \"_BatchSender\", 10, 10, 1)); \n mMePrimaryRecoveryLog.init(new ServerConfig(mMeJvm, mMePrimaryRecoveryLog, mMePrimaryPostChain, tName + \"_RecoveryLog\", 1, 1, 50)); \n mMePrimaryPostChain.init(new ServerConfig(mMeJvm, mMePrimaryPostChain, mMePrimaryResponsePool, tName + \"_PostChain\", 1, 1, 46)); \n mMePrimaryResponsePool.init(new ServerConfig(mMeJvm, mMePrimaryResponsePool, mMeTaxNwDelay, tName + \"_ResponsePool\", 5, 25, 16)); \n\n {\n mMeMesNwDelay.init(new ServerConfig(mMeMesNwDelay, mMeStandbyTcp, \"MeMesNwDelay\", 1, 1, 90)); \n {\n tName=\"MatchingEngineStandby\";\n mMeStandbyTcp.init(new ServerConfig(mMeStandbyJvm, mMeStandbyTcp, mMeStandbyServerPool, tName + \"_Tcp\", 1, 1, 13)); \n mMeStandbyServerPool.init(new ServerConfig(mMeStandbyJvm, mMeStandbyServerPool, mMesMeNwDelay, tName + \"_ServerPool\", 5, 150, 18)); \n }\n mMesMeNwDelay.init(new ServerConfig(mMesMeNwDelay, mMePrimaryPostChain, \"MesMeNwDelay\", 1, 1, 90)); \n }\n }\n mMeTaxNwDelay.init(new ServerConfig(mMeTaxNwDelay, mTaxCollector, \"MeTaxNwDelay\", 1, 1, 100));\n }\n } \n mTaxCollector.init(new ServerConfig(mTaxJvm, mTaxCollector, mTaxClientNwDelay, tName + \"_Collector\", 1, 1, 0.1)); \n mTaxClientNwDelay.init(new ServerConfig(mTaxClientNwDelay, null, \"TaxClientNwDelay\", 1, 1, 0.1));\n }\n }", "protected void setup() {\n\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\tdfd.setName(getAID());\n\t\tServiceDescription sd = new ServiceDescription();\n\t\tsd.setType(\"paciente\");\n\t\tsd.setName(getName());\n\t\tdfd.addServices(sd);\n\t\ttry {\n\t\t\tDFService.register(this, dfd);\n\t\t} catch (FIPAException fe) {\n\t\t\tfe.printStackTrace();\n\t\t}\n\t\t\n\t\t// atualiza lista de monitores e atuadores\n\t\taddBehaviour(new UpdateAgentsTempBehaviour(this, INTERVALO_AGENTES));\n\t\t\n\t\t// ouve requisicoes dos atuadores e monitores\n\t\taddBehaviour(new ListenBehaviour());\n\t\t\n\t\t// adiciona comportamento de mudanca de temperatura\n\t\taddBehaviour(new UpdateTemperatureBehaviour(this, INTERVALO_ATUALIZACAO));\n\t\t\n\t\t// adiciona comportamento de mudanca de hemoglobina\t\t\n\t\taddBehaviour(new UpdateHemoglobinaBehaviour(this, INTERVALO_ATUALIZACAO));\n\t\t\n\t\t// adiciona comportamento de mudanca de bilirrubina\n\t\taddBehaviour(new UpdateBilirrubinaBehaviour(this, INTERVALO_ATUALIZACAO));\n\n\t\t// adiciona comportamento de mudanca de pressao\t\t\n\t\taddBehaviour(new UpdatePressaoBehaviour(this, INTERVALO_ATUALIZACAO));\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\tcolorSpeed = new GenericKnob(0.05f, scale(50), \"Color rotate speed\");\n\t\tbassBounce = new GenericKnob(0.7f, scale(50), \"Bass Bounce\");\n\t\trequestUserControl(colorSpeed);\n\t\trequestUserControl(bassBounce);\n\t\t\n\t\t// Set up a nice jazzy gradient!\n\t\tColor purple = new Color(255, 0, 128);\n\t\tColor nightBlue = new Color(0, 14, 122);\n\t\tgradient = new RGBGradientCompoundLinear(new Color[]{Color.BLUE, purple, nightBlue, Color.BLACK, Color.BLUE}, new double[]{0.0, 0.25, 0.5, 0.75, 1.0});\n\t\t\n\t\t\n\t}", "public void initiate() {\n\t\tallDepartments.put(HRDepartment.class.getSimpleName(), HRDepartment.getInstance());\n\t\tallDepartments.put(ProductionDepartment.class.getSimpleName(), ProductionDepartment.getInstance());\n\t\tallDepartments.put(WarehousingDepartment.class.getSimpleName(), WarehousingDepartment.getInstance());\n\t\tallDepartments.put(FinanceDepartment.class.getSimpleName(), FinanceDepartment.getInstance());\n\t\tallDepartments.put(MarketingDepartment.class.getSimpleName(), MarketingDepartment.getInstance());\n\t\tallDepartments.put(LogisticsDepartment.class.getSimpleName(), LogisticsDepartment.getInstance());\n\t\tallDepartments.put(ProcurementDepartment.class.getSimpleName(), ProcurementDepartment.getInstance());\n\t\tallDepartments.put(ResearchAndDevelopmentDepartment.class.getSimpleName(), ResearchAndDevelopmentDepartment.getInstance());\n\t\tallDepartments.put(SalesDepartment.class.getSimpleName(), SalesDepartment.getInstance());\n\n\t\tcustomerSatisfaction = CustomerSatisfaction.getInstance();\n\t\tcustomerDemand = CustomerDemand.getInstance();\n\t\texternalEvents = ExternalEvents.getInstance();\n\t\tcompanyEcoIndex = CompanyEcoIndex.getInstance();\n\t\tinternalFleet = InternalFleet.getInstance();\n\t\tbankingSystem = BankingSystem.getInstance();\n\t\tproductSupport = ProductSupport.getInstance();\n\t\temployeeGenerator = EmployeeGenerator.getInstance();\n\t\temployeeGenerator.setDepartment((HRDepartment) allDepartments.get(HRDepartment.class.getSimpleName()));\n\t}", "private ServiceFactory() {}", "public ServiceClient() {\n\t\tsuper();\n\t}", "public VehmonService() {\n }", "private void initConfigServices() {\n List<ServiceDTO> customizedConfigServices = getCustomizedConfigService();\n\n if (customizedConfigServices != null) {\n setConfigServices(customizedConfigServices);\n return;\n }\n\n // update from meta service\n this.tryUpdateConfigServices();\n this.schedulePeriodicRefresh();\n }", "private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}", "@Override\n\tpublic void init(EngineConfig config) throws ServiceException\n\t{\n\t\t\n\t}", "public void init() {\n configuration.init();\n \n //Connections connections = configuration.getBroker().getConnections(\"topic\");\n Connections connections = configuration.getBrokerPool().getBroker().getConnections(\"topic\");\n \n if (connections == null) {\n handleException(\"Couldn't find the connection factor: \" + \"topic\");\n }\n \n sensorCatalog = new SensorCatalog();\n clientCatalog = new ClientCatalog();\n \n nodeCatalog = new NodeCatalog();\n \n updateManager = new UpdateManager(configuration, sensorCatalog, this);\n updateManager.init();\n \n endpointAllocator = new EndpointAllocator(configuration, nodeCatalog);\n\n registry = new JCRRegistry(this);\n registry.init();\n\n // Initialize Public-End-Point\n if(!isPublicEndPointInit) {\n \tinitPublicEndpoint();\n }\n }", "protected void setup() {\n\t\tSystem.out.println(\"Broker Agent \"+getAID().getName()+\" is ready.\");\r\n\t\tthis.getContentManager().registerLanguage(new SLCodec());\r\n\t\tthis.getContentManager().registerOntology(RequestOntology.getInstance());\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\t\tif (args != null && args.length > 0) {\r\n\t\t\tprice = (String) args[0];\r\n\t\t\tvolume= (String) args[1];\r\n\t\t\t\r\n\t\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\t\tdfd.setName(getAID());\r\n\t\t\tServiceDescription sd = new ServiceDescription();\r\n\t\t\tsd.setType(\"energy-selling\");\r\n\t\t\tsd.setName(\"Energy-Broker\");\r\n\t\t\tdfd.addServices(sd);\r\n\t\t\ttry {\r\n\t\t\t\tDFService.register(this, dfd);\r\n\t\t\t}\r\n\t\t\tcatch (FIPAException fe) {\r\n\t\t\t\tfe.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(getAID().getName()+\" No available arguments\");\r\n\t\t\tdoDelete();\r\n\t\t}\r\n\t\taddBehaviour(new BOReply(this));\r\n\t}", "void init(ReflectionService reflectionService);", "public MesanaConfigurator()\n\t{ \n\t\tsetGui();\n\t\tif (ConnectionManager.getInstance().connectionState)\n\t\t{\n\t\t\t// initialize customer data and SensorData to GUI if sensor connected\n\t\t\ttry\n\t\t\t{\n\t\t\t\t//setData();\n\t\t\t\tstatusBar.setText(\"Sensor \" + ConnectionManager.getInstance().currentSensor(0).getSensorPath()\n\t\t\t\t\t\t+ \" has been connected successfully!\");\n\t\t\t\tfor(SensorData element :sCollect.getList())\n\t\t\t\t{\t\n\t\t\t\t\tif(element.getId().equals(ConnectionManager.getInstance().currentSensor(0).getSerialNumber()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!element.getState().equals(Constants.SENSOR_STATE_STOCK))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tconfigButton.setEnabled(false);\n\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}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SensorNotFoundException e)\n\t\t\t{\n\t\t\t\tstatusBar.setText(e.getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t\tsetGuiListeners();\n\t\tshell.pack();\n\n\t\twhile (!shell.isDisposed())\n\t\t{\n\t\t\tif (!display.readAndDispatch())\n\t\t\t\tdisplay.sleep();\n\t\t}\n\t\tdisplay.dispose();\n\n\t}", "public BaseCatalog()\n {\n System.out.println(\"BaseCatalog: BaseCatalog() ... a new service created\");\n _environment = new Environment();\n _layout = new PageLayout();\n _layoutProj = new LayoutProject();\n _layoutProj.setRegisteredEnvironment(_environment);\n _layoutProj.setRegisteredLayout(_layout);\n }", "public DirectProjectCPConfigServiceImpl() {\r\n // Empty\r\n }", "@PostConstruct\n public void init() {\n String[] commandPathPatterns = new String[]{\"classpath*:/commands/**\",\n \"classpath*:/crash/commands/**\"};\n\n // Patterns to use to look for configurations.\n String[] configPathPatterns = new String[]{\"classpath*:/crash/*\"};\n\n // Comma-separated list of commands to disable.\n String[] disabledCommands = new String[]{\"jpa*\", \"jdbc*\", \"jndi*\"};\n\n // Comma-separated list of plugins to disable. Certain plugins are disabled by default\n // based on the environment.\n String[] disabledPlugins = new String[0];\n\n FS commandFileSystem = createFileSystem(\n commandPathPatterns,\n disabledCommands);\n FS configurationFileSystem = createFileSystem(\n configPathPatterns, new String[0]);\n\n PluginDiscovery discovery = new BeanFactoryFilteringPluginDiscovery(\n this.resourceLoader.getClassLoader(), this.beanFactory,\n disabledPlugins);\n\n PluginContext context = new PluginContext(discovery,\n createPluginContextAttributes(), commandFileSystem,\n configurationFileSystem, this.resourceLoader.getClassLoader());\n\n context.refresh();\n start(context);\n }", "@Override\n public void init()\n throws InitializationException\n {\n // Create a default configuration.\n String[] def = new String[]\n {\n DEFAULT_RUN_DATA,\n DEFAULT_PARAMETER_PARSER,\n DEFAULT_COOKIE_PARSER\n };\n configurations.put(DEFAULT_CONFIG, def.clone());\n\n // Check other configurations.\n Configuration conf = getConfiguration();\n if (conf != null)\n {\n String key,value;\n String[] config;\n String[] plist = new String[]\n {\n RUN_DATA_KEY,\n PARAMETER_PARSER_KEY,\n COOKIE_PARSER_KEY\n };\n for (Iterator<String> i = conf.getKeys(); i.hasNext();)\n {\n key = i.next();\n value = conf.getString(key);\n int j = 0;\n for (String plistKey : plist)\n {\n if (key.endsWith(plistKey) && key.length() > plistKey.length() + 1)\n {\n key = key.substring(0, key.length() - plistKey.length() - 1);\n config = (String[]) configurations.get(key);\n if (config == null)\n {\n config = def.clone();\n configurations.put(key, config);\n }\n config[j] = value;\n break;\n }\n j++;\n }\n }\n }\n\n\t\tpool = (PoolService)TurbineServices.getInstance().getService(PoolService.ROLE);\n\n if (pool == null)\n {\n throw new InitializationException(\"RunData Service requires\"\n + \" configured Pool Service!\");\n }\n\n parserService = (ParserService)TurbineServices.getInstance().getService(ParserService.ROLE);\n\n if (parserService == null)\n {\n throw new InitializationException(\"RunData Service requires\"\n + \" configured Parser Service!\");\n }\n\n setInit(true);\n }", "private ServiceGen() {\n }", "public void init(Ball host) {\n\t\tdecoree.init(host);\n\t}", "private RadiusServiceStarter() {\n }", "CdapServiceInstanceConfiguration createCdapServiceInstanceConfiguration();", "private void configureServices(Environment environment){\n DaoCountry country = new DaoCountry(hibernateBundle.getSessionFactory());\n DaoAddress address = new DaoAddress(hibernateBundle.getSessionFactory());\n\n environment.jersey().register(new ServiceCountry(country));\n environment.jersey().register(new ServiceAddress(address));\n }", "@Override\n\tpublic void agentSetup() {\n\n\t\t// load the class names of each object\n\t\tString os = dagent.getOfferingStrategy().getClassname();\n\t\tString as = dagent.getAcceptanceStrategy().getClassname();\n\t\tString om = dagent.getOpponentModel().getClassname();\n\t\tString oms = dagent.getOMStrategy().getClassname();\n\n\t\t// createFrom the actual objects using reflexion\n\n\t\tofferingStrategy = BOAagentRepository.getInstance().getOfferingStrategy(os);\n\t\tacceptConditions = BOAagentRepository.getInstance().getAcceptanceStrategy(as);\n\t\topponentModel = BOAagentRepository.getInstance().getOpponentModel(om);\n\t\tomStrategy = BOAagentRepository.getInstance().getOMStrategy(oms);\n\n\t\t// init the components.\n\t\ttry {\n\t\t\topponentModel.init(negotiationSession, dagent.getOpponentModel().getParameters());\n\t\t\topponentModel.setOpponentUtilitySpace(fNegotiation);\n\t\t\tomStrategy.init(negotiationSession, opponentModel, dagent.getOMStrategy().getParameters());\n\t\t\tofferingStrategy.init(negotiationSession, opponentModel, omStrategy,\n\t\t\t\t\tdagent.getOfferingStrategy().getParameters());\n\t\t\tacceptConditions.init(negotiationSession, offeringStrategy, opponentModel,\n\t\t\t\t\tdagent.getAcceptanceStrategy().getParameters());\n\t\t\tacceptConditions.setOpponentUtilitySpace(fNegotiation);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// remove the reference to the information object such that the garbage\n\t\t// collector can remove it.\n\t\tdagent = null;\n\t}", "@Override\n\tpublic Service duplexstreamServiceInit(List<String> configList) {\n\t\treturn null;\n\t}", "@Override\r\n public void simpleInitApp() {\r\n PhysicsRigidBody.logger2.setLevel(Level.WARNING);\r\n\r\n cam.setLocation(new Vector3f(39f, 64f, 172f));\r\n cam.setRotation(new Quaternion(-0.013f, 0.98608f, -0.1254f, -0.1084f));\r\n flyCam.setMoveSpeed(100f);\r\n\r\n Material hiMat = MyAsset\r\n .createWireframeMaterial(assetManager, ColorRGBA.Red, 3f);\r\n Material loMat = MyAsset\r\n .createWireframeMaterial(assetManager, ColorRGBA.Green, 3f);\r\n\r\n // Add axes\r\n float axisLength = 30f;\r\n AxesVisualizer axes = new AxesVisualizer(assetManager, axisLength);\r\n axes.setLineWidth(AxesVisualizer.widthForSolid);\r\n rootNode.addControl(axes);\r\n axes.setEnabled(true);\r\n\r\n for (int i = 0; i < 1000; ++i) {\r\n float x = -50f + 100f * random.nextFloat();\r\n float z = -50f + 100f * random.nextFloat();\r\n float vz = test(x, z);\r\n\r\n PointMesh pointMesh = new PointMesh();\r\n pointMesh.setLocation(new Vector3f(x, 5f * vz, z));\r\n Geometry geometry = new Geometry(\"result\", pointMesh);\r\n if (vz > 1f) {\r\n geometry.setMaterial(hiMat);\r\n } else {\r\n geometry.setMaterial(loMat);\r\n }\r\n rootNode.attachChild(geometry);\r\n }\r\n }", "public RiftsawServiceLocator() {\n }", "public CheckEngineLightBuilder() {\r\n checkEngineLight = new CheckEngineLight();\r\n }", "SourceBuilder createService();", "@Override\n\tpublic Service duplexstreamDeliverMsgPluginManagerServiceInit(\n\t\t\tList<String> configList) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Service duplexstreamDeliverServiceInit(List<String> configList) {\n\t\treturn null;\n\t}", "public ServerService(){\n\t\tlogger.info(\"Initilizing the ServerService\");\n\t\tservers.put(1001, new Server(1001, \"Test Server1\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1002, new Server(1002, \"Test Server2\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1003, new Server(1003, \"Test Server3\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1004, new Server(1004, \"Test Server4\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tlogger.info(\"Initilizing the ServerService Done\");\n\t}", "static void configure() {\n float weight = (float) (Math.random() * 4000);\n System.out.println(\"Weight: \" + String.format(\"%.2f\", weight) + \"kg\");\n\n if (weight < 2000) {\n logisticsFactory = new RoadLogistics();\n } else {\n logisticsFactory = new SeaLogistics();\n }\n\n }", "private Mesh createMesh(final int pTrianglesCount) {\n\t\tfinal int pSpeed \t\t\t= 20;\n\t\tfinal int pVertexCount\t \t= Mesh.VERTEX_SIZE * pTrianglesCount * 3; \t\n\t\tfinal float pColor \t\t\t= new Color(0f,0f,0f).getABGRPackedFloat();\n\t\tfinal float pSegmentWidth \t= CAMERA_WIDTH/pTrianglesCount;\n\t\tfinal float[] pBufferData \t= new float[pVertexCount];\t\n\t\t\n\t\tmHeightOffsetCurrent = new float[pVertexCount];\t\t\n\t\t\n\t\t//create triangles \n\t\t// A--B\n\t\t// \\ |\n\t\t// \\|\n\t\t// C\n\t\t//\n\t\tint i = 0;\n\t\tfloat x = 0f;\n\t\tfinal float pInitialHeight = 400;\n\t\tfor (int triangleIndex = 0;triangleIndex<pTrianglesCount;triangleIndex++){\n\t\t\t //first triangle \n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = 0;\t\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\t\n\t\t\t \n\t\t\t i = i+3;\n\t\t\t x = x+pSegmentWidth;\n\t\t }\n\t\t \n\t\tfinal VertexBufferObjectManager VBOM = getVertexBufferObjectManager();\n\t\tfinal HighPerformanceMeshVertexBufferObject pMeshVBO = new HighPerformanceMeshVertexBufferObject(VBOM, pBufferData, pBufferData.length, DrawType.DYNAMIC, true, Mesh.VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT);\n\t\t\n//\t\tpMesh = new Mesh(0, 0,pVertexCount,DrawMode.TRIANGLES,pMeshVBO){\t\t\n//\t\t\t\n//\t\t\tfloat progress_x = 0;\n//\t\t\t\n//\t\t\t@Override\n//\t\t protected void onManagedUpdate(final float pSecondsElapsed) { \n//\t\t\t\tsuper.onManagedUpdate(pSecondsElapsed);\n//\t\t\t\tdrawBySine(pSecondsElapsed);\n//\t\t this.mMeshVertexBufferObject.setDirtyOnHardware(); // include this line\n//\t\t progress_x+=(pSpeed*pSecondsElapsed);\n//\t\t };\n//\t\t\t\n//\t\t\tvoid drawBySine(final float pSecondsElapsed){\n//\t\t\t\tfinal float[] pBuff = pMeshVBO.getBufferData();\n//\t\t\t\tfor (int i = 0;i<((pTrianglesCount)*3);i++){ //FIRST part of triangles \n//\t\t\t\t\tif (i%3==0||i==0||((i-1)%3==0)){\n//\t\t\t\t\t\t//every vertex (v0) of triangle must be connected to previous triangle at second vertex (v1) to prevent stairs\n//\t\t\t\t\t\tif (i%3==0&&i>0){ \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = mHeightOffsetCurrent[i-2];\n//\t\t\t\t\t\t} else { \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = getNormalizedSine(i+progress_x, mTouchY, pTrianglesCount*3);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t} \n//\t\t\t\t\tpBuff[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = mHeightOffsetCurrent[i];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\t\n//\t\t\tfloat getNormalizedSine(float x, float halfY, float maxX) {\t\n//\t\t\t double factor = (2 * Math.PI) / maxX;\n//\t\t\t return (float) ((Math.sin(x * factor) * halfY) + halfY);\n//\t\t\t}\n//\t\t\t\n//\t\t};\n\t\treturn pMesh;\n\t}", "private ServiceGenerator() {\n }", "protected void initializeServices() throws Exception {\n String fileName = this.getClass().getSimpleName() + \"Output.csv\";\r\n outputFile = new File(fileName); // located in current run dir \r\n getOutputFile().delete(); // delete any previous version\r\n \r\n // Configure system properties for Velo to work properly (can also be provided as runtime args)\r\n System.setProperty(\"logfile.path\", \"./velo.log\");\r\n if(repositoryPropertiesFile == null) {\r\n System.setProperty(\"repository.properties.path\", \"./repository.properties\");\r\n } else {\r\n System.setProperty(\"repository.properties.path\", repositoryPropertiesFile.getAbsolutePath()); \r\n }\r\n \r\n // Initialize the spring container\r\n if(cmsServicesFile == null && tifServicesFile == null) {\r\n SpringContainerInitializer.loadBeanContainerFromClasspath(null);\r\n \r\n } else {\r\n List<String> beanFilePaths = new ArrayList<String>();\r\n if(cmsServicesFile != null) {\r\n beanFilePaths.add(\"file:\" + cmsServicesFile.getAbsolutePath());\r\n }\r\n if(tifServicesFile != null) {\r\n beanFilePaths.add(\"file:\" + tifServicesFile.getAbsolutePath());\r\n }\r\n SpringContainerInitializer.loadBeanContainerFromFilesystem(beanFilePaths.toArray(new String[beanFilePaths.size()]));\r\n }\r\n \r\n // set the service classes\r\n securityManager = CmsServiceLocator.getSecurityManager();\r\n resourceManager = CmsServiceLocator.getResourceManager();\r\n searchManager = CmsServiceLocator.getSearchManager();\r\n notificationManager = CmsServiceLocator.getNotificationManager();\r\n \r\n if(tifServicesFile != null) {\r\n jobLaunchService = TifServiceLocator.getJobLaunchingService();\r\n codeRegistry = TifServiceLocator.getCodeRegistry();\r\n machineRegistry = TifServiceLocator.getMachineRegistry();\r\n scriptRegistry = TifServiceLocator.getScriptRegistry();\r\n jobConfigService = TifServiceLocator.getJobConfigService();\r\n veloWorkspace = TifServiceLocator.getVeloWorkspace();\r\n }\r\n \r\n \r\n securityManager.login(username, password);\r\n\r\n }", "public borFactoryImpl() {\n\t\tsuper();\n\t}", "public RemoteFacadeServiceLocator() {\r\n }", "private BluetoothSettings() {\n }", "public void initialize(AccessServiceConfig accessServiceConfigurationProperties,\n OMRSTopicConnector enterpriseOMRSTopicConnector,\n OMRSRepositoryConnector enterpriseOMRSRepositoryConnector,\n AuditLog auditLog,\n String serverUserName) throws OMAGConfigurationErrorException {\n final String actionDescription = \"initialize\";\n\n auditLog.logMessage(actionDescription, GovernanceEngineAuditCode.SERVICE_INITIALIZING.getMessageDefinition());\n\n this.auditLog = auditLog;\n\n try {\n List<String> supportedZones = this.extractSupportedZones(\n accessServiceConfigurationProperties.getAccessServiceOptions(),\n accessServiceConfigurationProperties.getAccessServiceName(),\n auditLog);\n\n this.instance = new GovernanceEngineServicesInstance(enterpriseOMRSRepositoryConnector,\n supportedZones,\n auditLog,\n serverUserName,\n enterpriseOMRSRepositoryConnector.getMaxPageSize());\n this.serverName = instance.getServerName();\n\n /*\n * Only set up the listening and event publishing if requested in the config.\n */\n OpenMetadataTopicConnector outTopicConnector = null;\n\n if (accessServiceConfigurationProperties.getAccessServiceOutTopic() != null) {\n outTopicConnector = super.getOutTopicEventBusConnector(accessServiceConfigurationProperties.getAccessServiceOutTopic(),\n AccessServiceDescription.GOVERNANCE_ENGINE_OMAS.getAccessServiceFullName(),\n auditLog);\n }\n\n\n if (accessServiceConfigurationProperties.getAccessServiceOutTopic() != null) {\n GovernanceEngineOMRSTopicListener omrsTopicListener =\n new GovernanceEngineOMRSTopicListener(outTopicConnector,\n enterpriseOMRSRepositoryConnector.getRepositoryHelper(),\n enterpriseOMRSRepositoryConnector.getRepositoryValidator(),\n accessServiceConfigurationProperties.getAccessServiceName(),\n serverName,\n serverUserName,\n supportedZones,\n auditLog);\n super.registerWithEnterpriseTopic(accessServiceConfigurationProperties.getAccessServiceName(),\n serverName,\n enterpriseOMRSTopicConnector,\n omrsTopicListener,\n auditLog);\n }\n\n auditLog.logMessage(actionDescription, GovernanceEngineAuditCode.SERVICE_INITIALIZED.getMessageDefinition());\n } catch (OMAGConfigurationErrorException error) {\n throw error;\n } catch (Throwable error) {\n auditLog.logException(actionDescription,\n GovernanceEngineAuditCode.SERVICE_INSTANCE_FAILURE.getMessageDefinition(error.getMessage()),\n error);\n\n super.throwUnexpectedInitializationException(actionDescription,\n AccessServiceDescription.GOVERNANCE_ENGINE_OMAS.getAccessServiceFullName(),\n error);\n }\n }", "private ServiceConstructorArguments(\n Class<? extends Service> implementation,\n Class<?> configClass,\n String configID,\n Object config,\n String serviceID,\n Class<? extends Service> serviceClass,\n Service serviceInstance\n ) {\n this.implementation = implementation;\n this.configClass = configClass;\n this.configID = configID;\n this.config = config;\n this.serviceID = serviceID;\n this.serviceClass = serviceClass;\n this.serviceInstance = serviceInstance;\n }", "public FloodlightModuleContext() {\n\t\tserviceMap = \n\t\t new HashMap<Class<? extends IFloodlightService>,\n\t\t IFloodlightService>();\n\t\tconfigParams =\n\t\t new HashMap<Class<? extends IFloodlightModule>,\n\t\t Map<String, String>>();\n\t}", "public void forceServiceInstantiation()\n {\n getService();\n\n _serviceModelObject.instantiateService();\n }", "public Service() {\n if (peers[0] == null) {\n Service.peers[0] = new Peer(clave7);\n Service.peers[1] = new Peer(clave8);\n Service.peers[2] = new Peer(clave9);\n Service.peers[0].addPeer(new EntradaTEncam(clave1, HOSTS[0], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave2, HOSTS[0], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave3, HOSTS[0], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave4, HOSTS[1], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave5, HOSTS[1], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave6, HOSTS[1], PUERTO));\n //Service.peers[0].addPeer(new EntradaTEncam(clave7, HOSTS[2], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave8, HOSTS[2], PUERTO));\n Service.peers[0].addPeer(new EntradaTEncam(clave9, HOSTS[2], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave1, HOSTS[0], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave2, HOSTS[0], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave3, HOSTS[0], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave4, HOSTS[1], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave5, HOSTS[1], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave6, HOSTS[1], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave7, HOSTS[2], PUERTO));\n //Service.peers[1].addPeer(new EntradaTEncam(clave8, HOSTS[2], PUERTO));\n Service.peers[1].addPeer(new EntradaTEncam(clave9, HOSTS[2], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave1, HOSTS[0], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave2, HOSTS[0], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave3, HOSTS[0], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave4, HOSTS[1], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave5, HOSTS[1], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave6, HOSTS[1], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave7, HOSTS[2], PUERTO));\n Service.peers[2].addPeer(new EntradaTEncam(clave8, HOSTS[2], PUERTO));\n //Service.peers[2].addPeer(new EntradaTEncam(clave9, HOSTS[2], PUERTO));\n }\n }", "public GhostManager(int numberOfGhost, Location center, Double radiusBoundary){\n // TODO: Germaine is working on this\n }", "private void initServices() {\n PortletServiceFactory factory = SportletServiceFactory.getInstance();\n // Get instance of password manager service\n try {\n this.userManager =\n (UserManagerService)\n factory.createPortletService(UserManagerService.class, null, true);\n } catch (Exception e) {\n _log.error(\"Unable to get instance of password manager service!\", e);\n }\n }", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "private void init(RunTimeSingleton glob, I_ServiceManager manager, String type_, String version_,\n ContextNode contextNode) throws ServiceManagerException {\n this.glob = glob;\n\n if (type_ == null) {\n log.debug(\"Service type is null, ignoring Service\");\n return;\n }\n this.type = type_.trim();\n this.version = (version_ == null) ? \"1.0\" : version_.trim();\n\n if (manager == null) return;\n\n propertyName = manager.getName();\n ME = \"ServiceInfo-\"+propertyName;\n\n if (ignoreService()) {\n log.debug(\"Service type set to 'undef', ignoring Service\");\n return;\n }\n\n // propertyKey=\"ProtocolService[IOR][1.0]\"\n propertyKey = manager.createServicePropertyKey(type, version);\n \n // Search for e.g. \"ProtocolService[IOR][1.0]\" or \"/ehrserver/node/heron/ProtocolService[IOR][1.0]\"\n String defaultClass = \"EhrSOABaseService\";\n PropString prop = new PropString(defaultClass);\n /*String usedPropertyKey =*/prop.setFromEnv(glob, contextNode, propertyKey);\n \n log.debug(\"Trying contextNode=\" + ((contextNode==null)?\"null\":contextNode.getRelativeName()) + \" propertyKey=\" + propertyKey);\n\n String rawString = prop.getValue();\n\n if (rawString==null) {\n if (this.type != null) {\n log.debug(\"Service '\" + toString() + \"' not found, giving up.\");\n throw new ServiceManagerException(glob, SysErrorCode.RESOURCE_CONFIGURATION, ME, \"Service '\" + toString() + \"' not found, please check your configuration\");\n }\n rawString = manager.getDefaultServiceName(this.type, this.version);\n }\n\n parsePropertyValue(rawString);\n }", "public void start(){\n CoffeeMakerHelper coffeeMakerHelper = new CoffeeMakerHelper(inputArgs[0]);\n coffeeMakerService = coffeeMakerHelper.parseJsonFile();\n computeCoffeeMaker();\n }", "public ComponentsFactory() {\n\t\tsuper();\n\t}", "@Override\n protected void reconfigureService() {\n }", "GLMesh(BindStates bindStates, IOpenGL opengl)\n {\n this.bindStates = bindStates;\n this.opengl = opengl;\n }", "public Mesh() {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n }", "public Mesh() {\n this(DEFAULT_COORDS);\n }", "public Collection<Service> createServices();" ]
[ "0.58145535", "0.5553717", "0.5517069", "0.5490229", "0.54254", "0.5410262", "0.53921306", "0.5333576", "0.5330773", "0.5330374", "0.53183055", "0.53069955", "0.5290922", "0.52705234", "0.5259448", "0.52270913", "0.52036196", "0.5199948", "0.5195302", "0.51784676", "0.5176328", "0.5170795", "0.5170166", "0.5148348", "0.5147277", "0.51361567", "0.513271", "0.5131112", "0.5130457", "0.5115045", "0.5113395", "0.5100283", "0.50998616", "0.509945", "0.5095517", "0.5093643", "0.5083019", "0.50816876", "0.5068542", "0.5064187", "0.5061939", "0.50569457", "0.5044102", "0.5041978", "0.5031581", "0.5018649", "0.5016718", "0.50089306", "0.50035673", "0.5000257", "0.49898627", "0.49834713", "0.49809507", "0.49718243", "0.49668092", "0.49347684", "0.49335596", "0.493133", "0.49290988", "0.4923613", "0.49223247", "0.4920515", "0.49094278", "0.48947787", "0.48935443", "0.4893131", "0.48895392", "0.4887501", "0.4886675", "0.4880013", "0.48797223", "0.48775607", "0.48728395", "0.4868507", "0.48636293", "0.48606518", "0.485933", "0.48572552", "0.48463607", "0.48462063", "0.48443478", "0.48436344", "0.48433414", "0.4839922", "0.48354977", "0.48335427", "0.48278818", "0.48239577", "0.48234713", "0.48234156", "0.48220712", "0.48216993", "0.4815038", "0.48123989", "0.48113427", "0.48107302", "0.48080322", "0.48047212", "0.4804325", "0.4800358" ]
0.7597312
0
used by subclass NNCategory_3
public String preview(HttpServletRequest request, Campaign campaign) throws Exception { throw new Exception("Base class preview with Campaign - not implemented"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getCategory();", "public abstract String getCategory();", "@Override\r\n public String getCategory() throws Exception\r\n {\n return null;\r\n }", "@Override\n public String getCategoryLabel() {\n return categoryLabel;\n }", "public interface LdCDef extends Classification {\n\n /** The empty array for no sisters. */\n String[] EMPTY_SISTERS = new String[]{};\n\n /** The empty map for no sub-items. */\n @SuppressWarnings(\"unchecked\")\n Map<String, Object> EMPTY_SUB_ITEM_MAP = (Map<String, Object>)Collections.EMPTY_MAP;\n\n /**\n * はいいいえを示す\n */\n public enum YesNo implements LdCDef {\n /** y */\n y(\"y\", \"y\", EMPTY_SISTERS)\n ,\n /** n */\n n(\"n\", \"n\", EMPTY_SISTERS)\n ;\n private static final Map<String, YesNo> _codeValueMap = new HashMap<String, YesNo>();\n static {\n for (YesNo value : values()) {\n _codeValueMap.put(value.code().toLowerCase(), value);\n for (String sister : value.sisters()) { _codeValueMap.put(sister.toLowerCase(), value); }\n }\n }\n private String _code; private String _alias; private String[] _sisters;\n private YesNo(String code, String alias, String[] sisters)\n { _code = code; _alias = alias; _sisters = sisters; }\n public String code() { return _code; } public String alias() { return _alias; }\n private String[] sisters() { return _sisters; }\n public Map<String, Object> subItemMap() { return EMPTY_SUB_ITEM_MAP; }\n public ClassificationMeta meta() { return LdCDef.DefMeta.YesNo; }\n\n public boolean inGroup(String groupName) {\n return false;\n }\n\n /**\n * Get the classification by the code. (CaseInsensitive)\n * @param code The value of code, which is case-insensitive. (NullAllowed: if null, returns null)\n * @return The instance of the corresponding classification to the code. (NullAllowed: if not found, returns null)\n */\n public static YesNo codeOf(Object code) {\n if (code == null) { return null; }\n if (code instanceof YesNo) { return (YesNo)code; }\n return _codeValueMap.get(code.toString().toLowerCase());\n }\n\n /**\n * Get the classification by the name (also called 'value' in ENUM world).\n * @param name The string of name, which is case-sensitive. (NullAllowed: if null, returns null)\n * @return The instance of the corresponding classification to the name. (NullAllowed: if not found, returns null)\n */\n public static YesNo nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }\n\n /**\n * Get the list of all classification elements. (returns new copied list)\n * @return The list of all classification elements. (NotNull)\n */\n public static List<YesNo> listAll() {\n return new ArrayList<YesNo>(Arrays.asList(values()));\n }\n\n /**\n * Get the list of classification elements in the specified group. (returns new copied list) <br />\n * @param groupName The string of group name, which is case-sensitive. (NullAllowed: if null, returns empty list)\n * @return The list of classification elements in the group. (NotNull)\n */\n public static List<YesNo> groupOf(String groupName) {\n return new ArrayList<YesNo>(4);\n }\n\n @Override public String toString() { return code(); }\n }\n\n /**\n * 蔵書の状態を示す\n */\n public enum CollectionStatus implements LdCDef {\n /** NOR: 通常状態を示す */\n NOR(\"NOR\", \"NOR\", EMPTY_SISTERS)\n ,\n /** WAT: 待ち状態を示す */\n WAT(\"WAT\", \"WAT\", EMPTY_SISTERS)\n ,\n /** OUT: 貸し出し中を示す */\n OUT(\"OUT\", \"OUT\", EMPTY_SISTERS)\n ;\n private static final Map<String, CollectionStatus> _codeValueMap = new HashMap<String, CollectionStatus>();\n static {\n for (CollectionStatus value : values()) {\n _codeValueMap.put(value.code().toLowerCase(), value);\n for (String sister : value.sisters()) { _codeValueMap.put(sister.toLowerCase(), value); }\n }\n }\n private String _code; private String _alias; private String[] _sisters;\n private CollectionStatus(String code, String alias, String[] sisters)\n { _code = code; _alias = alias; _sisters = sisters; }\n public String code() { return _code; } public String alias() { return _alias; }\n private String[] sisters() { return _sisters; }\n public Map<String, Object> subItemMap() { return EMPTY_SUB_ITEM_MAP; }\n public ClassificationMeta meta() { return LdCDef.DefMeta.CollectionStatus; }\n\n public boolean inGroup(String groupName) {\n return false;\n }\n\n /**\n * Get the classification by the code. (CaseInsensitive)\n * @param code The value of code, which is case-insensitive. (NullAllowed: if null, returns null)\n * @return The instance of the corresponding classification to the code. (NullAllowed: if not found, returns null)\n */\n public static CollectionStatus codeOf(Object code) {\n if (code == null) { return null; }\n if (code instanceof CollectionStatus) { return (CollectionStatus)code; }\n return _codeValueMap.get(code.toString().toLowerCase());\n }\n\n /**\n * Get the classification by the name (also called 'value' in ENUM world).\n * @param name The string of name, which is case-sensitive. (NullAllowed: if null, returns null)\n * @return The instance of the corresponding classification to the name. (NullAllowed: if not found, returns null)\n */\n public static CollectionStatus nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }\n\n /**\n * Get the list of all classification elements. (returns new copied list)\n * @return The list of all classification elements. (NotNull)\n */\n public static List<CollectionStatus> listAll() {\n return new ArrayList<CollectionStatus>(Arrays.asList(values()));\n }\n\n /**\n * Get the list of classification elements in the specified group. (returns new copied list) <br />\n * @param groupName The string of group name, which is case-sensitive. (NullAllowed: if null, returns empty list)\n * @return The list of classification elements in the group. (NotNull)\n */\n public static List<CollectionStatus> groupOf(String groupName) {\n return new ArrayList<CollectionStatus>(4);\n }\n\n @Override public String toString() { return code(); }\n }\n\n /**\n * 登録モジュールタイプ\n */\n public enum RegisterModuleType implements LdCDef {\n /** Online: Online Module */\n Online(\"OLN\", \"Online\", EMPTY_SISTERS)\n ,\n /** Batch: Batch Module */\n Batch(\"BTC\", \"Batch\", EMPTY_SISTERS)\n ;\n private static final Map<String, RegisterModuleType> _codeValueMap = new HashMap<String, RegisterModuleType>();\n static {\n for (RegisterModuleType value : values()) {\n _codeValueMap.put(value.code().toLowerCase(), value);\n for (String sister : value.sisters()) { _codeValueMap.put(sister.toLowerCase(), value); }\n }\n }\n private String _code; private String _alias; private String[] _sisters;\n private RegisterModuleType(String code, String alias, String[] sisters)\n { _code = code; _alias = alias; _sisters = sisters; }\n public String code() { return _code; } public String alias() { return _alias; }\n private String[] sisters() { return _sisters; }\n public Map<String, Object> subItemMap() { return EMPTY_SUB_ITEM_MAP; }\n public ClassificationMeta meta() { return LdCDef.DefMeta.RegisterModuleType; }\n\n public boolean inGroup(String groupName) {\n return false;\n }\n\n /**\n * Get the classification by the code. (CaseInsensitive)\n * @param code The value of code, which is case-insensitive. (NullAllowed: if null, returns null)\n * @return The instance of the corresponding classification to the code. (NullAllowed: if not found, returns null)\n */\n public static RegisterModuleType codeOf(Object code) {\n if (code == null) { return null; }\n if (code instanceof RegisterModuleType) { return (RegisterModuleType)code; }\n return _codeValueMap.get(code.toString().toLowerCase());\n }\n\n /**\n * Get the classification by the name (also called 'value' in ENUM world).\n * @param name The string of name, which is case-sensitive. (NullAllowed: if null, returns null)\n * @return The instance of the corresponding classification to the name. (NullAllowed: if not found, returns null)\n */\n public static RegisterModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }\n\n /**\n * Get the list of all classification elements. (returns new copied list)\n * @return The list of all classification elements. (NotNull)\n */\n public static List<RegisterModuleType> listAll() {\n return new ArrayList<RegisterModuleType>(Arrays.asList(values()));\n }\n\n /**\n * Get the list of classification elements in the specified group. (returns new copied list) <br />\n * @param groupName The string of group name, which is case-sensitive. (NullAllowed: if null, returns empty list)\n * @return The list of classification elements in the group. (NotNull)\n */\n public static List<RegisterModuleType> groupOf(String groupName) {\n return new ArrayList<RegisterModuleType>(4);\n }\n\n @Override public String toString() { return code(); }\n }\n\n /**\n * 更新モジュールタイプ\n */\n public enum UpdateModuleType implements LdCDef {\n /** Online: Online Module */\n Online(\"OLN\", \"Online\", EMPTY_SISTERS)\n ,\n /** Batch: Batch Module */\n Batch(\"BTC\", \"Batch\", EMPTY_SISTERS)\n ;\n private static final Map<String, UpdateModuleType> _codeValueMap = new HashMap<String, UpdateModuleType>();\n static {\n for (UpdateModuleType value : values()) {\n _codeValueMap.put(value.code().toLowerCase(), value);\n for (String sister : value.sisters()) { _codeValueMap.put(sister.toLowerCase(), value); }\n }\n }\n private String _code; private String _alias; private String[] _sisters;\n private UpdateModuleType(String code, String alias, String[] sisters)\n { _code = code; _alias = alias; _sisters = sisters; }\n public String code() { return _code; } public String alias() { return _alias; }\n private String[] sisters() { return _sisters; }\n public Map<String, Object> subItemMap() { return EMPTY_SUB_ITEM_MAP; }\n public ClassificationMeta meta() { return LdCDef.DefMeta.UpdateModuleType; }\n\n public boolean inGroup(String groupName) {\n return false;\n }\n\n /**\n * Get the classification by the code. (CaseInsensitive)\n * @param code The value of code, which is case-insensitive. (NullAllowed: if null, returns null)\n * @return The instance of the corresponding classification to the code. (NullAllowed: if not found, returns null)\n */\n public static UpdateModuleType codeOf(Object code) {\n if (code == null) { return null; }\n if (code instanceof UpdateModuleType) { return (UpdateModuleType)code; }\n return _codeValueMap.get(code.toString().toLowerCase());\n }\n\n /**\n * Get the classification by the name (also called 'value' in ENUM world).\n * @param name The string of name, which is case-sensitive. (NullAllowed: if null, returns null)\n * @return The instance of the corresponding classification to the name. (NullAllowed: if not found, returns null)\n */\n public static UpdateModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }\n\n /**\n * Get the list of all classification elements. (returns new copied list)\n * @return The list of all classification elements. (NotNull)\n */\n public static List<UpdateModuleType> listAll() {\n return new ArrayList<UpdateModuleType>(Arrays.asList(values()));\n }\n\n /**\n * Get the list of classification elements in the specified group. (returns new copied list) <br />\n * @param groupName The string of group name, which is case-sensitive. (NullAllowed: if null, returns empty list)\n * @return The list of classification elements in the group. (NotNull)\n */\n public static List<UpdateModuleType> groupOf(String groupName) {\n return new ArrayList<UpdateModuleType>(4);\n }\n\n @Override public String toString() { return code(); }\n }\n\n public enum DefMeta implements ClassificationMeta {\n /** はいいいえを示す */\n YesNo\n ,\n /** 蔵書の状態を示す */\n CollectionStatus\n ,\n /** 登録モジュールタイプ */\n RegisterModuleType\n ,\n /** 更新モジュールタイプ */\n UpdateModuleType\n ;\n public String classificationName() {\n return name(); // same as definition name\n }\n\n public Classification codeOf(Object code) {\n if (\"YesNo\".equals(name())) { return LdCDef.YesNo.codeOf(code); }\n if (\"CollectionStatus\".equals(name())) { return LdCDef.CollectionStatus.codeOf(code); }\n if (\"RegisterModuleType\".equals(name())) { return LdCDef.RegisterModuleType.codeOf(code); }\n if (\"UpdateModuleType\".equals(name())) { return LdCDef.UpdateModuleType.codeOf(code); }\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }\n\n public Classification nameOf(String name) {\n if (\"YesNo\".equals(name())) { return LdCDef.YesNo.valueOf(name); }\n if (\"CollectionStatus\".equals(name())) { return LdCDef.CollectionStatus.valueOf(name); }\n if (\"RegisterModuleType\".equals(name())) { return LdCDef.RegisterModuleType.valueOf(name); }\n if (\"UpdateModuleType\".equals(name())) { return LdCDef.UpdateModuleType.valueOf(name); }\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }\n\n public List<Classification> listAll() {\n if (\"YesNo\".equals(name())) { return toClassificationList(LdCDef.YesNo.listAll()); }\n if (\"CollectionStatus\".equals(name())) { return toClassificationList(LdCDef.CollectionStatus.listAll()); }\n if (\"RegisterModuleType\".equals(name())) { return toClassificationList(LdCDef.RegisterModuleType.listAll()); }\n if (\"UpdateModuleType\".equals(name())) { return toClassificationList(LdCDef.UpdateModuleType.listAll()); }\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }\n\n public List<Classification> groupOf(String groupName) {\n if (\"YesNo\".equals(name())) { return toClassificationList(LdCDef.YesNo.groupOf(groupName)); }\n if (\"CollectionStatus\".equals(name())) { return toClassificationList(LdCDef.CollectionStatus.groupOf(groupName)); }\n if (\"RegisterModuleType\".equals(name())) { return toClassificationList(LdCDef.RegisterModuleType.groupOf(groupName)); }\n if (\"UpdateModuleType\".equals(name())) { return toClassificationList(LdCDef.UpdateModuleType.groupOf(groupName)); }\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }\n\n @SuppressWarnings(\"unchecked\")\n private List<Classification> toClassificationList(List<?> clsList) {\n return (List<Classification>)clsList;\n }\n\n public ClassificationCodeType codeType() {\n if (\"YesNo\".equals(name())) { return ClassificationCodeType.String; }\n if (\"CollectionStatus\".equals(name())) { return ClassificationCodeType.String; }\n if (\"RegisterModuleType\".equals(name())) { return ClassificationCodeType.String; }\n if (\"UpdateModuleType\".equals(name())) { return ClassificationCodeType.String; }\n return ClassificationCodeType.String; // as default\n }\n\n public ClassificationUndefinedHandlingType undefinedHandlingType() {\n if (\"YesNo\".equals(name())) { return ClassificationUndefinedHandlingType.EXCEPTION; }\n if (\"CollectionStatus\".equals(name())) { return ClassificationUndefinedHandlingType.EXCEPTION; }\n if (\"RegisterModuleType\".equals(name())) { return ClassificationUndefinedHandlingType.EXCEPTION; }\n if (\"UpdateModuleType\".equals(name())) { return ClassificationUndefinedHandlingType.EXCEPTION; }\n return ClassificationUndefinedHandlingType.LOGGING; // as default\n }\n }\n}", "String category();", "public boolean isNChannel() {\n/* 107 */ return \"NChannel\".equals(this.dictionary.getNameAsString(COSName.SUBTYPE));\n/* */ }", "protected String customIconSet(Object inNode)\n\t{\n\t\treturn null;\n\t}", "@Override\n public CommandCategory getCat() {\n return super.getCat();\n }", "public abstract String getChildTitle();", "@Test\n public void test68() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"8pY%wg3-9N4;)\");\n combinedRangeCategoryPlot0.setDomainAxis(3, (CategoryAxis) subCategoryAxis0, true);\n }", "@Test\n public void test22() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n CategoryAxis[] categoryAxisArray0 = new CategoryAxis[2];\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"Null 'marker' not permitted.\");\n categoryAxisArray0[0] = (CategoryAxis) extendedCategoryAxis0;\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D();\n categoryAxisArray0[1] = (CategoryAxis) categoryAxis3D0;\n combinedRangeCategoryPlot0.setDomainAxes(categoryAxisArray0);\n }", "public String[] getCategoryList(){\n return new String[]{\n \"Macros\",\n \"Instrument Type\",\n \"TOF_NSCD\",\n \"NEW_SNS\"\n };\n }", "public final Class<? extends Attribute> getCategory() {\n/* 219 */ return (Class)SheetCollate.class;\n/* */ }", "public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) {\n/* */ double x1;\n/* 228 */ if (!getItemVisible(row, column)) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 234 */ if (!(dataset instanceof StatisticalCategoryDataset)) {\n/* 235 */ super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass);\n/* */ \n/* */ return;\n/* */ } \n/* */ \n/* 240 */ int visibleRow = state.getVisibleSeriesIndex(row);\n/* 241 */ if (visibleRow < 0) {\n/* */ return;\n/* */ }\n/* 244 */ int visibleRowCount = state.getVisibleSeriesCount();\n/* */ \n/* 246 */ StatisticalCategoryDataset statDataset = (StatisticalCategoryDataset)dataset;\n/* */ \n/* 248 */ Number meanValue = statDataset.getMeanValue(row, column);\n/* 249 */ if (meanValue == null) {\n/* */ return;\n/* */ }\n/* 252 */ PlotOrientation orientation = plot.getOrientation();\n/* */ \n/* */ \n/* */ \n/* 256 */ if (getUseSeriesOffset()) {\n/* 257 */ x1 = domainAxis.getCategorySeriesMiddle(column, dataset\n/* 258 */ .getColumnCount(), visibleRow, visibleRowCount, \n/* */ \n/* 260 */ getItemMargin(), dataArea, plot.getDomainAxisEdge());\n/* */ } else {\n/* */ \n/* 263 */ x1 = domainAxis.getCategoryMiddle(column, getColumnCount(), dataArea, plot\n/* 264 */ .getDomainAxisEdge());\n/* */ } \n/* 266 */ double y1 = rangeAxis.valueToJava2D(meanValue.doubleValue(), dataArea, plot\n/* 267 */ .getRangeAxisEdge());\n/* */ \n/* */ \n/* */ \n/* */ \n/* 272 */ Number sdv = statDataset.getStdDevValue(row, column);\n/* 273 */ if (pass == 1 && sdv != null) {\n/* */ double lowVal, highVal;\n/* 275 */ RectangleEdge yAxisLocation = plot.getRangeAxisEdge();\n/* 276 */ double valueDelta = sdv.doubleValue();\n/* */ \n/* 278 */ if (meanValue.doubleValue() + valueDelta > rangeAxis\n/* 279 */ .getRange().getUpperBound()) {\n/* 280 */ highVal = rangeAxis.valueToJava2D(rangeAxis\n/* 281 */ .getRange().getUpperBound(), dataArea, yAxisLocation);\n/* */ }\n/* */ else {\n/* */ \n/* 285 */ highVal = rangeAxis.valueToJava2D(meanValue.doubleValue() + valueDelta, dataArea, yAxisLocation);\n/* */ } \n/* */ \n/* */ \n/* 289 */ if (meanValue.doubleValue() + valueDelta < rangeAxis\n/* 290 */ .getRange().getLowerBound()) {\n/* 291 */ lowVal = rangeAxis.valueToJava2D(rangeAxis\n/* 292 */ .getRange().getLowerBound(), dataArea, yAxisLocation);\n/* */ }\n/* */ else {\n/* */ \n/* 296 */ lowVal = rangeAxis.valueToJava2D(meanValue.doubleValue() - valueDelta, dataArea, yAxisLocation);\n/* */ } \n/* */ \n/* */ \n/* 300 */ if (this.errorIndicatorPaint != null) {\n/* 301 */ g2.setPaint(this.errorIndicatorPaint);\n/* */ } else {\n/* */ \n/* 304 */ g2.setPaint(getItemPaint(row, column));\n/* */ } \n/* 306 */ if (this.errorIndicatorStroke != null) {\n/* 307 */ g2.setStroke(this.errorIndicatorStroke);\n/* */ } else {\n/* */ \n/* 310 */ g2.setStroke(getItemOutlineStroke(row, column));\n/* */ } \n/* 312 */ Line2D line = new Line2D.Double();\n/* 313 */ if (orientation == PlotOrientation.HORIZONTAL) {\n/* 314 */ line.setLine(lowVal, x1, highVal, x1);\n/* 315 */ g2.draw(line);\n/* 316 */ line.setLine(lowVal, x1 - 5.0D, lowVal, x1 + 5.0D);\n/* 317 */ g2.draw(line);\n/* 318 */ line.setLine(highVal, x1 - 5.0D, highVal, x1 + 5.0D);\n/* 319 */ g2.draw(line);\n/* */ } else {\n/* */ \n/* 322 */ line.setLine(x1, lowVal, x1, highVal);\n/* 323 */ g2.draw(line);\n/* 324 */ line.setLine(x1 - 5.0D, highVal, x1 + 5.0D, highVal);\n/* 325 */ g2.draw(line);\n/* 326 */ line.setLine(x1 - 5.0D, lowVal, x1 + 5.0D, lowVal);\n/* 327 */ g2.draw(line);\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 332 */ Shape hotspot = null;\n/* 333 */ if (pass == 1 && getItemShapeVisible(row, column)) {\n/* 334 */ Shape shape = getItemShape(row, column);\n/* 335 */ if (orientation == PlotOrientation.HORIZONTAL) {\n/* 336 */ shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);\n/* */ }\n/* 338 */ else if (orientation == PlotOrientation.VERTICAL) {\n/* 339 */ shape = ShapeUtilities.createTranslatedShape(shape, x1, y1);\n/* */ } \n/* 341 */ hotspot = shape;\n/* */ \n/* 343 */ if (getItemShapeFilled(row, column)) {\n/* 344 */ if (getUseFillPaint()) {\n/* 345 */ g2.setPaint(getItemFillPaint(row, column));\n/* */ } else {\n/* */ \n/* 348 */ g2.setPaint(getItemPaint(row, column));\n/* */ } \n/* 350 */ g2.fill(shape);\n/* */ } \n/* 352 */ if (getDrawOutlines()) {\n/* 353 */ if (getUseOutlinePaint()) {\n/* 354 */ g2.setPaint(getItemOutlinePaint(row, column));\n/* */ } else {\n/* */ \n/* 357 */ g2.setPaint(getItemPaint(row, column));\n/* */ } \n/* 359 */ g2.setStroke(getItemOutlineStroke(row, column));\n/* 360 */ g2.draw(shape);\n/* */ } \n/* */ \n/* 363 */ if (isItemLabelVisible(row, column)) {\n/* 364 */ if (orientation == PlotOrientation.HORIZONTAL) {\n/* 365 */ drawItemLabel(g2, orientation, dataset, row, column, y1, x1, \n/* 366 */ (meanValue.doubleValue() < 0.0D));\n/* */ }\n/* 368 */ else if (orientation == PlotOrientation.VERTICAL) {\n/* 369 */ drawItemLabel(g2, orientation, dataset, row, column, x1, y1, \n/* 370 */ (meanValue.doubleValue() < 0.0D));\n/* */ } \n/* */ }\n/* */ } \n/* */ \n/* 375 */ if (pass == 0 && getItemLineVisible(row, column) && \n/* 376 */ column != 0) {\n/* */ \n/* 378 */ Number previousValue = statDataset.getValue(row, column - 1);\n/* 379 */ if (previousValue != null) {\n/* */ \n/* */ \n/* 382 */ double x0, previous = previousValue.doubleValue();\n/* */ \n/* 384 */ if (getUseSeriesOffset()) {\n/* 385 */ x0 = domainAxis.getCategorySeriesMiddle(column - 1, dataset\n/* 386 */ .getColumnCount(), visibleRow, visibleRowCount, \n/* */ \n/* 388 */ getItemMargin(), dataArea, plot\n/* 389 */ .getDomainAxisEdge());\n/* */ } else {\n/* */ \n/* 392 */ x0 = domainAxis.getCategoryMiddle(column - 1, \n/* 393 */ getColumnCount(), dataArea, plot\n/* 394 */ .getDomainAxisEdge());\n/* */ } \n/* 396 */ double y0 = rangeAxis.valueToJava2D(previous, dataArea, plot\n/* 397 */ .getRangeAxisEdge());\n/* */ \n/* 399 */ Line2D line = null;\n/* 400 */ if (orientation == PlotOrientation.HORIZONTAL) {\n/* 401 */ line = new Line2D.Double(y0, x0, y1, x1);\n/* */ }\n/* 403 */ else if (orientation == PlotOrientation.VERTICAL) {\n/* 404 */ line = new Line2D.Double(x0, y0, x1, y1);\n/* */ } \n/* 406 */ g2.setPaint(getItemPaint(row, column));\n/* 407 */ g2.setStroke(getItemStroke(row, column));\n/* 408 */ g2.draw(line);\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 413 */ if (pass == 1) {\n/* */ \n/* 415 */ EntityCollection entities = state.getEntityCollection();\n/* 416 */ if (entities != null) {\n/* 417 */ addEntity(entities, hotspot, dataset, row, column, x1, y1);\n/* */ }\n/* */ } \n/* */ }", "@Test\n public void test57() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n combinedDomainCategoryPlot0.clearDomainMarkers();\n CategoryTextAnnotation categoryTextAnnotation0 = new CategoryTextAnnotation(\"\", (Comparable) \"\", (-1680.444156425021));\n categoryTextAnnotation0.setCategory(\"\");\n boolean boolean0 = combinedDomainCategoryPlot0.removeAnnotation(categoryTextAnnotation0);\n categoryTextAnnotation0.setRotationAngle((-614.082251));\n CategoryItemRenderer categoryItemRenderer0 = combinedDomainCategoryPlot0.getRenderer(0);\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) null);\n int int0 = combinedDomainCategoryPlot0.getRangeAxisCount();\n // Undeclared exception!\n try { \n combinedDomainCategoryPlot0.setRenderer((-2292), (CategoryItemRenderer) null, false);\n } catch(IllegalArgumentException e) {\n //\n // Requires index >= 0.\n //\n assertThrownBy(\"org.jfree.chart.util.AbstractObjectList\", e);\n }\n }", "Category(int num) {\n this.num = num;\n }", "public String getCategory_name(){return category_name;}", "@Test\n public void test59() throws Throwable {\n DefaultKeyedValues2DDataset defaultKeyedValues2DDataset0 = new DefaultKeyedValues2DDataset();\n NumberAxis numberAxis0 = new NumberAxis(\"w9!(d\");\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"w9!(d\");\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultKeyedValues2DDataset0, (CategoryAxis) extendedCategoryAxis0, (ValueAxis) numberAxis0, (CategoryItemRenderer) null);\n CategoryPlot categoryPlot1 = (CategoryPlot)categoryPlot0.clone();\n }", "@Test\n public void test36() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n CategoryTextAnnotation categoryTextAnnotation0 = new CategoryTextAnnotation(\"\", (Comparable) \"\", (-1680.444156425021));\n categoryTextAnnotation0.setCategory(\"\");\n boolean boolean0 = combinedDomainCategoryPlot0.removeAnnotation(categoryTextAnnotation0);\n categoryTextAnnotation0.setRotationAngle((-614.082251));\n CategoryItemRenderer categoryItemRenderer0 = combinedDomainCategoryPlot0.getRenderer(0);\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) null);\n int int0 = combinedDomainCategoryPlot0.getRangeAxisCount();\n }", "public Category(String n) {\n this.name = n;\n }", "@Test\n public void test14() throws Throwable {\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D();\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) categoryAxis3D0);\n CategoryItemRenderer categoryItemRenderer0 = combinedDomainCategoryPlot0.getRenderer((-1305));\n Line2D.Double line2D_Double0 = new Line2D.Double(1295.82248000883, 5.0E10, 1295.82248000883, 3199.69438219);\n line2D_Double0.x2 = 1295.82248000883;\n CategoryMarker categoryMarker0 = new CategoryMarker((Comparable) 1295.82248000883);\n Layer layer0 = Layer.FOREGROUND;\n combinedDomainCategoryPlot0.addDomainMarker(categoryMarker0, layer0);\n combinedDomainCategoryPlot0.setRangeCrosshairVisible(true);\n }", "@Test\n public void test57() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"wX*\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot1 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n combinedDomainCategoryPlot0.remove(combinedDomainCategoryPlot1);\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) null, true);\n AxisChangeEvent axisChangeEvent0 = new AxisChangeEvent((Axis) extendedCategoryAxis0);\n combinedDomainCategoryPlot0.axisChanged(axisChangeEvent0);\n combinedDomainCategoryPlot0.setRenderer(84, (CategoryItemRenderer) null, true);\n AxisSpace axisSpace0 = combinedDomainCategoryPlot0.getFixedDomainAxisSpace();\n boolean boolean0 = combinedDomainCategoryPlot0.getDrawSharedDomainAxis();\n }", "public String[] getCategoryList(){\n return new String[]{\n \"HIDDENOPERATOR\"\n };\n }", "CodeType getCategory();", "@Override\n\tpublic List<Categoryb> GetCategpryb() {\n\t\treturn null;\n\t}", "@Override\n\t\t\t\tpublic String getKey() {\n\t\t\t\t\treturn \"category\";\n\t\t\t\t}", "public String toString() {\n\t\treturn category;\n\t}", "public String getCncategory() {\n return cncategory;\n }", "int getCategoryValue();", "public CategoryLabel(String title) {\n\t\tsuper(title.toUpperCase());\n\t\tsetForeground(GUIParameters.LEFTBAR_CAT);\n\t\tsetAlignmentX(CENTER_ALIGNMENT);\n\t\tBorder empty = new EmptyBorder(0, 0, 20, 0);\n\t\tsetBorder(empty);\n\t}", "@Override\n public String getCategory() {\n return category;\n }", "public String getCategory();", "public int getR_Category_ID();", "@Test\n public void test51() throws Throwable {\n PeriodAxis periodAxis0 = new PeriodAxis(\"e\");\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) periodAxis0);\n CategoryMarker categoryMarker0 = new CategoryMarker((Comparable) \"e\");\n categoryMarker0.setKey(\"e\");\n Layer layer0 = Layer.FOREGROUND;\n combinedRangeCategoryPlot0.addDomainMarker(3, categoryMarker0, layer0);\n }", "@Test\n public void test46() throws Throwable {\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D();\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) categoryAxis3D0);\n SortOrder sortOrder0 = SortOrder.ASCENDING;\n combinedDomainCategoryPlot0.setColumnRenderingOrder(sortOrder0);\n List list0 = combinedDomainCategoryPlot0.getCategories();\n Line2D.Double line2D_Double0 = new Line2D.Double();\n double double0 = line2D_Double0.x2;\n RendererChangeEvent rendererChangeEvent0 = new RendererChangeEvent((Object) combinedDomainCategoryPlot0);\n combinedDomainCategoryPlot0.rendererChanged(rendererChangeEvent0);\n DeviationRenderer deviationRenderer0 = new DeviationRenderer(false, false);\n Paint paint0 = deviationRenderer0.getSeriesOutlinePaint(43);\n BasicStroke basicStroke0 = (BasicStroke)combinedDomainCategoryPlot0.getDomainGridlineStroke();\n CategoryMarker categoryMarker0 = null;\n try {\n categoryMarker0 = new CategoryMarker((Comparable) 0.0, (Paint) null, (Stroke) basicStroke0);\n } catch(IllegalArgumentException e) {\n //\n // Null 'paint' argument.\n //\n assertThrownBy(\"org.jfree.chart.plot.Marker\", e);\n }\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public ItemCategory getCategory();", "public int getCategory(){\n\t\treturn this.cat;\n\t}", "@Test\n public void test39() throws Throwable {\n CategoryAxis categoryAxis0 = new CategoryAxis(\"Null 'info' argument.\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot(categoryAxis0);\n PlotOrientation plotOrientation0 = PlotOrientation.HORIZONTAL;\n combinedDomainCategoryPlot0.setOrientation(plotOrientation0);\n AxisChangeEvent axisChangeEvent0 = new AxisChangeEvent((Axis) categoryAxis0);\n JFreeChart jFreeChart0 = axisChangeEvent0.getChart();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo();\n }", "long getCategoryBits();", "public int getDimension() { return this.nbAttributes;}", "@Test\n public void test32() throws Throwable {\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis((-1505.20649), \"Category_Plot\");\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) cyclicNumberAxis0);\n SystemColor systemColor0 = SystemColor.text;\n BasicStroke basicStroke0 = (BasicStroke)CategoryPlot.DEFAULT_GRIDLINE_STROKE;\n ValueMarker valueMarker0 = new ValueMarker(4.0, (Paint) systemColor0, (Stroke) basicStroke0);\n MarkerChangeEvent markerChangeEvent0 = new MarkerChangeEvent((Marker) valueMarker0);\n combinedRangeCategoryPlot0.markerChanged(markerChangeEvent0);\n combinedRangeCategoryPlot0.setAnchorValue(1401.824847306, false);\n CategoryAxis categoryAxis0 = new CategoryAxis(\"Category_Plot\");\n combinedRangeCategoryPlot0.setDomainAxis(categoryAxis0);\n // Undeclared exception!\n try { \n combinedRangeCategoryPlot0.setDataset((-1030), (CategoryDataset) null);\n } catch(IllegalArgumentException e) {\n //\n // Requires index >= 0.\n //\n assertThrownBy(\"org.jfree.chart.util.AbstractObjectList\", e);\n }\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Test\n public void test68() throws Throwable {\n Rectangle2D.Double rectangle2D_Double0 = (Rectangle2D.Double)Plot.DEFAULT_LEGEND_ITEM_BOX;\n int int0 = rectangle2D_Double0.outcode(111.8092395654101, 111.8092395654101);\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"%%'\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n DefaultBoxAndWhiskerCategoryDataset defaultBoxAndWhiskerCategoryDataset0 = new DefaultBoxAndWhiskerCategoryDataset();\n combinedDomainCategoryPlot0.setDataset(0, (CategoryDataset) defaultBoxAndWhiskerCategoryDataset0);\n }", "String getCategory();", "String getCategory();", "public int getNodeLabel ();", "@Test\n public void test26() throws Throwable {\n Point2D.Double point2D_Double0 = new Point2D.Double();\n point2D_Double0.setLocation(2159.0, 2159.0);\n DefaultKeyedValues2DDataset defaultKeyedValues2DDataset0 = new DefaultKeyedValues2DDataset();\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D();\n NumberAxis3D numberAxis3D0 = new NumberAxis3D((String) null);\n DefaultCategoryItemRenderer defaultCategoryItemRenderer0 = new DefaultCategoryItemRenderer();\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultKeyedValues2DDataset0, (CategoryAxis) categoryAxis3D0, (ValueAxis) numberAxis3D0, (CategoryItemRenderer) defaultCategoryItemRenderer0);\n categoryPlot0.mapDatasetToRangeAxis(1, 1);\n Class<ExtendedCategoryAxis> class0 = ExtendedCategoryAxis.class;\n boolean boolean0 = SerialUtilities.isSerializable(class0);\n }", "@Override\r\npublic String getCelestialClassification() {\n\treturn \"DwarfPlanets\";\r\n}", "@Override\r\n public String toString() {\n return super.toString();\r\n }", "@Test\n public void test73() throws Throwable {\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"jhpWb\\\"F\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n ExtendedCategoryAxis extendedCategoryAxis1 = (ExtendedCategoryAxis)combinedDomainCategoryPlot0.getDomainAxisForDataset(777);\n List list0 = combinedDomainCategoryPlot0.getCategories();\n Rectangle2D.Double rectangle2D_Double0 = new Rectangle2D.Double();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo();\n rectangle2D_Double0.setFrameFromDiagonal(4364.40135, 0.0, (double) 777, (double) 777);\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n Rectangle2D.Double rectangle2D_Double1 = (Rectangle2D.Double)plotRenderingInfo0.getDataArea();\n rectangle2D_Double0.setRect((Rectangle2D) rectangle2D_Double1);\n RectangleEdge rectangleEdge0 = combinedDomainCategoryPlot0.getDomainAxisEdge();\n }", "public String getName(){\n return category;\n }", "@Override\n\t\t\t\t\tpublic void changed(ObservableValue arg0, Object arg1,\n\t\t\t\t\t\t\tObject arg2) {\n\t\t\t\t\t\tif (arg2.toString() == \"管理分类\") {// 查看商品分类\n\t\t\t\t\t\t\tCommodityKindInformationui c = new CommodityKindInformationui();\n\t\t\t\t\t\t\tc.display(Job, name, id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public int getNumCategories(){\n\n return numCategories;\n }", "public abstract String getLabel();", "public String toString() { return kind() + \":\"+ text() ; }", "@Override\n\tpublic java.lang.String getCategoryCode() {\n\t\treturn _lineaGastoCategoria.getCategoryCode();\n\t}", "@Override\r\n public String toString() {\n return super.toString();\r\n }", "private GestionnaireLabelsProperties() {\r\n\t\tsuper();\r\n\t}", "public category() {\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Category [categoryid=\" + categoryid + \", name=\" + capitalize(name) + \"]\";\n\t}", "@Override\n\t\t\tpublic String getLabel() {\n\t\t\t\treturn null;\n\t\t\t}", "@java.lang.Override public int getCategoryValue() {\n return category_;\n }", "@Override\n\t\tprotected int getNormalItemType(int position) {// 0 1 2\n\t\t\tCategoryBean categoryBean = mDatas.get(position);\n\t\t\tif (categoryBean.isTitle) {\n\t\t\t\treturn 2;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "@Test\n public void test12() throws Throwable {\n DefaultKeyedValues2DDataset defaultKeyedValues2DDataset0 = new DefaultKeyedValues2DDataset();\n CategoryAxis categoryAxis0 = new CategoryAxis(\"ma!!aV@/5:3\");\n NumberAxis numberAxis0 = new NumberAxis(\"w9!(d\");\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultKeyedValues2DDataset0, categoryAxis0, (ValueAxis) numberAxis0, (CategoryItemRenderer) null);\n AxisLocation axisLocation0 = categoryPlot0.getRangeAxisLocation((-4267));\n }", "@Override\n\tpublic java.lang.String getName() {\n\t\treturn _lineaGastoCategoria.getName();\n\t}", "private void createNodeLabel(NodeAppearanceCalculator nac) {\r\n\t PassThroughMapping passThroughMapping = new PassThroughMapping(\"\",\r\n\t ObjectMapping.NODE_MAPPING);\r\n\t \r\n\t // change canonicalName to Label\r\n//\t passThroughMapping.setControllingAttributeName\r\n//\t (\"canonicalName\", null, false);\r\n\t passThroughMapping.setControllingAttributeName\r\n// (Semantics.LABEL, null, false);\r\n\t (Semantics.CANONICAL_NAME, null, false);\r\n\t\r\n\t GenericNodeLabelCalculator nodeLabelCalculator =\r\n\t new GenericNodeLabelCalculator(\"SimpleBioMoleculeEditor ID Label\"\r\n\t , passThroughMapping);\r\n\t nac.setNodeLabelCalculator(nodeLabelCalculator);\r\n\t }", "@Test\n public void test53() throws Throwable {\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n GanttRenderer ganttRenderer0 = new GanttRenderer();\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) ganttRenderer0, true);\n Layer layer0 = Layer.FOREGROUND;\n Collection collection0 = combinedDomainCategoryPlot0.getRangeMarkers(layer0);\n LogAxis logAxis0 = new LogAxis(\"\");\n CombinedRangeXYPlot combinedRangeXYPlot0 = new CombinedRangeXYPlot((ValueAxis) logAxis0);\n AxisLocation axisLocation0 = combinedRangeXYPlot0.getRangeAxisLocation(0);\n AxisLocation axisLocation1 = AxisLocation.getOpposite(axisLocation0);\n combinedDomainCategoryPlot0.setDomainAxisLocation(244, axisLocation1);\n }", "public void nodata();", "@Override\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\n\t\t}", "@Test\n public void test81() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n CombinedDomainCategoryPlot combinedDomainCategoryPlot1 = new CombinedDomainCategoryPlot();\n combinedDomainCategoryPlot0.addChangeListener(combinedDomainCategoryPlot1);\n RectangleEdge rectangleEdge0 = combinedDomainCategoryPlot0.getRangeAxisEdge();\n JDBCCategoryDataset jDBCCategoryDataset0 = null;\n try {\n jDBCCategoryDataset0 = new JDBCCategoryDataset(\"\", \"Null 'seriesKey' argument.\", \"\", \"Null 'seriesKey' argument.\");\n } catch(ClassNotFoundException e) {\n }\n }", "@Test\n public void test00() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n combinedDomainCategoryPlot0.clearDomainMarkers();\n CategoryTextAnnotation categoryTextAnnotation0 = new CategoryTextAnnotation(\"\", (Comparable) \"\", (-1680.444156425021));\n categoryTextAnnotation0.setCategory(\"\");\n boolean boolean0 = combinedDomainCategoryPlot0.removeAnnotation(categoryTextAnnotation0);\n categoryTextAnnotation0.setRotationAngle((-614.082251));\n CategoryItemRenderer categoryItemRenderer0 = combinedDomainCategoryPlot0.getRenderer(0);\n int int0 = combinedDomainCategoryPlot0.getRangeAxisCount();\n combinedDomainCategoryPlot0.setRenderer(0, (CategoryItemRenderer) null, false);\n }", "public String toString() {\n return super.toString() + \", Language = \" + getLanguage() + \", Category = \" + getCategory() + \"\\n\";\n }", "@Override\n\tpublic String getCategoryIcon() {\n\t\treturn categoryIcon;\n\t}", "@Override\n\tpublic void nhanTinNhan() {\n\n\t}", "public String getNotiCategory() {\r\n return (String) getAttributeInternal(NOTICATEGORY);\r\n }", "@Override\r\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\r\n\t\t}", "@Test\n public void test22() throws Throwable {\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\" twtGuHO\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n Polygon polygon0 = new Polygon();\n Rectangle rectangle0 = polygon0.getBounds();\n rectangle0.height = (-2538);\n AxisLocation axisLocation0 = combinedDomainCategoryPlot0.getDomainAxisLocation((-2538));\n boolean boolean0 = combinedDomainCategoryPlot0.isRangeZoomable();\n AxisLocation axisLocation1 = axisLocation0.getOpposite();\n combinedDomainCategoryPlot0.setDomainAxisLocation(3, axisLocation0, false);\n RectangleInsets rectangleInsets0 = new RectangleInsets();\n combinedDomainCategoryPlot0.setAxisOffset(rectangleInsets0);\n }", "public String getName () { return n.getName(); }", "public String getCategory(){\r\n\t\treturn this.category;\r\n\t}", "public controladorCategorias() {\r\n }", "public int getSSRCategory() {\n return ssrCategory;\n }", "public SceneLabelObjectState(SceneLabelObjectState state){\t\t\n\t\tsuper(state); //will create a SceneDivObjectState from the supplied state\n\t\tsuper.setObjectsPrimaryType(SceneObjectType.Label); //subtypes should also run this statement straight after the super command in order to override their parents type and set their own as the primary/\n\n\n\t\tthis.ObjectsCurrentText = state.ObjectsCurrentText;\n\t\tthis.CSSname = state.CSSname;\n\t\tthis.cursorVisible=state.cursorVisible;\n\t\tthis.TypedText=state.TypedText;\t\t\n\t\tthis.Custom_Key_Beep = state.Custom_Key_Beep;\n\t\tthis.Custom_Space_Beep = state.Custom_Space_Beep;\n\n\t}", "public abstract int getNodeType();", "public abstract String[] getLabels();", "@Test\n public void test42() throws Throwable {\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D((String) null);\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) categoryAxis3D0);\n combinedDomainCategoryPlot0.clearDomainAxes();\n }", "@Override\r\n public String toString() {\r\n return super.toString();\r\n }", "@Override\r\n public String toString() {\r\n return super.toString();\r\n }", "@Override\n \tpublic String getSliceLabel(int n) {\n \t\tif (n < 1 || n > layers.size()) return null;\n \t\treturn layers.get(n-1).getTitle();\n \t}", "@Override \n\t public String getDescription() {\n\t \t return \"(*.MXD)\"; \n\t }", "protected PermissionCategory () {\n //\n }", "@Override\n public String toString () {\n return super.toString();\n }", "public void newCategory() {\n btNewCategory().push();\n }", "public String category() {\n return this.category;\n }", "public String category() {\n return this.category;\n }", "io.dstore.values.StringValue getPageCategoryDescription();", "public Category() {\n super();\n }", "@Override\n public String toString() {\n return getClass().getSimpleName() + \"[\" + _name + \"]\";\n }", "@Override\npublic void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) {\narg2.setType(Feeds.class);\narg2.setName(\"Feeds\");\n\narg2.setNamespace(n1);\n\n}", "public Category getCategory();" ]
[ "0.5902354", "0.5902354", "0.57094985", "0.56416184", "0.5583908", "0.55733865", "0.55161333", "0.55074805", "0.5465781", "0.54478335", "0.5442219", "0.5439762", "0.54318357", "0.54107034", "0.5389621", "0.5388554", "0.5372563", "0.53504676", "0.5324973", "0.53229254", "0.5317076", "0.5315737", "0.53121376", "0.5307757", "0.5302953", "0.5301688", "0.5282589", "0.5264792", "0.52630883", "0.5262214", "0.52466255", "0.52273333", "0.5222477", "0.52106607", "0.5204829", "0.52030915", "0.51995856", "0.5184607", "0.51773846", "0.51733696", "0.51732767", "0.51704776", "0.51662415", "0.51658666", "0.5163894", "0.5155565", "0.5155565", "0.51487315", "0.51479447", "0.51453584", "0.5125636", "0.5124701", "0.5120514", "0.5118148", "0.5114289", "0.51117957", "0.5109572", "0.51088464", "0.5104694", "0.51017123", "0.5101144", "0.5101026", "0.50925446", "0.5083598", "0.5081711", "0.50805306", "0.50791574", "0.5076097", "0.5074087", "0.5070815", "0.5065879", "0.5065182", "0.5062956", "0.5059804", "0.50594056", "0.50573343", "0.5055981", "0.5055664", "0.5052176", "0.50467753", "0.504566", "0.5044823", "0.50430256", "0.503985", "0.50395274", "0.5038687", "0.50313216", "0.50265867", "0.50265867", "0.5013068", "0.5012756", "0.5012735", "0.5012151", "0.5006983", "0.5004595", "0.5004595", "0.5001506", "0.500116", "0.49843216", "0.49832666", "0.49793413" ]
0.0
-1
Initializes the proxy and returns the wrapped value.
Object getTarget();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ProxyValue createProxyValue();", "@Override\n public T get() {\n if (!initialized) {\n synchronized (this) {\n if (!initialized) {\n T t = delegate.get();\n value = t;\n initialized = true;\n return t;\n }\n }\n }\n return value;\n }", "Proxy getProxy();", "private HttpProxyCacheServer getProxy() {\n\n return proxy == null ? (proxy = newProxy()) : proxy;\n }", "@Override\n protected BeanUtilsBean initialValue() {\n // 创建cglib代理\n BeanUtilsBean beanUtilsBean = (BeanUtilsBean) _createProxy(BeanUtilsBean.class, new OptionalUnpacker());\n // 注册Optional Converter\n beanUtilsBean.getConvertUtils().register(new OptionalConverter(), Optional.class);\n return beanUtilsBean;\n }", "public Object getProxy() {\n\t\t\r\n\t\treturn getProxy(this.advised.getTargetClass().getClassLoader());\r\n\t}", "public Proxy getProxy() {\n return proxy;\n }", "protected Proxy(InvocationHandler h) { }", "ProxyFluent(T o) {\n proxy = (InterceptableProxy) InterceptableProxyFactory.createANewObjectProxyIfNeeded(o);\n }", "public Proxy(){\n\t\tthis.useProxy = false;\n\t\tthis.host = null;\n\t\tthis.port = -1;\n\t}", "public void initProxy() {\n\n System.setProperty(\"http.proxyHost\", \"199.101.97.159\"); // set proxy server\n System.setProperty(\"http.proxyPort\", \"60099\"); // set proxy port\n //System.setProperty(\"http.proxyUser\", authUser);\n //System.setProperty(\"http.proxyPassword\", authPassword);\n Authenticator.setDefault(\n new Authenticator() {\n @Override\n public PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\n authUser, authPassword.toCharArray());\n }\n }\n );\n }", "public ProxyBean() {\n }", "public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }", "ArrayProxyValue createArrayProxyValue();", "private RCProxy() {\n\t\tstate = new DefaultState();\n\t\tSTBListener.instance().addObserver(this);\n\t}", "@Override\n\tpublic T proxy() {\n\t\tfinal ClassLoader loader = Thread.currentThread().getContextClassLoader();\n\n\t\t// extract the generic type's interfaces\n\t\tfinal Set<?> ifaceSet = typeToken.getTypes().interfaces().rawTypes();\n\t\tfinal boolean appendGT = !ifaceSet.contains(GenericTyped.class);\n\t\tfinal int ifaceCount = ifaceSet.size() + (appendGT ? 1 : 0);\n\t\tfinal Class<?>[] interfaces = new Class<?>[ifaceCount];\n\t\tifaceSet.toArray(interfaces);\n\t\tif (appendGT) interfaces[ifaceCount - 1] = GenericTyped.class;\n\n\t\t// NB: Technically, this cast is not safe, because T might not be\n\t\t// an interface, and thus might not be one of the proxy's types.\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal T proxy = (T) Proxy.newProxyInstance(loader, interfaces, this);\n\t\treturn proxy;\n\t}", "Stub.Proxy(IBinder ibinder)\n\t\t{\n\t\t\tmRemote = ibinder;\n\t\t// 2 4:aload_0 \n\t\t// 3 5:aload_1 \n\t\t// 4 6:putfield #19 <Field IBinder mRemote>\n\t\t// 5 9:return \n\t\t}", "public HttpHandler createProxyHandler() {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }", "private OkHttpClient Create() {\n final OkHttpClient.Builder baseClient = new OkHttpClient().newBuilder()\n .connectTimeout(CONNECTION_TIMEOUT, TimeUnit.SECONDS)\n .writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS)\n .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS);\n\n // If there's no proxy just create a normal client\n if (appProps.getProxyHost().isEmpty()) {\n return baseClient.build();\n }\n\n final OkHttpClient.Builder proxyClient = baseClient\n .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(appProps.getProxyHost(), Integer.parseInt(appProps.getProxyPort()))));\n\n if (!appProps.getProxyUsername().isEmpty() && !appProps.getProxyPassword().isEmpty()) {\n\n Authenticator proxyAuthenticator;\n String credentials;\n\n credentials = Credentials.basic(appProps.getProxyUsername(), appProps.getProxyPassword());\n\n // authenticate the proxy\n proxyAuthenticator = (route, response) -> response.request().newBuilder()\n .header(\"Proxy-Authorization\", credentials)\n .build();\n proxyClient.proxyAuthenticator(proxyAuthenticator);\n }\n return proxyClient.build();\n\n }", "public ClientBuilder proxy(@Nullable Proxy proxy) {\n this.proxy = proxy;\n return this;\n }", "public ProxySettings(Proxy proxy)\n {\n this(proxy, null, null);\n }", "@Test\r\n public void testSetProxy() {\r\n // Not required\r\n }", "private ServerModelFacade(IServerProxy theProxy) {\n setServerProxy(theProxy);\n }", "public ValueWrapper(Object value) {\n\t\tsuper();\n\t\tthis.value = value;\n\t}", "public ProxyableObject()\r\n {\r\n id = new command.GlobalObjectId();\r\n command.ObjectDB.getSingleton().store(id.getLocalObjectId(), this);\r\n \r\n //observable = new ObservabilityObject();\r\n }", "public getProxy_result(getProxy_result other) {\n if (other.isSetSuccess()) {\n java.util.List<TProxy> __this__success = new java.util.ArrayList<TProxy>(other.success.size());\n for (TProxy other_element : other.success) {\n __this__success.add(new TProxy(other_element));\n }\n this.success = __this__success;\n }\n }", "public Proxy getProxy(Proxy p){\n if(p != null){\n doInit(p);\n }\n mode = COMMAND_MODE;\n pack();\n show();\n return proxy;\n }", "public Proxy getProxy(){\n mode = COMMAND_MODE;\n pack();\n show();\n return proxy;\n }", "public static Proxy getProxy() {\r\n\t\tif (_proxy == null) {//no need to synchronized\r\n\t\t\ttry {\r\n\t\t\t\tClasses.forNameByThread(\"org.zkoss.zk.ui.sys.PageRenderer\");\r\n\t\t\t\t_proxy = newProxy5();\r\n\t\t\t} catch (ClassNotFoundException ex) {\r\n\t\t\t\t_proxy = newProxy3();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn _proxy;\r\n\t}", "public Object getProxy(ClassLoader classLoader) {\n\t\treturn Proxy.newProxyInstance(classLoader, this.advised.getTargetClass().getInterfaces(), this);\r\n\t}", "public static RCProxy instance(){\n\t\treturn SingletonHolder.INSTANCE;\n\t}", "public void testBeforeSet() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test { def prop = 'hello' }\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaClass.getInstance(testClass);\r\n go.setMetaClass(pmc);\r\n\r\n pmc.setInterceptor( new PropertyAccessInterceptor(){\r\n\r\n public Object beforeGet(Object object, String property, InvocationCallback callback) {\r\n return null;\r\n }\r\n\r\n public void beforeSet(Object object, String property, Object newValue, InvocationCallback callback) {\r\n assertEquals(\"prop\", property);\r\n BeanWrapper bean = new BeanWrapperImpl(object);\r\n bean.setPropertyValue(\"prop\",\"success\");\r\n callback.markInvoked();\r\n }\r\n\r\n public Object beforeInvoke(Object object, String methodName, Object[] arguments, InvocationCallback callback) {\r\n return null;\r\n }\r\n\r\n public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {\r\n return null;\r\n }\r\n });\r\n\r\n go.setProperty(\"prop\", \"newValue\");\r\n Object result = go.getProperty(\"prop\");\r\n assertNotNull(result);\r\n assertEquals(\"success\",result);\r\n }", "public FakeBasicProxyPreparer() {\n\tsuper();\n }", "public void initialize() {\r\n\t\tsetValue(initialValue);\r\n\t}", "public ProxyConfig createProxyConfig();", "@Override\n\tpublic double initialize() {\n\n\t\treturn calculate();\n\t\t\n\t}", "public Object getObject()\n {\n initialize();\n\n if (_invariant)\n return _cachedValue;\n\n return resolveProperty();\n }", "public Properties initForRuntime() {\n initProperties();\n return this;\n }", "public ValueObject(final T initValue) {\n\t\tthis.value = initValue;\n\t\tthis.incrementHandler = null;\n\t\tthis.converter = null;\n\t}", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "public void setProxy(Proxy proxy) {\n\t\tthis.proxy = proxy;\n\t}", "public Value makeGetter() {\n Value r = new Value(this);\n r.getters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {\n super(objRef);\n this.contentBasedDeduplication = software.amazon.jsii.Kernel.get(this, \"contentBasedDeduplication\", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));\n this.delaySeconds = software.amazon.jsii.Kernel.get(this, \"delaySeconds\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.fifoQueue = software.amazon.jsii.Kernel.get(this, \"fifoQueue\", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));\n this.kmsDataKeyReusePeriodSeconds = software.amazon.jsii.Kernel.get(this, \"kmsDataKeyReusePeriodSeconds\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.kmsMasterKeyId = software.amazon.jsii.Kernel.get(this, \"kmsMasterKeyId\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.maxMessageSize = software.amazon.jsii.Kernel.get(this, \"maxMessageSize\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.messageRetentionSeconds = software.amazon.jsii.Kernel.get(this, \"messageRetentionSeconds\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.name = software.amazon.jsii.Kernel.get(this, \"name\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.namePrefix = software.amazon.jsii.Kernel.get(this, \"namePrefix\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.policy = software.amazon.jsii.Kernel.get(this, \"policy\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.receiveWaitTimeSeconds = software.amazon.jsii.Kernel.get(this, \"receiveWaitTimeSeconds\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.redrivePolicy = software.amazon.jsii.Kernel.get(this, \"redrivePolicy\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.tags = software.amazon.jsii.Kernel.get(this, \"tags\", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));\n this.visibilityTimeoutSeconds = software.amazon.jsii.Kernel.get(this, \"visibilityTimeoutSeconds\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.count = software.amazon.jsii.Kernel.get(this, \"count\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.dependsOn = software.amazon.jsii.Kernel.get(this, \"dependsOn\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.ITerraformDependable.class)));\n this.lifecycle = software.amazon.jsii.Kernel.get(this, \"lifecycle\", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformResourceLifecycle.class));\n this.provider = software.amazon.jsii.Kernel.get(this, \"provider\", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformProvider.class));\n }", "<T> T newProxy(T target, Class<T> interfaceType);", "private ClassProxy() {\n }", "public DataWrapProxy(int data) {\n this.data = data;\n }", "protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {\n super(objRef);\n this.errorDocument = software.amazon.jsii.Kernel.get(this, \"errorDocument\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.indexDocument = software.amazon.jsii.Kernel.get(this, \"indexDocument\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.redirectAllRequestsTo = software.amazon.jsii.Kernel.get(this, \"redirectAllRequestsTo\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.routingRules = software.amazon.jsii.Kernel.get(this, \"routingRules\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n }", "public ShoppingSessionClient() {\n\t\t/* TODO: instantiate the proxy using the EJBProxyFactory (see the other client classes) */\n\t}", "public Object getInitValue()\r\n\t{\r\n\t\treturn initValue;\r\n\t}", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt, boolean paramBoolean) throws IOException {\n/* 143 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt, paramBoolean);\n/* */ }", "private ProxyBean getFactoryProxyBean(Object orig) {\n final Class<?> type = orig.getClass();\n if (isUnproxyable(type))\n return null;\n\n // we don't lock here; ok if two proxies get generated for same type\n ProxyBean proxy = (ProxyBean) _proxies.get(type);\n if (proxy == null) {\n ClassLoader l = GeneratedClasses.getMostDerivedLoader(type, ProxyBean.class);\n Class<?> pcls = loadBuildTimeProxy(type, l);\n if (pcls == null) {\n pcls = generateAndLoadProxyBean(type, true, l);\n }\n if (pcls != null)\n proxy = (ProxyBean) instantiateProxy(pcls, findCopyConstructor(type), new Object[] { orig });\n if (proxy == null) {\n _unproxyable.add(type.getName());\n } else {\n _proxies.put(type, proxy);\n }\n }\n return proxy;\n }", "private Proxy createProxyOne() {\n\t\t\n\t\tWorkingMemoryPointer origin = createWorkingMemoryPointer (\"fakevision\", \"blibli\", \"VisualObject\");\n\t\tProxy proxy = createNewProxy(origin, 0.35f);\n\t\t\n\t\tFeatureValue red = createStringValue (\"red\", 0.73f);\n\t\tFeature feat = createFeatureWithUniqueFeatureValue (\"colour\", red);\n\t\taddFeatureToProxy (proxy, feat);\n\t\t\t\t\n\t\tFeatureValue cylindrical = createStringValue (\"cylindrical\", 0.63f);\n\t\tFeature feat2 = createFeatureWithUniqueFeatureValue (\"shape\", cylindrical);\n\t\taddFeatureToProxy (proxy, feat2);\n\t\t\n\t\tlog(\"Proxy one for belief model successfully created\");\n\t\treturn proxy;\n\t}", "@Override\n public T get() {\n long nanos = this.expirationNanos;\n long now = nanoTime();\n if (nanos == 0L || now - nanos >= 0L) {\n synchronized(this) {\n if (nanos == this.expirationNanos) {\n ReturnValue<T> t = this.delegate.get();\n if (t.canMemoize())\n this.value = t.value();\n else\n return t.value();\n\n this.expirationNanos = now + this.durationNanos;\n return t.value();\n }\n }\n }\n return this.value;\n }", "public Object get() {\n Supplier supplier = this.delegate;\n synchronized (supplier) {\n Supplier supplier2 = this.delegate;\n return supplier2.get();\n }\n }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public Factory() {\n this(getInternalClient());\n }", "public DataWrapProxy(boolean data) {\n this.data = data;\n }", "@Mod.EventHandler\n public void init(FMLInitializationEvent e) {\n proxy.init(e);\n }", "@Mod.EventHandler\n public void init(FMLInitializationEvent e) {\n proxy.init(e);\n }", "protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {\n super(objRef);\n this.clusterId = software.amazon.jsii.Kernel.get(this, \"clusterId\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.instanceType = software.amazon.jsii.Kernel.get(this, \"instanceType\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.autoscalingPolicy = software.amazon.jsii.Kernel.get(this, \"autoscalingPolicy\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.bidPrice = software.amazon.jsii.Kernel.get(this, \"bidPrice\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.configurationsJson = software.amazon.jsii.Kernel.get(this, \"configurationsJson\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.ebsConfig = software.amazon.jsii.Kernel.get(this, \"ebsConfig\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(imports.aws.EmrInstanceGroupEbsConfig.class)));\n this.ebsOptimized = software.amazon.jsii.Kernel.get(this, \"ebsOptimized\", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));\n this.instanceCount = software.amazon.jsii.Kernel.get(this, \"instanceCount\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.name = software.amazon.jsii.Kernel.get(this, \"name\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.count = software.amazon.jsii.Kernel.get(this, \"count\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.dependsOn = software.amazon.jsii.Kernel.get(this, \"dependsOn\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.ITerraformDependable.class)));\n this.lifecycle = software.amazon.jsii.Kernel.get(this, \"lifecycle\", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformResourceLifecycle.class));\n this.provider = software.amazon.jsii.Kernel.get(this, \"provider\", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformProvider.class));\n }", "@Stub\n\tpublic void init()\n\t{\n\t\t//\n\t}", "@Override // java.lang.ThreadLocal\n public final AnonymousClass0jT initialValue() {\n return new AnonymousClass0jT();\n }", "private void setInternalProxy(SimpleClientHttpRequestFactory requestFactory) {\n\t\tif (PAYASIA_MIND_PROXY_ENABLED_FOR_DEV) {\n\t\t\tProxy proxy = new Proxy(Type.HTTP, new InetSocketAddress(\n\t\t\t\t\tPAYASIA_MIND_PROXY_HOSTNAME, PAYASIA_MIND_PROXY_PORT));\n\t\t\trequestFactory.setProxy(proxy);\n\t\t}\n\t}", "@Override\n void initialize(Catalog catalog, EntityModel model, int initVersion) {\n if (proxyFormat == null) {\n assert proxyClassName != null;\n proxyFormat = catalog.getFormat(proxyClassName);\n }\n /* Make the linkage from proxy format to proxied format. */\n proxyFormat.setProxiedFormat(this);\n }", "public T get() {\n return object;\n }", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt) throws IOException {\n/* 127 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt);\n/* */ }", "protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {\n super(objRef);\n this.authenticationType = software.amazon.jsii.Kernel.get(this, \"authenticationType\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.openidConnectConfig = software.amazon.jsii.Kernel.get(this, \"openidConnectConfig\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(imports.aws.AppsyncGraphqlApiAdditionalAuthenticationProviderOpenidConnectConfig.class)));\n this.userPoolConfig = software.amazon.jsii.Kernel.get(this, \"userPoolConfig\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(imports.aws.AppsyncGraphqlApiAdditionalAuthenticationProviderUserPoolConfig.class)));\n }", "public static IngestHelperInterface create() {\n ClassLoader cl = SimpleDataTypeHelper.class.getClassLoader();\n return (IngestHelperInterface) Proxy.newProxyInstance(cl, new Class[] {IngestHelperInterface.class}, new SimpleDataTypeHelper());\n }", "private AirforceOne_lazy() {\n }", "@Override\r\n protected double initValue()\r\n {\n try\r\n {\r\n interpFlow = InterpolaterFactory.create(tableName.v);\r\n return computeValue();\r\n }\r\n catch (Throwable t)\r\n {\r\n Logger.logError(t.getMessage());\r\n return 0;\r\n }\r\n }", "@Override\n public SessionClient build() {\n Supplier<CompletableFuture<SessionClient>> proxyFactory = () -> CompletableFuture.completedFuture(\n new DefaultRaftSessionClient(\n primitiveName,\n primitiveType,\n serviceConfig,\n partitionId,\n DefaultRaftClient.this.protocol,\n selectorManager,\n sessionManager,\n readConsistency,\n communicationStrategy,\n threadContextFactory.createContext(),\n minTimeout,\n maxTimeout));\n\n SessionClient proxy;\n\n ThreadContext context = threadContextFactory.createContext();\n\n // If the recovery strategy is set to RECOVER, wrap the builder in a recovering proxy client.\n if (recoveryStrategy == Recovery.RECOVER) {\n proxy = new RecoveringSessionClient(\n clientId,\n partitionId,\n primitiveName,\n primitiveType,\n proxyFactory,\n context);\n } else {\n proxy = proxyFactory.get().join();\n }\n\n // If max retries is set, wrap the client in a retrying proxy client.\n if (maxRetries > 0) {\n proxy = new RetryingSessionClient(\n proxy,\n context,\n maxRetries,\n retryDelay);\n }\n return new BlockingAwareSessionClient(proxy, context);\n }", "private MockClientFacade() {\n\t\t//this.c = Client.getInstance();\n\t}", "public Interceptor create(Proxy proxy) throws NullPointerException {\n MethodInterceptor methodInterceptor = (MethodInterceptor) pico.getComponentInstance(interceptorComponentKey);\n if (methodInterceptor == null) {\n throw new NullPointerException(\"Interceptor with component key \" + interceptorComponentKey\n + \" + not found in PicoContainer\");\n }\n return new MethodInterceptorAdapter(methodInterceptor);\n }", "public MeasureUnitProxy() {\n }", "public CountryAccessor(PersistenceManagerFactory pmfProxy)\n {\n super(pmfProxy);\n }", "public LoginInfoClientProxy(URL proxyURL) {\n this.proxyURL = proxyURL;\n }", "protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {\n super(objRef);\n this.automountServiceAccountToken = software.amazon.jsii.Kernel.get(this, \"automountServiceAccountToken\", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));\n this.imagePullSecrets = software.amazon.jsii.Kernel.get(this, \"imagePullSecrets\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(imports.k8s.LocalObjectReference.class)));\n this.metadata = software.amazon.jsii.Kernel.get(this, \"metadata\", software.amazon.jsii.NativeType.forClass(imports.k8s.ObjectMeta.class));\n this.secrets = software.amazon.jsii.Kernel.get(this, \"secrets\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(imports.k8s.ObjectReference.class)));\n }", "public ProxyActor(ActorRef otherActor) {\n\t\tthis(otherActor, null, null);\n\t}", "public AbstractTransactionProxy(Object wrappedObject) {\n\t\tsuper(wrappedObject);\n\t}", "public HttpHandler createProxyHandler(HttpHandler next) {\n return ProxyHandler.builder()\n .setProxyClient(container.getProxyClient())\n .setNext(next)\n .setMaxRequestTime(maxRequestTime)\n .setMaxConnectionRetries(maxRetries)\n .setReuseXForwarded(reuseXForwarded)\n .build();\n }", "public DataWrapProxy(String data) {\n this.data = data;\n }", "public static synchronized void init()\n {\n lazyinit();\n }", "@Override\n public Object postProcessBeforeInitialization(Object bean, String beanName) {\n if (bean instanceof DataSourceProxy) {\n throw new UnexpectedException(\"Auto proxy of DataSource can't be enabled as you've created a DataSourceProxy bean.\" +\n \"Please consider removing DataSourceProxy bean or disabling auto proxy of DataSource.\");\n }\n return bean;\n }", "private <T extends Object> Object newProxy(final Class<T> proxyInterface,\n final Class<? extends T> proxyImplementation) {\n return AdminModelFactory.newProxy(user, classLoader, proxyInterface,\n proxyImplementation);\n }", "public NaviProxyFactoryBean() {\r\n\r\n }", "protected final ActionProxy getProxy(String action,String [] params){\n \tsetUpRequestTestParams(params);\n\t\tActionProxy actionProxy = getActionProxy(action);\n\t\tassertNotNull(\"Action proxy shouldn't be null\", actionProxy);\n\t\tactionProxy.setExecuteResult(false);\n\t\treturn actionProxy;\t \t\n }", "public getProxy_args(getProxy_args other) {\n __isset_bitfield = other.__isset_bitfield;\n this.num = other.num;\n }", "protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {\n super(objRef);\n this.name = software.amazon.jsii.Kernel.get(this, \"name\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.capabilities = software.amazon.jsii.Kernel.get(this, \"capabilities\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));\n this.disableRollback = software.amazon.jsii.Kernel.get(this, \"disableRollback\", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));\n this.iamRoleArn = software.amazon.jsii.Kernel.get(this, \"iamRoleArn\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.notificationArns = software.amazon.jsii.Kernel.get(this, \"notificationArns\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));\n this.onFailure = software.amazon.jsii.Kernel.get(this, \"onFailure\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.parameters = software.amazon.jsii.Kernel.get(this, \"parameters\", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));\n this.policyBody = software.amazon.jsii.Kernel.get(this, \"policyBody\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.policyUrl = software.amazon.jsii.Kernel.get(this, \"policyUrl\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.tags = software.amazon.jsii.Kernel.get(this, \"tags\", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));\n this.templateBody = software.amazon.jsii.Kernel.get(this, \"templateBody\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.templateUrl = software.amazon.jsii.Kernel.get(this, \"templateUrl\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n this.timeoutInMinutes = software.amazon.jsii.Kernel.get(this, \"timeoutInMinutes\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.timeouts = software.amazon.jsii.Kernel.get(this, \"timeouts\", software.amazon.jsii.NativeType.forClass(imports.aws.CloudformationStackTimeouts.class));\n this.count = software.amazon.jsii.Kernel.get(this, \"count\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));\n this.dependsOn = software.amazon.jsii.Kernel.get(this, \"dependsOn\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.ITerraformDependable.class)));\n this.lifecycle = software.amazon.jsii.Kernel.get(this, \"lifecycle\", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformResourceLifecycle.class));\n this.provider = software.amazon.jsii.Kernel.get(this, \"provider\", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.TerraformProvider.class));\n }", "@Test\n public void testProxy() {\n Dell dell = new Dell();\n Proxy proxy = new Proxy(dell);\n proxy.salePc();\n }", "public MyProxyLogon() {\n super();\n host = System.getenv(\"MYPROXY_SERVER\");\n if (host == null) {\n host = \"myproxy.teragrid.org\";\n }\n String portString = System.getenv(\"MYPROXY_SERVER_PORT\");\n if (portString != null) {\n port = Integer.parseInt(portString);\n }\n username = System.getProperty(\"user.name\");\n }", "public ProxyInfo getInitialProxyInfo() {\n if (mIpConfiguration != null) {\n return mIpConfiguration.getHttpProxy();\n } else {\n return null;\n }\n }", "public void testBeforeGet() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test { def prop = 'hello' }\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaClass.getInstance(testClass);\r\n go.setMetaClass(pmc);\r\n\r\n pmc.setInterceptor( new PropertyAccessInterceptor(){\r\n\r\n public Object beforeGet(Object object, String property, InvocationCallback callback) {\r\n callback.markInvoked();\r\n return \"success\";\r\n }\r\n\r\n public void beforeSet(Object object, String property, Object newValue, InvocationCallback callback) {\r\n // TODO Auto-generated method stub\r\n }\r\n\r\n public Object beforeInvoke(Object object, String methodName, Object[] arguments, InvocationCallback callback) {\r\n return null;\r\n }\r\n\r\n public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {\r\n return null;\r\n }\r\n });\r\n\r\n Object result = go.getProperty(\"prop\");\r\n assertNotNull(result);\r\n assertEquals(\"success\",result);\r\n }", "@Override\n\tpublic Object _init_(final IScope scope) {\n\t\treturn super._init_(this.scope);\n\t}", "protected void ensureIsInitialized() {\n\t\tif (initialized) {\n\t\t\treturn;\n\t\t}\n\t\tencapsulatedObjectValueAccessor = new Accessor<Object>() {\n\n\t\t\tObject object = ErrorOccurrence.tryCatch(new Accessor<Object>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Object get() {\n\t\t\t\t\tinitialObjectValue = null;\n\t\t\t\t\treturn initialObjectValue = loadValue();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t@Override\n\t\t\tpublic Object get() {\n\t\t\t\treturn ErrorOccurrence.rethrow(object);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void set(Object o) {\n\t\t\t\tobject = o;\n\t\t\t}\n\n\t\t};\n\t\tinitialized = true;\n\t}", "final protected Object convertSpringProxyObj(final Object o) {\n\t\tif (o instanceof InfrastructureProxy)\n\t\t\treturn ((InfrastructureProxy)o).getWrappedObject();\n\t\telse\n\t\t\treturn o;\n\t}", "public HttpProxyConfigResponse httpProxyConfig() {\n return this.httpProxyConfig;\n }", "@Mod.EventHandler\n public void init(FMLInitializationEvent event) {\n proxy.init(event);\n }", "ProxyConnectionState getProxyConnectionState() {\n return proxyConnectionState;\n }", "public DuckSourceRemote initialize() throws Exception;", "protected NegotiationParty init() throws InstantiateException {\n\t\tNegotiationParty party1 = load();\n\t\tprotocolClassPath = party1.getProtocol().getCanonicalName();\n\t\tinitialized = true;\n\t\treturn party1;\n\t}", "protected StorageProxy createStorageProxy(int nativeStorageHandle, int status)\n {\n return new StorageProxyImpl(nativeStorageHandle, status);\n }" ]
[ "0.6773005", "0.6192189", "0.6116528", "0.5873044", "0.57796794", "0.5703696", "0.56228715", "0.55880183", "0.5571524", "0.55514514", "0.5446346", "0.5441799", "0.5368091", "0.5298332", "0.5292304", "0.52656966", "0.5139549", "0.513012", "0.51286244", "0.5105932", "0.50921077", "0.508575", "0.50810903", "0.5043802", "0.5023406", "0.50144553", "0.5009963", "0.5008012", "0.50022185", "0.49963978", "0.49842834", "0.49736193", "0.49690276", "0.49083778", "0.49078816", "0.4907746", "0.48930067", "0.48737067", "0.48652032", "0.4855617", "0.48300034", "0.48112568", "0.48104975", "0.48064363", "0.48040894", "0.48000088", "0.47950998", "0.47926354", "0.47863007", "0.47837374", "0.47789305", "0.4776801", "0.47735605", "0.47684148", "0.47669843", "0.47662356", "0.4753914", "0.4750396", "0.4750396", "0.47407508", "0.47335523", "0.4733314", "0.47267738", "0.47134238", "0.4702277", "0.46755674", "0.46627736", "0.46393633", "0.4633805", "0.46271643", "0.46258286", "0.4625701", "0.46111357", "0.4605239", "0.46034727", "0.46025214", "0.45990932", "0.45976812", "0.45945024", "0.45837608", "0.4578352", "0.45754647", "0.45751572", "0.45609277", "0.4553572", "0.4540587", "0.45396888", "0.4538532", "0.4530965", "0.452521", "0.45230886", "0.45228732", "0.45185462", "0.45127487", "0.4511656", "0.4509122", "0.45076975", "0.45050102", "0.45023352", "0.44983515", "0.44932765" ]
0.0
-1
Craft a false DNS response Note the DNS response will not make use of any of the mocked query contents (all input is discarded and replies synthetically generated
public Object answer(InvocationOnMock invocation) throws Throwable { return craftResponse(invocation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayList<String> resolve(String domain, InetAddress dnsServer) {\n // Pointer\n int pos = 12;\n // Cmd buffer\n byte[] sendBuffer = new byte[100];\n // Message head\n sendBuffer[0] = ID[0];\n sendBuffer[1] = ID[1];\n sendBuffer[2] = 0x01;\n sendBuffer[3] = 0x00;\n sendBuffer[4] = 0x00;\n sendBuffer[5] = 0x01;\n sendBuffer[6] = 0x00;\n sendBuffer[7] = 0x00;\n sendBuffer[8] = 0x00;\n sendBuffer[9] = 0x00;\n sendBuffer[10] = 0x00;\n sendBuffer[11] = 0x00;\n\n // Add domain\n String[] part = domain.split(\"\\\\.\");\n for (String s : part) {\n if (s == null || s.length() <= 0)\n continue;\n int sLength = s.length();\n sendBuffer[pos++] = (byte) sLength;\n int i = 0;\n char[] val = s.toCharArray();\n while (i < sLength) {\n sendBuffer[pos++] = (byte) val[i++];\n }\n }\n\n // 0 end\n sendBuffer[pos++] = 0x00;\n sendBuffer[pos++] = 0x00;\n // 1 A record query\n sendBuffer[pos++] = 0x01;\n sendBuffer[pos++] = 0x00;\n // Internet record query\n sendBuffer[pos++] = 0x01;\n\n /**\n * UDP Send\n */\n DatagramSocket ds = null;\n byte[] receiveBuffer = null;\n try {\n ds = new DatagramSocket();\n ds.setSoTimeout(TIME_OUT);\n\n // Send\n DatagramPacket dp = new DatagramPacket(sendBuffer, pos, dnsServer, 53);\n ds.send(dp);\n\n // Receive\n dp = new DatagramPacket(new byte[512], 512);\n ds.receive(dp);\n\n // Copy\n int len = dp.getLength();\n receiveBuffer = new byte[len];\n System.arraycopy(dp.getData(), 0, receiveBuffer, 0, len);\n } catch (UnknownHostException e) {\n mError = Cmd.UNKNOWN_HOST_ERROR;\n } catch (SocketException e) {\n mError = Cmd.NETWORK_SOCKET_ERROR;\n e.printStackTrace();\n } catch (IOException e) {\n mError = Cmd.NETWORK_IO_ERROR;\n e.printStackTrace();\n } finally {\n if (ds != null) {\n try {\n ds.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n\n /**\n * Resolve data\n */\n\n // Check is return\n if (mError != Cmd.SUCCEED || receiveBuffer == null)\n return null;\n\n // ID\n if (receiveBuffer[0] != ID[0] || receiveBuffer[1] != ID[1]\n || (receiveBuffer[2] & 0x80) != 0x80)\n return null;\n\n // Count\n int queryCount = (receiveBuffer[4] << 8) | receiveBuffer[5];\n if (queryCount == 0)\n return null;\n\n int answerCount = (receiveBuffer[6] << 8) | receiveBuffer[7];\n if (answerCount == 0)\n return null;\n\n // Pointer restore\n pos = 12;\n\n // Skip the query part head\n for (int i = 0; i < queryCount; i++) {\n while (receiveBuffer[pos] != 0x00) {\n pos += receiveBuffer[pos] + 1;\n }\n pos += 5;\n }\n\n // Get ip form data\n ArrayList<String> iPs = new ArrayList<>();\n for (int i = 0; i < answerCount; i++) {\n if (receiveBuffer[pos] == (byte) 0xC0) {\n pos += 2;\n } else {\n while (receiveBuffer[pos] != (byte) 0x00) {\n pos += receiveBuffer[pos] + 1;\n }\n pos++;\n }\n byte queryType = (byte) (receiveBuffer[pos] << 8 | receiveBuffer[pos + 1]);\n pos += 8;\n int dataLength = (receiveBuffer[pos] << 8 | receiveBuffer[pos + 1]);\n pos += 2;\n // Add ip\n if (queryType == (byte) 0x01) {\n int address[] = new int[4];\n for (int n = 0; n < 4; n++) {\n address[n] = receiveBuffer[pos + n];\n if (address[n] < 0)\n address[n] += 256;\n }\n iPs.add(String.format(\"%s.%s.%s.%S\", address[0], address[1], address[2], address[3]));\n }\n pos += dataLength;\n }\n return iPs;\n }", "@Override\r\n protected IQ processRequest(IQ iq) {\n return iq.createResult(new Reachability(addresses));\r\n }", "@Test\n public void bogusReplySilentlyIgnored() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.sendFrame().headers(false, 41, TestUtil.headerEntries(\"a\", \"android\"));\n peer.sendFrame().ping(false, 2, 0);\n peer.acceptFrame();// PING\n\n peer.play();\n // play it back\n connect(peer);\n // verify the peer received what was expected\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(2, ping.payload1);\n }", "private void handleRawDnsResponse(IpPacket parsedPacket, DatagramSocket dnsSocket) throws IOException {\n byte[] datagramData = new byte[1024];\n DatagramPacket replyPacket = new DatagramPacket(datagramData, datagramData.length);\n dnsSocket.receive(replyPacket);\n dnsPacketProxy.handleDnsResponse(parsedPacket, datagramData);\n }", "public void __getReplyNoReport() {\n __getReply(false);\n }", "@Test\n public void testReplyToRequestFromUs() {\n Ip4Address ourIp = Ip4Address.valueOf(\"10.0.1.1\");\n MacAddress ourMac = MacAddress.valueOf(1L);\n Ip4Address theirIp = Ip4Address.valueOf(\"10.0.1.100\");\n\n expect(hostService.getHostsByIp(theirIp)).andReturn(Collections.emptySet());\n expect(interfaceService.getInterfacesByIp(ourIp))\n .andReturn(Collections.singleton(new Interface(getLocation(1),\n Collections.singleton(new InterfaceIpAddress(ourIp, IpPrefix.valueOf(\"10.0.1.1/24\"))),\n ourMac, VLAN1)));\n expect(hostService.getHost(HostId.hostId(ourMac, VLAN1))).andReturn(null);\n replay(hostService);\n replay(interfaceService);\n\n // This is a request from something inside our network (like a BGP\n // daemon) to an external host.\n Ethernet arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, ourMac, null, ourIp, theirIp);\n //Ensure the packet is allowed through (it is not to an internal port)\n\n proxyArp.reply(arpRequest, getLocation(5));\n assertEquals(1, packetService.packets.size());\n verifyPacketOut(arpRequest, getLocation(1), packetService.packets.get(0));\n\n // The same request from a random external port should fail\n packetService.packets.clear();\n proxyArp.reply(arpRequest, getLocation(2));\n assertEquals(0, packetService.packets.size());\n }", "public FakeDns unknownHost() {\n this.addresses = Collections.emptyList();\n return this;\n }", "private void __getReply() throws IOException\n {\n __getReply(true); // tagged response\n }", "@Test\n public void testReplyToRequestForUs() {\n Ip4Address theirIp = Ip4Address.valueOf(\"10.0.1.254\");\n Ip4Address ourFirstIp = Ip4Address.valueOf(\"10.0.1.1\");\n Ip4Address ourSecondIp = Ip4Address.valueOf(\"10.0.2.1\");\n MacAddress firstMac = MacAddress.valueOf(1L);\n MacAddress secondMac = MacAddress.valueOf(2L);\n\n Host requestor = new DefaultHost(PID, HID1, MAC1, VLAN1, LOC1,\n Collections.singleton(theirIp));\n\n expect(hostService.getHost(HID1)).andReturn(requestor);\n replay(hostService);\n replay(interfaceService);\n\n Ethernet arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, MAC1, null, theirIp, ourFirstIp);\n\n proxyArp.reply(arpRequest, LOC1);\n\n assertEquals(1, packetService.packets.size());\n Ethernet arpReply = buildArp(ARP.OP_REPLY, VLAN1, firstMac, MAC1, ourFirstIp, theirIp);\n verifyPacketOut(arpReply, LOC1, packetService.packets.get(0));\n\n // Test a request for the second address on that port\n packetService.packets.clear();\n arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, MAC1, null, theirIp, ourSecondIp);\n\n proxyArp.reply(arpRequest, LOC1);\n\n assertEquals(1, packetService.packets.size());\n arpReply = buildArp(ARP.OP_REPLY, VLAN1, secondMac, MAC1, ourSecondIp, theirIp);\n verifyPacketOut(arpReply, LOC1, packetService.packets.get(0));\n }", "public FutureResultWithAnswer queryToServer(Query query) throws IOException, Net4CareException;", "com.ipay.api.grpc.ServiceGenericReply getReply();", "String getDNSAnswers(DataInputStream dataInputStream) throws IOException {\n dataInputStream.readShort();\r\n short hexCode = dataInputStream.readShort();\r\n dataInputStream.readShort();\r\n dataInputStream.readInt();\r\n short addressLength = dataInputStream.readShort();\r\n byte[] address = new byte[addressLength];\r\n dataInputStream.read(address, 0, addressLength);\r\n\r\n Converter converter = new Converter(address, addressLength);\r\n\r\n try {\r\n if (hexCode == 0x0001 || hexCode == 0x0028) {\r\n if (!ipFound) {\t//Checks for IP returned address\r\n ipArrayList.add(converter.convert());\t///Adds to the list\r\n ipFound = true;\r\n return ipArrayList.get(ipArrayList.size() - 1);\r\n } else {\r\n ipArrayList.add(converter.convert());\r\n }\r\n } else if (hexCode == 0x0005) {\r\n if (!cnameFound) {\t//Checks for returned cname\r\n cnameIP = converter.convert();\r\n cnameFound = true;\r\n return cnameIP;\r\n } else\r\n return converter.convert();\r\n }\r\n else if(hexCode == 0x0006) {\r\n hostnameFound = true;\r\n return null;\r\n }\r\n else\r\n return null;\r\n }\r\n catch (Exception e){\r\n System.out.println(e);\r\n }\r\n return null;\r\n }", "@Override\n public List<DnsRecord> resolve(DnsQuestion question) {\n assert null != question;\n\n logger.debug(\"Attempting to resolve {}\", question);\n String questionName = question.getQuestionName().toLowerCase();\n\n // Might want to use a better data structure and algorithm - probably a tree with name segments\n for (String exception: exceptionList) {\n if (questionName.endsWith(exception)) {\n logger.debug(\"Exception found {}, returning empty list\", exception);\n return Collections.emptyList();\n }\n }\n\n List<DnsRecord> answers = new ArrayList<>();\n byte[] resourceData;\n switch (question.getQuestionType()) {\n case A:\n answers.add(new DnsRecord(questionName, DnsRecordType.A, DnsRecordClass.IN, ttl, serverIp));\n break;\n case CNAME:\n resourceData = ByteBufferUtils.encodeDomainName(\"a.\" + questionName);\n answers.add(new DnsRecord(questionName, DnsRecordType.CNAME, DnsRecordClass.IN, ttl, resourceData));\n break;\n case MX:\n // Do nothing and let it resolve for real I guess.\n break;\n case NS:\n resourceData = ByteBufferUtils.encodeDomainName(\"ns.\" + questionName);\n answers.add(new DnsRecord(questionName, DnsRecordType.NS, DnsRecordClass.IN, ttl, resourceData));\n break;\n case PTR:\n // Not doing any reverse lookup at the moment.\n break;\n case SOA:\n // Nope.\n break;\n case TXT:\n resourceData = text;\n answers.add(new DnsRecord(questionName, DnsRecordType.TXT, DnsRecordClass.IN, ttl, resourceData));\n break;\n }\n logger.debug(\"Resolved answers {}\", answers);\n return answers;\n\n }", "@Disabled\n @Test\n void testRun_nameserverQueryInTestTld_notFound() {\n persistResource(FullFieldsTestEntityHelper.makeHost(\"ns1.cat.lol\", \"1.2.3.4\"));\n newWhoisHttpAction(\"/nameserver/ns1.cat.lol\").run();\n assertThat(response.getPayload()).isEqualTo(loadFile(\"whois_action_nameserver.txt\"));\n }", "@Override\n\tpublic ZsPkgSearchReply respFormat(byte[] result) {\n\t\treturn null;\n\t}", "private ServerAddress parseResponse(String response, InetAddress address) {\n\n\t\tHashMap<String, String> values = parseBDP1Xml(response);\n\t\tif (values == null)\n\t\t\treturn null;\n\n\t\t// Validate \"response\" and \"signature\"\n\t\tString challenge_response = values.get(\"response\");\n\t\tString signature = values.get(\"signature\");\n\t\tif (challenge_response != null && signature != null) {\n\t\t\tString legit_response = getSignature(challenge_response)\n\t\t\t\t\t.toLowerCase();\n\t\t\tif (!legit_response.equals(signature.toLowerCase())) {\n\t\t\t\tLog.e(TAG, \"Signature verification failed \" + legit_response\n\t\t\t\t\t\t+ \" vs \" + signature);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// Validate \"cmd\"\n\t\tString cmd = values.get(\"cmd\");\n\t\tif (cmd == null || !cmd.equals(\"found\")) {\n\t\t\t// We'll get the discovery packet we sent out, where cmd=\"discovery\"\n\t\t\tLog.e(TAG, \"Bad cmd \" + response);\n\t\t\treturn null;\n\t\t}\n\n\t\t// Validate \"application\"\n\t\tString app = values.get(\"application\");\n\t\tif (app == null || !app.equals(\"boxee\")) {\n\t\t\tLog.e(TAG, \"Bad app \" + app);\n\t\t\treturn null;\n\t\t}\n\n\t\tServerAddress server = new ServerAddress(\"Boxee\", \n\t\t\t\tvalues.get(\"version\"), values.get(\"name\"),\n\t\t\t\t\"true\".equalsIgnoreCase(values.get(\"httpAuthRequired\")),\n\t\t\t\taddress, Integer.parseInt(values.get(\"httpPort\")));\n\t\tLog.d(TAG, \"Discovered server \" + server);\n\t\treturn server;\n\t}", "public static void parseResponse(byte[] response) {\n int qr = ((response[2] & 0b10000000) >> 7);\n int opcode = ((response[2] & 0b01111000) >> 3);\n int aa = ((response[2] & 0b00000100) >> 2);\n int tc = ((response[2] & 0b00000010) >> 1);\n int rd = (response[2] & 0b00000001);\n int ra = ((response[3] & 0b10000000) >> 7);\n int res1 = ((response[3] & 0b01000000) >> 6);\n int res2 = ((response[3] & 0b00100000) >> 5);\n int res3 = ((response[3] & 0b00010000) >> 4);\n int rcode = (response[3] & 0b00001111);\n int qdcount = (response[4] << 8 | response[5]);\n int ancount = (response[6] << 8 | response[7]);\n int nscount = (response[8] << 8 | response[9]);\n int arcount = (response[10] << 8 | response[11]);\n/*\n System.out.println(\"QR: \" + qr);\n System.out.println(\"OPCODE: \"+ opcode);\n System.out.println(\"AA: \" + aa);\n System.out.println(\"TC: \" + tc);\n System.out.println(\"RD: \" + rd);\n System.out.println(\"RA: \" + ra);\n System.out.println(\"RES1: \" + res1);\n System.out.println(\"RES2: \" + res2);\n System.out.println(\"RES3: \" + res3);\n System.out.println(\"RCODE: \" + rcode);\n System.out.println(\"QDCOUNT: \" + qdcount);\n System.out.println(\"ANCOUNT: \" + ancount);\n System.out.println(\"NSCOUNT: \" + nscount);\n System.out.println(\"ARCOUNT: \" + arcount);\n*/\n // WHO DESIGNED THE DNS PACKET FORMAT AND WHY DID THEY ADD POINTERS?!?\n HashMap<Integer, String> foundLabels = new HashMap<>();\n\n int curByte = 12;\n for(int i = 0; i < qdcount; i++) {\n ArrayList<Integer> currentLabels = new ArrayList<>();\n while(true) {\n if((response[curByte] & 0b11000000) != 0) {\n // Labels have a length value, the first two bits have to be 0.\n System.out.println(\"ERROR\\tInvalid label length in response.\");\n System.exit(1);\n }\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n currentLabels.add(pntr);\n for(Integer n : currentLabels) {\n if(foundLabels.containsKey(n)) {\n foundLabels.put(n, foundLabels.get(n) + \".\" + working.toString());\n } else {\n foundLabels.put(n, working.toString());\n }\n }\n }\n\n // Increment curByte every time we use it, meaning it always points to the byte we haven't used.\n short qtype = (short) ((response[curByte++] << 8) | response[curByte++]);\n short qclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n }\n\n // This for loop handles all the Answer section parts.\n for(int i = 0; i < ancount; i++) {\n StringBuilder recordName = new StringBuilder();\n while(true) {\n if((response[curByte] & 0b11000000) == 0b11000000) {\n recordName.append(foundLabels.get(((response[curByte++] & 0b00111111) << 8) | response[curByte++]));\n break;\n } else if ((response[curByte] & 0b11000000) == 0) {\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n recordName.append(working.toString());\n foundLabels.put(pntr, working.toString());\n } else {\n System.out.println(\"ERROR\\tInvalid label.\");\n System.exit(1);\n }\n }\n short type = (short) ((response[curByte++] << 8) | response[curByte++]);\n short dnsclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n int ttl = ((response[curByte++] << 24) | (response[curByte++] << 16) | (response[curByte++] << 8) | response[curByte++]);\n short rdlength = (short) ((response[curByte++] << 8) | response[curByte++]);\n\n // If it is an A record\n if(type == 1) {\n\n // If it is an invalid length\n if(rdlength != 4) {\n System.out.println(\"ERROR\\tA records should only have a 4 byte RDATA\");\n System.exit(1);\n }\n\n // Output the IP record\n System.out.println(\"IP\\t\" + (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \".\" +\n (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \"\\tnonauth\");\n }\n else if(type == 5){\n\n // Creates string to hold combined record\n String cnameRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte++] & 0xFF;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte] & 0xff;\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n cnameRecord += \".\";\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n cnameRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n cnameRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"CNAME\\t\" + cnameRecord + \"\\tnonauth\");\n }\n else if(type == 2){\n\n // Creates string to hold combined record\n String nsRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n nsRecord += \".\";\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n nsRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n nsRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"NS\\t\" + nsRecord + \"\\tnonauth\");\n }\n else if(type == 15){\n\n // Creates string to hold combined record\n String mxRecord = \"\";\n\n curByte ++;\n\n // Gets the preference number of the given mail server\n int preference = (int) response[curByte];\n\n curByte++;\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n mxRecord += \".\";\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n mxRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n mxRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"MX\\t\" + mxRecord + \"\\t\" + preference + \"\\tnonauth\");\n }\n }\n\n for(int i = 0; i < nscount; i++) {\n StringBuilder recordName = new StringBuilder();\n while(true) {\n if((response[curByte] & 0b11000000) == 0b11000000) {\n recordName.append(foundLabels.get(((response[curByte++] & 0b00111111) << 8) | response[curByte++]));\n break;\n } else if ((response[curByte] & 0b11000000) == 0) {\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n recordName.append(working.toString());\n foundLabels.put(pntr, working.toString());\n } else {\n System.out.println(\"ERROR\\tInvalid label.\");\n System.exit(1);\n }\n }\n short type = (short) ((response[curByte++] << 8) | response[curByte++]);\n short dnsclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n int ttl = ((response[curByte++] << 24) | (response[curByte++] << 16) | (response[curByte++] << 8) | response[curByte++]);\n short rdlength = (short) ((response[curByte++] << 8) | response[curByte++]);\n\n if(type == 1) {\n if(rdlength != 4) {\n System.out.println(\"ERROR\\tA records should only have a 4 byte RDATA\");\n System.exit(1);\n }\n System.out.println(\"IP\\t\" + (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \".\" +\n (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \"\\tauth\");\n }\n // If CNAME\n else if(type == 5){\n\n // Creates string to hold combined record\n String cnameRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n cnameRecord += \".\";\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n cnameRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n cnameRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"CNAME\\t\" + cnameRecord + \"\\tauth\");\n }\n else if(type == 2){\n\n // Creates string to hold combined record\n String nsRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n nsRecord += \".\";\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n nsRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n nsRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"NS\\t\" + nsRecord + \"\\tauth\");\n\n }\n else if(type == 15){\n\n // Creates string to hold combined record\n String mxRecord = \"\";\n\n curByte ++;\n\n // Gets the preference number of the given mail server\n int preference = (int) response[curByte];\n\n curByte++;\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n mxRecord += \".\";\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n mxRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n mxRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"MX\\t\" + mxRecord + \"\\t\" + preference + \"\\tauth\");\n }\n }\n }", "@Test\n public void remoteDoubleSynReply() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.acceptFrame();// PING\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"b\", \"banana\"));\n peer.sendFrame().ping(true, 1, 0);\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"c\", \"cola\"), false);\n Assert.assertEquals(Headers.of(\"a\", \"android\"), stream.takeHeaders());\n connection.writePingAndAwaitPong();// Ensure that the 2nd SYN REPLY has been received.\n\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n }", "public static String createDiscoverResponseMessage(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(\"HTTP/1.1 200 OK\").append(\"\\n\");\n\t\tsb.append(\"CACHE-CONTROL: max-age=1200\").append(\"\\n\");\n\t\tsb.append(\"DATE: Tue, 05 May 2009 13:31:51 GMT\").append(\"\\n\");\n\t\tsb.append(\"LOCATION: http://142.225.35.55:5001/description/fetch\").append(\"\\n\");\n\t\tsb.append(\"SERVER: Windows_XP-x86-5.1, UPnP/1.0, PMS/1.11\").append(\"\\n\");\n\t\tsb.append(\"ST: upnp:rootdevice\").append(\"\\n\");\n\t\tsb.append(\"EXT: \").append(\"\\n\");\n\t\tsb.append(\"USN: uuid:9dcf6222-fc4b-33eb-bf49-e54643b4f416::upnp:rootdevice\").append(\"\\n\");\n\t\tsb.append(\"Content-Length: 0\").append(\"\\n\");\n\t\t\n\t\treturn sb.toString();\n\t}", "protected ACLMessage prepareResponse(ACLMessage msg) {\n ACLMessage reply = msg.createReply();\n try {\n Object contentRebut = (Object)msg.getContent();\n showMessage(\"RECIEVED \"+msg.getSender().getName() + \", \"+msg.getPerformative());\n if(contentRebut.equals(\"Movement request\")) {\n showMessage(\"Movement request received\");\n reply.setPerformative(ACLMessage.AGREE);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n showMessage(\"Answer sent Movement requet recieved\"); //: \\n\"+reply.toString());\n return reply;\n }", "public String answerQuery(Query query) {\r\n\t\tString reply = null;\r\n\t\tif(query != null){\r\n\t\t\tif(query.elements != null){\r\n\t\t\t\tArrayList<String> queryReply = query.elements;\r\n\t\t\t\tqueryReply.add(is);\r\n\t\t\t\tqueryReply.add(Float.toString(query.price));\r\n\t\t\t\t\r\n\t\t\t\tif(query.isCredit){\r\n\t\t\t\t\tqueryReply.add(credit);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treply = GalaxyUtil.outputFormatter(queryReply);\r\n\t\t\t}else{\r\n\t\t\t\treply = badQuery;\r\n\t\t\t}\r\n\t\t\treply = query.query+\" \"+reply;\r\n\t\t\t\r\n\t\t\t//System.out.println(query.query+\" \"+reply);\r\n\t\t}\r\n\t\treturn reply;\r\n\t}", "public sparqles.avro.discovery.DGETInfo.Builder clearResponseLink() {\n ResponseLink = null;\n fieldSetFlags()[7] = false;\n return this;\n }", "public static InetAddress getByName(final String name) \n throws DNSSECException, IOException {\n final Name full = Name.concatenate(Name.fromString(name), Name.root);\n\n System.out.println(\"Verifying record: \"+ full);\n //final String [] servers = ResolverConfig.getCurrentConfig().servers();\n final Resolver res = newResolver();\n final Record question = Record.newRecord(full, Type.A, DClass.IN);\n final Message query = Message.newQuery(question);\n System.out.println(\"Sending query...\");\n final Message response = res.send(query);\n System.out.println(\"RESPONSE: \"+response);\n final RRset[] answer = response.getSectionRRsets(Section.ANSWER);\n \n final ArrayList<InetAddress> addresses = new ArrayList<InetAddress>();\n for (final RRset set : answer) {\n System.out.println(\"\\n;; RRset to chase:\");\n\n // First check for a CNAME and target.\n Iterator<Record> rrIter = set.rrs();\n boolean hasCname = false;\n Name cNameTarget = null;\n while (rrIter.hasNext()) {\n final Record rec = rrIter.next();\n final int type = rec.getType();\n \n if (type == Type.CNAME) {\n final CNAMERecord cname = (CNAMERecord) rec;\n hasCname = true;\n cNameTarget = cname.getTarget();\n } \n }\n \n rrIter = set.rrs();\n while (rrIter.hasNext()) {\n final Record rec = rrIter.next();\n System.out.println(rec);\n final int type = rec.getType();\n if (type == Type.A) {\n final ARecord arec = (ARecord) rec;\n if (hasCname) {\n if (rec.getName().equals(cNameTarget)) {\n addresses.add(arec.getAddress());\n }\n } else {\n addresses.add(arec.getAddress());\n }\n }\n }\n final Iterator<Record> sigIter = set.sigs();\n while (sigIter.hasNext()) {\n final RRSIGRecord rec = (RRSIGRecord) sigIter.next();\n System.out.println(\"\\n;; RRSIG of the RRset to chase:\");\n System.out.println(rec);\n verifyZone(set, rec);\n }\n }\n return addresses.get(0);\n }", "String getAnswerResponse();", "@Override\r\n\tpublic String parseResponses(String unfriendlyString) {\n\t\treturn null;\r\n\t}", "public void sendUnbindResponse(Pdu packet);", "private static void sendLookupRequest(String dnsName) {\n String request = \"lookup \" + dnsName;\n out.println(request);\n }", "@Test\n public void testReplyToRequestForUsIpv6() {\n Ip6Address theirIp = Ip6Address.valueOf(\"1000::ffff\");\n Ip6Address ourFirstIp = Ip6Address.valueOf(\"1000::1\");\n Ip6Address ourSecondIp = Ip6Address.valueOf(\"2000::2\");\n MacAddress firstMac = MacAddress.valueOf(1L);\n MacAddress secondMac = MacAddress.valueOf(2L);\n\n Host requestor = new DefaultHost(PID, HID2, MAC2, VLAN1, LOC1,\n Collections.singleton(theirIp));\n\n expect(hostService.getHost(HID2)).andReturn(requestor);\n expect(hostService.getHostsByIp(ourFirstIp))\n .andReturn(Collections.singleton(requestor));\n replay(hostService);\n replay(interfaceService);\n\n Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC2,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n ourFirstIp);\n\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(1, packetService.packets.size());\n\n Ethernet ndpReply = buildNdp(ICMP6.NEIGHBOR_ADVERTISEMENT,\n firstMac,\n MAC2,\n ourFirstIp,\n theirIp);\n verifyPacketOut(ndpReply, LOC1, packetService.packets.get(0));\n\n // Test a request for the second address on that port\n packetService.packets.clear();\n ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC2,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n ourSecondIp);\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(1, packetService.packets.size());\n\n ndpReply = buildNdp(ICMP6.NEIGHBOR_ADVERTISEMENT,\n secondMac,\n MAC2,\n ourSecondIp,\n theirIp);\n verifyPacketOut(ndpReply, LOC1, packetService.packets.get(0));\n }", "public QueryResponse(Query q) {\n this.q = q;\n this.docIDs = new HashSet<>();\n }", "public Builder clearResponseAddress() {\n bitField0_ = (bitField0_ & ~0x00000010);\n responseAddress_ = getDefaultInstance().getResponseAddress();\n onChanged();\n return this;\n }", "public static String m18355a(AbsResponseWrapper aVar, boolean z, boolean z2) {\n String a;\n if (aVar == null) {\n if (!Proxy.f16280c) {\n return \"response null\";\n }\n Log.e(\"TAG_PROXY_Response\", \"response null\");\n return \"response null\";\n } else if (!aVar.mo26446b()) {\n if (Proxy.f16280c) {\n Log.e(\"TAG_PROXY_Response\", \"response code: \" + aVar.mo26442a());\n }\n return \"response code: \" + aVar.mo26442a();\n } else {\n String a2 = aVar.mo26445a(\"Content-Type\", null);\n if (!m18372c(a2)) {\n if (Proxy.f16280c) {\n Log.e(\"TAG_PROXY_Response\", \"Content-Type: \" + a2);\n }\n return \"Content-Type: \" + a2;\n }\n int a3 = m18349a(aVar);\n if (a3 <= 0) {\n if (Proxy.f16280c) {\n Log.e(\"TAG_PROXY_Response\", \"Content-Length: \" + a3);\n }\n return \"Content-Length: \" + a3;\n } else if (z && ((a = aVar.mo26445a(\"Accept-Ranges\", null)) == null || !a.contains(\"bytes\"))) {\n if (Proxy.f16280c) {\n Log.e(\"TAG_PROXY_Response\", \"Accept-Ranges: \" + a);\n }\n return \"Accept-Ranges: \" + a;\n } else if (!z2 || aVar.mo26448d() != null) {\n return null;\n } else {\n if (!Proxy.f16280c) {\n return \"response body null\";\n }\n Log.e(\"TAG_PROXY_Response\", \"response body null\");\n return \"response body null\";\n }\n }\n }", "protected void buildResponse() {\r\n appendResponse(\"<?xml version=\\\"1.0\\\" standalone=\\\"no\\\"?>\\r\\n\");\r\n appendResponse(\"<!DOCTYPE RETS SYSTEM \\\"RETS-20021015.dtd\\\">\\r\\n\");\r\n appendResponse(\"<RETS ReplyCode=\\\"\");\r\n appendResponse(replyCode);\r\n appendResponse(\"\\\" ReplyText=\\\"\");\r\n appendResponse(replyText);\r\n appendResponse(\"\\\"\");\r\n\r\n if (getReplyCode() != REPLY_CODE_SUCCESS) {\r\n cat.debug(\"*****ERROR\");\r\n appendResponse(\" />\");\r\n } else {\r\n appendResponse(\" >\\n\");\r\n\r\n fillContent();\r\n\r\n appendResponse(\"</RETS>\\r\\n\");\r\n }\r\n\r\n cat.debug(\"RESPONSE ::\" + this.response.toString());\r\n }", "void stubNextResponse(HttpExecuteResponse nextResponse, Duration delay);", "protected abstract void askResponse();", "@Test\n public void testReplyExternalPortBadRequest() {\n replay(hostService); // no further host service expectations\n replay(interfaceService);\n\n Ip4Address theirIp = Ip4Address.valueOf(\"10.0.1.254\");\n\n // Request for a valid external IP address but coming in the wrong port\n Ethernet arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, MAC1, null, theirIp,\n Ip4Address.valueOf(\"10.0.3.1\"));\n proxyArp.reply(arpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n\n // Request for a valid internal IP address but coming in an external port\n packetService.packets.clear();\n arpRequest = buildArp(ARP.OP_REQUEST, VLAN1, MAC1, null, theirIp, IP1);\n proxyArp.reply(arpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n }", "@SmallTest\n @Test\n public void testNegotiationFailedInvalidResponse() {\n testStartNegotiation();\n\n // Received something other than the probe; it should be ignored\n mDtmfTransport.onDtmfReceived('1');\n // Super short message.\n mDtmfTransport.onDtmfReceived('A');\n mDtmfTransport.onDtmfReceived('D');\n\n verify(mCallback).onNegotiationFailed(eq(mDtmfTransport));\n }", "public PBFTReply createNullReplyMessage(PBFTRequest request){\n return new PBFTReply(request, null, getLocalServerID(), getCurrentViewNumber());\n }", "protected void sendUpnpResponse(DatagramPacket aPacket) throws IOException {\n\t\tInetAddress requester = aPacket.getAddress();\n\t\tint sourcePort = aPacket.getPort();\n\t\tString discoveryResponse = null;\n\t\tString httpLocationAddress = null;\n\t\tif (useUpnpIface) {\n\t\t\thttpLocationAddress = upnpConfigIP;\n\t\t} else {\n\t\t\t// refactored suggestion by https://github.com/pvint\n\t\t\thttpLocationAddress = AddressUtil.getOutboundAddress(requester.getHostAddress(), sourcePort).getHostAddress();\n\t\t}\n\n\t\ttry {\n\t\t\tThread.sleep(theUpnpSendDelay);\n\t\t} catch (InterruptedException e) {\n\t\t\t// noop\n\t\t}\n\n\t\tdiscoveryResponse = String.format(responseTemplate1, Configuration.UPNP_MULTICAST_ADDRESS,\n\t\t\t\tConfiguration.UPNP_DISCOVERY_PORT, httpType, httpLocationAddress, httpServerPort, bridgeId,\n\t\t\t\tbridgeSNUUID);\n\t\tif (traceupnp) {\n\t\t\tlog.info(\"Traceupnp: send upnp discovery template 1 with response address: \" + httpLocationAddress + \":\"\n\t\t\t\t\t+ httpServerPort + \" to address: \" + requester.getHostAddress() + \":\" + sourcePort);\n\t\t}\n\t\tlog.debug(\"sendUpnpResponse to address: \" + requester.getHostAddress() + \":\" + sourcePort\n\t\t\t\t+ \" with discovery responseTemplate1 is <<<\" + discoveryResponse + \">>>\");\n\t\tsendUDPResponse(discoveryResponse.getBytes(), requester, sourcePort);\n\n\t\tif(upnpAdvanced) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(theUpnpSendDelay);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// noop\n\t\t\t}\n\t\t\tdiscoveryResponse = String.format(responseTemplate2, Configuration.UPNP_MULTICAST_ADDRESS,\n\t\t\t\t\tConfiguration.UPNP_DISCOVERY_PORT, httpType, httpLocationAddress, httpServerPort, bridgeId,\n\t\t\t\t\tbridgeSNUUID, bridgeSNUUID);\n\t\t\tif (traceupnp) {\n\t\t\t\tlog.info(\"Traceupnp: send upnp discovery template 2 with response address: \" + httpLocationAddress + \":\"\n\t\t\t\t\t\t+ httpServerPort + \" to address: \" + requester.getHostAddress() + \":\" + sourcePort);\n\t\t\t}\n\t\t\tlog.debug(\"sendUpnpResponse to address: \" + requester.getHostAddress() + \":\" + sourcePort\n\t\t\t\t\t+ \" discovery responseTemplate2 is <<<\" + discoveryResponse + \">>>\");\n\t\t\tsendUDPResponse(discoveryResponse.getBytes(), requester, sourcePort);\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(theUpnpSendDelay);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// noop\n\t\t\t}\n\t\t\tdiscoveryResponse = String.format(responseTemplate3, Configuration.UPNP_MULTICAST_ADDRESS,\n\t\t\t\t\tConfiguration.UPNP_DISCOVERY_PORT, httpType, httpLocationAddress, httpServerPort, bridgeId,\n\t\t\t\t\tbridgeSNUUID);\n\t\t\tif (traceupnp) {\n\t\t\t\tlog.info(\"Traceupnp: send upnp discovery template 3 with response address: \" + httpLocationAddress + \":\"\n\t\t\t\t\t\t+ httpServerPort + \" to address: \" + requester.getHostAddress() + \":\" + sourcePort);\n\t\t\t}\n\t\t\tlog.debug(\"sendUpnpResponse to address: \" + requester.getHostAddress() + \":\" + sourcePort\n\t\t\t\t\t+ \" discovery responseTemplate3 is <<<\" + discoveryResponse + \">>>\");\n\t\t\tsendUDPResponse(discoveryResponse.getBytes(), requester, sourcePort);\n\t\t}\n\t}", "protected ACLMessage prepareResultNotification(ACLMessage msg, ACLMessage response) {\n ACLMessage reply = msg.createReply();\n reply.setPerformative(ACLMessage.INFORM);\n \n Object content = (Object)msg.getContent();\n \n // Prepare response for a ships movement request\n if(content.equals(\"Movement request\")){\n prepareMovementResultNotitication(reply);\n \n // Prepare response for a start negotiation requests\n }else if(content.equals(\"Negotiation request\")){\n \n }\n \n showMessage(\"Answer sent inform movement\"); //+reply.toString());\n return reply;\n\n }", "protected Response checkResponse(Response plainAnswer) throws WSException{\n if(plainAnswer!=null)\n switch(plainAnswer.getStatus()){\n //good answers\n case 200: {\n return plainAnswer;\n }//OK\n case 202: {\n return plainAnswer;\n }//ACCEPTED \n case 201: {\n return plainAnswer;\n }//CREATED\n //To be evaluate\n case 204: {\n return plainAnswer;\n }//NO_CONTENT\n //bad answers\n case 400: {\n throw new WSException400(\"BAD REQUEST! The action can't be completed\");\n }//BAD_REQUEST \n case 409: {\n throw new WSException409(\"CONFLICT! The action can't be completed\");\n }//CONFLICT \n case 403: {\n throw new WSException403(\"FORBIDDEN!The action can't be completed\");\n }//FORBIDDEN \n case 410: {\n throw new WSException410(\"GONE! The action can't be completed\");\n }//GONE\n case 500: {\n throw new WSException500(\"INTERNAL_SERVER_ERROR! The action can't be completed\");\n }//INTERNAL_SERVER_ERROR \n case 301: {\n throw new WSException301(\"MOVED_PERMANENTLY! The action can't be completed\");\n }//MOVED_PERMANENTLY \n case 406: {\n throw new WSException406(\"NOT_ACCEPTABLE! The action can't be completed\");\n }//NOT_ACCEPTABLE\n case 404: {\n throw new WSException404(\"NOT_FOUND! The action can't be completed\");\n }//NOT_FOUND\n case 304: {\n throw new WSException304(\"NOT_MODIFIED! The action can't be completed\");\n }//NOT_MODIFIED \n case 412: {\n throw new WSException412(\"PRECONDITION_FAILED! The action can't be completed\");\n }//PRECONDITION_FAILED \n case 303: {\n throw new WSException303(\"SEE_OTHER! The action can't be completed\");\n }//SEE_OTHER\n case 503: {\n throw new WSException503(\"SERVICE_UNAVAILABLE! The action can't be completed\");\n }//SERVICE_UNAVAILABLE\n case 307: {\n throw new WSException307(\"TEMPORARY_REDIRECT! The action can't be completed\");\n }//TEMPORARY_REDIRECT \n case 401: {\n throw new WSException401(\"UNAUTHORIZED! The action can't be completed\");\n }//UNAUTHORIZED \n case 415: {\n throw new WSException415(\"UNSUPPORTED_MEDIA_TYPE! The action can't be completed\");\n }//UNSUPPORTED_MEDIA_TYPE \n }\n return plainAnswer;\n }", "boolean hasResponseAddress();", "void faild_response();", "private SpeechletResponse generateAskResponse(String stringOutput,\n String repromptText) {\n\n /* Set output speech */\n OutputSpeech outputSpeech, repromptOutputSpeech;\n outputSpeech = new PlainTextOutputSpeech();\n ((PlainTextOutputSpeech) outputSpeech).setText(stringOutput);\n\n /* Set re-prompt speech */\n repromptOutputSpeech = new PlainTextOutputSpeech();\n ((PlainTextOutputSpeech) repromptOutputSpeech).setText(repromptText);\n Reprompt reprompt = new Reprompt();\n reprompt.setOutputSpeech(repromptOutputSpeech);\n\n return SpeechletResponse.newAskResponse(outputSpeech, reprompt);\n }", "private void prepareReply(ACLMessage msg) {\n\t\treply = msg.createReply();\n\t\treply.setPerformative(ACLMessage.REQUEST);\n\t\treply.setSender(getAID());\n\t}", "@SuppressWarnings(\"unchecked\")\n @Test\n public void variableResponseTypes() throws Exception {\n assumeThat(getEnv().serverVersion[0], is(greaterThanOrEqualTo(3)));\n\n assertThat(awaitIndefinitely(commandClient.zrem(key(\"Sicily\"), asList(buf(\"Palermo\"), buf(\"Catania\")))), is(lessThanOrEqualTo(2L)));\n\n final Long geoaddLong = awaitIndefinitely(commandClient.geoadd(key(\"Sicily\"),\n asList(new BufferLongitudeLatitudeMember(13.361389d, 38.115556d, buf(\"Palermo\")),\n new BufferLongitudeLatitudeMember(15.087269d, 37.502669d, buf(\"Catania\")))));\n assertThat(geoaddLong, is(2L));\n\n final List<Buffer> georadiusBuffers = awaitIndefinitely(commandClient.georadius(key(\"Sicily\"), 15d, 37d, 200d, KM));\n assertThat(georadiusBuffers, contains(buf(\"Palermo\"), buf(\"Catania\")));\n\n final List<?> georadiusMixedList = awaitIndefinitely(commandClient.georadius(key(\"Sicily\"), 15d, 37d, 200d, KM, WITHCOORD, WITHDIST, null, 5L, ASC, null, null));\n final Matcher georadiusResponseMatcher = contains(\n contains(is(buf(\"Catania\")), bufStartingWith(buf(\"56.\")), contains(bufStartingWith(buf(\"15.\")), bufStartingWith(buf(\"37.\")))),\n contains(is(buf(\"Palermo\")), bufStartingWith(buf(\"190.\")), contains(bufStartingWith(buf(\"13.\")), bufStartingWith(buf(\"38.\")))));\n assertThat(georadiusMixedList, georadiusResponseMatcher);\n\n assertThat(awaitIndefinitely(commandClient.geodist(key(\"Sicily\"), buf(\"Palermo\"), buf(\"Catania\"))), is(greaterThan(0d)));\n assertThat(awaitIndefinitely(commandClient.geodist(key(\"Sicily\"), buf(\"foo\"), buf(\"bar\"))), is(nullValue()));\n\n assertThat(awaitIndefinitely(commandClient.geopos(key(\"Sicily\"), buf(\"Palermo\"), buf(\"NonExisting\"), buf(\"Catania\"))), contains(\n contains(bufStartingWith(buf(\"13.\")), bufStartingWith(buf(\"38.\"))), is(nullValue()), contains(bufStartingWith(buf(\"15.\")), bufStartingWith(buf(\"37.\")))));\n\n final List<Buffer> evalBuffers = awaitIndefinitely(commandClient.evalList(buf(\"return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}\"),\n 2L, asList(buf(\"key1\"), buf(\"key2\")), asList(buf(\"first\"), buf(\"second\"))));\n assertThat(evalBuffers, contains(buf(\"key1\"), buf(\"key2\"), buf(\"first\"), buf(\"second\")));\n\n final Buffer evalBuf = awaitIndefinitely(commandClient.eval(buf(\"return redis.call('set','foo','bar')\"),\n 0L, emptyList(), emptyList()));\n assertThat(evalBuf, is(buf(\"OK\")));\n\n final Long evalLong = awaitIndefinitely(commandClient.evalLong(buf(\"return 10\"), 0L, emptyList(), emptyList()));\n assertThat(evalLong, is(10L));\n\n final List<?> evalMixedList = awaitIndefinitely(commandClient.evalList(buf(\"return {1,2,{3,'four'}}\"), 0L, emptyList(), emptyList()));\n assertThat(evalMixedList, contains(1L, 2L, asList(3L, buf(\"four\"))));\n }", "protected Message<Response>\n run(final String query, final Message<Request> m) throws Exception {\n final String p = HTTP.predicate(query);\n if (null == p || \".\".equals(p)) { // introspection or when block\n if (\"OPTIONS\".equals(m.head.method)) {\n return new Message<Response>(\n Response.options(\"TRACE\",\"OPTIONS\",\"GET\",\"HEAD\"), null);\n }\n if (!(\"GET\".equals(m.head.method) || \"HEAD\".equals(m.head.method))){\n return new Message<Response>(\n Response.notAllowed(\"TRACE\",\"OPTIONS\",\"GET\",\"HEAD\"), null);\n }\n Object value;\n try {\n // AUDIT: call to untrusted application code\n value = Eventual.ref(exports.reference(query)).call();\n } catch (final NullPointerException e) {\n return serialize(m.head.method, \"404\", \"not yet\",\n Server.ephemeral, new Rejected<Object>(e));\n } catch (final Exception e) {\n value = new Rejected<Object>(e);\n }\n if (null == p && !HTTP.isPBC(value)) {\n value = describe(value.getClass());\n }\n final Response failed = m.head.allow(\"\\\"\\\"\");\n if (null != failed) { return new Message<Response>(failed, null); }\n return serialize(m.head.method, \"200\", \"OK\", Server.forever, value);\n } // member access\n \n // determine the target object\n final Object target;\n try {\n final Promise<?> subject = Eventual.ref(exports.reference(query));\n // to preserve message order, only access members on a fulfilled ref\n if (!Fulfilled.isInstance(subject)) { throw new Exception(); }\n // AUDIT: call to untrusted application code\n target = subject.call();\n } catch (final Exception e) {\n return serialize(m.head.method, \"404\", \"never\", Server.forever,\n new Rejected<Object>(e));\n } \n if (HTTP.isPBC(target)) {\n // prevent access to local implementation details\n return new Message<Response>(Response.gone(), null);\n }\n \n // determine the type of accessed member\n final Method lambda = HTTP.dispatch(target, p);\n if (null == lambda) { // no such member\n if (\"OPTIONS\".equals(m.head.method)) {\n return new Message<Response>(\n Response.options(\"TRACE\", \"OPTIONS\"), null);\n }\n return new Message<Response>(\n Response.notAllowed(\"TRACE\", \"OPTIONS\"), null);\n }\n \n if (null != HTTP.property(lambda)) { // property access\n if (\"OPTIONS\".equals(m.head.method)) {\n return new Message<Response>(\n Response.options(\"TRACE\",\"OPTIONS\",\"GET\",\"HEAD\"), null);\n }\n if (!(\"GET\".equals(m.head.method) || \"HEAD\".equals(m.head.method))){\n return new Message<Response>(\n Response.notAllowed(\"TRACE\",\"OPTIONS\",\"GET\",\"HEAD\"), null);\n }\n Object value;\n try {\n // AUDIT: call to untrusted application code\n final Object r = Reflection.invoke(bubble(lambda), target);\n value = Fulfilled.isInstance(r) ? ((Promise<?>)r).call() : r;\n } catch (final Exception e) {\n value = new Rejected<Object>(e);\n }\n final boolean constant = \"getClass\".equals(lambda.getName());\n final int maxAge = constant ? Server.forever : Server.ephemeral; \n final String etag = constant ? null : exports.getTransactionTag();\n final Response failed = m.head.allow(etag);\n if (null != failed) { return new Message<Response>(failed, null); }\n Message<Response> r =\n serialize(m.head.method, \"200\", \"OK\", maxAge, value);\n if (null != etag) {\n r = new Message<Response>(r.head.with(\"ETag\", etag), r.body);\n }\n return r;\n }\n \n if (\"OPTIONS\".equals(m.head.method)) { // method invocation\n return new Message<Response>(\n Response.options(\"TRACE\", \"OPTIONS\", \"POST\"), null);\n }\n if (!\"POST\".equals(m.head.method)) {\n return new Message<Response>(\n Response.notAllowed(\"TRACE\", \"OPTIONS\", \"POST\"), null);\n }\n final Response failed = m.head.allow(null);\n if (null != failed) { return new Message<Response>(failed, null); }\n final Object value=exports.execute(query, lambda, new Promise<Object>(){\n public Object\n call() throws Exception {\n /*\n * SECURITY CLAIM: deserialize inside the once block to ensure\n * application code cannot detect request replay by causing\n * failed deserialization\n */ \n final ConstArray<?> argv;\n try {\n argv = deserialize(m,\n ConstArray.array(lambda.getGenericParameterTypes()));\n } catch (final BadSyntax e) {\n /*\n * strip out the parsing information to avoid leaking\n * information to the application layer\n */ \n throw (Exception)e.getCause();\n }\n \n // AUDIT: call to untrusted application code\n final Object r = Reflection.invoke(bubble(lambda), target,\n argv.toArray(new Object[argv.length()]));\n return Fulfilled.isInstance(r) ? ((Promise<?>)r).call() : r;\n }\n });\n return serialize(m.head.method, \"200\", \"OK\", Server.ephemeral, value);\n }", "public sparqles.avro.discovery.DGETInfo.Builder clearResponseServer() {\n ResponseServer = null;\n fieldSetFlags()[6] = false;\n return this;\n }", "private void useFakeResponse() {\n EmployeeApp.useFakeResponse = true;\n ResponseObject responseObject = new ResponseObject();\n responseObject.setReturnCode(200);\n responseObject.setType(ResponseObject.ResponseType.JSON);\n responseObject.setResponseBodyString(new CompanyEmployeesResponse().getRandomResponse());\n FakeInterceptor.addTest(\"-mobile-\", responseObject);\n }", "void handlePacket(String devReplyStr);", "@Test\n public void getOembedResponseForShouldWork5() throws IOException {\n\tString embeddableUrl = \"https://dailyfratze.de/michael/2014/10/13\";\n\tHttpResponse r1 = Mockito.mock(HttpResponse.class, Mockito.RETURNS_DEEP_STUBS);\n\twhen(r1.getStatusLine().getStatusCode()).thenReturn(200);\n\twhen(r1.getEntity().getContentType()).thenReturn(null);\n\twhen(r1.getEntity().getContent()).thenReturn(this.getClass().getResourceAsStream(\"/ac/simons/oembed/autodiscovery2.html\"));\n\n\tHttpResponse r2 = Mockito.mock(HttpResponse.class, Mockito.RETURNS_DEEP_STUBS);\n\twhen(r2.getStatusLine().getStatusCode()).thenReturn(200);\n\twhen(r2.getEntity().getContentType()).thenReturn(null);\n\twhen(r2.getEntity().getContent()).thenReturn(new ByteArrayInputStream(responseString.getBytes()));\n\n\twhen(defaultHttpClient.execute(any(HttpGet.class))).thenAnswer(new Answer() {\n\t @Override\n\t public Object answer(InvocationOnMock invocation) {\n\t\tfinal String url = invocation.getArgumentAt(0, HttpGet.class).getURI().toString();\n\t\tHttpResponse rv = null;\n\t\tif(embeddableUrl.equals(url)) {\n\t\t rv = r1;\n\t\t} else if(\"https://dailyfratze.de/app/oembed.json?url=https%3A%2F%2Fdailyfratze.de%2Fmichael%2F2014%2F10%2F13\".equals(url)) {\n\t\t rv = r2;\n\t\t}\n\t\treturn rv;\n\t }\n\t});\n\t\n\tOembedService oembedService = new OembedService(defaultHttpClient, null, new ArrayList<>(), null);\n\toembedService.setAutodiscovery(true);\n\t\t\n\tAssert.assertTrue(oembedService.getOembedResponseFor(embeddableUrl).isPresent());\t\n\tverify(defaultHttpClient, times(2)).execute(any(HttpGet.class));\t\n\tverifyNoMoreInteractions(cacheManager, defaultHttpClient);\t\t\n }", "boolean hasReply();", "public ResponsePacket() {\n MacAddr = new ArrayList<String>();\n content = new ArrayList<String>();\n }", "public CarReply() {\n super();\n this.nrCars = 0;\n this.carwashID = \"\";\n }", "public com.example.DNSLog.Builder clearRespp() {\n respp = null;\n fieldSetFlags()[4] = false;\n return this;\n }", "private static SearchResponse createSearchResponse() {\n long tookInMillis = randomNonNegativeLong();\n int totalShards = randomIntBetween(1, Integer.MAX_VALUE);\n int successfulShards = randomIntBetween(0, totalShards);\n int skippedShards = randomIntBetween(0, totalShards);\n InternalSearchResponse internalSearchResponse = InternalSearchResponse.empty();\n\n return new SearchResponse(\n internalSearchResponse,\n null,\n totalShards,\n successfulShards,\n skippedShards,\n tookInMillis,\n ShardSearchFailure.EMPTY_ARRAY,\n SearchResponse.Clusters.EMPTY\n );\n }", "void ackResult(boolean resultMatch);", "public void handleResponse(byte[] result, Command originalCommand);", "@Override\n\tpublic Packet generateForwardingReplyPacket(Packet p, InetAddress sndr) {\n\t\tif(verifyall){\n boolean v=sm.verify(p);\n System.out.println(\"verify=\"+v);\n if(!v){\n return null;\n }\n }\n\t\tif(p.getHeader().getDest().equals(sndr)) {\n\t\t\tSystem.out.println(\"verify: \"+sm.verify(p));\n\t\t}\n Packet pkt=super.generateForwardingReplyPacket(p, sndr);\n // System.out.println(\"pkt=\"+pkt);\n if(pkt==null){\n return null;\n }\n pkt=sm.sign(pkt);\n return pkt;\n\t}", "private static DataService createMockDS(Collection<String> dataToReturn, boolean shouldFail) throws IOException {\n //create the simulated response\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n serialiser.serialise(dataToReturn.stream(),baos);\n ReadResponse readResponse = new ClientReadResponse(new ByteArrayInputStream(baos.toByteArray()));\n //mock a data service to return it\n DataService mock = mock(DataService.class);\n if (shouldFail) {\n given(mock.read(any(ReadRequest.class))).willReturn(CompletableFuture.supplyAsync(() -> {\n throw new RuntimeException(\"test exception\");\n }));\n } else {\n given(mock.read(any(ReadRequest.class))).willReturn(CompletableFuture.completedFuture(readResponse));\n }\n return mock;\n }", "public interface HttpResponseProxylet extends Proxylet {\n \n /**\n * Possible return code of method 'accept'.\n * <br/>The proxylet accepts the message and will not block while processing it\n */\n public static final int ACCEPT = 0x03;\n /**\n * Possible return code of method 'accept'.\n * the proxylet accepts the message but might block while processing it\n */\n public static final int ACCEPT_MAY_BLOCK = 0x7;\n /**\n * Possible return code of method 'accept'.\n * <br/>The proxylet is not interested in the message\n */\n public static final int IGNORE = 0;\n \n /**\n * Called by the Engine to know how the proxylet will handle the Response.\n * <br/>The possible return codes are: ACCEPT, ACCEPT_MAY_BLOCK, IGNORE.\n * <b>NOTE: This method can be called by the Engine several times in a row for the same request.</b>\n * Therefore it should behave accordingly.\n * @param prolog the response prolog\n * @param headers the response headers\n * @return ACCEPT, ACCEPT_MAY_BLOCK, or IGNORE\n */\n public int accept(HttpResponseProlog prolog, HttpHeaders headers);\n \n}", "@SuppressLint(\"CallbackMethodName\")\n void reply(@NonNull byte[] response);", "byte[] getReplyAddress();", "Response mo35726n0() throws IOException;", "@Test\n public void testReplyToRequestFromUsIpv6() {\n Ip6Address ourIp = Ip6Address.valueOf(\"1000::1\");\n MacAddress ourMac = MacAddress.valueOf(1L);\n Ip6Address theirIp = Ip6Address.valueOf(\"1000::100\");\n\n expect(hostService.getHostsByIp(theirIp)).andReturn(Collections.emptySet());\n expect(interfaceService.getInterfacesByIp(ourIp))\n .andReturn(Collections.singleton(new Interface(getLocation(1),\n Collections.singleton(new InterfaceIpAddress(\n ourIp,\n IpPrefix.valueOf(\"1000::1/64\"))),\n ourMac,\n VLAN1)));\n expect(hostService.getHost(HostId.hostId(ourMac, VLAN1))).andReturn(null);\n replay(hostService);\n replay(interfaceService);\n\n // This is a request from something inside our network (like a BGP\n // daemon) to an external host.\n Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n ourMac,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n ourIp,\n theirIp);\n\n proxyArp.reply(ndpRequest, getLocation(5));\n assertEquals(1, packetService.packets.size());\n verifyPacketOut(ndpRequest, getLocation(1), packetService.packets.get(0));\n\n // The same request from a random external port should fail\n packetService.packets.clear();\n proxyArp.reply(ndpRequest, getLocation(2));\n assertEquals(0, packetService.packets.size());\n }", "public QueryTaskResult( int numPatientsReturned, boolean obfuscated )\n\t{\n\t\tsuper();\n\t\tmyStatusCode\t= StatusCode.SUCCESS;\n\t\tmyNumPatients \t= numPatientsReturned;\n\t\tisObfuscated\t= obfuscated;\n\t}", "@Override\n public void onResponse(String response) {\n Log.i(\"Checking\", response + \" \");\n if(new ServerReply(response).getStatus())\n {\n Toast.makeText(context,new ServerReply(response).getReason(),Toast.LENGTH_LONG).show();\n }\n\n }", "private void prepareNoResponse() {\n when(mSentenceDataRepository.getTodaysSentenceResponse()).thenReturn(null);\n }", "public BtcRpcGetAddressInfoEmbeddedResponse() {\n super();\n }", "public Builder setResponse(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n response_ = value;\n onChanged();\n return this;\n }", "private boolean sendAndCheckResp(byte[] userMessage, String trueResp, String falseResp) {\n\t\tbyte[] srvrResponse = sendServerCoded(userMessage);\n\t\tbyte[] expectedResponse = trueResp.getBytes();\n\t\tbyte[] alternateResponse = falseResp.getBytes();\n\n\t\tboolean truthVal = false;\n\t\tif (Arrays.equals(srvrResponse, expectedResponse)) {\n\t\t\ttruthVal = true;\n\t\t} else if (Arrays.equals(srvrResponse, alternateResponse)) {\n\t\t\t// truthVal = false;\n\t\t} else {\n\t\t\tComMethods.handleBadResp();\n\t\t}\n\t\treturn truthVal;\n\t}", "@Test\n public void queryWithOneInnerQueryCreate() throws IOException {\n BaseFuseClient fuseClient = new BaseFuseClient(\"http://localhost:8888/fuse\");\n //query request\n CreateQueryRequest request = new CreateQueryRequest();\n request.setId(\"1\");\n request.setName(\"test\");\n request.setQuery(Q1());\n //submit query\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .body(request)\n .post(\"/fuse/query\")\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1/cursor\"));\n assertEquals(1,queryResourceInfo.getInnerUrlResourceInfos().size());\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(201)\n .contentType(\"application/json;charset=UTF-8\");\n\n //get query resource by id\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .get(\"/fuse/query/\"+request.getId()+\"->\"+Q2().getName())\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(200)\n .contentType(\"application/json;charset=UTF-8\");\n\n\n }", "public interface RawContentResponse {\n /**\n * Gets the input stream for the response.\n *\n * @return the input stream\n */\n Optional<String> getResponseBody();\n\n /**\n * Gets the state of the response.\n *\n * @return the response state\n */\n ResponseState getState();\n\n /**\n * Gets the type of error, if any.\n *\n * @return the error type, or {@link ErrorType#UNKNOWN} on a non-error\n */\n ErrorType getErrorType();\n\n /**\n * Gets the number of pages in the response.\n *\n * @return the page count, or absent if the endpoint isn't paginated\n */\n Optional<Integer> getPageCount();\n\n /**\n * Returns true if the server gave a deprecation warning during this request.\n *\n * @return true if route is deprecated\n */\n default boolean isDeprecated() {\n return false;\n }\n\n /**\n * Gets the ETag associated with this request.\n *\n * @return the ETag, optionally\n */\n default Optional<String> getETag() {\n return Optional.empty();\n }\n\n /**\n * Gets the date that the data in the response becomes expired.\n *\n * @return the expiry date\n */\n Optional<ZonedDateTime> getExpiryDate();\n\n static RawContentResponse.Builder builder() {\n return new Builder() {\n private final Response.ResponseBuilder responseBuilder = new Response.ResponseBuilder();\n\n private ResponseState state = ResponseState.SUCCESS;\n private ErrorType errorType = ErrorType.UNKNOWN;\n private boolean deprecated = false;\n private String etag = null;\n private ZonedDateTime expiryDate = null;\n\n @Override\n public Builder setState(final ResponseState state) {\n this.state = state;\n return this;\n }\n\n @Override\n public Builder setErrorType(final ErrorType errorType) {\n this.errorType = errorType;\n return this;\n }\n\n @Override\n public Builder setDeprecated(final boolean deprecated) {\n this.deprecated = deprecated;\n return this;\n }\n\n public Builder setETag(final String etag) {\n this.etag = etag;\n return this;\n }\n\n @Override\n public Builder setExpiryDate(final ZonedDateTime expiryDate) {\n this.expiryDate = expiryDate;\n return this;\n }\n\n @Override\n public Builder accumulate(final HttpResponseStatus status) {\n responseBuilder.accumulate(status);\n return this;\n }\n\n @Override\n public Builder accumulate(final HttpResponseHeaders headers) {\n responseBuilder.accumulate(headers);\n return this;\n }\n\n @Override\n public Builder accumulate(final HttpResponseBodyPart bodyPart) {\n responseBuilder.accumulate(bodyPart);\n return this;\n }\n\n @Override\n public RawContentResponse build() {\n return new Impl(responseBuilder.build(), state, errorType, deprecated, etag, expiryDate);\n }\n };\n }\n\n interface Builder {\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setState(ResponseState state);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setErrorType(ErrorType errorType);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setDeprecated(boolean deprecated);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setETag(String etag);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder setExpiryDate(ZonedDateTime expiryDate);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder accumulate(final HttpResponseStatus status);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder accumulate(final HttpResponseHeaders headers);\n @SuppressWarnings(\"UnusedReturnValue\")\n Builder accumulate(final HttpResponseBodyPart bodyPart);\n RawContentResponse build();\n }\n\n class Impl implements RawContentResponse {\n private final Response response;\n private final ResponseState state;\n private final ErrorType errorType;\n private final boolean deprecated;\n private final String etag;\n private final ZonedDateTime expiryDate;\n\n private Impl(@Nullable Response response, ResponseState state, ErrorType errorType, final boolean deprecated, final String etag, final ZonedDateTime expiryDate) {\n this.response = response;\n this.state = state;\n this.errorType = errorType;\n this.deprecated = deprecated;\n this.etag = etag;\n this.expiryDate = expiryDate;\n }\n\n @Override\n public Optional<String> getResponseBody() {\n if (null == response) {\n return Optional.empty();\n }\n\n return Optional.ofNullable(response.getResponseBody());\n }\n\n @Override\n public ResponseState getState() {\n return state;\n }\n\n @Override\n public ErrorType getErrorType() {\n return errorType;\n }\n\n @Override\n public Optional<Integer> getPageCount() {\n if (null != response && response.getHeaders().contains(Constants.PAGE_COUNT_RESPONSE_HEADER)) {\n final String pageCount = response.getHeader(Constants.PAGE_COUNT_RESPONSE_HEADER);\n\n if (null != pageCount) {\n return Optional.of(Integer.valueOf(pageCount));\n }\n }\n return Optional.empty();\n }\n\n @Override\n public boolean isDeprecated() {\n return deprecated;\n }\n\n @Override\n public Optional<String> getETag() {\n return Optional.ofNullable(etag);\n }\n\n @Override\n public Optional<ZonedDateTime> getExpiryDate() {\n return Optional.ofNullable(expiryDate);\n }\n }\n}", "entities.Torrent.ReplicateResponse getReplicateResponse();", "public DNSHeader (short queryId)\n {\n this.id = queryId;\n // set flag and four counts field.\n this.flag = 0x0000;\n this.questionCount = 1;\n this.answerCount = 0;\n this.nameServerCount = 0;\n this.additionalFullRRCount = 0;\n }", "public String provideAlwasDefResponse()\n {\n return (\"d\") ;\n }", "protected void unexpectedReply() throws IOException {\n sendBye();\n throw new IOException(\"Unexpected reply from server \" + _reply_command);\n }", "@Test\n\tpublic void useResponseSpecification() {\n\t\t\n\t\tgiven().\n\t\t\tspec(requestSpec).\n\t\twhen().\n\t\t\tget(\"/2014/1/circuits.json\").\n\t\tthen().\n\t\t\tspec(responseSpec).\n\t\tand().\n\t\t\tbody(\"MRData.CircuitTable.Circuits.Location[0].locality\",equalTo(\"Melbourne\"));\n\t}", "@Test\n\tpublic void testResponse() throws IOException {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tHashMap<String, Handler> map = new HashMap<String,Handler>();\n\t\tHashMap<String, String> parameters = new HashMap<String, String>();\n\t\tcheckResponse(new RequestObject(\"\", \"\", parameters), HTTPConstants.BAD_REQUEST, map);\n\t\tcheckResponse(new RequestObject(\"PUT\", \"/reviewsearch\", parameters), HTTPConstants.NOT_ALLOWED, map);\n\t\tcheckResponse(new RequestObject(\"PULL\", \"/slackbot\", parameters), HTTPConstants.NOT_ALLOWED, map);\n\t\tcheckResponse(new RequestObject(\"GET\", \"/slackbot\", parameters), HTTPConstants.NOT_FOUND, map);\n\t\tcheckResponse(new RequestObject(\"POST\", \"/slackbot\", parameters), HTTPConstants.NOT_FOUND, map);\n\t\tmap.put(\"/slackbot\", new ChatHandler(config.getConfig()));\n\t\tcheckResponse(new RequestObject(\"POST\", \"/slackbot\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tcheckResponse(new RequestObject(\"POST\", \"/reviewsearch\", parameters), HTTPConstants.NOT_FOUND, map);\n\t\tmap.put(\"/reviewsearch\", new ReviewSearchHandler(config.getConfig(), new InvertedIndex()));\n\t\tcheckResponse(new RequestObject(\"POST\", \"/reviewsearch\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tparameters.put(\"query\", \"jumpers\");\n\t\tcheckResponse(new RequestObject(\"POST\", \"/reviewsearch\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tparameters.put(\"unknown\", \"unknown\");\n\t\tcheckResponse(new RequestObject(\"POST\", \"/reviewsearch\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tparameters.remove(\"query\");\n\t\tcheckResponse(new RequestObject(\"GET\", \"/reviewsearch\", parameters), HTTPConstants.OK_HEADER, map);\n\t\tcheckResponse(new RequestObject(\"GET\", \"/\", parameters), HTTPConstants.NOT_FOUND, map);\n\t}", "@Test\n\tpublic void testNoMdcThrowupForPlainMessage() throws Exception {\n\t\tdoAnswer(x -> {\n\t\t\tassertThat(MDC.get(\"state\")).isEqualTo(\"sent\");\n\t\t\tassertThat(MDC.get(\"success\")).isNull();\n\t\t\tassertThat(MDC.get(\"duration\")).isNull();\n\t\t\tassertThat(MDC.get(\"osuApiRateBlockedTime\")).isNull();\n\t\t\treturn null;\n\t\t}).when(botInfo).setLastSentMessage(123L);\n\t\tPrivateMessage event = new PrivateMessage(1, \"nick\", 2, \"yo\");\n\t\tevent.getMeta().setRateLimiterBlockedTime(32);\n\t\twhen(clock.currentTimeMillis()).thenReturn(123L);\n\t\tresponsePostprocessor.onResponse(new Message(\"yeah\"), event);\n\t\tverify(botInfo).setLastSentMessage(123L);\n\t}", "public pam_response(Pointer src) {\n useMemory(src);\n read();\n }", "boolean getReturnPartialResponses();", "private void forwardResponse(XmppServletResponse response, IQRequest originalRequest) {\n\t\t\n\t\tJID from = originalRequest.getTo();\n\t\tJID to = originalRequest.getFrom();\t\t\n\t\ttry {\n\t\t\tIQRequest request = null;\n\t\t\tList<Element> elements = response.getElements();\n\t\t\tif (elements != null && elements.size() > 0) {\n\t\t\t\trequest = getXmppFactory().createIQ(from,to,response.getType(), elements.toArray(new Element[]{}));\n\t\t\t} else {\n\t\t\t\trequest = getXmppFactory().createIQ(from, to, response.getType());\n\t\t\t}\n\t\t\trequest.setID(originalRequest.getId());\n\t\t\trequest.send();\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// In the event of an error, continue dispatching to all remaining JIDs\n\t\t\tlog.error(e.getMessage(),e);\n\t\t}\n\t}", "private SpeechletResponse getHelpResponse() {\n\t\tString speechText = \"Please ask Flight Check the status of a flight by providing the airline name followed by the flight number. For example, Flight Check, what is the status of Lufthansa flight 112. Now, what can I help you with?\";\n\t\t// Create the plain text output.\n\t\tPlainTextOutputSpeech speech = new PlainTextOutputSpeech();\n\t\tspeech.setText(speechText);\n\n\t\t// Create reprompt\n\t\tReprompt reprompt = new Reprompt();\n\t\treprompt.setOutputSpeech(speech);\n\n\t\treturn SpeechletResponse.newAskResponse(speech, reprompt);\n\t}", "@Test\n public void testReplyExternalPortBadRequestIpv6() {\n replay(hostService); // no further host service expectations\n replay(interfaceService);\n\n Ip6Address theirIp = Ip6Address.valueOf(\"1000::ffff\");\n\n Ethernet ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC1,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n Ip6Address.valueOf(\"3000::1\"));\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n\n // Request for a valid internal IP address but coming in an external port\n packetService.packets.clear();\n ndpRequest = buildNdp(ICMP6.NEIGHBOR_SOLICITATION,\n MAC1,\n MacAddress.valueOf(\"33:33:ff:00:00:01\"),\n theirIp,\n IP3);\n proxyArp.reply(ndpRequest, LOC1);\n assertEquals(0, packetService.packets.size());\n }", "public com.example.DNSLog.Builder setRespp(java.lang.CharSequence value) {\n validate(fields()[4], value);\n this.respp = value;\n fieldSetFlags()[4] = true;\n return this;\n }", "@Override\n\tpublic boolean isResponseExpected() {\n\t\treturn false;\n\t}", "public Result apply(WSResponse response) {\n\n if (response.getStatus() >= 400) {\n Logger.info(\"Error status [\" + response.getStatusText() + \"] from proxied request \" + holder.getUrl());\n return getCachedResponse(response.getStatus());\n }\n /**\n * Check the content type of the response. Current policy is that only JSON types are supported. Other types should not be\n * cached. u\n */\n if (!response.getHeader(Http.HeaderNames.CONTENT_TYPE).contains(Http.MimeTypes.JSON)) {\n //TODO: Remove\n Logger.warn(\"Response contains unsupported mediatype: \" + response.getHeader(Http.HeaderNames.CONTENT_TYPE));\n return status(UNSUPPORTED_MEDIA_TYPE, \"Response contains an unsupported media type [\" + response.getHeader(Http.HeaderNames.CONTENT_TYPE) + \"]\");\n }\n\n //TODO: get request and response headers into a string to cache\n CachedResponse resp = new CachedResponse(\n request().toString(),\n response.getBody(),\n response.getStatus(),\n \"application/json\"\n );\n\n Logger.debug(\"Response headers are \" + response.getAllHeaders());\n for (String key : response.getAllHeaders().keySet()) {\n final String val = StringUtils.join(response.getAllHeaders().get(key), \";\");\n response().setHeader(key, val);\n }\n _responseCache.put(getCacheKeyFromRequest(), resp);\n Logger.debug(\"Cached Response for [\" + holder.getUrl() + \"] from proxied request \" + holder.getUrl());\n return status(response.getStatus(), response.getBody()).as(Http.MimeTypes.JSON);\n }", "@Test\n public void testInfoEndpoints() throws Exception {\n List<QueryFormat> qfs = new ArrayList<>();\n\n wireMockRule.stubFor(any(anyUrl())\n .willReturn(aResponse()\n .withStatus(200)\n .withBody(objectMapper.writeValueAsString(qfs))));\n\n String uri = composeURL(endpointUrl, \"/info/\" + resourceId);\n\n\n HttpResponse response = retrievePostResponse(uri, headers, \"\");\n assertEquals(\"Missing credentials should return 401\", 401, response.getStatusLine().getStatusCode());\n\n QueryRequest infoRequest = new QueryRequest();\n Map<String, String> clientCredentials = new HashMap<String, String>();\n //TODO I guess we need some way to identify the token key? Maybe V1.4_BEARER_TOKEN\n clientCredentials.put(IRCTResourceRS.IRCT_BEARER_TOKEN_KEY, \"testToken\");\n infoRequest.setResourceCredentials(clientCredentials);\n String body = objectMapper.writeValueAsString(infoRequest);\n\n response = retrievePostResponse(uri, headers, body);\n assertEquals(\"Response status code should be 200\", 200, response.getStatusLine().getStatusCode());\n ResourceInfo responseInfo = HttpClientUtil.readObjectFromResponse(response, ResourceInfo.class);\n assertNotNull(\"Resource response should not be null\", responseInfo);\n assertNotNull(\"Resource response should have queryFormats\", responseInfo.getQueryFormats());\n assertNotNull(\"Resource response should have a name\", responseInfo.getName());\n\n //Try with a non-existent id\n uri = composeURL(endpointUrl , \"/info/3b2437fe-df56-4360-8156-27bcf0b1a467\");\n response = retrievePostResponse(uri, headers, body);\n assertEquals(\"Incorrect resource Id should return 500\", 500, response.getStatusLine().getStatusCode());\n }", "private String getResponse(String input) throws DukeException {\n String toReturn = \"\";\n\n try {\n toReturn = duke.getResponse(input);\n } catch (DukeException e) {\n throw e;\n }\n\n return toReturn;\n }", "@Override\n public ResponseInput generateResponseMessage() throws IllegalStateException {\n char asw=0;\n if (!responseIsReady)\n throw new IllegalStateException(\"Input non ancora presi\");\n\n return new ResponseRespawn(targetSpawnPoint);\n }", "DNSRecord queryCache(DNSQuestion question) throws IOException {\n if (cache.containsKey(question)) {\n System.out.println(\"Answer found in cache!\");\n if (cache.get(question).timestampValid()) {\n System.out.println(\"TTL valid!\");\n return cache.get(question);\n }\n else {\n cache.remove(question);\n System.out.println(\"TTL not valid!\");\n }\n }\n return null;\n }", "@Test\n public void fetch() throws RazorpayException{\n String mockedResponseJson = \"{\\n\" +\n \" \\\"id\\\": \"+REFUND_ID+\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 300100,\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FIKOnlyii5QGNx\\\",\\n\" +\n \" \\\"notes\\\": {\\n\" +\n \" \\\"comment\\\": \\\"Comment for refund\\\"\\n\" +\n \" },\\n\" +\n \" \\\"receipt\\\": null,\\n\" +\n \" \\\"acquirer_data\\\": {\\n\" +\n \" \\\"arn\\\": \\\"10000000000000\\\"\\n\" +\n \" },\\n\" +\n \" \\\"created_at\\\": 1597078124,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"normal\\\",\\n\" +\n \" \\\"speed_requested\\\": \\\"optimum\\\"\\n\" +\n \"}\";\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n Refund fetch = refundClient.fetch(REFUND_ID);\n assertNotNull(fetch);\n assertEquals(REFUND_ID,fetch.get(\"id\"));\n String fetchRequest = getHost(String.format(Constants.REFUND,REFUND_ID));\n verifySentRequest(false, null, fetchRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "com.google.protobuf.ByteString getResponseAddress();", "public String provideRandomResponse()\n {\n int randomN = (int) (Math.random() * 2) ;\n if (randomN == 1)\n {\n return(\"c\") ;\n }\n else\n {\n return(\"d\") ;\n }\n \n }", "public Builder clearResponse() {\n \n response_ = 0;\n onChanged();\n return this;\n }", "public List<DnsResource> answers() {\n if (answers == null) {\n return Collections.emptyList();\n }\n return Collections.unmodifiableList(answers);\n }", "@Test\n public void iPAddressReverseDomainLookupTest() throws Exception {\n String value = null;\n IPReverseDNSLookupResponse response = api.iPAddressReverseDomainLookup(value);\n\n // TODO: test validations\n }", "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 String answer() {\n\t\treturn null;\n\t}", "@Test\n public void testSend200OkResponseWithoutBody() {\n String expected = \"RTSP/1.0 200 OK\\r\\n\" + (((\"server: Testserver\\r\\n\" + \"cseq: 1\\r\\n\") + \"session: 2547019973447939919\\r\\n\") + \"\\r\\n\");\n HttpResponse response = new io.netty.handler.codec.http.DefaultHttpResponse(RTSP_1_0, OK);\n response.headers().add(SERVER, \"Testserver\");\n response.headers().add(CSEQ, \"1\");\n response.headers().add(SESSION, \"2547019973447939919\");\n EmbeddedChannel ch = new EmbeddedChannel(new RtspEncoder());\n ch.writeOutbound(response);\n ByteBuf buf = ch.readOutbound();\n String actual = buf.toString(UTF_8);\n buf.release();\n Assert.assertEquals(expected, actual);\n }" ]
[ "0.5765814", "0.57359886", "0.5525798", "0.5458099", "0.54503316", "0.54468036", "0.5377288", "0.53200144", "0.530102", "0.5269832", "0.5257044", "0.5099931", "0.50932485", "0.50867945", "0.5063386", "0.50586444", "0.5053647", "0.5032486", "0.5023387", "0.5023194", "0.50148237", "0.50143236", "0.49940255", "0.49869138", "0.49791464", "0.49671894", "0.49611002", "0.49441412", "0.4939568", "0.49327275", "0.49151984", "0.49113688", "0.49068585", "0.49053162", "0.48925838", "0.48911124", "0.48593053", "0.4854308", "0.4846515", "0.48375407", "0.48350576", "0.48301542", "0.48281288", "0.48238134", "0.47944787", "0.47919634", "0.47908023", "0.47787932", "0.47758743", "0.47706306", "0.476708", "0.47528636", "0.47524437", "0.47502586", "0.47469664", "0.4740374", "0.47377172", "0.47242218", "0.47179022", "0.47154948", "0.47059155", "0.47012907", "0.46965587", "0.46939382", "0.4693782", "0.46930623", "0.4684354", "0.46840423", "0.46813595", "0.46789116", "0.46772566", "0.4676983", "0.46698168", "0.46676898", "0.46613425", "0.46608436", "0.46460626", "0.46446404", "0.4644481", "0.4644163", "0.4639277", "0.46320084", "0.4631837", "0.46318245", "0.46301597", "0.4629013", "0.4623441", "0.4619337", "0.46128637", "0.46012136", "0.46005395", "0.4600121", "0.4588914", "0.45855832", "0.4581601", "0.45777225", "0.45699885", "0.45684847", "0.45681795", "0.45663637" ]
0.4623579
86
Reads the LTA bus stops into a hashmap
public HashMap<String, BusStops> readLtaBusStops(String file, String file2) throws IOException { //Reads Lta Bus Stop Codes and add it into a hashmap HashMap<String, BusStops> busStopMap = new HashMap<>(); File ltaBusStopCodes = new File(file); //Instantiates the file to read File otherFile = new File(file2); //Tries to read the file using buffered reader try (BufferedReader br = new BufferedReader(new FileReader(ltaBusStopCodes))) { br.readLine();//To skip first line StringTokenizer st; //String tokenizer to read the csv token by token String line; //loops through the csv file and read it while ((line = br.readLine()) != null) { st = new StringTokenizer(line, ","); //using StringTokenizer's delimiter for ",". Each word as a single token. //2nd while loop to loop each and every word after delimiter "," while (st.hasMoreTokens()) { String busStopCode = st.nextToken(); String roadDesc = st.nextToken(); String busStopDesc = st.nextToken(); //Creates a LtaBusStopCodes object with the data read from csv and insert into the hashmap BusStops ltaBsStopCode = new BusStops(busStopCode, roadDesc, busStopDesc); busStopMap.put(ltaBsStopCode.getBusStopCode(), ltaBsStopCode); }//End while loop for each token }//End while loop } try (BufferedReader br = new BufferedReader(new FileReader(otherFile))) { br.readLine(); StringTokenizer st; String line; while ((line = br.readLine()) != null) { st = new StringTokenizer(line, ","); while (st.hasMoreTokens()) { double latitude = Double.parseDouble(st.nextToken()); double longitude = Double.parseDouble(st.nextToken()); int zid = Integer.parseInt(st.nextToken()); BusStops bs = busStopMap.get(st.nextToken()); if (bs != null) { bs.setX(latitude); bs.setY(longitude); bs.setZid(zid); } } } } return busStopMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<AbstractMap.SimpleImmutableEntry<Stop, Integer>> getStops() { return stops;}", "public List<Stop> getStopsMap()\r\n {\r\n return stops_map;\r\n }", "List<Map.Entry<Long, String>> getStopTimeTable(String stopId) throws Exception;", "private void initMaps(Context cxt, ObaResponse response) {\n if (response.getCode() == ObaApi.OBA_OK) {\n final ObaData data = response.getData();\n final ObaArray<ObaStop> stops = data.getStops();\n final Map<String,ObaStop> stopMap = getStopMap(stops);\n final ObaArray<ObaStopGrouping> groupings = data.getStopGroupings();\n final int groupingsLen = groupings.length();\n \n for (int groupingIndex = 0; groupingIndex < groupingsLen; ++groupingIndex) {\n final ObaStopGrouping grouping = groupings.get(groupingIndex);\n final ObaArray<ObaStopGroup> groups = grouping.getStopGroups();\n final int groupsLen = groups.length();\n \n for (int i=0; i < groupsLen; ++i) {\n final HashMap<String,String> groupMap = new HashMap<String,String>(1);\n final ObaStopGroup group = groups.get(i);\n // We can initialize the stop grouping values.\n groupMap.put(\"name\", group.getName());\n // Add this to the groupings map\n \n // Create the sub list (the list of stops in the group)\n final List<String> stopIds = group.getStopIds();\n final int stopIdLen = stopIds.size();\n \n final ArrayList<HashMap<String,String>> childList =\n new ArrayList<HashMap<String,String>>(stopIdLen);\n \n for (int j=0; j < stopIdLen; ++j) {\n final String stopId = stopIds.get(j);\n final ObaStop stop = stopMap.get(stopId);\n HashMap<String,String> groupStopMap = \n new HashMap<String,String>(2);\n if (stop != null) {\n groupStopMap.put(\"name\", stop.getName());\n String dir = cxt.getString(\n UIHelp.getStopDirectionText(\n stop.getDirection()));\n groupStopMap.put(\"direction\", dir);\n groupStopMap.put(\"id\", stopId);\n mStopMap.put(stopId, stop);\n }\n else {\n groupStopMap.put(\"name\", \"\");\n groupStopMap.put(\"direction\", \"\"); \n groupStopMap.put(\"id\", stopId);\n }\n childList.add(groupStopMap);\n } \n \n mStopGroups.add(groupMap);\n mStops.add(childList);\n }\n }\n }\n }", "@Override\n\tpublic Map getStartandStopByGPS(String terminalId, String start_time,\n\t\t\tString stop_time) {\n\t\tMap map = new HashMap();\n\t\ttry {\n\t\t\tif(start_time.length()==12&&stop_time.length()==12){\n\t\t\t\tString start_time_in_format = start_time.substring(0,2) + \"-\" + start_time.substring(2,4) + \"-\" + start_time.substring(4,6) + \" \" + start_time.substring(6,8) + \":\" + start_time.substring(8,10) + \":\" + start_time.substring(10,12);\n\t\t\t\tString stop_time_in_format = stop_time.substring(0,2) + \"-\" + stop_time.substring(2,4) + \"-\" + stop_time.substring(4,6) + \" \" + stop_time.substring(6,8) + \":\" + stop_time.substring(8,10) + \":\" + stop_time.substring(10,12);\n\t\t\t\tmap.put(\"start_time_in_format\", start_time_in_format);\n\t\t\t\tmap.put(\"stop_time_in_format\", stop_time_in_format);\n\t\t\t\tList<PositionData> position_between = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' and date>'\" + start_time_in_format + \"' and date<'\" + stop_time_in_format + \"' order by date desc\");\n\t\t\t\tfor(int i=0;i<position_between.size();i++){\n\t\t\t\t\tif(position_between.get(i).getInfo().contains(\"GPS状态:GPS不定位;\")){\n\t\t\t\t\t\tposition_between.remove(i);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tString start_point = \"Nil\";\n\t\t\t\tString stop_point = \"Nil\";\n\t\t\t\tif(position_between.size()>0){\n\t\t\t\t\tString stop_point_latitude = position_between.get(0).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"纬度:\"));\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.substring(0,stop_point_latitude.indexOf(\";\"));\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.split(\":\")[1];\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.replaceAll(\"°\", \".\");\n\t\t\t\t\tString tempStrPart = stop_point_latitude.split(\"\\\\.\")[1];\n\t\t\t\t\ttempStrPart = \"0.\" + tempStrPart;\n\t\t\t\t\tdouble tempD = Double.parseDouble(tempStrPart)/60*100;\n\t\t\t\t\tstop_point_latitude = Integer.parseInt(stop_point_latitude.split(\"\\\\.\")[0]) + tempD + \"\";\n\t\t\t\t\t\n\t\t\t\t\tString stop_point_longitute = position_between.get(0).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"经度:\"));\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.substring(0,stop_point_longitute.indexOf(\";\"));\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.split(\":\")[1];\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.replaceAll(\"°\", \".\");\n\t\t\t\t\tString _tempStrPart = \"0.\" + stop_point_longitute.split(\"\\\\.\")[1];\n\t\t\t\t\tdouble _tempD = Double.parseDouble(_tempStrPart)/60*100;\n\t\t\t\t\tstop_point_longitute = Integer.parseInt(stop_point_longitute.split(\"\\\\.\")[0]) + _tempD + \"\";\n\t\t\t\t\tstop_point = stop_point_longitute + \",\" + stop_point_latitude;\n\t\t\t\t\t\n\t\t\t\t\tString start_point_latitude = position_between.get(position_between.size()-1).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"纬度:\"));\n\t\t\t\t\tstart_point_latitude = start_point_latitude.substring(0,start_point_latitude.indexOf(\";\"));\n\t\t\t\t\tstart_point_latitude = start_point_latitude.split(\":\")[1];\n\t\t\t\t\tstart_point_latitude = start_point_latitude.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstart_point_latitude = start_point_latitude.replaceAll(\"°\", \".\");\n\t\t\t\t\tString tempStrPart1 = start_point_latitude.split(\"\\\\.\")[1];\n\t\t\t\t\ttempStrPart1 = \"0.\" + tempStrPart1;\n\t\t\t\t\tdouble tempD1 = Double.parseDouble(tempStrPart1)/60*100;\n\t\t\t\t\tstart_point_latitude = Integer.parseInt(start_point_latitude.split(\"\\\\.\")[0]) + tempD1 + \"\";\n\t\t\t\t\t\n\t\t\t\t\tString start_point_longitute = position_between.get(position_between.size()-1).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"经度:\"));\n\t\t\t\t\tstart_point_longitute = start_point_longitute.substring(0,start_point_longitute.indexOf(\";\"));\n\t\t\t\t\tstart_point_longitute = start_point_longitute.split(\":\")[1];\n\t\t\t\t\tstart_point_longitute = start_point_longitute.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstart_point_longitute = start_point_longitute.replaceAll(\"°\", \".\");\n\t\t\t\t\tString _tempStrPart1 = \"0.\" + start_point_longitute.split(\"\\\\.\")[1];\n\t\t\t\t\tdouble _tempD1 = Double.parseDouble(_tempStrPart1)/60*100;\n\t\t\t\t\tstart_point_longitute = Integer.parseInt(start_point_longitute.split(\"\\\\.\")[0]) + _tempD1 + \"\";\n\t\t\t\t\tstart_point = start_point_longitute + \",\" + start_point_latitude;\n//\t\t\t\t\tSystem.out.println(start_point + \"-->\" + stop_point);\n//\t\t\t\t\tmap.put(\"start_point\",start_point);\n//\t\t\t\t\tmap.put(\"stop_point\", stop_point);\n\t\t\t\t}\n\t\t\t\treturn map;\n\t\t\t}\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public HashMap<String,SLR1_automat.State> get_switches();", "public void cacheBusRouteData()\n\t{\t\n\t\tdataMap = BusRouteDataFileReader.readAndCacheBusRouteData(this.pathname);\n\t}", "private Vector <BusStopInfo> findStopInfo(BusStopInterface busStop)\r\n {\r\n Vector <BusStopInfo> result = new Vector<BusStopInfo>();\r\n Awtobus checking = null;\r\n for(int i=0; i < lines.size(); i++)\r\n {\r\n checking = lines.get(i);\r\n int length = checking.busLine.getNumberOfBusStops();\r\n for(int j=0; j<length; j++)\r\n {\r\n if(busStop == checking.busLine.getBusStop(j))\r\n {\r\n result.add(new BusStopInfo(checking, j));\r\n }\r\n }\r\n }\r\n return result;\r\n }", "private void loadMemory() {\n try {\n File varTmpDir = new File(\"data/\" + brainLocation + \".ser\");\n if (varTmpDir.exists()) {\n FileInputStream fileIn = new FileInputStream(varTmpDir);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n longTermMemory = (HashMap<String, BoardRecord>) in.readObject();\n in.close();\n fileIn.close();\n }\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"File not found\");\n c.printStackTrace();\n return;\n }\n\n System.out.println(\"RECALLED LONG TERM MEMORIES FROM \" + brainLocation + \": \" + longTermMemory.toString());\n }", "public HashMap<String, Long> loadCapacity() {\n HashMap<String, Long> items = null;\n Gson gson = new Gson();\n try {\n BufferedReader reader = new BufferedReader(new FileReader(CAPACITY_PATH));\n Type type = new TypeToken<HashMap<String, Long>>() {\n }.getType();\n items = gson.fromJson(reader, type);\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe);\n }\n return items;\n }", "public String[] obtainStops() {\n\n String[] stopsNone = { \"No stops found\" };\n String[] stopsArbutus = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Hilltop Cir. & Hilltop Rd.\", \"Hilltop Cir. & Walker Ave.\", \"Hilltop Cir. & Center Rd.\", \"Poplar Ave. & Stadium Lot\", \"TRC @ Linden Ave\", \"Westland Blvd. & Circle Dr.\", \"Westland Blvd. & Courtney Rd.\", \"Maiden Choice La. & Westland Blvd\", \"Maiden Choice La. & Warren Tree\", \"Maiden Choice La. & Wilkens Ave\", \"Maiden Choice La. & Grouse Ct\", \"Maiden Choice La. & Symmington Aven.\"};\n String[] stopsArundel = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"BWI Marc Station\", \"Arundel Mills Mall Visitor Entrace #5\", \"BWI Marc Station\", \"Administration Dr. Bus Shelter\", \"Hilltop Circle & Hilltop Rd.\" };\n String[] stopsCatonsville = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Rolling Rd @YMCA\", \"Rolling Rd @Valley Rd (CCBC)\", \"Catonsville High @Bloomsbury Ave\", \"Mellor Ave & Bloomsbury Ave\" };\n String[] stopsDowntownA = { \"Commons Dr. & Park Rd\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Greyhound Station @ Haines\",\"MLK Blvd & Pratt St (UMB)\", \"Green St & Fayette St\", \"Green St & Lombard St (UMB)\" };\n\n if ( this.longName.toLowerCase().contains(\"Arbutus\".toLowerCase()) ) {\n return stopsArbutus;\n }\n if ( this.longName.contains(\"Arundel\") ) {\n return stopsArundel;\n }\n if ( this.longName.contains(\"Catonsville\") ) {\n return stopsCatonsville;\n }\n if ( this.longName.contains(\"Downtown\") ) {\n return stopsDowntownA;\n }\n\n return stopsNone;\n\n }", "List<Stop> getStops();", "List<Stopsinlinedb> fetchStopsInLines();", "public List<BusRoutes> readBusRoutes(String sbsFile, String smrtFile) throws IOException {\n\t\tList<BusRoutes> busRoutes = new ArrayList<>();\n\t\tFile ltaSbstRoute = new File(sbsFile);\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(ltaSbstRoute))) {\n\t\t\tbr.readLine();\n\t\t\tStringTokenizer st;\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString serviceNum = st.nextToken();\n\t\t\t\t\tint direction = Integer.parseInt(st.nextToken());\n\t\t\t\t\tint roadSeq = Integer.parseInt(st.nextToken());\n\t\t\t\t\tString busStopCode = st.nextToken();\n\t\t\t\t\tDouble distance;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdistance = Double.parseDouble(st.nextToken());\n\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\tdistance = null;\n\t\t\t\t\t}\n\t\t\t\t\tBusRoutes ltaRoutes = new BusRoutes(serviceNum, direction, roadSeq, busStopCode, distance);\n\t\t\t\t\tbusRoutes.add(ltaRoutes);\n\t\t\t\t}//End while loop for each token\n\t\t\t}//End while loop\n\t\t}\n\t\tFile smrtBusRoute = new File(smrtFile);\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(smrtBusRoute))) {\n\t\t\tbr.readLine();\n\t\t\tStringTokenizer st;\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString serviceNum = st.nextToken();\n\t\t\t\t\tint direction = Integer.parseInt(st.nextToken());\n\t\t\t\t\tint roadSeq = Integer.parseInt(st.nextToken());\n\t\t\t\t\tString busStopCode = st.nextToken();\n\t\t\t\t\tDouble distance;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdistance = Double.parseDouble(st.nextToken());\n\t\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\t\tdistance = null;\n\t\t\t\t\t}\n\t\t\t\t\tBusRoutes smrtRoutes = new BusRoutes(serviceNum, direction, roadSeq, busStopCode, distance);\n\t\t\t\t\tbusRoutes.add(smrtRoutes);\n\t\t\t\t}//End while loop for each token\n\t\t\t}//End while loop\n\t\t}\n\t\treturn busRoutes;\n\t}", "public TimeMap() {\n hashMap = new HashMap<String, List<Data>>();\n }", "List<Stop> getStopsPerLine(String line);", "protected Map<Long, byte[]> getMap(DB database) \n\t{\t\t\n\t\t//OPEN MAP\n\t\treturn database.createTreeMap(\"block_heights\")\n\t\t\t\t.keySerializer(BTreeKeySerializer.BASIC)\n\t\t\t\t.makeOrGet();\n\t}", "public static List<Stop> getAllStops() {\n return allStops;\n }", "public TimeMap2() {\n map = new HashMap<>();\n }", "public HashMap<String, ArrayList<Trajectory>> readTrajectories(String trajFileName) {\n Scanner csv = null;\n HashMap<String, ArrayList<Trajectory>> trajectories = new HashMap<String, ArrayList<Trajectory>>();\n try {\n csv = new Scanner(new File(trajFileName));\n ArrayList<Trajectory> tj = new ArrayList<Trajectory>();\n String currentId = \"\";\n while (csv.hasNextLine()) {\n String[] line = csv.nextLine().split(\",\");\n line[0] = line[0].substring(6, line[0].length() - 1);\n String[] locs = line[0].split(\" \");\n\n if (currentId.equals(\"\")) // first device\n {\n currentId = line[1];\n } else if (!currentId.equals(line[1])) // we are looking at a new device, add arrayList to the map, reset arrayList\n {\n trajectories.put(currentId, tj);\n tj = new ArrayList<Trajectory>();\n currentId = line[1];\n }\n tj.add(new Trajectory(Double.parseDouble(locs[0]), Double.parseDouble(locs[1]), line[1], Double.parseDouble(line[2])));\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return trajectories;\n }", "private void onAppOpened(Context context) {\n // Prepare metadata dictionary\n PebbleDictionary first = new PebbleDictionary();\n int stopCount = 0;\n\n // Count saved stops\n for (Direction direction : mPreferencesDataSource.getStops())\n stopCount += direction.getStops().size();\n\n first.addUint32(MESSAGE_TYPE, MESSAGE_STOPS_METADATA);\n first.addUint32(1, stopCount);\n first.addUint32(2, 4);\n\n // Send initial dictionary\n PebbleKit.sendDataToPebbleWithTransactionId(context, WATCHAPP_UUID, first, MESSAGE_STOPS_METADATA);\n\n PebbleKit.registerReceivedAckHandler(context, new PebbleKit.PebbleAckReceiver(WATCHAPP_UUID) {\n /**\n * Runs when the watchapp acknowledges our sent data\n */\n @Override\n public void receiveAck(Context context, int transactionId) {\n switch (transactionId) {\n case MESSAGE_STOPS_METADATA:\n\n break;\n case MESSAGE_STOP_DATA:\n break;\n }\n }\n });\n\n for (Direction direction : mPreferencesDataSource.getStops()) {\n Route route = direction.getRoute();\n\n String routeTag = route.getTag();\n String routeTitle = route.getShortTitle() != null ? route.getShortTitle() : route.getTitle();\n String directionName = direction.getName();\n\n for (Stop stop : direction.getStops()) {\n PebbleDictionary savedStop = new PebbleDictionary();\n savedStop.addUint32(0, MESSAGE_STOP_DATA);\n\n String stopTitle = stop.getShortTitle() != null ? stop.getShortTitle() : stop.getTitle();\n\n savedStop.addString(1, routeTag);\n savedStop.addString(2, routeTitle);\n savedStop.addString(3, directionName);\n savedStop.addString(4, stopTitle);\n\n Log.i(TAG, \"Sending data for stop: \" + stopTitle);\n\n try {\n Thread.sleep(1000L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n PebbleKit.sendDataToPebble(context, WATCHAPP_UUID, savedStop);\n }\n }\n }", "private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {\n/* 210 */ stream.defaultReadObject();\n/* 211 */ this.store = new TreeMap();\n/* 212 */ int keyCount = stream.readInt();\n/* 213 */ for (int i = 0; i < keyCount; i++) {\n/* 214 */ Comparable key = (Comparable)stream.readObject();\n/* 215 */ Stroke stroke = SerialUtilities.readStroke(stream);\n/* 216 */ this.store.put(key, stroke);\n/* */ } \n/* */ }", "private Map<LIRRStop, Map<LIRRStop, TObjectIntMap<LIRRStop>>> initializeLirrViaFareOverrides (List<FareOverride> fareOverrides, boolean peak, NYCFareDataCache fareData) {\n Map<LIRRStop, Map<LIRRStop, TObjectIntMap<LIRRStop>>> fares = new HashMap<>();\n if (fareOverrides != null) {\n for (FareOverride fo : fareOverrides) {\n if (fo.viaStopId == null) continue;\n\n if (!transitLayer.indexForStopId.containsKey(fo.fromStopId) ||\n !transitLayer.indexForStopId.containsKey(fo.toStopId) ||\n !transitLayer.indexForStopId.containsKey(fo.viaStopId)) {\n throw new IllegalArgumentException(\"from or to stop not found!\");\n }\n\n int fromStop = transitLayer.indexForStopId.get(fo.fromStopId);\n int toStop = transitLayer.indexForStopId.get(fo.toStopId);\n int viaStop = transitLayer.indexForStopId.get(fo.viaStopId);\n int fare = peak ? fo.peakFare : fo.offPeakFare;\n LIRRStop fromLirrStop = fareData.lirrStopForTransitLayerStop.get(fromStop);\n LIRRStop toLirrStop = fareData.lirrStopForTransitLayerStop.get(toStop);\n LIRRStop viaLirrStop = fareData.lirrStopForTransitLayerStop.get(viaStop);\n\n\n fares.computeIfAbsent(fromLirrStop, k -> new HashMap<>())\n .computeIfAbsent(toLirrStop, k -> new TObjectIntHashMap<>())\n .put(viaLirrStop, fare);\n }\n }\n return fares;\n }", "private Map getLRC2LFNS(Set lfns){\n int batch = lfns.size() > mBatchSize ? mBatchSize:lfns.size();\n //sanity check\n if (this.isClosed()) {\n //probably an exception should be thrown here!!\n throw new RuntimeException(RLI_NOT_CONNECTED_MSG + this.mRLIURL);\n }\n\n Map lrc2lfn = new HashMap();//indexed by lrc url and each value a collection\n //of lfns that the RLI says are present init.\n //get a handle to the rli\n\n //we need to query the RLI in batches\n for (Iterator it = lfns.iterator(); it.hasNext(); ) {\n ArrayList l = new ArrayList(batch);\n for (int j = 0; (j < batch) && (it.hasNext()); j++) {\n l.add(it.next());\n }\n\n //query the RLI for one batch\n List res = null;\n try{\n res = mRLI.getLRCBulk(l);\n }\n catch(RLSException ex){\n mLogger.log(\"getLRC2LFNS(Set)\",ex,\n LogManager.ERROR_MESSAGE_LEVEL);\n //or throw a runtime exception\n return null;\n }\n //iterate through the results and put them in the map\n String lrc = null;\n String lfn = null;\n for(Iterator lit = res.iterator();lit.hasNext();){\n RLSString2Bulk s2b = (RLSString2Bulk) lit.next();\n lfn = s2b.s1;//s1 is the lfn\n lrc = s2b.s2;//s2 denotes the lrc which contains the mapping\n\n //rc is the exit status returned by the RLI\n if (s2b.rc == RLSClient.RLS_SUCCESS) {\n //we are really only concerned with success\n //and do not care about other exit codes\n Object val = null;\n Set s = null;\n s = ( (val = lrc2lfn.get(lrc)) == null) ?\n new LinkedHashSet():\n (LinkedHashSet)val;\n s.add(lfn);\n if(val == null)\n lrc2lfn.put(lrc,s);\n\n }\n }\n }\n\n //match LRC's just once against ingore and restrict lists\n for( Iterator it = lrc2lfn.keySet().iterator(); it.hasNext(); ){\n String lrc = ( String ) it.next();\n int state = this.determineQueryType(lrc);\n\n //do the query on the basis of the state\n if (state == LRC_QUERY_IGNORE) {\n mLogger.log(\"Skipping LRC \" + lrc,\n LogManager.DEBUG_MESSAGE_LEVEL);\n it.remove();\n }\n }\n\n\n\n return lrc2lfn;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void readDumpedKeggPathways() {\n\t\ttry {\n\t\t\t// read dumped file contents\n//\t\t\tFile input = new File(\"conf/keggKO2PW.map\");\n\t\t\tInputStream is = getClass().getResourceAsStream(\"/de/mpa/resources/conf/keggKO2PW.map\");\n\t\t\tObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(new GZIPInputStream(is)));\n\n\t\t\tko2pathway = (HashMap<Short, List<Short>>) ois.readObject();\n\t\t\tpathway2ko = (HashMap<Short, List<Short>>) ois.readObject();\n\t\t\t\n//\t\t\tec2pathway = (HashMap<short[], List<Short>>) ois.readObject();\n\t\t\tec2pathway = new TreeMap<short[], List<Short>>(\n\t\t\t\t\tnew Comparator<short[]>() {\n\t\t\t\t\t\tpublic int compare(short[] o1, short[] o2) {\n\t\t\t\t\t\t\tint delta = 0;\n\t\t\t\t\t\t\tfor (int i = 0; i < o1.length; i++) {\n\t\t\t\t\t\t\t\tdelta = o1[i] - o2[i];\n\t\t\t\t\t\t\t\tif (delta != 0) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn delta;\n\t\t\t\t\t\t}\n\t\t\t});\n\t\t\tec2pathway.putAll((Map<? extends short[], ? extends List<Short>>) ois.readObject());\n\t\t\t\n\t\t\tpathway2ec = (HashMap<Short, List<short[]>>) ois.readObject();\n\t\t\tois.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private Map<LIRRStop, TObjectIntMap<LIRRStop>> initializeLirrDirectFareOverrides (List<FareOverride> fareOverrides, boolean peak, NYCFareDataCache fareData) {\n Map<LIRRStop, TObjectIntMap<LIRRStop>> fares = new HashMap<>();\n if (fareOverrides != null) {\n for (FareOverride fo : fareOverrides) {\n if (fo.viaStopId != null) continue;\n\n if (!transitLayer.indexForStopId.containsKey(fo.fromStopId) ||\n !transitLayer.indexForStopId.containsKey(fo.toStopId)) {\n throw new IllegalArgumentException(\"from or to stop not found!\");\n }\n\n int fromStop = transitLayer.indexForStopId.get(fo.fromStopId);\n int toStop = transitLayer.indexForStopId.get(fo.toStopId);\n int fare = peak ? fo.peakFare : fo.offPeakFare;\n LIRRStop fromLirrStop = fareData.lirrStopForTransitLayerStop.get(fromStop);\n LIRRStop toLirrStop = fareData.lirrStopForTransitLayerStop.get(toStop);\n\n fares.computeIfAbsent(fromLirrStop, k -> new TObjectIntHashMap<>()).put(toLirrStop, fare);\n }\n }\n return fares;\n }", "public ArrayList getStops(String route, int direction){\r\n // Will hold all the stops returned from query\r\n ArrayList stopDataList = new ArrayList();\r\n Cursor getData = getReadableDatabase().rawQuery(\"select _id from routes where route_long_name = '\" + route + \"'\", null);\r\n // Make sure to begin at the first element of the returned data\r\n getData.moveToFirst();\r\n int route_id = getData.getInt(0);\r\n final String query = \"select distinct Stops.Stop_Name \" +\r\n \"from Trips join \" +\r\n \"Calendar on Trips.Service_Id=Calendar._Id join \" +\r\n \"Routes on Trips.Route_Id=Routes._Id join \" +\r\n \"Stop_Times on Trips._Id=Stop_Times.Trip_Id JOIN \" +\r\n \"Stops on Stop_Times.Stop_Id=Stops._Id \" +\r\n \"where Calendar._Id in \" + getDayOfTheWeek() + \" \" +\r\n \"AND Trips.Route_Id= \" + route_id + \" \" +\r\n \"AND Stop_Times.Arrival_Time != '' \" +\r\n \"AND direction_id = \" + direction;\r\n getData.moveToFirst();\r\n getData = getReadableDatabase().rawQuery(query, null);\r\n // the data count is 0 when a route is not in service on a particular day\r\n if(getData.getCount() == 0){\r\n stopDataList.add(\"No Stops Available Today For This Route\");\r\n return stopDataList;\r\n }else{\r\n while (getData.moveToNext()){\r\n stopDataList.add(getData.getString(0));\r\n }\r\n }\r\n\r\n getData.close();\r\n\r\n return stopDataList;\r\n }", "private void loadAddressFromLatches(){\r\n horizontalTileCounter = horizontalTileLatch;\r\n verticalTileCounter = verticalTileLatch;\r\n horizontalNameCounter = horizontalNameLatch; // single bit\r\n verticalNameCounter = verticalNameLatch; // single bit\r\n fineVerticalCounter = fineVerticalLatch;\r\n }", "@Nullable\n private static Map<Integer, String> readNwsoSubCenter(String path) {\n Map<Integer, String> result = new HashMap<>();\n\n try (InputStream is = GribResourceReader.getInputStream(path);\n BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) {\n while (true) {\n String line = br.readLine();\n if (line == null) {\n break;\n }\n if ((line.isEmpty()) || line.startsWith(\"#\")) {\n continue;\n }\n\n StringBuilder lineb = new StringBuilder(line);\n StringUtil2.removeAll(lineb, \"'+,/\");\n String[] flds = lineb.toString().split(\"[:]\");\n\n int val = Integer.parseInt(flds[0].trim()); // must have a number\n String name = flds[1].trim() + \": \" + flds[2].trim();\n\n result.put(val, name);\n }\n return Collections.unmodifiableMap(result); // all at once - thread safe\n\n } catch (IOException ioError) {\n logger.warn(\"An error occurred in Grib1Tables while trying to open the table \" + path + \" : \" + ioError);\n return null;\n }\n }", "private void loadDataMap() throws IOException {\n\t\tDaySleepDurationMap.getInstance().clear();\n\n\t\t// List of entries\n\t\tList<SleepEntry> entries = new ArrayList<SleepEntry>();\n\t\t\n\t\t// Get CSV file\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(DATA_LOCATION)));\n\t\tString line = \"\";\n\n\t\t// Ignore the first line (CSV header)\n\t\tbr.readLine();\n\n\t\twhile (((line = br.readLine()) != null)){\n\t\t\t// Convert the line from CSV to a SleepEntry\n\t\t\tSleepEntry se = SleepEntry.parseFromCSV(line);\n\t\t\t// Add it to the entry list\n\t\t\tentries.add(se);\n\t\t}\n\t\t\n\t\tfor (SleepEntry se : entries){\n\t\t\t// Add data from list to the map\n\t\t\tDaySleepDurationMap.getInstance().addToDay(se.getEffectiveDate(), se.getDuration());\n\t\t}\n\t\t\n\n\t\tbr.close();\n\t\t\n\t}", "void updateStops(HashMap<String, List<TimedStopProblem>> problemsToAdd);", "private void initializationMapOfLastDistance(){\r\n Float val = 0.00f;\r\n for(Build b: allBuildings_){\r\n saveLastDistance.put(b.getName(), val);\r\n }\r\n }", "public static void readMap(Scanner scanner) {\n // getting the pair of nodes from the input until an empty line is found\n while (true) {\n // read the current line of input\n String line = scanner.nextLine();\n // break the loop when the line is empty\n if (line.equals(\"\")) {\n break;\n }\n readLine(line);\n }\n }", "private void initMaps()\r\n\t{\r\n\t\tenergiesForCurrentKOppParity = new LinkedHashMap<Integer, Double>();\r\n\t\tinputBranchWithJ = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedR = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedP = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularP = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularR = new LinkedHashMap<Integer, Double>();\r\n\t\tupperEnergyValuesWithJ = new LinkedHashMap<Integer, Double>();\r\n\t}", "public BusStopRecord() {\n super(BusStop.BUS_STOP);\n }", "public int getNumberInboundStops(){\n\t \treturn 0;\n\t \t\n\t }", "public static Map<String, String> readMap() {\n\n\n // take resource from jar file (in the project they are in the \"target\" folder)\n InputStream playlist =\n PlaylistPrepare.class.getClassLoader()\n .getResourceAsStream(\"playlist.txt\");\n\n InputStreamReader reader = new InputStreamReader(playlist);\n BufferedReader br = new BufferedReader(reader);\n\n Map<String, String> map = new HashMap<>();\n\n try {\n String line;\n while ((line = br.readLine()) != null) {\n String[] split = line.split(\"¦\");\n// System.out.println(split[1] + \"; \" + split[2]);\n map.put(split[1], split[2]);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return map;\n }", "public void saveStopsInLine(Stopsinlinedb stopsInLine);", "private static Map<Integer, Integer> readState(String stateFile) throws Exception {\n\n Map<Integer, Integer> ret = new HashMap<>();\n\n File f = new File(stateFile);\n if (f.exists()) {\n //LOG.info(\"File exists\");\n List<String> lines = FileUtils.readLines(f, null);\n for (String line: lines) {\n //LOG.info(\"Line: \" + line);\n String[] toks = line.split(\":\");\n String channelId = toks[0];\n String messageId = toks[1];\n ret.put(Integer.valueOf(channelId), Integer.valueOf(messageId));\n }\n }\n\n //LOG.info(\"Read from file into map size \" + ret.size());\n\n return ret;\n }", "public Map<String, C0148k> call() throws Exception {\n HashMap hashMap = new HashMap();\n long elapsedRealtime = SystemClock.elapsedRealtime();\n hashMap.putAll(m471c());\n hashMap.putAll(m472d());\n StringBuilder sb = new StringBuilder();\n sb.append(\"finish scanning in \");\n sb.append(SystemClock.elapsedRealtime() - elapsedRealtime);\n C0135c.m449h().mo273b(\"Fabric\", sb.toString());\n return hashMap;\n }", "public Map<TableName, Map<String, Long>> readLogTimestampMap() throws IOException {\n return systemTable.readLogTimestampMap(backupInfo.getBackupRootDir());\n }", "private Map getAsMap(BuildStatus bs) {\n String lines[] = bs.toExternalForm().split(\"\\n\");\n Map m = new HashMap();\n for (int i = 0; i < lines.length; i++) {\n String line = lines[i];\n String parts[] = line.split(\"=\");\n String name = parts[0];\n String value = parts[1];\n m.put(name + \"=\", value);\n }\n return m;\n }", "@Override\n public Stop[] getStops(String name) throws Exception {\n String query = \"{\\n\"\n + \"stops(name: \\\"\" + name + \"\\\") {\\n\"\n + \"name\\n\"\n + \"desc\\n\"\n + \"url\\n\"\n + \"code\\n\"\n + \"gtfsId\\n\"\n + \"}\\n\"\n + \"}\";\n \n String json = new GraphQLAPIQuery(apiUrl, query).execute();\n \n Stop[] deserialized = new GsonBuilder()\n .registerTypeAdapter(Stop[].class, new TransitDataJsonDeserializer())\n .create()\n .fromJson(json, Stop[].class);\n \n return deserialized;\n }", "private void parseStopTimes(Set<String> tripID){\n \tSystem.out.println(\"start stop_times parsing\");\n String[] column = new String[]{\"trip_id\",\"stop_id\"};\n Set<String> stopID = new HashSet<String>();\n\n List<StopTimesTransit> beans;\n\n ColumnPositionMappingStrategy<StopTimesTransit> strategy =\n new ColumnPositionMappingStrategy<StopTimesTransit>();\n strategy.setType(StopTimesTransit.class);\n strategy.setColumnMapping(column);\n\n CsvToBean<StopTimesTransit> csvToBean = new CsvToBean<>();\n\n CSVReader csvReader;\n\t\ttry {\n\t\t\tcsvReader = new CSVReader(new FileReader(\"D:\\\\JavaProj\\\\XMLPreProcessor\\\\src\\\\stop_times.csv\"));\n\t beans = csvToBean.parse(strategy, csvReader);\n\n Iterator<StopTimesTransit> itr = beans.iterator();\n while(itr.hasNext()) {\n StopTimesTransit i = itr.next();\n String id = i.getTrip_id();\n if (!tripID.contains(id)) {\n itr.remove();\n }\n }\n\n for(StopTimesTransit data: beans){\n stopID.add(data.getStop_id());\n }\n\n parseStopID(stopID);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"end stop_times parsing\");\n\n }", "public static Map<String,Long> readEvents(String fileName) throws IOException{\r\n\t\tBufferedReader in = new BufferedReader(new FileReader(fileName));\r\n\t\tString s;\r\n\t\tMap<String,Long> map = new HashMap<String,Long>();\r\n\t\twhile((s = in.readLine()) != null) {\r\n\t\t\tString[] split = s.split(\"[()]\");\r\n\t\t\tmap.put(split[0], new Long(split[1]));\r\n\t\t}\r\n\t\tin.close();\r\n\t\treturn map;\r\n\t}", "public java.util.List<java.util.AbstractMap.SimpleImmutableEntry<Street,Stop>> getRoute()\r\n {\r\n List<java.util.AbstractMap.SimpleImmutableEntry<Street,Stop>> roads_map = new ArrayList<java.util.AbstractMap.SimpleImmutableEntry<Street,Stop>>();\r\n java.util.AbstractMap.SimpleImmutableEntry<Street,Stop> entry = new java.util.AbstractMap.SimpleImmutableEntry<Street,Stop>(null, null);\r\n\r\n for (Street s : streets_map)\r\n {\r\n if (s.getStops().isEmpty() == false)\r\n {\r\n for (int i = 0; i < s.getStops().size(); i++)\r\n {\r\n entry = new java.util.AbstractMap.SimpleImmutableEntry<Street,Stop>(s,s.getStops().get(i));\r\n }\r\n\r\n }\r\n else\r\n {\r\n entry = new java.util.AbstractMap.SimpleImmutableEntry<Street,Stop>(s,null);\r\n }\r\n\r\n roads_map.add(entry);\r\n\r\n }\r\n\r\n return roads_map;\r\n\r\n }", "public TimeMap() {\n timeMap = new HashMap<>();\n }", "public Map<String,Flight> getAllDepartureFlights() {\n\t\tMap<String,Flight> allFlights = new HashMap<String,Flight> ();\n\t\twaitForElementToAppear(departureFlightSection);\n\t\tList<WebElement> flights = departureFlightSection.findElements(By.tagName(\"li\"));\n\t\tif (!flights.isEmpty()) {\n\t\t for (WebElement flight:flights) {\n\t\t \tString flightInformation = flight.getText();\n\t\t \tString[] flightInformationElements = flightInformation.split(\"\\n\");\n\t\t \tfor (int j = 0; j < flightInformationElements.length; j++) {\n\t\t \t\tSystem.out.println(flightInformationElements[j]);\n\t\t \t}\n\t\t \tFlight newFlight = new Flight();\n\t\t \tString flightNumber = flightInformationElements[0].trim();\n\t\t \tnewFlight.setFlightNumber(flightNumber);\n\t\t \tnewFlight.setStop(flightInformationElements[1].trim());\n\t\t \tnewFlight.setDepartureTime(flightInformationElements[2].trim());\n\t\t \tnewFlight.setArrivalTime(flightInformationElements[3].trim());\n\t\t \tnewFlight.setDuration(flightInformationElements[4].trim());\n\t\t \tnewFlight.setDurationTime(flightInformationElements[5].trim());\n\t\t \tnewFlight.setBusinessPrice(flightInformationElements[6].trim());\n\t\t \tnewFlight.setAnytimePrice(flightInformationElements[7].trim());\n\t\t \tnewFlight.setGetAwayPrice(flightInformationElements[8].trim());\n\t\t \tif (!allFlights.containsKey(flightNumber))\n\t\t \t\tallFlights.put(flightNumber , newFlight);\n\t\t }\n\t\t}\n\t\treturn allFlights;\n\t}", "private void getLongTermMemory(String board) {\n BoardRecord stm = longTermMemory.get(board);\n System.out.println(stm.getWins());\n System.out.println(stm.getTies());\n System.out.println(stm.getLosses());\n }", "public Map(int[] lattice){\n\t\tthis.lattice = lattice;\n\t\tvisited = new boolean[lattice.length];\n\t\t\n\t\t//unique case [end/start]\n\t\tif(lattice[6] != -1)\n\t\t\ta2Nodes.add(6);\n\t\tvisited[6] = true;\n\t\tif(lattice[224] != -1)\n\t\t\ta2Nodes.add(224);\n\t\tvisited[224] = true;\n\t\t\n\t\t\n\t\tfor(int i = 0; i < 6;i++){ //top cases A3NODES\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta3Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\tif(lattice[14] != -1) // unique case due to corner cut[CC]\n\t\t\ta3Nodes.add(14);\n\t\tvisited[14] = true;\n\t\t\n\t\tfor(int i = 225; i < 231;i++){//bottom cases A3NODES\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta3Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\tif(lattice[216] != -1) //index 218, accounts for CC\n\t\t\ta3Nodes.add(216);\n\t\tvisited[216] = true;\n\t\t\n\t\tfor(int i = 29; i < 210; i+=15){ //side cases A4NODES\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta4Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 21; i < 202; i+=15){\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta4Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\tif(lattice[7] != -1) //unique side cases due to CC\n\t\t\ta4Nodes.add(7);\n\t\tvisited[7] = true;\n\t\tif(lattice[223] != -1)\n\t\t\ta4Nodes.add(223);\n\t\tvisited[223] = true;\n\t\t\n\t\t\n\t\tfor(int i = 8; i < 14; i++){ //Bottom-top cases A5NODES\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta5Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 217; i < 223; i++){\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta5Nodes.add(i);\n\t\t\tvisited[i] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < lattice.length; i++){ //All A6Nodes\n\t\t\tif(visited[i])\n\t\t\t\tcontinue;\n\t\t\tif(lattice[i] != -1)\n\t\t\t\ta6Nodes.add(i);\n\t\t}\n\t\t\n\t\tcreateNodes();\n\t}", "final Map<String, Perf4jData> collectPerf4jData(\n final InputStream perfLogStream) throws IOException {\n\n BufferedReader streamReader = new BufferedReader(new InputStreamReader(\n perfLogStream, \"UTF-8\"));\n Map<String, Perf4jData> perf4jDataMap = new HashMap<String, Perf4jData>();\n\n StopWatchParser stopWatchParser = new StopWatchParser();\n String line;\n while ((line = streamReader.readLine()) != null) {\n StopWatch stopWatch = stopWatchParser.parseStopWatch(line);\n\n if (stopWatch != null) {\n String tag = stopWatch.getTag();\n double elapsedTime = stopWatch.getElapsedTime();\n long startTime = stopWatch.getStartTime();\n\n Perf4jData perf4jData = perf4jDataMap.get(tag);\n if (perf4jData == null) {\n perf4jData = new Perf4jData(tag);\n perf4jData.setStartTime(startTime);\n perf4jDataMap.put(tag, perf4jData);\n }\n\n perf4jData.addElapsedTime(elapsedTime);\n perf4jData.setEndTime(startTime);\n }\n }\n\n streamReader.close();\n\n return perf4jDataMap;\n }", "public void loadAll() throws IOException {\r\n System.out.println(\"Previous setting were:\");\r\n System.out.print(\"Time: \" + SaveLoadPrev.getPrevTime(\"outputfile.txt\") + \" | \");\r\n System.out.print(\"Bus Number: \" + SaveLoadPrev.getPrevBusnum(\"outputfile.txt\") + \" | \");\r\n System.out.println(\"Bus Stop: \" + SaveLoadPrev.getPrevBusstop(\"outputfile.txt\"));\r\n String time = SaveLoadPrev.getPrevTime(\"outputfile.txt\");\r\n String busnum = SaveLoadPrev.getPrevBusnum(\"outputfile.txt\");\r\n String busstop = SaveLoadPrev.getPrevBusstop(\"outputfile.txt\");\r\n new ArriveTimeCalculator(busstop, busnum, time);\r\n }", "public Obs findStops(String[] towers, String[] tstamps, Hashtable<Integer, Vertex> towersXY) {\n\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t/**\n\t\t * Stops sets and time stamps for these stops\n\t\t */\n\t\tString stops = \"\";\n\t\tString tstops = \"\";\n\n\t\t/**\n\t\t * Buffers: <\\n buffer holds sequence of observations that did not meet\n\t\t * buffer clearance criterias.> <\\n tbuffer holds time stamps values\n\t\t * corresponding to those in the buffer.>\n\t\t */\n\t\tArrayList<String> buffer = new ArrayList<>();\n\t\tArrayList<String> tbuffer = new ArrayList<>();\n\n\t\tdouble max_distance = 0;\n\t\tint time_diff = 0;\n\t\tfor (int i = 0; i < towers.length; i++) {\n\t\t\tVertex a = towersXY.get(Integer.parseInt(towers[i]));\n\t\t\tfor (int j = 0; j < buffer.size(); j++) {\n\t\t\t\tVertex b = towersXY.get(Integer.parseInt(buffer.get(j)));\n\t\t\t\t// System.out.println(\"b\"+Integer.parseInt(buffer.get(j)));\n\t\t\t\tdouble tmp_distance = eculidean(a.getX(), b.getX(), a.getY(), b.getY());\n\t\t\t\tif (tmp_distance > max_distance) {\n\t\t\t\t\tmax_distance = tmp_distance;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbuffer.add(towers[i]);\n\t\t\ttbuffer.add(tstamps[i]);\n\n\t\t\tif (max_distance > dist_th) {\n\n\t\t\t\ttry {\n\t\t\t\t\t/**\n\t\t\t\t\t * if the time exceeds timing threshold, then check the\n\t\t\t\t\t * distance between towers. If this distance less than the\n\t\t\t\t\t * distance threshold, then previous tower is the end of the\n\t\t\t\t\t * current trip.\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\tjava.util.Date sTime = formatter.parse(tbuffer.get(0));\n\t\t\t\t\tjava.util.Date eTime = formatter.parse(tbuffer.get(tbuffer.size() - 1));\n\t\t\t\t\tcal.setTime(sTime);\n\t\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\tcal.setTime(eTime);\n\t\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\ttime_diff = Math.abs((ehour - hour)) * HOUR + (eminute - minute);\n\n\t\t\t\t\tif (time_diff > time_th) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Add buffer mode to the stops\n\t\t\t\t\t\t */\n\t\t\t\t\t\tint index = modeIndex(buffer);\n\t\t\t\t\t\tif (index != -1) {\n\t\t\t\t\t\t\t// System.out.println(\"Find stop\");\n\t\t\t\t\t\t\tif (!stops.isEmpty()) {\n\t\t\t\t\t\t\t\tstops += CLM;\n\t\t\t\t\t\t\t\ttstops += CLM;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstops += buffer.get(index);\n\t\t\t\t\t\t\ttstops += tbuffer.get(index);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// else {\n\t\t\t\t\tbuffer = new ArrayList<>();\n\t\t\t\t\ttbuffer = new ArrayList<>();\n\t\t\t\t\t/**\n\t\t\t\t\t * Reset maximum distances\n\t\t\t\t\t */\n\t\t\t\t\tmax_distance = 0;\n\t\t\t\t\t// }\n\t\t\t\t} catch (ParseException ex) {\n\t\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (!buffer.isEmpty()) {\n\t\t\t/**\n\t\t\t * Add buffer mode to the stops\n\t\t\t */\n\t\t\tint index = modeIndex(buffer);\n\t\t\tif (index != -1) {\n\t\t\t\t// System.out.println(\"Find from the remaining buffer\");\n\t\t\t\tif (!stops.isEmpty()) {\n\t\t\t\t\tstops += CLM;\n\t\t\t\t\ttstops += CLM;\n\t\t\t\t}\n\t\t\t\tstops += buffer.get(index);\n\t\t\t\ttstops += tbuffer.get(index);\n\n\t\t\t}\n\n\t\t}\n\n\t\t// System.out.println(\"stops:\\t\" + stops);\n\t\t// System.out.println(\"time stamps:\\t\" + tstops);\n\t\treturn new Obs(stops, tstops);\n\n\t}", "private void initializeMap() {\n FLMotor = hardwareMap.get(DcMotor.class, \"FLMotor\");\n FRMotor = hardwareMap.get(DcMotor.class, \"FRMotor\");\n BLMotor = hardwareMap.get(DcMotor.class, \"BLMotor\");\n BRMotor = hardwareMap.get(DcMotor.class, \"BRMotor\");\n //ods = hardwareMap.get(OpticalDistanceSensor.class, \"ods\");\n //color = hardwareMap.get(ColorSensor.class, \"color\");\n //touch = hardwareMap.get(TouchSensor.class, \"touch\");\n gyro = hardwareMap.get(GyroSensor.class, \"gyro\");\n\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n BRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n BLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n FRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n FLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n }", "void readMap()\n {\n try {\n FileReader\t\tmapFile = new FileReader(file);\n StringBuffer\tbuf = new StringBuffer();\n int\t\t\t\tread;\n boolean\t\t\tdone = false;\n \n while (!done)\n {\n read = mapFile.read();\n if (read == -1)\n done = true;\n else\n buf.append((char) read);\n }\n \n mapFile.close();\n \n parseMap(buf.toString());\n \n } catch (Exception e) {\n ErrorHandler.displayError(\"Could not read the map file data.\", ErrorHandler.ERR_OPEN_FAIL);\n }\n }", "public ArrayList<KeyVal> readAllLocal(){\n\t\tDHTNode myNode = dynamoRing.getNode(MY_ADDRESS);\n\t\treturn readDHTAllFromNode(myNode);\n\t}", "public static void readStopList() throws FileNotFoundException {\n String tempBuffer = \"\";\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/Stopword-List.txt\"));\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n stopWords.add(tempBuffer);\n }\n sc_obj.close();\n }", "private Map<String, TimerEntity> getTimers(final String timedObjectId) {\n Map<String, TimerEntity> map = timers.get(timedObjectId);\n if (map == null) {\n map = loadTimersFromFile(timedObjectId);\n timers.put(timedObjectId, map);\n }\n return map;\n }", "public StopBits getStopBits() {\n\t\treturn stopBits;\n\t}", "private void readData()\n {\n while(System.currentTimeMillis() - start <= durationMillis)\n {\n counters.numRequested.incrementAndGet();\n readRate.acquire();\n\n if (state.get() == SimulationState.TEARING_DOWN)\n break;\n }\n }", "private void erstelleListenMap(){\n farbenMap = new TreeMap<>();\n symbolMap = new TreeMap<>();\n\n for(Symbol symbol:Symbol.values()){\n\n switch (symbol) // sortiert ihn in die entsprechende Liste ein\n {\n case ka_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,karos);\n break;\n case ks_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,kreise);\n break;\n case kr_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,kreuze);\n break;\n case st_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,sterne);\n break;\n case qu_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_blau:\n farbenMap.put(symbol,blaue);\n symbolMap.put(symbol,kleeblaetter);\n break;\n\n case ka_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,karos);\n break;\n case ks_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,kreise);\n break;\n case kr_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,kreuze);\n break;\n case st_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,sterne);\n break;\n case qu_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_gelb:\n farbenMap.put(symbol,gelbe);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,karos);\n break;\n case ks_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,kreise);\n break;\n case kr_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,kreuze);\n break;\n case st_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,sterne);\n break;\n case qu_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_gruen:\n farbenMap.put(symbol,gruene);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,karos);\n break;\n case ks_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,kreise);\n break;\n case kr_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,kreuze);\n break;\n case st_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,sterne);\n break;\n case qu_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_rot:\n farbenMap.put(symbol,rote);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,karos);\n break;\n case ks_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,kreise);\n break;\n case kr_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,kreuze);\n break;\n case st_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,sterne);\n break;\n case qu_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_violett:\n farbenMap.put(symbol,violette);\n symbolMap.put(symbol,kleeblaetter);\n break;\n case ka_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,karos);\n break;\n case ks_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,kreise);\n break;\n case kr_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,kreuze);\n break;\n case st_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,sterne);\n break;\n case qu_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,quadrate);\n break;\n case kb_orange:\n farbenMap.put(symbol,orangene);\n symbolMap.put(symbol,kleeblaetter);\n break;\n }\n\n }\n }", "public Map<Long, List<LineStation>> getConnections(RailwayConnectionsRequest request) {\n return linesStationsRepository.findAllConnections(request.getStartingStation(),request.getFinalStation(), request.getDepartureDate()).stream()\n .sorted(Comparator.comparing(LineStation::getArrivalDate))\n .collect(Collectors.groupingBy(x -> x.getTrain().getTrainNumber(), Collectors.toList()));\n }", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "private void getDictionary(){\r\n // TODO: read Dictionary\r\n try{\r\n lstDictionary.clear();\r\n for(int i = 0; i < IConfig.LABEL_COUNT; i++){\r\n lstDictionary.add(new HashMap<>());\r\n DictionaryReader dictionaryReader = new DictionaryReader(lstDictionary.get(i), IConfig.DICTIONARY_URL[i]);\r\n dictionaryReader.read();\r\n }\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "private static HashMap makeLabelMapping(String szlabelmapping) throws IOException\n {\n\tHashMap hmlabelExtend = new HashMap();\n\tif (szlabelmapping != null)\n\t{\n BufferedReader bridlabel = Util.getBufferedReader(szlabelmapping);\n\t String szLine;\n\n\t //Loading in a mapping from state ID to a label description\n\n\t while ((szLine = bridlabel.readLine())!=null)\n {\n\t StringTokenizer st = new StringTokenizer(szLine,\"\\t\");\n\t String szID = st.nextToken().trim();\n\t String szLabelExtend = st.nextToken().trim();\n\t hmlabelExtend.put(szID,szLabelExtend);\n\t }\n\t bridlabel.close();\n\t}\n\n\treturn hmlabelExtend;\n }", "protected synchronized Hashtable getMappingsFromFile() throws Exception {\n\n \t\n\t\tInputStream path = null;\n\n\t\tpath = getClass().getResourceAsStream(\"../../../config/mappings.txt\");\n\n\t\tSystem.out.println(\"Path is - \" + path);\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(path));\n/*\t\tStringBuilder sb = new StringBuilder();\n\t\tString line1 = null;\n\t\twhile ((line1 = reader.readLine()) != null) {\n\t\t\tsb.append(line1 + \"\\n\");\n\t\t}\n*/\t\t//System.out.println(\"String is - \" + sb.toString());\n\t\t\n/* \tFile f = new File(\"src/edu/ucsd/crbs/incf/components/services/emage/mappings.txt\");\n System.out.println(\"Mapping - \" + f.getAbsolutePath());\n\n*/ /*if(sb.toString().trim().equals(\"\") || sb.toString() == null ) {\n System.err.println(\"bisel.ReadMappings cannot find mapping file\");\n System.exit(1);\n }*/\n\n Hashtable mappings = new Hashtable(17, new Float(1.25).floatValue());\n\n\n //BufferedReader br = new BufferedReader(new FileReader(f));\n String line = reader.readLine();\n while(line != null) { \n StringTokenizer st = new StringTokenizer(line, \"*\");\n String aba = st.nextToken();\n String emap = st.nextToken();\n mappings.put(aba, emap);\n line = reader.readLine();\n }\n\n reader.close();\n return mappings;\n }", "public void read() {\r\n\t\tbusExt.put(data);\r\n\t}", "public static void parseBuses(Stop stop, String jsonResponse) throws JSONException {\n JSONArray buses = new JSONArray(jsonResponse);\n for (int i = 0; i < buses.length(); i++) {\n JSONObject bus = buses.getJSONObject(i);\n Bus parsedBus = parseBus(bus);\n try {\n if (parsedBus != null) {\n stop.addBus(parsedBus);\n }\n } catch (RouteException e) {\n //silence return\n }\n }\n }", "private void parseStopID(Set<String> stopID){\n \tSystem.out.println(\"start stop parsing\");\n String[] column = new String[]{\n \"stop_id\",\"stop_code\"\n };\n\n List<StopsTransit> beans;\n\n\n ColumnPositionMappingStrategy<StopsTransit> strategy =\n new ColumnPositionMappingStrategy<StopsTransit>();\n strategy.setType(StopsTransit.class);\n strategy.setColumnMapping(column);\n\n CsvToBean<StopsTransit> csvToBean = new CsvToBean<>();\n\n try {\n\t\t\tCSVReader csvReader = new CSVReader(new FileReader(\n\t\t\t\t\t\"D:\\\\JavaProj\\\\XMLPreProcessor\\\\src\\\\stops.csv\"));\n\t\t\t beans = csvToBean.parse(strategy, csvReader);\n\n\t Iterator<StopsTransit> itr = beans.iterator();\n\t while(itr.hasNext()) {\n\t StopsTransit i = itr.next();\n\t String id = i.getStop_id();\n\t if (!stopID.contains(id)) {\n\t itr.remove();\n\t }\n\t }\n\n\t for(StopsTransit data: beans){\n\t stops.add(Integer.parseInt(data.getStop_code()));\n\t }\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n System.out.println(\"end stop parsing\");\n \n }", "void setListOfStops(ArrayList<TTC> listOfStops) {\n this.listOfStops = listOfStops;\n }", "private IntLongMap getEdgeIdToOsmWayIdMap() {\n if (edgeIdToOsmWayIdMap == null)\n edgeIdToOsmWayIdMap = new GHIntLongHashMap(osmWayIdSet.size(), 0.5f);\n\n return edgeIdToOsmWayIdMap;\n }", "private void fetchStopPoints() {\n\t\tif (mode == Mode.ADD_MODE && routeComboBox.getValue() != null) {\n\t\t\tstopPoints = SQLExecutor.fetchStopPointsByRoute(routeComboBox.getValue());\n\t\t} else if (mode == Mode.UPDATE_MODE && tripComboBox.getValue() != null){\n\t\t\tstopPoints = SQLExecutor.fetchStopPointsByTrip(tripComboBox.getValue());\n\t\t}\n\t}", "Trip(Time start_time, TTC start_station, String type, String number){\n this.START_TIME = start_time;\n this.START_STATION = start_station;\n this.deducted = 0;\n this.listOfStops = new ArrayList<>();\n this.TYPE = type;\n this.NUMBER = number;\n }", "public BusShared(String n, double l, double v, double h, double a, double num){\r\n\t\t\tsuper(n, l, v, h);\r\n\t\t\tthis.additional = a;\r\n\t\t\tthis.Stops = num;\r\n\t }", "public static Map<Taso, Opintokokonaisuus> lueOpintokokonaisuudet(String tiedosto) throws Exception {\n FileInputStream sisaanF = new FileInputStream(tiedosto);\n ObjectInputStream sisaan = new ObjectInputStream(sisaanF);\n \n Map<Taso, Opintokokonaisuus> luettu = null;\n \n try {\n luettu = (Map<Taso, Opintokokonaisuus>)sisaan.readObject();\n } catch (Exception e){\n luettu = new HashMap<Taso, Opintokokonaisuus>();\n }\n \n\n return luettu;\n }", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "public TravelMap() {\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tadjacencyList.add(new ArrayList<>());\n\t\t}\n\t}", "public void loadMap(Maps map) throws FileNotFoundException{\n ArrayList<Station> stat; \n stat = new ArrayList<>();\n \n try {\n String hodnoty; //do premennej hodnoty budem nacitavat riadky z textaka\n int stanica_na_zapis = 1; //counter pre stanice\n \n //---------------------------------------- zaciatok nacitavania\n hodnoty = br.readLine(); //nacitam riadok z textaka\n int x,y; //x, y budu sluzit pre nacitane suradnice\n String nazov; \n String[] split; //split je pole stringov...tu rozdelim riadok na jednotlive hodnoty\n split = hodnoty.split(\"\\\\s+\"); //delim podla medzery\n nazov = split[0]; //nazov stanice bude prvy string\n x = Integer.parseInt(split[1]); //nasleduje konverzia suradnic\n y = Integer.parseInt(split[2]);\n \n Station st = new Station(nazov,stanica_na_zapis,x,y); //vytvorim novu stanicu\n \n stat.add(st); //a pridam do zoznamu stanic\n \n while(!\"\".equals(hodnoty = br.readLine())){ //toto robim, az kym nie som na prazdnom riadku\n stanica_na_zapis++;\n split = hodnoty.split(\"\\\\s+\");\n nazov = split[0];\n x = Integer.parseInt(split[1]);\n y = Integer.parseInt(split[2]);\n st = new Station(nazov,stanica_na_zapis,x,y); \n stat.add(st);\n }\n } catch (IOException ex) {\n Logger.getLogger(Maps.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n stations_loaded = stat.size(); \n map.setStations(stat); //nakoniec ukladam nahrany zoznam stanic\n }", "public RBTMap() {\n RBT = new TreeMap<K,V>();\n \n }", "public interface RobotMap {\n\t// CAN Device IDs\n\n\tpublic static final int WINCH_TALON = 1;\n\t// winch motors\n\n\tpublic static final int LEFT_ALIGN_TALON = 3;\n\tpublic static final int RIGHT_ALIGN_TALON = 4;\n\t// allignment wheels\n\n\tpublic static final int REAR_RIGHT_TALON = 5;\n\tpublic static final int REAR_LEFT_TALON = 6;\n\tpublic static final int FRONT_RIGHT_TALON = 7;\n\tpublic static final int FRONT_LEFT_TALON = 8;\n\t// drivetrain wheels\n\n\tpublic static final int PCM_MAIN = 9;\n\n\t/******************\n ** PNEUMATICS ** \n ******************/ \n\tpublic static final int FLIPPER_RIGHT = 0;\n\tpublic static final int FLIPPER_LEFT = 1;\n\tpublic static final int ARMS_A = 2;\n\tpublic static final int ARMS_B = 3;\n\t// End Pneumatic Channels\n\n\t/******************\n **PID CONTROLLER** \n ******************/ \n public static final double ABS_TOL = 100;\n public static final double P = .4;\n public static final double I = .01;\n public static final double D = 11;\n public static final double OUT_RANGE_L = -0.8;\n public static final double OUT_RANGE_H = 0.8;\n\n}", "public HashMap<String, String> getLovKeyMappings(HashMap<String, String> lov2osdMap) {\n\t\t// ...\n\t\treturn lov2osdMap;\n\t}", "public Bus(int busNo, int lastStop, int nextStop, double lastStopArrivalTime) {\r\n\t\tsuper();\r\n\t\tthis.busNo = busNo;\r\n\t\tthis.lastStop = lastStop;\r\n\t\tthis.nextStop = nextStop;\r\n\t\tthis.lastStopArrivalTime = lastStopArrivalTime;\r\n\t\tthis.busAtStop = 'N';\r\n\t\tthis.allBusesSync='Y';\r\n\t}", "public String printRouteStops()\r\n {\r\n String route_output = \"-> \";\r\n for (Stop s : stops_map)\r\n {\r\n route_output = route_output + s.getId() + \" ->\";\r\n }\r\n\r\n return route_output;\r\n }", "public Map<String, Object> getMapData(int iusid, int timeperiodid);", "public long[] read();", "public TreeMap<Integer,ArrayList<Integer>> getshortesttrips (String departure, String arrival) {\n // Variables ---------------------------------------------------------------------------------------------------\n TreeMap<Integer,ArrayList<Integer>> res =new TreeMap<Integer,ArrayList<Integer>>();\n TreeMap<String,String> tmp = null;\n ArrayList<Integer> intlist = new ArrayList<Integer>();\n int pds=-1;\n int i;\n int idepart = searchers.get_id_from_name(lstations,departure, \"idstation\");\n int iarival = searchers.get_id_from_name(lstations,arrival, \"idstation\");\n if (idepart==-1 || iarival==-1 ) {\n return null;\n }\n ArrayList<Integer> idlists = searchers.get_ids_from_ints(ltrips,idepart, iarival, \"idtrips\", \"departure\", \"arrival\");\n System.out.print(\"\\n ------ ID LISTS \"+idlists+\" -------------------- \\n\");\n // -------------------------------------------------------------------------------------------------------------\n // Operations --------------------------------------------------------------------------------------------------\n if (idlists.size()==1) {\n tmp=searchers.get_map_from_ints(ltrips, idlists.get(0), \"idtrips\");\n res.put(tmp.size()-3, idlists);\n return res;\n }\n for (i=0; i < idlists.size(); i++) {\n tmp=searchers.get_map_from_ints(ltrips, idlists.get(i), \"idtrips\");\n if (pds != tmp.size()- 3) {\n res.put(pds, intlist);\n pds=tmp.size()-3;\n intlist = new ArrayList<Integer>();\n }\n intlist.add(idlists.get(i));\n }\n if (tmp != null) {\n pds = tmp.size()-3;\n res.put(pds, intlist);\n intlist = new ArrayList<Integer>();\n intlist.add(idlists.get(i-1));\n }\n return res;\n }", "public static Map readRecords() throws ClassNotFoundException, IOException {\n\t\tMap map = null;\n\t\ttry{\n\t\t\twhile(true) {\n\t\t\t\tmap = (Map) input.readObject();\n\t\t\t\treturn map;\n\t\t\t}\n\t\t} catch(EOFException e) {\n\t\t\tSystem.err.println(\"Error: Reached end of file prematurely. File may be corrupted.\");\n\t\t\tthrow e;\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSystem.err.println(\"Error: Class 'map' not found. Unable to create object.\");\n\t\t\tthrow e;\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to read map from file.\");\n\t\t\tthrow e;\n\t\t}\n\t}", "public static HashMap<String, Vol> getlesVols(){\n\t\treturn lesVols;\n\t}", "public static HashMap<String, Integer> readHashMap(Hessian2Input dis, Integer[] allInts) {\n int count;\n HashMap<String, Integer> tileMap = null;\n String[] keys;\n try {\n // TODO - The following read is necessary, but could be removed in a future version\n dis.readInt();//size = dis.readInt();\n count = dis.readInt();\n tileMap = new HashMap<String, Integer>(count);\n keys = new String[count];\n for (int i = 0; i < keys.length; i++) {\n keys[i] = dis.readString();\n }\n for (int i = 0; i < count; i++) {\n tileMap.put(keys[i], allInts[dis.readInt()]);\n }\n\n } catch (IOException e) {\n MessageGenerator.briefErrorAndExit(\"Error in readHashMap()\");\n }\n return tileMap;\n }", "public static Map<Integer, List<GeoDBSlipRateRecord>> readGeoDB(Reader reader) throws IOException {\n\t\tif (!(reader instanceof BufferedReader))\n\t\t\treader = new BufferedReader(reader);\n\t\tMap<Integer, List<GeoDBSlipRateRecord>> ret = new HashMap<>();\n\t\t\n\t\tFeatureCollection features = FeatureCollection.read(reader);\n\t\t\n\t\tfor (Feature feature : features.features) {\n\t\t\tGeoDBSlipRateRecord record = new GeoDBSlipRateRecord(feature);\n\t\t\tList<GeoDBSlipRateRecord> faultRecords = ret.get(record.faultID);\n\t\t\tif (faultRecords == null) {\n\t\t\t\tfaultRecords = new ArrayList<>();\n\t\t\t\tret.put(record.faultID, faultRecords);\n\t\t\t}\n\t\t\tfaultRecords.add(record);\n\t\t}\n\t\treader.close();\n\t\treturn ret;\n\t}", "public List<Map<String, Object>> NewListFaultStatistics(Timestamp start, Timestamp end, int chainid) {\n\t\treturn statisticsMapper.NewListFaultStatistics(start,end,chainid);\n\t}", "private void parseCPUSpeedTimes(){\n\t\tString str = parser.readFile(SYS_CPU_SPEED_STEPS, 512);\n\t\tif(str == null)\n\t\t\treturn;\n\t\t\n\t\tString[] vals;\n\t\tint index = 0;\n\t\tlong time;\n\t\t\n\t\tfor(String token : str.split(\"\\n\")){\n\t\t\tif(str.trim().length() == 0) continue;\n\t\t\ttry{\n\t\t\t\tvals = token.split(\" \");\n\t\t\t\ttime = Long.valueOf(vals[1]);\n\t\t\t\tmRelCpuSpeedTimes[index] = time - mBaseCpuSpeedTimes[index];\n\t\t\t\tmBaseCpuSpeedTimes[index] = time;\n\t\t\t}catch (NumberFormatException nfe){\n\t\t\t\tnfe.printStackTrace();\n\t\t\t}finally{\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t}", "public HashMap<String, String[]> readDictionary (){\n\t\tHashMap<String, String[]> hashmap = new HashMap<String, String[]>();\n\t\t\n\t\treturn (HashMap<String, String[]>) readDictionary(hashmap);\n\t}", "public static Map loadMap(String MapFile){\n int Bottle =0;\n int Bottle1= 0;\n Map Object = new Map(0,0);\n \n try {\n \n Scanner scan = new Scanner(new File(MapFile));\n FileReader fr = new FileReader(MapFile);\n while(scan.hasNextLine()){\n if (scan.hasNextInt()){\n Bottle = scan.nextInt();\n Bottle1 = scan.nextInt();\n\n }\n Object = new Map(Bottle,Bottle1);\n }\n fr.close();\n }\n \n catch (Exception e){\n System.out.println(\"Sorry Nothing Found\");\n System.out.println(e.toString());\n e.printStackTrace(); \n } \n \n return Object;\n }", "@Override\n public Stoptime[] getStoptimes(String stopGtfsId) throws Exception {\n String query = getStopTimesQuery(stopGtfsId);\n String json = new GraphQLAPIQuery(apiUrl, query).execute();\n \n Stop deserialized = new GsonBuilder()\n .registerTypeAdapter(Stop.class, new TransitDataJsonDeserializer())\n .create()\n .fromJson(json, Stop.class);\n \n return deserialized.getStoptimes();\n }", "Map<Locality, LocalityLbEndpoints> getLocalityLbEndpointsMap() {\n return Collections.unmodifiableMap(localityLbEndpointsMap);\n }", "public Map<Integer, Date> getTrainsByStation(Station station1) throws NotFoundInDatabaseException {\n Station station = stationService.getStationByName(station1.getName());\n List<Schedule> scheduleList = scheduleService.getScheduleByStationId(station.getId());\n Map<Integer, Date> trainMap = new HashMap<Integer, Date>();\n for (Schedule schedule: scheduleList) {\n trainMap.put(getTrainById(schedule.getTrainId()).getNumber(), schedule.getDepartureDate());\n }\n return trainMap;\n }", "public List<Tailor> read();", "private static void updateDistances(Stop newStop) {\n stopDistances.put(new StopPair(newStop, newStop), 0);\n for (Stop s : getAllStops()) {\n // Calculate distance both directions, as implementation of\n // calculateDistancesBetweenStops may change and provide non-mirroring\n // results.\n int distanceA = calculateDistanceBetweenStops(s, newStop);\n int distanceB = calculateDistanceBetweenStops(newStop, s);\n stopDistances.put(new StopPair(s, newStop), distanceA);\n stopDistances.put(new StopPair(newStop, s), distanceB);\n }\n }", "@PostConstruct\n public void init() {\n for (final Entry<String, Set<String>> aggregateEntry : processor.getTaskIndex().entrySet()) {\n final AggregateStopwatch stopwatchEntry = new AggregateStopwatch();\n\n aggregatedTasks.put(aggregateEntry.getKey(), stopwatchEntry);\n\n for (final String nameEntry : aggregateEntry.getValue()) {\n logger.info(\"adding stopwatchEntry - aggregate: \" + aggregateEntry.getKey() + \" task: \" + nameEntry);\n stopwatchEntry.getTimedTasks().put(nameEntry, new TaskStopwatch());\n }\n }\n }" ]
[ "0.5775755", "0.5711445", "0.548944", "0.54012436", "0.53732616", "0.52857065", "0.5264587", "0.52580494", "0.51578903", "0.5079438", "0.50507504", "0.50358623", "0.5025813", "0.50226563", "0.500295", "0.4934352", "0.4910719", "0.49073783", "0.48707223", "0.48456457", "0.48387596", "0.48125315", "0.480584", "0.48058346", "0.47957242", "0.47944778", "0.475196", "0.47515565", "0.47444192", "0.47291985", "0.4696861", "0.4691808", "0.4682286", "0.46738994", "0.46598727", "0.4656581", "0.4655311", "0.46531382", "0.46528095", "0.46358198", "0.46190092", "0.46141416", "0.45935693", "0.4572505", "0.45668975", "0.45448595", "0.4542144", "0.45421124", "0.45009303", "0.44968784", "0.449278", "0.44696638", "0.44671908", "0.44639522", "0.4462356", "0.44592774", "0.4454302", "0.4450096", "0.4449371", "0.4444935", "0.44443026", "0.44357824", "0.44336691", "0.4430252", "0.44258642", "0.4410272", "0.44001514", "0.43955636", "0.4394938", "0.4387294", "0.43773353", "0.43761298", "0.43739712", "0.4372211", "0.4367914", "0.43673128", "0.43648764", "0.43619806", "0.4357642", "0.4356571", "0.43522966", "0.4351138", "0.43502346", "0.43475646", "0.43464988", "0.4345202", "0.4334724", "0.4315619", "0.4312774", "0.43102607", "0.4309955", "0.43090272", "0.42986652", "0.42961124", "0.42919803", "0.42892653", "0.42889494", "0.4284836", "0.42810366", "0.4269164" ]
0.69381
0
Reads BOTH the sbs and SMRT file and put them into a single list
public List<BusRoutes> readBusRoutes(String sbsFile, String smrtFile) throws IOException { List<BusRoutes> busRoutes = new ArrayList<>(); File ltaSbstRoute = new File(sbsFile); try (BufferedReader br = new BufferedReader(new FileReader(ltaSbstRoute))) { br.readLine(); StringTokenizer st; String line; while ((line = br.readLine()) != null) { st = new StringTokenizer(line, ","); while (st.hasMoreTokens()) { String serviceNum = st.nextToken(); int direction = Integer.parseInt(st.nextToken()); int roadSeq = Integer.parseInt(st.nextToken()); String busStopCode = st.nextToken(); Double distance; try { distance = Double.parseDouble(st.nextToken()); } catch (NumberFormatException ex) { distance = null; } BusRoutes ltaRoutes = new BusRoutes(serviceNum, direction, roadSeq, busStopCode, distance); busRoutes.add(ltaRoutes); }//End while loop for each token }//End while loop } File smrtBusRoute = new File(smrtFile); try (BufferedReader br = new BufferedReader(new FileReader(smrtBusRoute))) { br.readLine(); StringTokenizer st; String line; while ((line = br.readLine()) != null) { st = new StringTokenizer(line, ","); while (st.hasMoreTokens()) { String serviceNum = st.nextToken(); int direction = Integer.parseInt(st.nextToken()); int roadSeq = Integer.parseInt(st.nextToken()); String busStopCode = st.nextToken(); Double distance; try { distance = Double.parseDouble(st.nextToken()); } catch (NumberFormatException ex) { distance = null; } BusRoutes smrtRoutes = new BusRoutes(serviceNum, direction, roadSeq, busStopCode, distance); busRoutes.add(smrtRoutes); }//End while loop for each token }//End while loop } return busRoutes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void removeSSRs(File input){\n try(\n FileReader fRead = new FileReader(input+\".ssr\");\n BufferedReader bRead = new BufferedReader(fRead);\n FileReader fRead2 = new FileReader(input);\n BufferedReader bRead2 = new BufferedReader(fRead2)\n ){\n ArrayList<String> noSSRFilenames = new ArrayList<>();\n while (true){\n String line = bRead.readLine();\n if (line == null){\n break;\n }\n else{\n String [] nLine = line.split(\"\\t\");\n if (!nLine[0].equals(\"Name\")){\n if (!noSSRFilenames.contains(nLine[0])){\n noSSRFilenames.add(nLine[0]);\n }\n }\n }\n }\n boolean match = false;\n Sequence raw;\n String seqName = \"\";\n while (true) {\n String seqLine = bRead2.readLine();\n if (seqLine == null) {\n break;\n }\n else {\n if (seqLine.charAt(0) == '>') {\n match = false;\n for (String name : noSSRFilenames) {\n if (seqLine.equals(name)) {\n match = true;\n break;\n }\n }\n if (!match) {\n seqName = seqLine;\n }\n }\n //** Sequence objects are created and added to Metagenome\n else if(!match && seqLine.length() > DMMController.getIgnoreShortSeq() ){\n raw = new Sequence(seqName,seqLine,seqLine.length());\n sequences.add(raw);\n }\n }\n }\n }\n catch (Exception e){\n System.out.println(e.getMessage() + \"----------Remove SSRs issue\");\n }\n }", "private static ArrayList<Message> ReadFile(Scanner sc) {\t\n\t\tArrayList<Message> messageList = new ArrayList<Message>();\n\t\t\n\t\t/* Iterating over each string in file and creating\n\t\t * Message object with file contents\n\t\t*/\n\t\twhile (sc.hasNextLine()) {\n\t\t\tString line = sc.nextLine();\n\t\t\tScanner lineScanner = new Scanner(line);\n\t\t\twhile (lineScanner.hasNext()) {\n\t\t\t\ttry {\n\t\t\t\t\tString received = lineScanner.next(); \n\t\t\t\t\tString sent = lineScanner.next();\n\t\t\t\t\tString node1 = lineScanner.next();\n\t\t\t\t\tString notification = lineScanner.next();\n\t\t\t\t\tString node2 = null;\n\t\t\t\t\tif (lineScanner.hasNext()) {\n\t\t\t\t\t\tnode2 = lineScanner.next();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlong receivedVal = Long.parseLong(received);\n\t\t\t\t\tlong sentVal = Long.parseLong(sent);\n\t\t\t\t\tMessage message = new Message(receivedVal, sentVal, node1,\n\t\t\t\t\t\t\tnotification, node2);\n\t\t\t\t\t\n\t\t\t\t\tmessageList.add(message);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tlineScanner.close();\n\t\t}\n\t\treturn messageList;\n\t}", "public void readfiles1(String file_name){\n \n\n try{\n File fname1 = new File(file_name);\n Scanner sc = new Scanner(fname1);\n \n while (sc.hasNext()){\n String temp = sc.nextLine();\n String[] sts = temp.split(\" \");\n outs.addAll(Arrays.asList(sts));\n\n }\n\n // for (int i = 0;i<outs.size();i++){\n // System.out.println(outs.get(i));\n //}\n\n }catch(Exception ex){\n System.out.println(ex.getMessage());\n }\n }", "private ObservableList<Saucer> loadSaucers(){\r\n try {\r\n File file = new File(\"src/data/saucers.txt\");\r\n FileInputStream fis = new FileInputStream(file);\r\n ObjectInputStream input = new ObjectInputStream(fis);\r\n List<Saucer> list = (List<Saucer>) input.readObject();\r\n ObservableList<Saucer> saucers = FXCollections.observableArrayList(list);\r\n\r\n return saucers;\r\n } catch (Exception ex){\r\n ex.printStackTrace();\r\n\r\n return null;\r\n }\r\n }", "public void fillList (File file) throws FileNotFoundException {\n\t\tif (!file.getName().endsWith(\".srt\")) {\n\t\t\tthrow new IllegalArgumentException(\"Only .srt files supported\");\n\t\t}\n\n\t\t//create file reader tied to the .srt file, used JUST to count the # of lines\n\t\ttry {\n\t\t\treader = new Scanner(file);\n\t\t} catch(FileNotFoundException e) {\n\t\t\tthrow e; //let it propogate up\n\t\t}\n\n\t\tint numOfBlocks = countNumberOfStringBlocks();\n\t\t\n\t\t//don't directly copy into stringList, as there could be errors reading file.\n\t\t//don't want to overwrite current stringList until entire file is read succesfully.\n\t\tStringBlock[] stringListBuffer = new StringBlock[numOfBlocks];\t\t//instantiate the array of stringblocks to the size needed\n\t\t//end of file reached during countNumberOfStringBlocks();\n\t\t\n\t\treader.close();\n\t\t\n\t\tcurrentLineNum = 0;\n\t\t//return reader back to top of the file, to begin parsing/storing chunks\n\t\ttry {\n\t\t\treader = new Scanner(file);\n\t\t} catch(FileNotFoundException e) {\n\t\t\tthrow e;\n\t\t}\n\t\t\n\t\tStringBlock stringBlock;\n\t\tint index = 0;\n\t\t\n\t\t//read in stringblocks, and store them in order\n\t\ttry{\n\t\t\twhile ((stringBlock = parseNextStringBlock()) != null) {\n\t\t\t\tstringListBuffer[index] = stringBlock;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t//end of file reached successfully\n\t\t\t\n\t\t\tstringList = stringListBuffer;\n\t\t} catch (IllegalStateException e) {\n\t\t\tthrow e; //let it propogate all the way up to the method where the file is selected\n\t\t}\n\t\t\n\t\t//close reader\n\t\treader.close();\n\t}", "public static void read6() {\n List<String> list = new ArrayList<>();\n\n try (BufferedReader br = Files.newBufferedReader(Paths.get(filePath))) {\n\n //br returns as stream and convert it into a List\n list = br.lines().collect(Collectors.toList());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n list.forEach(System.out::println);\n }", "public static ArrayList<Stue> getStueData() {\n ArrayList<Stue> fillArray = new ArrayList<>();\n\n try {\n File fileIn = new File(\"Stuedata.txt\");\n\n Scanner in = new Scanner(fileIn);\n\n while (in.hasNext()) {\n Stue stueData = new Stue();\n stueData.idRum = in.next();\n stueData.navn = in.next();\n stueData.motto = in.next();\n stueData.etage = in.next();\n fillArray.add(stueData);\n }\n in.close(); //WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY?\n } catch (IOException i) {\n i.printStackTrace();\n System.exit(0);\n }\n return fillArray;\n }", "public static List<Server> readFile() {\n String fileName = \"servers.txt\";\n\n List<Server> result = new LinkedList<>();\n try (Scanner sc = new Scanner(createFile(fileName))) {\n\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n result.add(lineProcessing(line));\n\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File is not found\");\n } catch (MyException e) {\n System.out.println(\"File is corrupted\");\n }\n return result;\n }", "private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }", "public static String loadStudentList() {\n\n // Variable used to organize code and allow buffered reader to close\n String bufferedStudentList = \" \"; \n\n // The try...catch block handles the possible error that may occur if \n // there was an issue with accessing the file. \n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(Constants.STUDENT_LIST));\n bufferedStudentList = bufferedReader.readLine();\n bufferedReader.close();\n } catch (IOException exception) {\n System.out.println(exception);\n } \n return bufferedStudentList; \n }", "private void readItems() {\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n // try to find items to add\n try {\n items = new ArrayList<>(FileUtils.readLines(todoFile));\n } catch (IOException e) {\n items = new ArrayList<>();\n }\n }", "public static ArrayList<MonitoredData> readFileData(){\n ArrayList<MonitoredData> data = new ArrayList<>();\n List<String> lines = new ArrayList<>();\n try (Stream<String> stream = Files.lines(Paths.get(\"Activities.txt\"))) {\n lines = stream\n .flatMap((line->Stream.of(line.split(\"\\t\\t\"))))\n .collect(Collectors.toList());\n for(int i=0; i<lines.size()-2; i+=3){\n MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));\n data.add(md);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //data.forEach(System.out::println);\n return data;\n }", "static List<String> fileToList(){\n List<String> contacts = null;\n try {\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n contacts = Files.readAllLines(contactsListPath);\n } catch (IOException ioe){\n ioe.printStackTrace();\n }\n return contacts;\n }", "private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\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 while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\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 }", "private ArrayList<String> readRouteList(String filename) {\n FileInputStream fstream = null;\n ArrayList<String> list = new ArrayList();\n try {\n fstream = new FileInputStream(filename);\n BufferedReader br = new BufferedReader(new InputStreamReader(new DataInputStream(fstream)));\n while (true) {\n String readLine = br.readLine();\n String s = readLine;\n if (!(readLine == null || s.length() == 0)) {\n list.add(s);\n }\n try {\n fstream.close();\n break;\n } catch (IOException e) {\n }\n }\n } catch (IOException e2) {\n } catch (Throwable th) {\n if (fstream != null) {\n try {\n fstream.close();\n } catch (IOException e3) {\n }\n }\n }\n return list;\n }", "private ArrayList<Read> makeReadList() {\r\n\t\tArrayList<Read> rlist=makeReadList2();\r\n\t\tif(mateStream!=null){\r\n\t\t\tListNum<Read> matesln=mateStream.nextList();\r\n\t\t\tArrayList<Read> mates=matesln.list;\r\n\t\t\tif(rlist!=null && mates!=null){\r\n\t\t\t\tint max=Tools.min(rlist.size(), mates.size());\r\n\t\t\t\tfor(int i=0; i<max; i++){\r\n\t\t\t\t\tRead a=rlist.get(i);\r\n\t\t\t\t\tRead b=mates.get(i);\r\n\t\t\t\t\ta.mate=b;\r\n\t\t\t\t\tb.mate=a;\r\n\t\t\t\t\tb.setPairnum(1);\r\n\t\t\t\t}\r\n\t\t\t\tmates.clear();\r\n\t\t\t\tmateStream.returnList(matesln, false);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn rlist;\r\n\t}", "private static List<RSQSimEvent> readEventsFile(\n\t\t\tInputStream eListStream, InputStream pListStream, InputStream dListStream, InputStream tListStream,\n\t\t\tList<SimulatorElement> elements, Collection<? extends RuptureIdentifier> rupIdens, boolean bigEndian,\n\t\t\tboolean skipSlipsAndTimes) throws IOException {\n\t\tList<RSQSimEvent> events = Lists.newArrayList();\n\t\t\n\t\tpopulateEvents(eListStream, pListStream, dListStream, tListStream, elements, rupIdens, bigEndian, events, skipSlipsAndTimes);\n\t\t\n\t\treturn events;\n\t}", "void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }", "public List<List<String>> read () {\n List<List<String>> information = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(path))) {\n int aux = 0;\n while ((line = br.readLine()) != null) {\n String[] data = line.split(split_on);\n List<String> helper = new ArrayList<>();\n helper.add(data[0]);\n helper.add(data[1]);\n information.add(helper);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return information;\n }", "private void readGraphsFromFiles() {\n\n\n \t\ttry {\t\n\t\t\t// where to find SN files\n\t\t\tString fileName = \"./networks/SN_20000\";\n\t\t\tint numberSNs = 5;\n\t\t\t\n\t\t\t// TODO CHANGE! IT IS JUST FOR TESTING. OUT OF MEMORY\n\t\t\tfileNamesGraphs = new String[numberSNs];\n\t\t\tfileNamesGraphs [0]= fileName + \"_0.001.dgs\";\n\t\t\tfileNamesGraphs [1]= fileName + \"_0.002.dgs\";\n\t\t\tfileNamesGraphs [2]= fileName + \"_0.003.dgs\";\n\t\t\tfileNamesGraphs [3]= fileName + \"_0.004.dgs\";\n\t\t\tfileNamesGraphs [4]= fileName + \"_0.005.dgs\";\n\t\t\t//files [5]= fileName + \"_0.001.dgs\";\n\t\t\t//files [6]= fileName + \"_0.001.dgs\";\n\t\t\t//files [7]= fileName + \"_0.001.dgs\";\n\t\t\t//files [8]= fileName + \"_0.001.dgs\";\n\t\t\t//files [9]= fileName + \"_0.001.dgs\";\n\n\t long time1 = System.currentTimeMillis( );\n\n\t\t\t// first create a list of Graphs\n\t\t\tthis.graphsFromFiles = new ArrayList<Graph>();\t\n\t\t\t\n\t\t\tfor (int i = 0; i < numberSNs; i++) {\n\t\t\t\tGraph graphFromFile;\n\t\t\t\tgraphFromFile = new SingleGraph(\"SN\" + i);\n\t\t\t\tthis.graphsFromFiles.add(graphFromFile);\n\t\t\t}\n\t\t\n\t\t\tFileSourceDGS fileSource = new FileSourceDGS();\n\t\t\t\t\t\n\t\t\tfor (int i = 0; i < numberSNs; i++) {\n\t\t\t\tfileSource.addSink(this.graphsFromFiles.get(i));\t\t\t\t\n\t\t\t\tfileSource.readAll(fileNamesGraphs[i]);\n\t\t\t\tfileSource.removeSink(this.graphsFromFiles.get(i));\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tlong time2 = System.currentTimeMillis( );\n\t\t\tSystem.out.println(\"readGraphsFromFiles: \" + (double)(time2 - time1)/1000 \n\t\t\t\t\t+ \"s for reading the SN files\");\n\t \n\t\t\t\n\t\t} catch (IOException e) {\n\t\t \tSystem.out.println(\"Error when reading SN files\");\n\t\t}\n\t\t\t\t\t\n\t}", "static List<Student> loadStudentList(InputStream in) {\n return new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))\n .lines()\n .skip(1)\n .map(Student::fromCsv)\n .collect(Collectors.toList());\n }", "private static List<Student> loadStudentList(File file) throws IOException {\n return loadStudentList(new FileInputStream(file));\n }", "public ArrayList<String> readFromFile(){\n ArrayList<String> results = new ArrayList<>();\n //Wrap code in a try/ catch to help with exception handling.\n try{\n //Create a object of Scanner class\n Scanner s = new Scanner(new FileReader(path));\n //While loop for iterating thru the file.\n // Reads the data and adds it to the ArrayList.\n while(s.hasNext()) {\n String c1 = s.next();\n String c2 = s.next();\n String w = s.next();\n results.add(c1);\n results.add(c2);\n results.add(w);\n }return results;\n\n }//File not found exception block.\n catch(FileNotFoundException e){\n System.out.println(e);\n }\n return results;//default return.\n }", "public List<Stock> readFile() throws IOException\n {\n \t //System.out.println(\"hhh\");\n \t //List<Stock> listStock = mapper.readValue(file, new TypeReference<List<Stock>>() {});\n \t \n \t List<Stock> listStock = mapper.readValue(file, new TypeReference<List<Stock>>(){});\n \t\n\t\treturn listStock;\n }", "public List<String> readFileIntoList(String filepath) throws IOException;", "private void readFile() {\n try (BufferedReader br = new BufferedReader(new FileReader(\"../CS2820/src/production/StartingInventory.txt\"))) {\n String line = br.readLine();\n while (line != null) {\n line = br.readLine();\n this.items.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void readStopList() throws FileNotFoundException {\n String tempBuffer = \"\";\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/Stopword-List.txt\"));\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n stopWords.add(tempBuffer);\n }\n sc_obj.close();\n }", "public ArrayList<String> loadToRead() {\n\n\t\tSAVE_FILE = TO_READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "protected final StreamInfoList loadStreamList(FileState fstate, DBFileInfo finfo, DBDeviceContext dbCtx, boolean dbLoad) {\n\n // Check if the stream list has already been loaded\n \n StreamInfoList sList = (StreamInfoList) fstate.findAttribute(FileState.StreamsList);\n \n // If the streams list is not loaded then load it from the database\n\n if ( sList == null && dbLoad == true) { \n\n // Load the streams list from the database\n \n try {\n\n // Load the streams list\n \n sList = dbCtx.getDBInterface().getStreamsList(finfo.getFileId(), DBInterface.StreamAll);\n }\n catch (DBException ex) {\n }\n }\n \n // Return the streams list\n \n return sList;\n }", "public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuffer();\n try {\n //getting file oject\n f = new File(sFilePath);\n if (f.exists()) {\n //get object for fileinputstream\n fstream = new FileInputStream(f);\n // Get the object of DataInputStream\n in = new DataInputStream(fstream);\n //get object for bufferreader\n br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n //Read File Line By Line\n while ((strLine = br.readLine()) != null) {\n strbuff.append(strLine + \"##NL##\");\n }\n\n stemp = strbuff.toString().split(\"##NL##\");\n } else {\n throw new Exception(\"File Not Found!!\");\n }\n\n return stemp;\n } catch (Exception e) {\n throw new Exception(\"ReadAllFileLines : \" + e.toString());\n } finally {\n //Close the input stream\n try {\n br.close();\n } catch (Exception e) {\n }\n try {\n fstream.close();\n } catch (Exception e) {\n }\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Student> retrieveAllStudentObjects() {\r\n\t\tList<Student> listOfStudents = new ArrayList<Student>();\r\n\r\n\t\ttry {\r\n\t\t\tlistOfStudents = readSerializedObject();\r\n\r\n\t\t\tif (listOfStudents == null) {\r\n\t\t\t\tSystem.out.println(\"Unable to read from file!\");\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn listOfStudents;\r\n\t}", "private static String[] rms(BufferedReader br) throws IOException {\n return br.readLine().split(SPLIT_CHAR);\n }", "TraceList read(File file) throws IOException;", "public List<String> readFileIntoList(String sourceFilepath) throws IOException {\n List<String> lines = new ArrayList<>();\n URL url = new URL(sourceFilepath);\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String line = null;\n while ((line = reader.readLine()) != null) {\n lines.add(line);\n }\n reader.close();\n return lines;\n }", "static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}", "public ArrayList<Auction> readAuctions()\n {\n String dataLines[]; /* Data read from line */\n int countAuction = 0; /* No. of auction */\n boolean bNotNull = true; /* Indicate line null error */ \n \n ArrayList<Auction> auctionList = new ArrayList<Auction>();\n \n /* Open file. If cannot open, return null; */\n TextFileReader reader = new TextFileReader(auctionFileName);\n if (reader.open() == false)\n return null;\n \n /* Read number of data */\n String line;\n line = reader.readLine();\n try\n {\n countAuction = Integer.parseInt(line);\n }\n catch (Exception e)\n {\n return null;\n }\n \n /* Loop get auction, loop get bid, and add to list */\n int numTag = tagAuction.length;\n for (int i = 0; i < countAuction && bNotNull; i++)\n {\n /* Get Auction */\n dataLines = new String[numTag];\n for (int j = 0; j < numTag && bNotNull; j++)\n {\n dataLines[j] = reader.readLine();\n if (dataLines[j] == null)\n bNotNull = false;\n }\n Auction auction = parseAuction(dataLines);\n if (auction != null) /* If data is correct, add to auction list */\n {\n auctionList.add(auction);\n readBids(reader, auction);\n }\n }\n reader.close();\n return auctionList;\n }", "public static ArrayList<Student> read(String filename){\n\t\t\n\t\tArrayList<Student> students = new ArrayList<>();\n\n\t\tBufferedReader br;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.contains(\" \")){\n\t\t\t\t\tstudents.add(new Student(getGpaFromLine(line), getSatFromLine(line)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn students;\n\t}", "private static List<StudentRecord> convert(List<String> lines) {\n\t\tObjects.requireNonNull(lines);\n\t\t\n\t\tArrayList<StudentRecord> result = new ArrayList<>(lines.size());\n\t\t\n\t\tfor(String data : lines) {\n\t\t\tif(data.length() == 0) continue; //preskoci prazne linije\n\t\t\tScanner sc = new Scanner(data);\n\t\t\tsc.useDelimiter(\"\\t\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tresult.add(new StudentRecord(sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next()));\n\t\t\t}catch(NoSuchElementException e) {\n\t\t\t\tsc.close();\n\t\t\t\tthrow new NoSuchElementException(\"Data not formatted correctly.\");\n\t\t\t}\n\t\t\tsc.close();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static void readFromFile(ArrayList<String> sArrayList, Context context){\n\n int i=0;\n try{\n InputStream inputStream = context.openFileInput(TxtName);\n\n if(inputStream!=null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String receivedString = \"\";\n\n while((receivedString = bufferedReader.readLine())!=null){\n sArrayList.set(i,receivedString);\n Log.d(\"fileContent\", \"readFromFile: \"+sArrayList.get(i)+\"\\n\");\n i++;\n }\n inputStream.close();\n }\n\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n }\n\n }", "public static ArrayList<ArrayList<ArrayList<String>>> readSourceInputFile(\n\t\t\tArrayList<ArrayList<ArrayList<String>>> allSentences, FilePath pathStr) throws IOException {\n\t\tArrayList<String> inputList = null;\n\t\tinputList = readInputTxtFile(inputList, pathStr);\n\t\treturn allSentences = readResultTxtFile(allSentences, inputList, pathStr);\n\t}", "protected List<String> readFile()\n {\n // Base size 620 for Google KML icons. This might be slow for larger\n // sets.\n List<String> lines = New.list(620);\n try (BufferedReader reader = new BufferedReader(\n new InputStreamReader(getClass().getResourceAsStream(myImageList), StringUtilities.DEFAULT_CHARSET)))\n {\n for (String line = reader.readLine(); line != null; line = reader.readLine())\n {\n lines.add(line);\n }\n }\n catch (IOException e)\n {\n LOGGER.warn(e.getMessage());\n }\n return lines;\n }", "public static Bom combineSBomsFromInputStreamSource(List<InputStreamSource> files)\n\t\t\tthrows SBomCombinerException, SBomCommonsException\n\t{\n\t\treturn combineCommonSBoms(files);\n\t}", "public static ArrayList<Subject> loadListOfPools(String fileName) {\n ArrayList<Subject> subject = new ArrayList<>();\r\n String str = TextReader.StringFromPools(fileName);//Uses the method that returns a complete string with newlines for each studentline.\r\n if (validateInputFromPool(str)) {//Uses the validation method to check that the input is valid.\r\n String[] lines = str.split(\"\\n\");\r\n String[] lineParameters;\r\n int countFor = 0;\r\n for (String line : lines) {\r\n if(countFor > 1){\r\n lineParameters = line.split(\",\");\r\n Subject sub = new Subject(lineParameters[0],lineParameters[1]);\r\n subject.add(sub);\r\n }\r\n countFor++;\r\n }\r\n }\r\n\r\n return subject;\r\n }", "public SLList readFile(String file) {\n\t\t// Read it back in\n\t\tObjectInputStream i = null;\n\t\tSLList temp = null;\n\n\t\ttry {\n\t\t\ti = new ObjectInputStream(new FileInputStream(file));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t/**\n\t\t * try/catch to verify file has been restored\n\t\t */\n\t\t\n\t\ttry {\n\t\t\ttemp = (SLList) i.readObject();\n\t\t\t//System.out.println(temp);\n\t\t\tSystem.out.println(\"Successfully restored data from file!\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ti.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t}", "public void readMSP() throws IOException\n\t{\n\t\tString line = \"\";\t\t\t\t\t\t//Line for reading\n\t\tString fragType = \"\";\t\t\t\t\t//Fragment type\n\t\tString polarity = \"\";\t\t\t\t\t//Polarity of entry\n\t\tDouble precursor = 0.0;\t\t\t\t\t//Precursor mass\n\t\tString name = \"\";\t\t\t\t\t\t//Lipid name\n\t\tLibrarySpectrum entryTemp = null;\t\t//Temp library entry\n\t\tboolean peakStart = false;\t\t\t\t//Boolean if peak list beginning\n\t\tboolean isLipidex = false;\t\t\t\t//Boolean if spectra was generated using LipiDex\n\t\tboolean optimalPolarity = false;\t\t//Boolean if optimal polarity for class\n\t\tString[] split;\t\t\t\t\t\t\t//String array for parsing transitions\n\n\t\tfor (int i=0; i<lipidLibs.size(); i++)\n\t\t{\n\t\t\tupdateProgress((int)(Double.valueOf(i+1)\n\t\t\t\t\t/Double.valueOf(lipidLibs.size())*100.0),\"% - Reading Libraries\",true);\n\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(lipidLibs.get(i)));\n\n\t\t\t//read line if not empty\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t{\n\t\t\t\t//read in retention time\n\t\t\t\tif (line.contains(\"Name:\") || line.contains(\"NAME:\"))\n\t\t\t\t{\n\t\t\t\t\t//Add entry\n\t\t\t\t\tif (precursor>0.0) \n\t\t\t\t\t\taddSpectrum(entryTemp);\n\n\t\t\t\t\t//Erase entry\n\t\t\t\t\tpolarity = \"\";\n\t\t\t\t\tprecursor = 0.0;\n\t\t\t\t\tname = \"\";\n\t\t\t\t\tfragType = \"\";\n\t\t\t\t\tpeakStart = false;\n\t\t\t\t\tisLipidex = false;\n\t\t\t\t\toptimalPolarity = false;\n\n\t\t\t\t\tif (line.contains(\"]+\")) polarity = \"+\";\n\t\t\t\t\telse polarity = \"-\";\n\n\t\t\t\t\tname = line.substring(line.indexOf(\":\")+1);\n\t\t\t\t}\n\n\t\t\t\t//read in optimal polarity\n\t\t\t\tif (line.contains(\"OptimalPolarity=true\"))\n\t\t\t\t{\n\t\t\t\t\toptimalPolarity = true;\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"LipiDex\")) isLipidex = true;\n\n\t\t\t\tif (line.contains(\"Num Peaks:\"))\n\t\t\t\t{\n\t\t\t\t\tpeakStart = true;\n\t\t\t\t\tentryTemp = new LibrarySpectrum(precursor, polarity, name, lipidLibs.get(i).getName(), isLipidex, optimalPolarity);\n\t\t\t\t}\n\n\t\t\t\tif (peakStart && line.contains(\".\") && !line.contains(\"Num\"))\n\t\t\t\t{\n\t\t\t\t\tif (line.contains(\"\t\")) \n\t\t\t\t\t\tsplit = line.split(\"\t\");\n\t\t\t\t\telse \n\t\t\t\t\t\tsplit = line.split(\" \");\n\n\t\t\t\t\tif (isLipidex)\n\t\t\t\t\t\tfragType = line.substring(line.indexOf(\"\\\"\")+1,line.lastIndexOf(\"\\\"\"));\n\n\t\t\t\t\tif (precursor-Double.valueOf(split[0])>2.0)\n\t\t\t\t\t\tentryTemp.addFrag(Double.valueOf(split[0]), Double.valueOf(split[1]), fragType, getTransitionType(fragType));\n\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"PRECURSORMZ:\"))\n\t\t\t\t{\n\t\t\t\t\tprecursor = Double.valueOf(line.substring(line.lastIndexOf(\" \")+1));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\taddSpectrum(entryTemp);\n\t\t\treader.close();\n\t\t}\n\t}", "public static List<List<String>> readFile() {\r\n List<List<String>> out = new ArrayList<>();\r\n File dir = new File(\"./tmp/data\");\r\n dir.mkdirs();\r\n File f = new File(dir, \"storage.txt\");\r\n try {\r\n f.createNewFile();\r\n Scanner s = new Scanner(f);\r\n while (s.hasNext()) {\r\n String[] tokens = s.nextLine().split(\"%%%\");\r\n List<String> tokenss = new ArrayList<>(Arrays.asList(tokens));\r\n out.add(tokenss);\r\n }\r\n return out;\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "private List<String> readSrc(){\n //daclarations\n InputStream stream;\n List<String> lines;\n String input;\n BufferedReader reader;\n StringBuilder buf;\n\n //Inlezen van bestand\n stream = this.getClass().getResourceAsStream(RESOURCE);\n lines = new LinkedList<>();\n\n // laad de tekst in \n reader = new BufferedReader(new InputStreamReader(stream));\n buf = new StringBuilder();\n\n if(stream != null){\n try{\n while((input = reader.readLine()) != null){\n buf.append(input);\n System.out.println(input);\n lines.add(input);\n }\n } catch(IOException ex){\n System.out.println(ex);// anders schreeuwt hij in mijn gezicht:\n }\n }\n return lines;\n }", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }", "public ArrayList<Suspect> readSuspectFile(String path)\n {\n // Create an arrayList to be populated with suspects\n ArrayList<Suspect> suspectArray = new ArrayList<>();\n try(BufferedReader fileReader = new BufferedReader(new FileReader(path)))\n {\n // Reads file until the reader reaches the end of the file\n while((e = fileReader.readLine()) != null)\n {\n // Creates a Suspect from the file, then adds the Suspect Object to the arrayList.\n String[] info = e.split(\"/\");\n Suspect s = new Suspect();\n s.setName(info[0]);\n s.setLocation(info[1]);\n s.setDescription(info[2]);\n s.setGuilty(false);\n\n\n\n //Didn't add guilty boolean from file - Instead all Suspects guilty = false.\n //Then in Mansion constructor, we draw one random suspect from the arrayList and set their boolean\n //Guilty = true;\n\n // Finally add the created Suspect to the suspectArray\n suspectArray.add(s);\n }\n }\n catch(IOException ex)\n {\n System.out.println(\"File not found\");\n }\n\n return suspectArray;\n }", "public ArrayList<String> loadRead() {\n\n\t\tSAVE_FILE = READ_FILE;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tlist = loadIds();\n\t\treturn list;\n\t}", "public static List<QSL> loadQsl(String fileSorgente) throws IOException {\r\n\t\tTimestamp t1 = new Timestamp(System.currentTimeMillis());\r\n\t\tFile reportFile = new File(fileSorgente);\r\n\t\tFileInputStream fis = new FileInputStream(reportFile);\r\n\t\tbyte[] data = new byte[(int) reportFile.length()];\r\n\t\tfis.read(data);\r\n\t\tfis.close();\r\n\t\t\r\n\t\tDate fileDate = new Date(reportFile.lastModified());\r\n\t\tDate now = new Date();\r\n\t\tlong diff = now.getTime() - fileDate.getTime();\r\n\t int age = (int) TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS);\r\n\t List<QSL> conferme = new ArrayList<QSL>();\r\n\r\n\t\tString[] report = new String(data, \"UTF-8\").split(\"<eoh>\");\r\n\t\tString header = report[0].split(\"\\n\")[1];\r\n\t\tSystem.out.format(\"Report di %d giorni, %s\", age, header);\r\n\r\n\t\treport = report[1].split(\"<eor>\");\r\n\r\n\t\tfor (String record : report) {\r\n\t\t\tif (!record.contains(\"<DXCC:\"))\r\n\t\t\t\tcontinue;\r\n\t\t\tQSL qsl = new QSL(record);\r\n\t\t\tconferme.add(qsl);\r\n\t\t}\r\n\t\tTimestamp t2 = new Timestamp(System.currentTimeMillis());\r\n\t\tfloat tt = t2.getTime() - t1.getTime();\r\n\t\tSystem.out.format(\"Ho elaborato il file: %s in %dms.\\n\", fileSorgente, (int)tt);\r\n\t\treturn conferme;\r\n\t}", "private static ArrayList<String> read(String fileName, boolean next) {\n\t\t\n\n\t\tFile input = new File(fileName);\n\t\tArrayList<String> information = new ArrayList<String>();\n\t\t\n\t\t\n\t\t//uses a simple try catch to read the file\n\t\ttry {\n\t\t\t\n\t\t\tScanner fileReader = new Scanner(input);\n\t\t\t\n\t\t\tif(next) //if reading by word, the ArrayList will contain info by word\n\t\t\t\twhile(fileReader.hasNext()) \n\t\t\t\t\tinformation.add(fileReader.next());\n\t\t\t\t\n\t\t\telse //otherwise the ArrayList will contain info by lines\n\t\t\t\twhile(fileReader.hasNextLine())\n\t\t\t\t\tinformation.add(fileReader.nextLine());\n\t\t\t\n\t\t\tfileReader.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn information;\n\t}", "public static List read(String fileName) throws IOException {\n\tList data = new ArrayList() ;\n Scanner scanner = new Scanner(new FileInputStream(fileName));\n try {\n while (scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n }\n finally{\n scanner.close();\n }\n return data;\n }", "private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}", "private List<String> applySSA() {\n\t\t//String content = Utility.getStringFromFile(filePath);\n\t\tList<String> ssa = new ArrayList<String>();\n\t\tInputStream stream = new ByteArrayInputStream(source.getBytes());\n\t\ttry {\n\t\t\tANTLRInputStream input = new ANTLRInputStream(stream);\n\t\t\tEntryLexer lexer = new EntryLexer(input);\n\t\t\tCommonTokenStream tokens = new CommonTokenStream(lexer);\n\t\t\tEntryParser parser = new EntryParser(tokens);\n\t\t\tProgContext prog = parser.prog();\n\t\t\tconvertToSSAString(prog, ssa);\n\t\t\treturn ssa;\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "void readFile()\n {\n Scanner sc2 = new Scanner(System.in);\n try {\n sc2 = new Scanner(new File(\"src/main/java/ex45/exercise45_input.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (sc2.hasNextLine()) {\n Scanner s2 = new Scanner(sc2.nextLine());\n while (s2.hasNext()) {\n //s is the next word\n String s = s2.next();\n this.readFile.add(s);\n }\n }\n }", "List<T> read();", "public void read() {\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(\"studentData.dat\");\n\n\t\t\tObjectInputStream ois;\n\t\t\ttry {\n\t\t\t\tois = new ObjectInputStream(fis);\n\t\t\t\ttry {\n\t\t\t\t\tstudentList = (ArrayList<Student>) ois.readObject();\n\t\t\t\t} catch (ClassNotFoundException 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\tois.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tprotected ListEntity parseList(InputStream is) throws Exception {\n\t\tVipStudentList studentList = VipStudentList.parse(is);\n\t\treturn studentList;\n\t}", "public static ArrayList readJStorFile(String filename) {\n ArrayList bibitems = new ArrayList();\n File f = new File(filename);\n if (!f.exists() || !f.canRead() || !f.isFile()) {\n System.err.println(\"Error: \" + filename + \" is not a valid file and|or is not readable.\");\n return null;\n }\n \n String s = \"\";\n try {\n BufferedReader in = new BufferedReader(new FileReader(filename));\n \n while (!s.startsWith(\"Item Type\"))\n s = in.readLine();\n \n mainloop: while ((s = in.readLine()) != null) {\n if (s.equals(\"\"))\n continue;\n if (s.startsWith(\"-----------------------------\"))\n break mainloop;\n String[] fields = s.split(\"\\t\");\n BibtexEntry be = new BibtexEntry(Util.createNeutralId());\n try {\n if (fields[0].equals(\"FLA\"))\n be.setType(BibtexEntryType.getType(\"article\"));\n setIfNecessary(be, \"title\", fields[2]);\n setIfNecessary(be, \"author\", fields[4].replaceAll(\"; \", \" and \"));\n setIfNecessary(be, \"journal\", fields[7]);\n setIfNecessary(be, \"volume\", fields[9]);\n setIfNecessary(be, \"number\", fields[10]);\n String[] datefield = fields[12].split(\" \");\n setIfNecessary(be, \"year\", datefield[datefield.length-1]);\n //for (int i=0; i<fields.length; i++)\n // Util.pr(i+\": \"+fields[i]);\n setIfNecessary(be, \"pages\", fields[13].replaceAll(\"-\", \"--\"));\n setIfNecessary(be, \"url\", fields[14]);\n setIfNecessary(be, \"issn\", fields[15]);\n setIfNecessary(be, \"abstract\", fields[16]);\n setIfNecessary(be, \"keywords\", fields[17]);\n setIfNecessary(be, \"copyright\", fields[21]);\n } catch (ArrayIndexOutOfBoundsException ex) {}\n bibitems.add(be);\n }\n \n } catch (IOException ex) {\n Util.pr(\"Err: \"+s);\n }\n return bibitems;\n }", "public static ArrayList B() {\n int n10;\n ArrayList<String[]> arrayList = new ArrayList<String[]>();\n Object object = Environment.getRootDirectory().getAbsoluteFile();\n ((StringBuilder)((Object)arrayList)).append(object);\n object = File.separator;\n ((StringBuilder)((Object)arrayList)).append((String)object);\n Object object2 = \"etc\";\n ((StringBuilder)((Object)arrayList)).append((String)object2);\n ((StringBuilder)((Object)arrayList)).append((String)object);\n object = \"vold.fstab\";\n ((StringBuilder)((Object)arrayList)).append((String)object);\n arrayList = ((StringBuilder)((Object)arrayList)).toString();\n Object object3 = new File((String)((Object)arrayList));\n arrayList = new ArrayList<String[]>();\n boolean bl2 = ((File)object3).exists();\n if (!bl2) {\n return arrayList;\n }\n object = new ArrayList();\n try {\n object.clear();\n Object object4 = new FileReader((File)object3);\n object2 = new BufferedReader((Reader)object4);\n while ((object3 = ((BufferedReader)object2).readLine()) != null) {\n object4 = \"dev_mount\";\n n10 = ((String)object3).startsWith((String)object4);\n if (n10 == 0) continue;\n object.add(object3);\n }\n ((BufferedReader)object2).close();\n object.trimToSize();\n }\n catch (IOException iOException) {}\n object3 = object.iterator();\n while (bl2 = object3.hasNext()) {\n int n11;\n object = (String)object3.next();\n if (object == null || (object = object.split((String)(object2 = \" \"))) == null || (n11 = ((String[])object).length) < (n10 = 4) || (object = object[n11 = 2]) == null || (n11 = (int)(((File)(object2 = new File((String)object))).exists() ? 1 : 0)) == 0) continue;\n arrayList.add((String[])object);\n }\n return arrayList;\n }", "static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }", "List readFile(String pathToFile);", "public ArrayList<String[]> read(String s) throws IOException,\n\t\t\tFileNotFoundException {\n\t\tArrayList<String[]> result = new ArrayList<String[]>();\n\t\tFileReader fr = new FileReader(s);\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString[] row = new String[6];\n\t\tString line;\n\t\twhile (true) {\n\t\t\tline = br.readLine();\n\t\t\tif (line == null) {\n\t\t\t\tbr.close();\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\trow = line.split(\",\");\n\t\t\tresult.add(row);\n\t\t}\n\t}", "public void readFNIRSFile(boolean keepFirst) throws Exception{\n if (trials == null) throw new Exception(\"read marker file first\");\n \n chew(fnirsDataIn, \"Other:\"); //.. change this depending on file\n data = new ArrayList();\n \n String line;\n \n //.. read the file\n while ((line = fnirsDataIn.readLine()) != null) {\n String [] row = line.split(\"\\t\");\n if(keepFirst) data.add(row);\n else data.add( Arrays.copyOfRange(row, 1, row.length)); //. first might be time\n }\n }", "private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }", "private ArrayList<Book> readBookCollection() {\n File file = new File(\"books.txt\");\n ArrayList<Book> collection = new ArrayList<Book>();\n try {\n FileReader fileReader = new FileReader(file);\n BufferedReader reader = new BufferedReader(fileReader);\n while (true) {\n String line = reader.readLine();\n if (line == null) break;\n line = line.trim();\n if (line.equals(\"\")) continue; // ignore possible blank lines\n String[] bookInfo = line.split(\" :: \");\n collection.add(new Book(bookInfo[0], bookInfo[1]));\n }\n }\n catch (IOException e) {\n System.out.println(e.getMessage());\n }\n return collection;\n }", "public static ArrayList readScifinder( String filename)\n {\n \t\tArrayList bibitems=new ArrayList();\n \t\tFile f = new File(filename);\n \n \t\tif(!f.exists() && !f.canRead() && !f.isFile()){\n \t\t\tSystem.err.println(\"Error \" + filename + \" is not a valid file and|or is not readable.\");\n \t\t\treturn null;\n \t\t}\n \t\tStringBuffer sb=new StringBuffer();\n \t\ttry{\n \t\t\tBufferedReader in = new BufferedReader(new FileReader( filename));\n \n \t\t\tString str;\n \t\t\twhile ((str = in.readLine()) != null) {\n \t\t\t\tsb.append(str);\n \t\t\t}\n \t\t\tin.close();\n \n \t\t}\n \t\tcatch(IOException e){return null;}\n \t\tString [] entries=sb.toString().split(\"START_RECORD\");\n \t\tHashMap hm=new HashMap();\n \t\tfor(int i=1; i<entries.length; i++){\n \t\t\tString[] fields = entries[i].split(\"FIELD \");\n \t\t\tString Type=\"\";\n \t\t\thm.clear(); // reset\n \t\t\tfor(int j=0; j<fields.length; j++) if (fields[j].indexOf(\":\") >= 0) {\n \t\t\t\tString tmp[]= new String[2];\n tmp[0] = fields[j].substring(0, fields[j].indexOf(\":\"));\n tmp[1] = fields[j].substring(fields[j].indexOf(\":\")+1);\n \t\t\t\tif(tmp.length > 1){//==2\n \t\t\t\t\tif(tmp[0].equals(\"Author\"))\n \t\t\t\t\t\thm.put( \"author\", tmp[1].replaceAll(\";\",\" and \") );\n \t\t\t\t\telse if(tmp[0].equals(\"Title\"))\n \t\t\t\t\t\thm.put(\"title\",tmp[1]);\n \n \t\t\t\t\telse if(tmp[0].equals(\"Journal Title\"))\n \t\t\t\t\t\thm.put(\"journal\",tmp[1]);\n \n \t\t\t\t\telse if(tmp[0].equals(\"Volume\"))\n \t\t\t\t\thm.put(\"volume\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Page\"))\n \t\t\t\t\thm.put(\"pages\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Publication Year\"))\n \t\t\t\t\thm.put(\"year\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Abstract\"))\n \t\t\t\t\thm.put(\"abstract\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Supplementary Terms\"))\n \t\t\t\t\thm.put(\"keywords\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Document Type\"))\n \t\t\t\t\tType=tmp[1].replaceAll(\"Journal\",\"article\");\n \t\t\t}\n \t }\n \n \t BibtexEntry b=new BibtexEntry(Globals.DEFAULT_BIBTEXENTRY_ID,\n \t\t\t\t\t\t\t\t\t Globals.getEntryType(Type)); // id assumes an existing database so don't create one here\n \t b.setField( hm);\n \t bibitems.add( b );\n \n \t}\n \treturn bibitems;\n }", "public ArrayList<List<String>> processSemesterFile(String semesterfile) {\n\t\tArrayList<List<String>> semesters = new ArrayList<List<String>>();\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(semesterfile));\n\t\t\tString line = null;\n\t\t\twhile ((line = reader.readLine()) != null) \n\t\t\t{\n\t\t\t\tline = line.trim();\n\t\t\t\t\n\n\t\t\t\tString[] tokens = line.split(\":\");\n\n\t\t\t\tList<String> list = new ArrayList<String>();\n\t\t\t\tfor (String token : tokens) \n\t\t\t\t{\n\t\t\t\t\ttoken.trim();\n\t\t\t\t\t//System.out.println(token);\n\t\t\t\t\t//if (token.equals(\"\"))\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tlist.add(token);\n\t\t\t\t}\n\t\t\t\tif (!list.isEmpty()) \n\t\t\t\t{\n\t\t\t\t\tsemesters.add(list);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn semesters;\n\t}", "private ArrayList<VideoFile> receiveData(ObjectInputStream in, String mode) {\n ArrayList<VideoFile> returned = new ArrayList<>();\n ArrayList<VideoFile> chunks = new ArrayList<>();\n\n //resetChunks();\n\n VideoFile file; //COUNTER IS HOW MANY NULL STRINGS ARE READ\n int counter = 0; //WHEN COUNTER ==2 THEN END ALL FILE CHUNKS\n try {\n while (counter < 2) {\n try {\n while ((file = (VideoFile) in.readObject()) != null) {\n chunks.add(file);\n /*if (mode.equals(\"mode1\")) {\n //addChunk(file);\n }*/\n counter = 0;\n }\n if (!chunks.isEmpty()) {\n if (mode.equals(\"save\")) {\n VideoFile merged = VideoFileHandler.merge(chunks);\n returned.add(merged);\n }\n }\n chunks.clear();\n ++counter;\n } catch (IOException e) {\n Extras.printError(\"CONSUMER: receiveData: exception in reading chunks\");\n }\n if (counter > 2) break;\n }\n return returned;\n } catch (ClassNotFoundException e) {\n Extras.printError(\"CONSUMER: RECEIVE DATA: ERROR: Could not cast Object to MusicFile\");\n }\n return null;\n }", "public StreamInfoList getStreamList(SrvSession sess, TreeConnection tree, String fileName)\n throws IOException {\n\n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Get the file state for the top level file\n \n FileState fstate = getFileState(fileName, dbCtx, true);\n \n // Check if the file state already has the streams list cached\n \n StreamInfoList streamList = (StreamInfoList) fstate.findAttribute(DBStreamList);\n if ( streamList != null)\n return streamList;\n \n // Get the main file information and convert to stream information\n \n DBFileInfo finfo = getFileDetails(fileName,dbCtx, fstate);\n \n // Create the stream list\n \n streamList = new StreamInfoList();\n \n StreamInfo sinfo = new StreamInfo(\"::$DATA\", finfo.getFileId(), 0, finfo.getSize(), finfo.getAllocationSize());\n streamList.addStream(sinfo);\n\n // Get the list of streams\n \n StreamInfoList sList = loadStreamList(fstate, finfo, dbCtx, true);\n if ( sList != null) {\n \n // Copy the stream information to the main list\n \n for ( int i = 0; i < sList.numberOfStreams(); i++) {\n \n // Add the stream to the main list\n\n streamList.addStream(sList.getStreamAt(i));\n }\n }\n\n // Cache the stream list\n \n fstate.addAttribute(DBStreamList, streamList);\n \n // Return the stream list\n \n return streamList;\n }", "public List<byte[]> getByteReader(Integer version) {\n\n\t\t// Switch statement used for different file configurations\n\t\tswitch (version) {\n\n\t\t\tcase 113:\n\t\t\tcase 114:\n\t\t\tcase 115: {\n\n\t\t\t\t// Initialize object for files from Stata 8, 10, and 12\n\t\t\t\tList<byte[]> oldfmt = new ArrayList<byte[]>();\n\n\t\t\t\t// Release version\n\t\t\t\toldfmt.add(new byte[1]);\n\n\t\t\t\t// Byte order a value of 1 is MSF 2 is LSF\n\t\t\t\toldfmt.add(new byte[1]);\n\n\t\t\t\t// File type 0x01\n\t\t\t\toldfmt.add(new byte[1]);\n\n\t\t\t\t// Unused 0x00\n\t\t\t\toldfmt.add(new byte[1]);\n\n\t\t\t\t// Short valued number of variables\n\t\t\t\toldfmt.add(new byte[2]);\n\n\t\t\t\t// Integer valued number of observations\n\t\t\t\toldfmt.add(new byte[4]);\n\n\t\t\t\t// \\0 Terminated dataset label\n\t\t\t\toldfmt.add(new byte[81]);\n\n\t\t\t\t// Dataset time stamp\n\t\t\t\toldfmt.add(new byte[18]);\n\n\t\t\t\t// Returns the object\n\t\t\t\treturn oldfmt;\n\n\t\t\t} // End case for Stata 8, 10, and 12 files\n\n\t\t\t// For Stata 13 files\n\t\t\tcase 117:\n\n\t\t\t\t// Initialize the list object to store the data\n\t\t\t\tList<byte[]> stata13 = new ArrayList<byte[]>();\n\n\t\t\t\t// Release version\n\t\t\t\tstata13.add(new byte[3]);\n\n\t\t\t\t// Byte order of the file\n\t\t\t\tstata13.add(new byte[2]);\n\n\t\t\t\t// Short value number of variables\n\t\t\t\tstata13.add(new byte[2]);\n\n\t\t\t\t// Integer number of observations\n\t\t\t\tstata13.add(new byte[4]);\n\n\t\t\t\t// For the length of the dataset label\n\t\t\t\tstata13.add(new byte[1]);\n\n\t\t\t\t// For the dataset timestamp\n\t\t\t\tstata13.add(new byte[1]);\n\n\t\t\t\t// Return the object\n\t\t\t\treturn stata13;\n\n\t\t\t// For Stata Files >= Version 14\n\t\t\tdefault:\n\n\t\t\t\t// Initialize the list object for Stata 14 > files\n\t\t\t\tList<byte[]> stata14 = new ArrayList<byte[]>();\n\n\t\t\t\t// Release version\n\t\t\t\tstata14.add(new byte[3]);\n\n\t\t\t\t// Byte order of the file\n\t\t\t\tstata14.add(new byte[2]);\n\n\t\t\t\t// Short value number of variables\n\t\t\t\tstata14.add(new byte[2]);\n\n\t\t\t\t// Integer number of observations\n\t\t\t\tstata14.add(new byte[8]);\n\n\t\t\t\t// For the length of the dataset label\n\t\t\t\tstata14.add(new byte[2]);\n\n\t\t\t\t// For the dataset timestamp\n\t\t\t\tstata14.add(new byte[1]);\n\n\t\t\t\t// Return the object\n\t\t\t\treturn stata14;\n\n\t\t} // End of switch statement\n\n\t}", "public void getList() {\n\n\t\tFile opFile = new File(\"/home/bridgeit/Desktop/newfile.txt\");\n\t\ttry {\n\t\t\topFile.createNewFile();\n\t\t\tFileWriter fwriter = new FileWriter(opFile);\n\n\t\t\tfor (int i = 0; i < slist.size(); i++) {\n\n\t\t\t\tfwriter.append(slist.returnItem(i) + \" \");\n\n\t\t\t}\n\t\t\tfwriter.close();\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void storeValue() {\n\t\tScanner s;\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\SubR1.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tSubR1.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\SubR2.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tSubR2.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\SubIRR.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tSubIRR.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\PredR1.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tPredR1.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\PredR2.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tPredR2.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\PredR3.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tPredR3.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\ObjR1.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tObjR1.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\ObjR2.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tObjR2.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\ts = new Scanner(new File(\"Files\\\\PrepR1.txt\"));\t\t//Read the reference file.\n\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tPrepR1.add(s.nextLine());\t\t\t\t\t\t//Store the reference file in Arraylist.\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void read8() {\n List<String> list = new ArrayList<>();\n\n try (Stream<String> stream = Files.lines(Paths.get(filePath))) {\n\n //1. filter line 3\n //2. convert all content to upper case\n //3. convert it into a List\n list = stream\n .filter(line -> !line.startsWith(\"line3\"))\n .map(String::toUpperCase)\n .collect(Collectors.toList());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n list.forEach(System.out::println);\n }", "public static void Reader(String document, ArrayList<String> listSymptoms) throws IOException {\n\t\t\t\tif (document != null) {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(document));\n\t\t\t\tString line = br.readLine();\n\t\t\t\twhile ((line = br.readLine()) != null){\n\t\t\t\t\t\n\t\t\t\t\t//see the content of the files in the console \n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t\n\t\t\t\t\t// add the symptoms in the list\n\t\t\t\t\tlistSymptoms.add(line);\n\t\t\t }\n\t\t\t\t\t// see the list in the console\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(listSymptoms);\n\t\t\t\t\t\n\t\t\t br.close();\n\t\t\t \n\t\t\t \n\t\t\t\t}\n\t}", "List<T> readList();", "private static List<StudentRecord> convert(List<String> lines) {\n\t\tList<StudentRecord> records = new ArrayList<>();\n\n\t\tfor (String line : lines) {\n\t\t\tif(line.isEmpty()) continue;\n\t\t\t\n\t\t\trecords.add(StudentRecord.fromLine(line));\n\t\t}\n\n\t\treturn records;\n\t}", "abstract void readSMF(File file) throws InvalidMidiDataException, IOException;", "List<String[]> readAll();", "public static void main(String[] args) throws IOException, ClassNotFoundException {\n FileInputStream fis =new FileInputStream(\"test.txt\");\n BufferedInputStream bis=new BufferedInputStream(fis);\n ObjectInputStream ois=new ObjectInputStream(bis);\n ArrayList<Goods> list = (ArrayList<Goods>)ois.readObject();\n for (int i = 0; i < list.size(); i++) {\n Goods goods = list.get(i);\n System.out.println(goods);\n }\n\n // Goods goods= (Goods)ois.readObject();\n // System.out.println(goods);\n ois.close();\n\n }", "private ArrayList<Book> loadBooks(InputStream is) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder jsonFileContent = new StringBuilder();\r\n\t\t//read line by line from file\r\n\t\tString nextLine = null;\r\n\t\twhile ((nextLine = br.readLine()) != null){\r\n\t\t\tjsonFileContent.append(nextLine);\r\n\t\t}\r\n\r\n\t\tGson gson = new Gson();\r\n\t\t//this is a require type definition by the Gson utility so Gson will \r\n\t\t//understand what kind of object representation should the json file match\r\n\t\tType type = new TypeToken<ArrayList<Book>>(){}.getType();\r\n\t\tArrayList<Book> books = gson.fromJson(jsonFileContent.toString(), type);\r\n\t\t//close\r\n\t\tbr.close();\t\r\n\t\treturn books;\r\n\t}", "public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}", "public ArrayList<Event> readSerFile() {\n\n ArrayList<Event> events = new ArrayList<>();\n try {\n FileInputStream file = new FileInputStream(filename);\n ObjectInputStream storedEvents = new ObjectInputStream(file);\n\n events = (ArrayList<Event>) storedEvents.readObject();\n\n storedEvents.close();\n file.close();\n\n return events;\n\n } catch (FileNotFoundException e) {\n System.out.println(filename + \" is missing\");\n } catch (IOException | ClassNotFoundException e) {\n return events;\n }\n\n return events;\n }", "public void DeserialiseList() throws IOException {\n ObjectInputStream inputStream = null;\n\n try {\n inputStream = new ObjectInputStream(new FileInputStream(\"Warehouses\" + \".dat\"));\n Wlist = (WarehouseList) inputStream.readObject();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n inputStream.close();\n }\n try {\n inputStream = new ObjectInputStream(new FileInputStream(\"Stores\" + \".dat\"));\n Slist = (StoreList) inputStream.readObject();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n inputStream.close();\n }\n\n try {\n inputStream = new ObjectInputStream(new FileInputStream(\"WarehouseAdminList\" + \".dat\"));\n WAlist = (WarehouseAdminList) inputStream.readObject();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n inputStream.close();\n }\n\n try {\n inputStream = new ObjectInputStream(new FileInputStream(\"StoreAdminList\" + \".dat\"));\n SAlist = (StoreAdminList) inputStream.readObject();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n } finally {\n inputStream.close();\n }\n\n }", "public static ArrayList<Item> readFromFile() {\n\t\t\n\t\tPath writeFile = Paths.get(\"list.txt\");\n\t\tFile file = writeFile.toFile();\n\t\tArrayList<Item> itemList = new ArrayList<Item>();\n\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\t// this is a buffer and the benefit of using this is to is to store a block of\n\t\t\t// memory that\n\t\t\t// we can read data from later -- more efficient than Scanner\n\n\t\t\tBufferedReader reader = new BufferedReader(fr);\n\t\t\t// this is attempting to read the first line from the text document\n\t\t\tString line = \"\";\n\t\t\twhile ((line = reader.readLine()) != null) {\n\n\t\t\t\tString[] stringArray= line.split(\",\");\n\t\t\t\tItem item = new Item(Integer.parseInt(stringArray[0]), stringArray[1], stringArray[2],stringArray[3],Integer.parseInt(stringArray[4]),Double.parseDouble(stringArray[5]) );\n\t\t\t\titemList.add(item);\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"There were no items!\");\n\t\t}\n\t\treturn itemList;\n\t}", "public static ArrayList readData(){\n ArrayList alr = new ArrayList();\n try{\n ArrayList stringArray = (ArrayList)read(filename);\n for (int i = 0; i < stringArray.size(); i++){\n String st = (String)stringArray.get(i);\n StringTokenizer star = new StringTokenizer(st, SEPARATOR);\n int movieID = Integer.parseInt(star.nextToken().trim());\n String email = star.nextToken().trim();\n String comment = star.nextToken().trim();\n Review review = new Review(movieID, email, comment);\n alr.add(review);\n }\n }\n catch (IOException e){\n System.out.println(\"Exception > \" + e.getMessage());\n }\n return alr;\n }", "private ArrayList<String> readReturnFileContents(String fileName){\n String startingDir = System.getProperty(\"user.dir\");\n BufferedReader reader = null;\n String line = \"\";\n ArrayList<String> wholeFile = new ArrayList<String>();\n try {\n reader = new BufferedReader(new FileReader(startingDir + \"/\" + fileName));\n while ((line = reader.readLine()) != null) {\n wholeFile.add(line);\n }\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe.getMessage());\n System.exit(1);\n } catch (NullPointerException npe) {\n System.out.println(npe.getMessage());\n System.exit(1);\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n return wholeFile;\n }", "@SuppressWarnings(\"unchecked\")\n public List readList() throws IOException {\n List list = new ArrayList();\n Object obj = read();\n while (obj != null) {\n list.add(obj);\n obj = read();\n }\n return list;\n }", "private static List<Student> getStudents() {\n \t\n List<Student> studentList = new ArrayList<>();\n Scanner readStudents=null;\n try {\n\t\t\treadStudents = new Scanner(new File(\"src/Student.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Student file not found.\");\n\t\t}\n\t\twhile(readStudents.hasNextLine()) {\n\t\t\tString[] studentLine = readStudents.nextLine().split(\",\");\n\t\t\tlong studentId= Long.parseLong(studentLine[0]);\n\t\t\tint age = Integer.parseInt(studentLine[4]);\n\t\t\tlong recordId = Long.parseLong(studentLine[5]);\n \tStudent newStudent = new Student(studentId,age,studentLine[1],studentLine[2],studentLine[3],recordId);\n \tstudentList.add(newStudent);\n\t\t}\n \n readStudents.close();\n return studentList;\n }", "private List<Task> readFromFile() {\n if (file.exists()) {\n try {\n return objectmapper.readValue(file,TaskList.class);\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n } else {\n return new ArrayList<>();\n }\n }", "private void readFileToArray(FileInputStream fis, Warship[] wsArr) throws Exception {\n\t\tScanner scanner = null;\n\t\ttry {\n\t\t\tscanner = new Scanner(fis);\n\t\t\tint i = 0;\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\twsArr[i] = this.getWarship(scanner.nextLine());\n\t\t\t\ti++;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t} finally {\n\t\t\tif (scanner != null) {\n\t\t\t\tscanner.close();\n\t\t\t}\n\t\t}\n\t}", "public List<String> read()\n\t{\n\t\treturn null;\n\t}", "public ArrayList<StudentTuitionModel> getAllTution(String file){\n\t\t\t aFile = file;\n\t\t\t allTuition = new ArrayList();\n\t\t\t try {\n\t\t\t\t BufferedReader reader = new BufferedReader(new FileReader(aFile));\n\t\t\t\t String line = reader.readLine();\n\t\t\t\t while(line != null) {\n\t\t\t\t\tif (line.length() != 0) {\n\t\t\t\t\t String[] arr = line.split(\"\\\\,\");\n\t\t\t\t\t StudentTuitionModel sdam = new StudentTuitionModel (arr[0].trim(), arr[1].trim(),arr[2].trim(),arr[3].trim(), arr[4].trim());\n\t\t\t\t\t if( sdam.getStudFirstName().equals(firstName) &&\n\t\t\t\t\t\t sdam.getStudLastName().equals(lastName) &&\n\t\t\t\t\t\t sdam.getStudSerialNum().equals(studNum) )\n\n\t\t\t\t\t\t allTuition.add(sdam);\n\t\t\t\t\t}\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t }\n\t\t\t }\n\t\t\t catch(FileNotFoundException exc){\n\t\t\t\t exc.printStackTrace();\n\t\t\t\t System.exit(1);\n\t\t\t }\n\t\t\t catch(IOException exc){\n\t\t\t\t exc.printStackTrace();\n\t\t\t\t System.exit(1);\n\t\t\t }\n\t\t\t return allTuition;\n\t\t }", "@Override\n\tpublic void readAllAGBSources() {\n\t\t\n\t\tAPIController apic = new APIController();\n\t\t\n\t\tString s = apic.getAllAGBSources().toString();\n\t\t\n\t\tString [] sarray = s.split(\"],\");\n\t\t\n\t\tSystem.out.println(\"Alle AGBs der Datenbank: \");\n\t\tSystem.out.println(\" \");\n\t\t\n\t\tfor (int i=0; i<sarray.length; i++)\n\t\t{\n\t\t\tallAGBSources.add(sarray[i]);\n\t\t\t//System.out.println(sarray[i]);\n\t\t}\n\t\t\n\t\t\n\t\tIterator iter = allAGBSources.iterator();\n\t\t\n\t\twhile (iter.hasNext())\n\t\t{\n\t\t\tSystem.out.println(iter.next());\n\t\t}\n\n\t}", "public void readData(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n\r\n String line = \"\";\r\n try {\r\n while ((line = reader.readLine()) != null) {\r\n //Split line by \",\"\r\n String[] fields = line.split(\",\");\r\n //Log.d(\"csvParseFieldLength\", String.valueOf(fields.length));\r\n ArrayList<Race> races = new ArrayList<>();\r\n if (fields[9].equals(\"\"))\r\n break;\r\n else {\r\n Swimmer s = new Swimmer(fields[0],fields[10], fields[9], Integer.parseInt(fields[8]), fields[7], races);\r\n swimmers.add(s);\r\n s.addRace(new Race(Integer.parseInt(fields[2]), Integer.parseInt(fields[3]), 0, null, (fields[4] + \" \" + fields[5])));\r\n \r\n EventID e = new EventID(eventId);\r\n String b = fields[12];\r\n \r\n \r\n if (!b.equals(\" \")) \r\n \te.addNames(b);\r\n \r\n \r\n \r\n }\r\n }\r\n } catch (IOException ex) {\r\n //Log.d(\"csvParseSwim\", \"Error reading data from file on line \" + line);\r\n }\r\n }", "public void readFromBookingListFile()\r\n {\r\n try(ObjectInputStream fromBookingListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/bookinglist.dta\")))\r\n {\r\n bookingList = (BookingList) fromBookingListFile.readObject();\r\n bookingList.setSavedStaticBookingRunNr(fromBookingListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av booking \"\r\n + \"objektene.\\nOppretter tomt bookingregister.\\n\" \r\n + cnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter tomt bookingregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n bookingList = new BookingList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter tomt bookingregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public List<RssGeneratedFile> selectRssFileList( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_RSS_FILE_LIST );\n daoUtil.executeQuery( );\n\n List<RssGeneratedFile> list = new ArrayList<RssGeneratedFile>( );\n\n while ( daoUtil.next( ) )\n {\n RssGeneratedFile rssFile = new RssGeneratedFile( );\n rssFile.setId( daoUtil.getInt( 1 ) );\n rssFile.setPortletId( daoUtil.getInt( 2 ) );\n rssFile.setName( daoUtil.getString( 3 ) );\n rssFile.setState( daoUtil.getInt( 4 ) );\n rssFile.setUpdateDate( daoUtil.getTimestamp( 5 ) );\n rssFile.setDescription( daoUtil.getString( 6 ) );\n rssFile.setWorkgroup( daoUtil.getString( 7 ) );\n rssFile.setTypeResourceRss( daoUtil.getString( 8 ) );\n rssFile.setMaxItems( daoUtil.getInt( 9 ) );\n rssFile.setFeedType( daoUtil.getString( 10 ) );\n rssFile.setEncoding( daoUtil.getString( 11 ) );\n\n list.add( rssFile );\n }\n\n daoUtil.free( );\n\n return list;\n }", "static ArrayList<String> loadShop() {\n //check directory, create if missing\n File dir = new File(\"./plugins/SkyblockShop/\");\n if (!dir.exists()) {if (!dir.mkdir()) { System.out.println(\"Failed to create SkyblockShop directory!\");}}\n\n //create fullShop to return all retrieved files\n ArrayList<String> fullShop = new ArrayList<>();\n\n //iterate through all files in directory and add them to fullShop\n File[] files = dir.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.getName().endsWith(\".txt\")) {\n fullShop.addAll(loadShop(file));\n }\n }\n }\n\n return fullShop;\n }" ]
[ "0.6229705", "0.58933115", "0.58895063", "0.5748356", "0.5740062", "0.56687635", "0.5667527", "0.5639655", "0.5583793", "0.55610687", "0.55598503", "0.55368936", "0.5463529", "0.5461439", "0.5446939", "0.5438713", "0.5431734", "0.5422321", "0.5417398", "0.5411496", "0.54057133", "0.53972226", "0.53812677", "0.5379617", "0.53751487", "0.5373345", "0.5369381", "0.53662956", "0.532939", "0.5320824", "0.5314603", "0.53143305", "0.5309379", "0.5306857", "0.5306338", "0.5288125", "0.528292", "0.5280776", "0.52688074", "0.5247351", "0.5235987", "0.52274853", "0.5221253", "0.52199477", "0.52195996", "0.52037597", "0.5200219", "0.519817", "0.5184673", "0.51782346", "0.51635116", "0.5163387", "0.51569766", "0.5153633", "0.51488435", "0.5148642", "0.51454633", "0.5142826", "0.51365316", "0.5135811", "0.5133759", "0.51268417", "0.511101", "0.5106963", "0.5105841", "0.51052046", "0.51024055", "0.51003236", "0.50951755", "0.5089292", "0.50849193", "0.5081137", "0.50776845", "0.50775176", "0.5073406", "0.5071947", "0.5069087", "0.5058965", "0.50446886", "0.5039966", "0.503955", "0.5038813", "0.5030838", "0.5012402", "0.501239", "0.5010879", "0.49968234", "0.49936506", "0.4991928", "0.49876058", "0.49867603", "0.49821258", "0.49809787", "0.49802586", "0.49701044", "0.49683958", "0.49681202", "0.49667814", "0.4966093", "0.49624574" ]
0.6854742
0
Sort entries by date and time Get guard with most minutes asleep overall Result is guard's ID minute of most common asleep time
@Test public void test_read_input_and_sort() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayList<Object> sortState(ArrayList<EcgInfo> array_ecgInfo, ArrayList<ActivityPoint> array_activityInfo,EcgInfo sleepDayInfo){\n\t\tArrayList<Object> sortedState=new ArrayList<Object>();\n\n\t\t//emily++++ insert sleepDayInfo into array_ecgInfo\n\t\tArrayList<EcgInfo> sortedEcgSleep=new ArrayList<EcgInfo>();\n\t\tif(sleepDayInfo.hasData){\n\t\t\twhile (array_ecgInfo.size()!=0 && sleepDayInfo.hasData){\n\t\t\t\tif(sleepDayInfo.measureTime > array_ecgInfo.get(0).measureTime){\n\t\t\t\t\tsortedEcgSleep.add(sleepDayInfo);\n\t\t\t\t\tsleepDayInfo.hasData=false;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tsortedEcgSleep.add(array_ecgInfo.get(0));\n\t\t\t\t\tarray_ecgInfo.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(array_ecgInfo.size()!=0){\n\t\t\tsortedEcgSleep.addAll(array_ecgInfo);\n\t\t}\n\t\tif(sleepDayInfo.hasData){\n\t\t\tsortedEcgSleep.add(sleepDayInfo);\n\t\t}\n\t\t//emily----\n\n\t\twhile(sortedEcgSleep.size()!=0&&array_activityInfo.size()!=0){\n\t\t\tif(sortedEcgSleep.get(0).measureTime<array_activityInfo.get(0).time){\n\t\t\t\tsortedState.add(sortedEcgSleep.get(0));\n\t\t\t\tsortedEcgSleep.remove(0);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsortedState.add(array_activityInfo.get(0));\n\t\t\t\tarray_activityInfo.remove(0);\n\t\t\t}\n\t\t}\n\t\tif(sortedEcgSleep.size()!=0){\n\t\t\tsortedState.addAll(sortedEcgSleep);\n\t\t}\n\t\telse{\n\t\t\tsortedState.addAll(array_activityInfo);\n\t\t}\n\t\treturn sortedState;\n\t}", "public long getMaxTime(){\n long max;\n if(myPlaces_ra != null){\n // max variable set to the first time element in the array\n max = myPlaces_ra.get(0).getTime();\n\n for (int i = 0; i < myPlaces_ra.size(); i++) {\n //compare if the current is bigger than the one hold in the max variable\n if(myPlaces_ra.get(i).getTime() > max ){\n max = myPlaces_ra.get(i).getTime();\n\n }\n }\n Log.d(TAG, \"getMaxTime: \" + max);\n\n }else{\n Log.d(TAG, \"array is empty\");\n max = -1;\n return max;\n }\n return max;\n\n }", "private static void getStatistics() {\r\n\r\n\t\tfloat totalWaitTime = 0;\r\n\t\tfloat totalRideTime = 0;\r\n\r\n\t\t// generate info about min wait time\r\n\t\tfloat minWaitTime = people.get(0).getWaitTime();\r\n\t\tString minWaitPerson = \"\";\r\n\t\ttotalWaitTime += minWaitTime;\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getWaitTime() < minWaitTime){\r\n\t\t\t\tminWaitTime = people.get(i).getWaitTime();\r\n\t\t\t\tminWaitPerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t\ttotalWaitTime += people.get(i).getWaitTime();\r\n\t\t}\r\n\r\n\t\t// generate info about min ride time\r\n\t\tfloat minRideTime = people.get(0).getRideTime();\r\n\t\tString minRidePerson = \"\";\r\n\t\ttotalRideTime += minRideTime;\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getRideTime() < minRideTime){\r\n\t\t\t\tminRideTime = people.get(i).getRideTime();\r\n\t\t\t\tminRidePerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t\ttotalRideTime += people.get(i).getRideTime();\r\n\t\t}\r\n\r\n\t\t// generate info about max wait time\r\n\t\tfloat maxWaitTime = people.get(0).getWaitTime();\r\n\t\tString maxWaitPerson = \"\";\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getWaitTime() > maxWaitTime){\r\n\t\t\t\tmaxWaitTime = people.get(i).getWaitTime();\r\n\t\t\t\tmaxWaitPerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// generate info about max ride time\r\n\t\tfloat maxRideTime = people.get(0).getRideTime();\r\n\t\tString maxRidePerson = \"\";\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getRideTime() > maxRideTime){\r\n\t\t\t\tmaxRideTime = people.get(i).getRideTime();\r\n\t\t\t\tmaxRidePerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.printf(\"Avg Wait Time: %.1f sec\\n\", totalWaitTime/people.size());\r\n\t\tSystem.out.printf(\"Avg Ride Time: %.1f sec\\n\\n\", totalRideTime/people.size());\r\n\r\n\t\tSystem.out.printf(\"Min Wait Time: %.1f sec (%s)\\n\", minWaitTime, minWaitPerson);\r\n\t\tSystem.out.printf(\"Min Ride Time: %.1f sec (%s)\\n\\n\", minRideTime, minRidePerson);\r\n\r\n\t\tSystem.out.printf(\"Max Wait Time: %.1f sec (%s)\\n\", maxWaitTime, maxWaitPerson);\r\n\t\tSystem.out.printf(\"Max Ride Time: %.1f sec (%s)\\n\\n\", maxRideTime, maxRidePerson);\r\n\r\n\t}", "private int getAwardsFiveMurdersOneMinute(String killer) {\n\t\tList<LogLineData> dataSubList = dataList;\n\t\tint awards = 0;\n\n\t\twhile (!dataSubList.isEmpty()) {\n\t\t\t\n\t\t\tCalendar calendar = DateUtil.stringToCalendar(dataSubList.get(0).getActionTime());\n\t\t\tcalendar.add(Calendar.MINUTE, 1);\n\t\t\tList<LogLineData> subList = new ArrayList<>();\n\t\t\tList<LogLineData> smallList = new ArrayList<>();\n\t\t\tint countMurder = 0;\n\n\t\t\tfor (LogLineData d : dataSubList) {\n\t\t\t\tCalendar c = DateUtil.stringToCalendar(d.getActionTime());\n\t\t\t\tif (c.compareTo(calendar) <= 0) {\n\t\t\t\t\tsubList.add(d);\n\t\t\t\t}else {\n\t\t\t\t\tsmallList.add(d);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (LogLineData d : subList) {\n\t\t\t\tif (d.getKillerName().equals(killer))\n\t\t\t\t\tcountMurder += 1;\n\t\t\t}\n\n\t\t\tif (countMurder >= 5)\n\t\t\t\tawards += 1;\n\n\t\t\tif(smallList.size() == 1) {\n\t\t\t\tdataSubList.remove(smallList.get(0));\n\t\t\t}else {\n\t\t\t\tdataSubList = smallList;\n\t\t\t}\n\t\t}\n\n\t\treturn awards;\n\t}", "public List<Integer> getBlockPlacedDurations() {\n Result<Record1<LocalDateTime>> result = jooq.select(GAME_LOGS.TIMESTAMP)\n .from(GAME_LOGS)\n .where(GAME_LOGS.GAMEID.equal(gameId))\n .and(GAME_LOGS.MESSAGE_TYPE.equal(\"BlockPlacedMessage\"))\n .orderBy(GAME_LOGS.ID.asc())\n .fetch();\n\n List<Integer> durations = new ArrayList<>();\n if (result.isNotEmpty()) {\n // add duration until first block placed\n durations.add((int) getStartTime().until(result.getValue(0, GAME_LOGS.TIMESTAMP), MILLIS));\n for (int i = 1; i < result.size(); i++) {\n durations.add((int) result.getValue(i - 1, GAME_LOGS.TIMESTAMP)\n .until(result.getValue(i, GAME_LOGS.TIMESTAMP), MILLIS));\n }\n }\n return durations;\n }", "private String findMaximumValidTime1(int a, int b, int c, int d) {\n int[] arr = {a,b,c,d};\n int maxHr = -1;\n int hr_i = 0, hr_j = 0;\n\n //Find maximum HR\n for(int i=0; i < arr.length; i++){\n for(int j=i+1; j < arr.length; j++){\n int value1 = arr[i] * 10 + arr[j];\n int value2 = arr[j] * 10 + arr[i];\n if(value1 < 24 && value2 < 24){\n if(value1 > value2 && value1 > maxHr) {\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 > value1 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n }else if(value1 < 24 && value2 > 24 && value1 > maxHr){\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 < 24 && value1 > 24 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n\n }\n }\n System.out.println(maxHr);\n\n //Find maximum MM\n int[] mArr = new int[2]; //minutes array\n int k=0;\n for(int i=0; i < arr.length; i++){\n if(i != hr_i && i != hr_j){\n mArr[k++] = arr[i];\n }\n }\n\n System.out.println(Arrays.toString(mArr));\n int maxMin = -1;\n int val1 = mArr[0] * 10 + mArr[1];\n int val2 = mArr[1] * 10 + mArr[0];\n\n if(val1 < 60 && val2 < 60){\n maxMin = Math.max(val1,val2);\n }else if(val1 < 60 && val2 > 60) {\n maxMin = val1;\n }else if(val2 < 60 && val1 > 60){\n maxMin = val2;\n }\n System.out.println(maxMin);\n\n //Create answer\n StringBuilder sb = new StringBuilder();\n if(maxHr == -1 || maxMin == -1){\n return \"Not Possible\";\n }\n\n if(Integer.toString(maxHr).length() < 2){ //HR\n sb.append(\"0\"+maxHr+\":\");\n }else {\n sb.append(maxHr+\":\");\n }\n\n if(Integer.toString(maxMin).length() < 2){ //MM\n sb.append(\"0\"+maxMin);\n }else {\n sb.append(maxMin);\n }\n\n return sb.toString();\n }", "long getMostSleepyMinuteSleepTime() {\n return getMinuteTotalSleepTime(getMostSleepyMinute());\n }", "public int compareTo(Punch another) {\n return ((new DateTime(time)).compareTo(another.getTime()));\n }", "@Override\n\t\tpublic int compareTo(pair2 o) {\n\t\t\tif (this.time == o.time) {\n\t\t\t\treturn o.status - this.status;\n\t\t\t} else {\n\t\t\t\treturn this.time - o.time;\n\t\t\t}\n\t\t}", "double getSortTime();", "public void sort() {\n\t\tArrayList<Medication> dayList = new ArrayList<Medication>();\n\t\tupcomingMedsLabel.setText(\"\");\n\t\tDate dt = new Date();\n\t\tDateFormat df = new SimpleDateFormat(\"EEEE\");\n\t\tString currentDay = df.format(dt);\n\t\t\n\t\t//Runs through all elements in the array\n\t\tfor(int i = 0; i < medList.size(); i++) {\n\t\t\t//Checks to see if the medication needs to be taken today\n\t\t\tif(medList.get(i).getMedDateTime().contains(currentDay)) {\n\t\t\t\tboolean added = false;\n\t\t\t\t//If no other element has been added, added the element\n\t\t\t\tif(dayList.size() == 0) {\n\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t} else {\n\t\t\t\t\t//Checks all other medications in the dayList to order them chronologicaly\n\t\t\t\t\tfor(int j = 0; j < dayList.size(); j++) {\n\t\t\t\t\t\t//Get the hour of element at j and compare it again element at i of medList\n\t\t\t\t\t\tint hour = Integer.parseInt(dayList.get(j).getHour());\n\t\t\t\t\t\t//If < add at j, if equal check minutes else add later\n\t\t\t\t\t\tif(Integer.parseInt(medList.get(i).getHour()) < hour) {\n\t\t\t\t\t\t\tdayList.add(j, medList.get(i));\n\t\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (Integer.parseInt(medList.get(i).getHour()) == hour) {\n\t\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\t\t//Checks against minutes\n\t\t\t\t\t\t\tint minute = Integer.parseInt(dayList.get(j).getMinute());\n\t\t\t\t\t\t\tif(Integer.parseInt(medList.get(i).getMinute()) < minute) {\n\t\t\t\t\t\t\t\tdayList.add(j, medList.get(i));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif(dayList.size() > (j + 1)) {\n\t\t\t\t\t\t\t\t\tdayList.add(j+1, medList.get(i));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(added == false) {\n\t\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Update the upcomingMedsLabel\n\t\tfor(int i = 0; i < dayList.size(); i++) {\n\t\t\tupcomingMedsLabel.setText(upcomingMedsLabel.getText() + \"\\n\\n\" + dayList.get(i));\n\t\t}\n\t}", "public ArrayList<BoardGame> filterByTime(ArrayList<BoardGame> list) {\n int time = extractInt(playTime);\n ArrayList<BoardGame> tempList = new ArrayList<>();\n for (BoardGame game: list) {\n //Debug print out\n Log.i(\"FILTER TIME\", \"Game: \" + game.getName() + \" Min Time: \" + game.getMinPlayTime() +\n \" Max Time: \" + game.getMaxPlayTime() + \" Target Time: \" + time);\n if((game.getMinPlayTime() <= time && game.getMaxPlayTime() >= time) || game.getMaxPlayTime() <= time) {\n addGameToList(tempList, game);\n }\n }\n return tempList;\n }", "public long getSortTime(){ \n return endTime - startTime;\n }", "public static int checkApp1Closed(){\n long timeNow = System.currentTimeMillis();\n\n DateFormat df = new SimpleDateFormat(\"HH:mm\");\n df.setTimeZone(TimeZone.getTimeZone(\"GMT+05:30\"));\n String time = df.format(new Date(timeNow));\n int hours = Integer.parseInt(time.split(\":\")[0]);\n int minutes = Integer.parseInt(time.split(\":\")[1]);\n int totalMinutes = (60 * hours) + minutes;\n\n ConfigUtility configUtility = ConfigUtility.getInstance();\n int startHour = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V1_START_HOUR,\"8\"));\n int startMinutes = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V1_START_MINUTE,\"45\"));\n int endHour = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V1_END_HOUR,\"18\"));\n int endMinutes = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V1_END_MINUTE,\"15\"));\n\n int startTime = (60 * startHour) + startMinutes;\n int endTime = (60 * endHour) + endMinutes;\n\n if (totalMinutes < startTime) {\n return -1;\n }\n if (totalMinutes > endTime) {\n return 1;\n }\n return 0;\n }", "public Comparator<Human> getLikelinessToGetKilledComparator() {\n return new Comparator<Human>() {\n @Override\n public int compare(Human human1, Human human2) {\n return (int) (100 * (human1.getLikelinessToGetKilled()\n - human2.getLikelinessToGetKilled()));\n }\n };\n }", "@Test\n public void test_sleep_count_matrix(){\n List<GuardStatus> list = Four.sortInputByDate(Four.readInputAndParse(\"src/main/java/AoC2018/four/out2\"));\n Four.buildSleepCountMatrix(list);\n }", "@Override\n public int compareTo(Booking other) {\n // Push new on top\n other.updateNewQuestion(); // update NEW button\n this.updateNewQuestion();\n\n\n String[] arr1 = other.time.split(\":\");\n String[] arr2 = this.time.split(\":\");\n// Date thisDate = new Date(this.getCalendarYear(), this.getCalendarMonth(), this.getCalendarDay(), Integer.getInteger(arr2[0]), Integer.getInteger(arr2[1]));\n// if (this.newQuestion != other.newQuestion) {\n// return this.newQuestion ? 1 : -1; // this is the winner\n// }\n\n\n if (this.calendarYear == other.calendarYear) {\n if (this.calendarMonth == other.calendarMonth) {\n if (this.calendarDay == other.calendarDay) {\n if (Integer.parseInt(arr2[0]) == Integer.parseInt(arr1[0])) { // hour\n if (Integer.parseInt(arr2[1]) == Integer.parseInt(arr1[1])) { // minute\n return 0;\n } else {\n return Integer.parseInt(arr1[1]) > Integer.parseInt(arr2[1]) ? -1 : 1;\n }\n } else {\n return Integer.parseInt(arr1[0]) > Integer.parseInt(arr2[0]) ? -1 : 1;\n }\n }\n else\n return other.calendarDay > this.calendarDay ? -1 : 1;\n }\n else\n return other.calendarMonth > this.calendarMonth ? -1 : 1;\n }\n else\n return other.calendarYear > this.calendarYear ? -1 : 1;\n\n\n// if (this.echo == other.echo) {\n// if (other.calendarMonth == this.calendarMonth) {\n// return 0;\n// }\n// return other.calendarMonth > this.calendarMonth ? -1 : 1;\n// }\n// return this.echo - other.echo;\n }", "private void calculatePeakHour() {\n\t\tint sum = 0;\n\t\t// sum up all the tasks that are waiting in queues\n\t\tfor (int i = 0; i < this.numberOfServers; i++) {\n\t\t\tsum += this.scheduler.getServers().get(i).getTasks().length;\n\t\t}\n\n\t\tif (sum > peakHourClients) {\n\t\t\tpeakHourClients = sum;\n\t\t\tpeakHour = currentTime;\n\t\t}\n\t}", "public int[] hotM(ArrayList<LottoDay> list)\n\t{\n\t\tint [] megaF = new int [28]; //stores number of occurrences for each mega number\n\t\tint[] check = new int [5]; //stores the highest mega numbers\n\t\tint counter =0; //counts occurrences\n\t\tint high=0; //checks for the highest mega numbers\n\n\t\t//fill megaF with the number of occurrences\n\t\tfor(int i=0; i<list.size();i++)\n\t\t{\n\t\t\tone = list.get(i);//get the object\n\t\t\tmega= one.getMega();//get the mega number of that object\n\t\t\tfor(int j=0; j<megaF.length;j++)\n\t\t\t{\n\n\t\t\t\tif(mega==j)\n\t\t\t\t{\n\t\t\t\t\tcounter++; //add one to counter\n\t\t\t\t\tmegaF[j]=counter+megaF[j]; //store occurrence\n\t\t\t\t\tcounter=0; //reset counter\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\t\thigh=0;//reset high\n\t\tfor( int j=0; j<check.length;j++)\n\t\t{\n\t\t\tfor(int i=0; i<megaF.length;i++)\n\t\t\t{\n\t\t\t\t//if occurrence beats high\n\t\t\t\tif(megaF[i]>high)\n\t\t\t\t{\n\t\t\t\t\thigh = megaF[i];//occurrence becomes new high\n\t\t\t\t\tcheck[j]=i;//store the index of highest occurrence\n\t\t\t\t\tindex=i;//store index\n\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\thigh=0;//reset high\n\t\t\tmegaF[index]=0;//set highest index to zero \n\t\t}\n\n\n\t\treturn check; //return 5 highest mega numbers\n\n\n\t}", "public void checkHighScore(){\n if(timeElapsed >= highMinutes){\n highMinutes = timeElapsed;\n highSeconds = timeCounter / 60;\n }\n }", "@Override\n\tpublic double sort() {\n\t\tlong startTime = System.nanoTime();\n\t\tArrayList<Offender> offenders = Offender.readArrayListCSV();\n\t\tCollections.sort(offenders, (a, b) -> ((Offender) a).getAge() < ((Offender) b).getAge() ? -1 : ((Offender) a).getAge() == ((Offender) b).getAge() ? 0 : 1);\n\t\tlong endTime = System.nanoTime();\n\t\tlong duration = (endTime - startTime); \n\t\tdouble seconds = (double)duration / 1_000_000_000.0;\n\t\t\n\t\treturn seconds;\n\t}", "public int compare(TimeEntry t1, TimeEntry t2) {\n\t\t\t\t\treturn t1.getTime().compareTo(t2.getTime());\n\t\t\t\t//return 1;\n\t\t\t }", "public long getMinutesAsleep() {\n return minutesAsleep;\n }", "public ArrayList<String> getCountStatics() {\n\t\tint countsPerMinute = 0;\n\t\tint countsPerHour = 0;\n\t\tint countsPerDay = 0;\n\t\tint countsPerWeek = 0;\n\t\tint countsPerMonth = 0;\n\n\t\t// get a comparison time and start comparing the times against it\n\t\tArrayList<String> myArrayString = new ArrayList<String>();\n\t\tCalendar currDate = Calendar.getInstance();\n\t\tfor (int i = 0; i < clickerCountObject.getClickerTimestamps().size(); i++) {\n\t\t\tSystem.out.println(clickerCountObject.getClickerTimestamps().get(i)\n\t\t\t\t\t.get(Calendar.MINUTE) <= currDate.get(Calendar.MINUTE));\n\t\t\tif (currDate.get(Calendar.MINUTE) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)\n\t\t\t\t\t&& currDate.get(Calendar.MINUTE) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)) {\n\t\t\t\tcountsPerMinute += 1;\n\t\t\t}\n\t\t\tif (currDate.get(Calendar.HOUR_OF_DAY) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.HOUR_OF_DAY)\n\t\t\t\t\t&& currDate.get(Calendar.HOUR_OF_DAY) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY)) {\n\t\t\t\tcountsPerHour += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.DAY_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.DAY_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.DAY_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.DAY_OF_MONTH))) {\n\t\t\t\tcountsPerDay += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.WEEK_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.WEEK_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.WEEK_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.WEEK_OF_MONTH))) {\n\t\t\t\tcountsPerWeek += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))) {\n\t\t\t\tcountsPerMonth += 1;\n\t\t\t}\n\t\t}\n\t\tmyArrayString.add(\"Counts per Minute \"\n\t\t\t\t+ Integer.toString(countsPerMinute));\n\t\tmyArrayString.add(\"Counts per Hour \" + Integer.toString(countsPerHour));\n\t\tmyArrayString.add(\"Counts per Day \" + Integer.toString(countsPerDay));\n\t\tmyArrayString.add(\"Counts per Week \" + Integer.toString(countsPerWeek));\n\t\tmyArrayString.add(\"Counts per Month \"\n\t\t\t\t+ Integer.toString(countsPerMonth));\n\n\t\tSystem.out.println(myArrayString);\n\t\treturn myArrayString;\n\t}", "public void printAverageRatingsByMinutes(){\n ThirdRatings sr = new ThirdRatings();\n int raters = sr.getRaterSize();\n System.out.println(\"read data for \" + raters + \" raters\");\n System.out.println(\"-------------------------------------\");\n \n //MovieDatabase.initialize(\"ratedmovies_short.csv\");\n MovieDatabase.initialize(\"ratedmoviesfull.csv\");\n System.out.println(\"read data for \" + MovieDatabase.size() + \" movies\");\n System.out.println(\"-------------------------------------\");\n \n Filter f = new MinutesFilter(105, 135); \n int minRatings = 5;\n ArrayList<Rating> aveRat = sr.getAverageRatingsByFilter(minRatings, f);\n System.out.println(\"Found \" + aveRat.size() + \" movies\");\n System.out.println(\"-------------------------------------\");\n // sort arraylist\n Collections.sort(aveRat);\n for(Rating r: aveRat){\n System.out.println(r.getValue() + \"\\t\" + \"Time: \" \n + MovieDatabase.getMinutes(r.getItem()) + \"\\t\" \n + MovieDatabase.getTitle(r.getItem()));\n }\n System.out.println(\"-------------------------------------\");\n \n \n }", "public void printAverageRatingsByMinutes(){\n \n String moviefile = \"data/ratedmovies_short.csv\";\n String ratingsfile = \"data/ratings_short.csv\";\n \n \n ThirdRatings tr = new ThirdRatings(ratingsfile);\n \n int rating_size = tr.getRaterSize();\n \n System.out.println(\"The number of raters read is : \"+ rating_size);\n \n MovieDatabase database = new MovieDatabase();\n \n database.initialize(moviefile);\n \n int movie_size = database.size();\n \n System.out.println(\"The number of movies read is : \"+ movie_size); \n \n int min = 110;\n int max = 170;\n \n MinutesFilter mins_filter = new MinutesFilter(min, max);\n \n ArrayList<Rating> ratings_list = tr.getAverageRatingsByFilter(1, mins_filter);\n \n HashMap<String, Double> map = new HashMap<String, Double>();\n \n Collections.sort(ratings_list);\n \n int count = 0; \n \n for(Rating rating : ratings_list){\n \n String title = database.getTitle(rating.getItem());\n \n double val = rating.getValue();\n \n int mov_time = database.getMinutes(rating.getItem());\n \n if(val != 0.0 ){\n \n map.put(title , val);\n \n count += 1;\n\n System.out.println(val + \"\\t\" + mov_time + \"\\t\" +title );\n }\n\n }\n \n System.out.println(\"The number of movies found with minimal number of ratings is : \"+ count); \n \n }", "private int compareTimes(String time1, String time2) {\n \n String[] timeOneSplit = time1.trim().split(\":\");\n String[] timeTwoSplit = time2.trim().split(\":\");\n \n \n if (timeOneSplit.length == 2 && timeTwoSplit.length == 2) {\n \n String[] minutesAmPmSplitOne = new String[2];\n minutesAmPmSplitOne[1] = timeOneSplit[1].trim().substring(0, timeOneSplit[1].length() - 2);\n minutesAmPmSplitOne[1] = timeOneSplit[1].trim().substring(timeOneSplit[1].length() - 2, timeOneSplit[1].length());\n\n String[] minutesAmPmSplitTwo = new String[2];\n minutesAmPmSplitTwo[1] = timeTwoSplit[1].trim().substring(0, timeTwoSplit[1].length() - 2);\n minutesAmPmSplitTwo[1] = timeTwoSplit[1].trim().substring(timeTwoSplit[1].length() - 2, timeTwoSplit[1].length());\n \n int hourOne = Integer.parseInt(timeOneSplit[0]);\n int hourTwo = Integer.parseInt(timeTwoSplit[0]);\n \n //increment hours depending on am or pm\n if (minutesAmPmSplitOne[1].trim().equalsIgnoreCase(\"pm\")) {\n hourOne += 12;\n }\n if (minutesAmPmSplitTwo[1].trim().equalsIgnoreCase(\"pm\")) {\n hourTwo += 12;\n }\n \n if (hourOne < hourTwo) {\n \n return -1;\n }\n else if (hourOne > hourTwo) {\n \n return 1;\n }\n else {\n \n int minutesOne = Integer.parseInt(minutesAmPmSplitOne[0]);\n int minutesTwo = Integer.parseInt(minutesAmPmSplitTwo[0]);\n \n if (minutesOne < minutesTwo) {\n \n return -1;\n }\n else if (minutesOne > minutesTwo) {\n \n return 1;\n }\n else {\n \n return 0;\n }\n }\n }\n //time1 exists, time 2 doesn't, time 1 comes first!\n else if (timeOneSplit.length == 2 && timeTwoSplit.length != 2) {\n return -1;\n }\n else {\n return 1;\n }\n }", "public int findMinDifference(List<String> timePoints) {\n List<Integer> p = new ArrayList<>();\n for(String time:timePoints){\n String[] hm = time.split(\":\");\n int h = Integer.parseInt(hm[0]);\n int m = Integer.parseInt(hm[1]);\n p.add(h*60 + m);\n if(h<12){\n p.add((h+24)*60+m);\n }\n }\n int diff = Integer.MAX_VALUE;\n Collections.sort(p);\n for(int i=1; i<p.size(); i++){\n diff = Math.min(p.get(i)-p.get(i-1), diff);\n }\n return diff;\n }", "public static Map<String, Long> eachLineDuration(List<MonitoredData> data){\n Map<String, String> hash = new HashMap<>();\n Map<String, Long> hashWithMillis = new HashMap<>();\n for (int i=0; i<data.size(); i++){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.ENGLISH);\n try {\n String startTime = data.get(i).getStartTime();\n Date firstDate = sdf.parse(startTime);\n String endTime = data.get(i).getEndTime();\n Date secondDate = sdf.parse(endTime);\n long diffInMillies = Math.abs(secondDate.getTime() - firstDate.getTime());\n DateFormat df = new SimpleDateFormat(\"HH 'hours', mm 'mins,' ss 'seconds'\");\n df.setTimeZone(TimeZone.getTimeZone(\"GMT+0\"));\n String difference = df.format(new Date(diffInMillies));\n hash.put(data.get(i).getActivity(), difference);\n System.out.println(\" \" + data.get(i).getActivity() + \" ::: \" + hash.get(data.get(i).getActivity()));\n //-----For each activity compute the entire duration over the monitoring period\n String acti = data.get(i).getActivity();\n if (activityHasValue.containsKey(data.get(i).getActivity())){\n long index = hashWithMillis.get(acti);\n hashWithMillis.put(data.get(i).getActivity(), diffInMillies + index);\n }else{\n hashWithMillis.put(data.get(i).getActivity(), diffInMillies);\n activityHasValue.put(data.get(i).getActivity(), diffInMillies);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n }\n System.out.print(\"\\n\\n5) Each activity duration over the whole period: \\n\");\n System.out.println(hashWithMillis);\n return hashWithMillis;\n }", "@GetMapping(\"/bestplayers\")\n public String best(Map<String, Object> model) {\n\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MINUTE, -5);\n Date date = calendar.getTime();\n System.out.println(date.toString());\n List<Match> matchs = matchRepo.findByMatchTimeAfter(date);\n\n\n Map<Chessplayer, Double> result = matchs.stream() //преобразуем в стрим\n // .map(Match::getMatchDetails) //мапа деталий матчей\n .flatMap(Match -> Match.getMatchDetails().stream()) //мапа деталей матча\n\n .collect(Collectors.groupingBy(MatchDetails::getChessplayer, Collectors.summingDouble(MatchDetails::getRatingChange)))\n\n .entrySet()\n .stream()\n .sorted(Map.Entry.<Chessplayer, Double>comparingByValue().reversed())\n .limit(5)\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));\n\n model.put(\"players\", result);\n\n return \"bestPlayers\";\n\n }", "public double calcAverageWaitingTime()\n\t{\n\t\tint min,y;\n\t\tint sum=0;\n\t\tint x=0,j;\n\t\tfor( int i=0;i<num;i++)\n\t\t{\n\t\t\ttest[i]=Priority[i];\n\n\t\t}\n\t\tint max=test[0];\n\t\tfor (int i=0;i<num;i++)\n\t\t{\n\t\t\tif(test[i]>max)\n\t\t\t{\n\t\t\t\tmax=test[i];\n\t\t\t}\n\n\t\t}\n\t\tmax=max+1;\n\t\tfor (int i=0;i<num;i++)\n\t\t{ \n\t\t\tmin = max;\n\t\t\tfor(j=0;j<num;j++)\n\t\t\t{\n\t\t\t\tif(test[j]!=-1&&test[j]<min)\n\t\t\t\t{\n\t\t\t\t\tmin = test[j];\n\t\t\t\t\tx = j;\n\t\t\t\t}\n\t\t\t\telse if(test[j]!=-1&&test[j]==min)\n\t\t\t\t{\n\t\t\t\t\tif(burstTime[j]<burstTime[x])\n\t\t\t\t\t{\n\t\t\t\t\t\tmin = test[j];\n\t\t\t\t\t\tx = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpid1[i]=x;\n\t\t\ttest[x]=-1;\n\t\t}\n\t\treturn printWaitingTime();\n\t}", "List<Candlestick> findTop2ByOrderByTimestampDesc();", "public List<T> mostliked();", "public List<Stats> findStatsPerTime(String date) {\n\t\treturn null;\r\n\t}", "public static int checkApp2Closed(){\n long timeNow = System.currentTimeMillis();\n\n DateFormat df = new SimpleDateFormat(\"HH:mm\");\n df.setTimeZone(TimeZone.getTimeZone(\"GMT+05:30\"));\n String time = df.format(new Date(timeNow));\n int hours = Integer.parseInt(time.split(\":\")[0]);\n int minutes = Integer.parseInt(time.split(\":\")[1]);\n int totalMinutes = (60 * hours) + minutes;\n\n ConfigUtility configUtility = ConfigUtility.getInstance();\n int startHour = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V2_START_HOUR,\"9\"));\n int startMinutes = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V2_START_MINUTE,\"0\"));\n int endHour = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V2_END_HOUR,\"18\"));\n int endMinutes = Integer.parseInt(configUtility.getConfigProperty(Constants.APP_V2_END_MINUTE,\"0\"));\n\n int startTime = (60 * startHour) + startMinutes;\n int endTime = (60 * endHour) + endMinutes;\n\n if (totalMinutes < startTime) {\n return -1;\n }\n if (totalMinutes > endTime) {\n return 1;\n }\n return 0;\n }", "protected int compareTime(Date first, Date second) {\n\t\treturn first.compareTo(second);\n\t}", "@Override\r\n\tpublic double getManufactureTime() {\r\n\t\tdouble highTime = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\tif(p.getManufactureTime() > highTime)\r\n\t\t\t\thighTime = p.getManufactureTime();\r\n\t\t}\r\n\t\t\r\n\t\treturn highTime;\r\n\t}", "public static void main(String[] args) {\n\t\tList<StatetostateDetail> list = new ArrayList<StatetostateDetail>();\n\t\tfor(int i = 1; i < 16; i++){\n\t\t\tStatetostateDetail s = new StatetostateDetail();\n\t\t\ts.setId(i);\n\t\t\ts.setStatue(0);\n\t\t\ts.setTime(System.currentTimeMillis() + (i + i * 100));\n\t\t\tlist.add(s);\n\t\t}\n\t\tlist.get(3).setStatue(1);\n\t\tlist.get(5).setStatue(1);\n\t\tlist.get(10).setStatue(1);\n\t\tlist.get(14).setStatue(1);\n\t\tlist.get(7).setStatue(2);\n\t\tlist.get(9).setStatue(2);\n\t\tSystem.out.println(\"list:\" + list);\n\t\n\t\t\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \tLong t1 = null;\n \tLong t2 = null;\n \ttry{\n \t\tt1 = s1.getTime();\n\t \tt2 = s2.getTime();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}\n \n return t2.compareTo(t1);\n }\n });\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \treturn s1.getStatue()>s2.getStatue()?1:(s1.getStatue()==s2.getStatue()?0:(s2.getTime()>s1.getTime()?-1:0));\n }\n });\n\t\t\n\t\tSystem.out.println(\"list:\" + list);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private int getNumberOfEventsByMinuteOrHour(boolean isByMinute) {\n int counter = 0;\n long currentTimeSeconds = getCurrentTimeInSeconds();\n long currentTimeIndex = (currentTimeSeconds - startTime) % SECONDS_IN_DAY;\n int timePeriod = isByMinute ? SECONDS_IN_MINUTE : SECONDS_IN_HOUR;\n\n if (currentTimeIndex + 1 - timePeriod >= 0) {\n for (int i = (int) currentTimeIndex; i > currentTimeIndex - timePeriod; i--) {\n synchronized (records[i]) {\n if (currentTimeSeconds - records[i].getLastTimeReset() < SECONDS_IN_DAY) {\n counter += records[i].getCount();\n }\n }\n }\n } else {\n for (int i = (int) currentTimeIndex; i >= 0; i--) {\n synchronized (records[i]) {\n if (currentTimeSeconds - records[i].getLastTimeReset() < SECONDS_IN_DAY) {\n counter += records[i].getCount();\n }\n }\n }\n\n for (int i = records.length - 1; i > records.length + currentTimeIndex - timePeriod; i--) {\n synchronized (records[i]) {\n if (currentTimeSeconds - records[i].getLastTimeReset() < SECONDS_IN_DAY) {\n counter += records[i].getCount();\n }\n }\n }\n }\n\n return counter;\n }", "public HashMap<String, Integer> sortedAthleteTimes(ArrayList<Athlete> allAths, String athName){\n\t\tHashMap<String, Integer> athTimes = new HashMap<>();\n\t\t\n\t\tfor(int i=0; i<allAths.size(); i++) {\n\t\t\tif(allAths.get(i).getName().equals(athName)) {\n\t\t\t\tfor(Event e : allAths.get(i).getEvents().values()) {\n\t\t\t\t\tathTimes.put(e.toString(), allAths.get(i).getEvents().get(e.toString()).getIntTime());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn this.sortByValue(athTimes);\n\t}", "@Override\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// luon duoc sap xep theo thoi gian thuc hien con lai\n\t\t\tpublic int compare(Integer o1, Integer o2) {\t\t\t\t\t\t // tu be den lon sau moi lan add them gia tri vao \n\t\t\t\tif (burstTimeArr[o1] > burstTimeArr[o2]) return 1;\n\t\t\t\tif (burstTimeArr[o1] < burstTimeArr[o2]) return -1;\n\t\t\t\treturn 0;\n\t\t\t}", "private int findMaxEvents(List<List<double[]>> timeLevel) {\n int max = 0;\n\n for(List<double[]> locations : timeLevel) {\n if (locations.size() > max) {\n max = locations.size();\n }\n }\n\n return max;\n }", "private void findHumidities(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n int numHours = hourlyForecast.hours();\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minHum = hourlyForecast.getHour(0).humidity();\n double maxHum = minHum;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double hum = hourlyForecast.getHour(i).humidity();\n if (minHum > hum)\n minHum = hum;\n if (maxHum < hum) {\n maxHum = hum;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setHumMin((int) (minHum * 100));\n day.setHumMax((int) (maxHum * 100));\n day.setHumMaxTime(maxHour);\n }", "public long findFastestTime()\r\n {\r\n for(int top = 1; top < listOfTimes.size(); top++)\r\n { \r\n long item = listOfTimes.get(top); \r\n int i = top;\r\n\r\n while(i > 0 && item < listOfTimes.get(i - 1))\r\n {\r\n listOfTimes.set(i, listOfTimes.get(i- 1));\r\n i--;\r\n }//end while \r\n\r\n listOfTimes.set(i, item);\r\n }//end for \r\n\r\n return listOfTimes.get(0);\r\n }", "public L2Character getMostHated()\n\t{\n\t\tif (getAggroListRP().isEmpty() || isAlikeDead())\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tL2Character mostHated = null;\n\t\t\n\t\tint maxHate = 0;\n\t\t\n\t\t// While Interating over This Map Removing Object is Not Allowed\n\t\tsynchronized (getAggroList())\n\t\t{\n\t\t\t// Go through the aggroList of the L2Attackable\n\t\t\tfor (final AggroInfoHolder ai : getAggroListRP().values())\n\t\t\t{\n\t\t\t\tif (ai == null)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (ai.getAttacker().isAlikeDead() || !getKnownList().knowsObject(ai.getAttacker()) || !ai.getAttacker().isVisible() || ai.getAttacker() instanceof L2PcInstance && !((L2PcInstance) ai.getAttacker()).isOnline() && !((L2PcInstance) ai.getAttacker()).isInOfflineMode()) // if player go\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\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// in offline\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\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// mode, he\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\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// must be hated\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\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// however\n\t\t\t\t{\n\t\t\t\t\tai.initHate();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (ai.getHate() > maxHate)\n\t\t\t\t{\n\t\t\t\t\tmostHated = ai.getAttacker();\n\t\t\t\t\tmaxHate = ai.getHate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (mostHated != null)\n\t\t{\n\t\t\tthis.mostHated = mostHated;\n\t\t}\n\t\t\n\t\treturn mostHated;\n\t}", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "private void findWaitingTime(int wt[]) {\n\t\tint rt[] = new int[n];\r\n\t\t\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\trt[i] = processList.get(i).getBurstTime();\r\n\t\t}\r\n\t\t\r\n\t\tint completed = 0,t=0,minm = Integer.MAX_VALUE;\r\n\t\tint shortest = 0, finish_time;\r\n\t\t\r\n\t\tboolean check = false;\r\n\t\t\r\n\t\twhile(completed!=n) {\r\n\t\t\t// find process with min rmaining time\r\n\t\t\tfor(int i=0; i<n ;i++) {\r\n\t\t\t\tif (processList.get(i).getArrivalTime()<=t && rt[i]<minm && rt[i]>0) {\r\n\t\t\t\t\tminm = rt[i];\r\n\t\t\t\t\tshortest = i;\r\n\t\t\t\t\tcheck = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(check == false) {\r\n\t\t\t\tt++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trt[shortest]--;\r\n\t\t\t\r\n\t\t\tif (minm == 0) {\r\n\t\t\t\tminm = Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (rt[shortest]==0) {\r\n\t\t\t\tcompleted++;\r\n\t\t\t\tcheck=false;\r\n\t\t\t\t\r\n\t\t\t\tfinish_time = t+1;\r\n\t\t\t\t\r\n\t\t\t\twt[shortest] = finish_time - processList.get(shortest).getBurstTime() - processList.get(shortest).getArrivalTime();\r\n\t\t\t\t\r\n\t\t\t\tif (wt[shortest]<0) {\r\n\t\t\t\t\twt[shortest] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tt++;\r\n\t\t}\r\n\t}", "private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}", "public void sortEventsByTime() {\n for (OrgEvent event : events) {\n event.setCompareByTime(true);\n }\n Collections.sort(events);\n }", "public int getMaxTime() { return _maxTime; }", "public int compareTo(ScheduleTime compare) {\n return (this.startHours - compare.startHours) * 100 + (this.startMins - compare.startMins);\n }", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "public void sort() {\r\n for (int i = 0; i < namesOfApp.length && i < runTimeOfApp.length; i++) {\r\n for (int j = 0; j < i; j++) {\r\n if (runTimeOfApp[j] < runTimeOfApp[i]) {\r\n String tempName = namesOfApp[i];\r\n long tempRunTime = runTimeOfApp[i];\r\n namesOfApp[i] = namesOfApp[j];\r\n runTimeOfApp[i] = runTimeOfApp[j];\r\n namesOfApp[j] = tempName;\r\n runTimeOfApp[j] = tempRunTime;\r\n }\r\n }\r\n }\r\n\r\n }", "public Integer getTimeSort() {\n return timeSort;\n }", "String getHighScoreTime() {\n return getStringStat(highScoreTime);\n }", "private static int compareEndTimes(TaskItem task1, TaskItem task2) {\n\t\tif (task1 instanceof FloatingTask) {\n\t\t\tif (task2 instanceof FloatingTask) {\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t} else if (task1 instanceof DeadlinedTask) {\n\t\t\tif (task2 instanceof FloatingTask) {\n\t\t\t\treturn 1;\n\t\t\t} else if (task2 instanceof DeadlinedTask) {\n\t\t\t\tDate endTime1 = ((DeadlinedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((DeadlinedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t} else {\n\t\t\t\tDate endTime1 = ((DeadlinedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((TimedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t}\n\t\t} else {\n\t\t\tif (task2 instanceof FloatingTask) {\n\t\t\t\treturn 1;\n\t\t\t} else if (task2 instanceof DeadlinedTask) {\n\t\t\t\tDate endTime1 = ((TimedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((DeadlinedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t} else {\n\t\t\t\tDate endTime1 = ((TimedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((TimedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t}\n\t\t}\n\t}", "public Scores[] dbSorter2(int time, String name){\n DBhandler db = new DBhandler(mActivity);\n Scores s2 = new Scores(time, name); // makes the current score and name into a score object\n\n db.addScore2(s2);\n Scores[] scoreList = db.getAllScores2(); // gets score list from main activity\n scoreList = db.sortScores2(scoreList);\n Log.i(\"Scores count\", Integer.toString(db.getScoresCount2()));\n Log.i(\"Scores time\", Integer.toString(time));\n\n return scoreList;\n }", "private int calTimeScore(SlidingBoardManager slidingBoardManager) {\n double time = slidingBoardManager.getTime();\n\n return (int) Math.round((100 - time / 15));\n\n }", "public Long timeMostRecentWallPost (PublicKey key) {\n Logger.write(\"VERBOSE\", \"DB\", \"timeMostRecentWallPost(...)\");\n try {\n ResultSet mostRecent = query(DBStrings.mostRecentWallPost.replace(\"__KEY__\", Crypto.encodeKey(key)));\n if (mostRecent.next())\n return Long.parseLong(mostRecent.getString(\"maxtime\"));\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n }\n return 0L;\n }", "public List<Integer> getByMinute() {\n\t\treturn byMinute;\n\t}", "@Override\n\t\tpublic int compareTo(Pair newThread) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tif(this.wakeTime > newThread.wakeTime) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if(this.wakeTime < newThread.wakeTime) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}", "public void testLoadRaters () {\n ArrayList<Rater> raters = loadRaters(\"ratings\"); \n System.out.println(\"Número total de evaluadores: \" + raters.size()); \n HashMap<String, HashMap<String, Double>> hashmap = new HashMap<String, HashMap<String, Double>> ();\n \n for (Rater rater : raters) {\n HashMap<String, Double> ratings = new HashMap<String, Double> ();\n ArrayList<String> itemsRated = rater.getItemsRated();\n \n for (int i=0; i < itemsRated.size(); i++) {\n String movieID = itemsRated.get(i);\n double movieRating = rater.getRating(movieID);\n \n ratings.put(movieID, movieRating);\n }\n \n hashmap.put(rater.getID(), ratings);\n }\n \n String raterID = \"193\"; // rater_id\n int ratingsSize = hashmap.get(raterID).size();\n System.out.println(\"Número de calificaciones para el evaluador \" + raterID + \" : \" + ratingsSize); \n int maxNumOfRatings = 0;\n \n for (String key : hashmap.keySet()) {\n int currAmountOfRatings = hashmap.get(key).size();\n \n if (currAmountOfRatings > maxNumOfRatings) {\n maxNumOfRatings = currAmountOfRatings;\n }\n }\n \n System.out.println(\"Número máximo de calificaciones por cualquier evaluador: \" + maxNumOfRatings); \n ArrayList<String> raterWithMaxNumOfRatings = new ArrayList<String> ();\n \n for (String key : hashmap.keySet()) {\n int currAmountOfRatings = hashmap.get(key).size();\n \n if (maxNumOfRatings == currAmountOfRatings) {\n raterWithMaxNumOfRatings.add(key);\n }\n }\n \n System.out.println(\"Evaluador (es) con la mayor cantidad de películas calificadas: \" + raterWithMaxNumOfRatings); \n String movieID = \"1798709\";\n int numOfRatings = 0;\n \n for (String key : hashmap.keySet()) {\n if(hashmap.get(key).containsKey(movieID)) {\n numOfRatings +=1;\n }\n }\n \n System.out.println(\"Número de clasificaciones de la película \" + movieID + \" tiene : \" + numOfRatings); \n ArrayList<String> uniqueMovies = new ArrayList<String> ();\n \n for (String key : hashmap.keySet()) {\n for (String currMovieID : hashmap.get(key).keySet()) {\n if (! uniqueMovies.contains(currMovieID)) {\n uniqueMovies.add(currMovieID);\n }\n }\n }\n \n System.out.println(\"Número total de películas unicas calificadas: \" + uniqueMovies.size());\n }", "public Long getTimeLapsed() {\r\n\t\tif(moodTimestamp == null) \r\n\t\t\treturn null;\r\n\t\telse \r\n\t\t\treturn ((System.currentTimeMillis()/1000) - moodTimestamp.longValue());\r\n\t}", "public ArrayList<String> isKill(String id, String date, String animalKill) {\n ArrayList<String> list =new ArrayList<>();\n SimpleDateFormat format = new SimpleDateFormat(\"YYYY-mm-dd-HH:mm\");\n ArrayList<ArrayList<String>> hmp = new ArrayList<>();\n if(mp.isEmpty())\n {\n for (Rules rule : rules) {\n if (Integer.parseInt(animalKill) > rule.getNoOfAnimals())\n {\n list.clear();\n list.add(rule.getId());\n list.add(\"False\");\n return list;\n }\n }\n }\n else {\n Date d1 = null;\n Date d2 = null;\n try {\n d1 = format.parse(date);\n hmp = mp.get(id);\n for (Rules rule : rules) {\n int count = Integer.parseInt(animalKill);\n int length = hmp.size();\n for (int i = length - 1; i >= 0; i--) {\n d2 = format.parse(hmp.get(i).get(0));\n long diff = d1.getTime() - d2.getTime();\n long diffHours = (diff / (60 * 60 * 1000) % 24);\n if (diffHours < (long) rule.getTime()) {\n if ((count + Integer.parseInt(hmp.get(i).get(1))) <= (long) rule.getNoOfAnimals())\n count = count + Integer.parseInt(hmp.get(i).get(1));\n else {\n list.add(rule.getId());\n list.add(\"False\");\n return list;\n }\n } else if (count > (long) rule.getNoOfAnimals()) {\n list.add(rule.getId());\n list.add(\"False\");\n return list;\n }\n }\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n ArrayList<String> animal = new ArrayList<>();\n animal.add(date);\n animal.add(animalKill);\n hmp.add(animal);\n mp.put(id, hmp);\n for(Rules rule :rules)\n list.add(rule.getId());\n list.add(\"True\");\n return list;\n }", "public static List<String> findTime(String crn, String date, int priority) throws SQLException\n\t{\n\t\tString semester = test.getLatestSemester();\n\t\t//String[] parse = test.parseCourse(course);\n\t\tResultSet student_id;\n\t\t\n\t\tif(priority == 1)\n\t\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where Class_Desc = 'Senior' and CRN = '\"+crn+\"' and Term_Code = '\"+semester+\"'\");\n\t\telse if(priority == 2)\n\t\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where Class_Desc = 'Junior' and CRN = '\"+crn+\"' and Term_Code = '\"+semester+\"'\");\n\t\telse\n\t\t\tstudent_id = test.readDatabase(\"select distinct Banner_id from class_2016 where CRN = '\"+crn+\"' and Term_Code = '\"+semester+\"'\");\n\n\t\tList<String> student = test.writeResultSet(student_id, \"Banner_id\");\n\t\tList<String> dist_time = new ArrayList<String>();\n\t\tfor(int x = 0; x < student.size(); x++)\n\t\t{\n\t\t\tResultSet class_t;\n\t\t\tif(date.charAt(0) == 'M')\n\t\t\t\tclass_t = test.readDatabase(\"select distinct Begin_Time from class_2016 where Banner_id = '\"+student.get(x)+\"' and Term_Code = '\"+semester+\"' and Monday_Ind1 = 'M' and Wednesday_Ind1 = 'W'and Friday_Ind1 = 'F' order by Begin_Time\");\n\t\t\telse\n\t\t\t\tclass_t = test.readDatabase(\"select distinct Begin_Time from class_2016 where Banner_id = '\"+student.get(x)+ \"' and Term_Code = '\"+semester+\"' and Tuesday_Ind1 = 'T' and Thursday_Ind1 = 'R' order by Begin_Time\");\n\t\t\tList<String> class_time = test.writeResultSet(class_t, \"Begin_Time\");\n\t\t\t//System.out.println(class_time);\n\t\t\tfor(int y = 0; y < class_time.size();y++)\n\t\t\t{\n\t\t\t\tif(dist_time.contains(class_time.get(y))==false)\n\t\t\t\t\tdist_time.add(class_time.get(y));\n\t\t\t}\n\n\t\t}\n\t\treturn dist_time;\n\t}", "private static void sortingArrayList() {\n Collections.sort(allMapData, new Comparator<MapDataModel>() {\n public int compare(MapDataModel d1, MapDataModel d2) {\n return valueOf(d1.getDateTime().compareTo(d2.getDateTime()));\n }\n });\n }", "long getInhabitedTime();", "public void removeOverTime(){\r\n\t\tlong latest = timeQueue.getLast();\r\n\t\twhile( !timeQueue.isEmpty() && overlapRatioQueue.isEmpty() ){\r\n\t\t\tlong temp = timeQueue.getFirst();\r\n\t\t\tif( latest - temp > SMOOTING_INTERVAL ){\r\n\t\t\t\ttimeQueue.removeFirst();\r\n\t\t\t\toverlapRatioQueue.removeFirst();\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void aStarTime(Person curPerson, Map<String, Person> persons) throws FileNotFoundException {\n\t\tclass DisComparator implements Comparator<Person> {\n\t\t\tpublic int compare(Person a, Person b) {\n\t\t\t\treturn a.peekEstTime() - b.peekEstTime();\n\t\t\t} \n\t\t}\n\t\t\n\t\tPriorityQueue<Person> pqueue = new PriorityQueue<Person>(persons.size(), new DisComparator());\t\t\n\t\tpqueue.add(curPerson);\n\t\t\n\t\twhile(!pqueue.isEmpty()) {\n\t\t\tcurPerson = pqueue.poll();\t\n\t\t\tif(curPerson.getName().equals(\"Noah\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Person> children = curPerson.getConnected();\n\t\t\tPerson child;\n\t\t\tfor(int i = 0; i < children.size(); i++) { //update the time distance of its children\n\t\t\t\tchild = children.get(i);\n\t\t\t\tif(!child.getMarked()) {\n\t\t\t\t\tchild.setRoute(curPerson);\n\t\t\t\t\tchild.setDistToTime(curPerson);\n\t\t\t\t\tchild.setMarked();\n\t\t\t\t\tpqueue.add(child);\n\t\t\t\t} else {\n\t\t\t\t\t//set the time distance to the new value when the new value is smaller\n\t\t\t\t\tif(child.peekDistToTime(curPerson) < child.getDistToTime()) {\n\t\t\t\t\t\tchild.setRoute(curPerson);\n\t\t\t\t\t\tchild.setDistToTime(curPerson);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\toutputResult(curPerson, \"A-star.time.result.txt\");\n\t}", "public static int getMostMoney(String[] games, int[] time, int[] money){\n int l = time.length; //The lengths of the three lists should be same;\n int t = 120; //The total time\n int[] played = new int[l];\n int[][] val = new int[l][121];\n for(int i=1;i<l;i++){\n for(int j=1;j<121;j++){\n if(j<time[i]){\n val[i][j] = val[i-1][j];\n }else\n val[i][j]=Math.max(val[i-1][j],val[i-1][j-time[i]]+money[i]);\n }\n }\n for(int i = l-1;i>=1;i--){\n if(val[i][t] != val[i-1][t]){\n System.out.println(games[i]); //print the best combination of games\n t -= time[i];\n }\n }\n\n return val[l-1][120]; //In this question, Adam can earn $780 at most;\n }", "final void minEvent() {\n minTime = Double.MAX_VALUE;\n if (timeOut.size() > 0) {\n for (int i = 0; i < timeOut.size(); i++) {\n if (timeOut.get(i) < minTime) {\n minTime = timeOut.get(i);\n num = i;\n }\n }\n }\n\n }", "@Override\n public String race() {\n mounts.forEach((list) -> list.randomizeSpeed());\n Collections.sort(mounts, new Comparator<Observer>() {\n @Override\n public int compare(Observer o1, Observer o2) {\n return o2.getResult() - o1.getResult();\n }\n });\n winners = new ArrayList<>();\n int win = 0;\n for (Observer horse : mounts) {\n if (horse.getResult() >= win) {\n win = horse.getResult();\n winners.add(horse);\n } else {\n break;\n }\n }\n winners.forEach((list) -> System.out.println(Answer.RACE.toString(1) + \" \" + list.getName()));\n return Answer.RACE.toString(6);\n }", "public static int compareTime(String time1, String time2)\r\n/* 83: */ {\r\n/* 84:110 */ String[] timeArr1 = (String[])null;\r\n/* 85:111 */ String[] timeArr2 = (String[])null;\r\n/* 86:112 */ timeArr1 = time1.split(\":\");\r\n/* 87:113 */ timeArr2 = time2.split(\":\");\r\n/* 88:114 */ int minute1 = Integer.valueOf(timeArr1[0]).intValue() * 60 + \r\n/* 89:115 */ Integer.valueOf(timeArr1[1]).intValue();\r\n/* 90:116 */ int minute2 = Integer.valueOf(timeArr2[0]).intValue() * 60 + \r\n/* 91:117 */ Integer.valueOf(timeArr2[1]).intValue();\r\n/* 92:118 */ return minute1 - minute2;\r\n/* 93: */ }", "private void totalWaitingTime(){\n int totalWaitingTime =0;\r\n for (Ride ride : rides) {\r\n totalWaitingTime += ride.getWaitingTime();\r\n }\r\n System.out.println(\"\\nTotal waiting time of the entire park is \" + totalWaitingTime / 60 + \" hours\");\r\n }", "public long getMinTime()\n {\n return times[0];\n }", "@Override\n\t\t\tpublic int compare(Integer a, Integer b) {\n\t\t\t\treturn guessCount[a - 1] - guessCount[b - 1];\n\t\t\t}", "public HashMap<String, Integer> sortedEventTimes(ArrayList<Athlete> allAths, String targetEvent){\n\t\t\n\t\t//stores all athletes and times for specific event in hashmap\n\t\tHashMap<String, Integer> athleteTimes = new HashMap<>();\n\t\t\n\t\tfor(int i=0; i<allAths.size(); i++) {\n\t\t\tfor(Event event : allAths.get(i).getEvents().values()) {\n\t\t\t\tif(event.toString().equals(targetEvent)) {\n\t\t\t\t\tathleteTimes.put(allAths.get(i).getName(), event.getIntTime());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.sortByValue(athleteTimes);\n\t\t\n\t\t\n\t\n\t\t\n\t}", "public int getOccupiedMinutes(){\n \t\treturn (int) (getOccupiedSeconds()/60);\n \t}", "int longestBreaktime(int waitTime, QNode temp) {\r\n\t \t\r\n\t \tif (this.front.wait_time==0) {\r\n\t \t\tint eachBreak = this.front.arrival_time- temp.service_timeEnding;\r\n\t \t\tbreaktime+= eachBreak;\r\n\t \t\tif (longest < eachBreak) {\r\n\t \t\t\tlongest= eachBreak;\r\n\t \t\t}\r\n\t \t\treturn breaktime;\r\n\t \t}\r\n\t \t\r\n\t\t\treturn breaktime;\r\n\t }", "private List<Conference> allocateTrackTwoAm(List<Conference> listTemp) {\r\n\t\tint sum2 = 0;\r\n\t\tList<Conference> listTemp2 = new LinkedList<Conference>();\r\n\t\tlistTemp2.addAll(listTemp);\r\n\t\twhile (sum2 != AM_MINUTES) {\r\n\t\t\tInteger index = random.nextInt(listTemp2.size());\r\n\t\t\tConference ele = listTemp2.get(index);\r\n\t\t\tlistTemp2.remove((int)index);\r\n\t\t\tsuper.trackTwoAm.add(ele);\r\n\t\t\tif ((sum2 += ele.getTimeDuration()) > AM_MINUTES) {\r\n\t\t\t\tsum2 = 0;\r\n\t\t\t\tsuper.trackTwoAm.clear();\r\n\t\t\t\tlistTemp2.clear();\r\n\t\t\t\tlistTemp2.addAll(listTemp);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listTemp2;\r\n\t}", "public Time getBestTime()\n\t{\n\t\treturn bestTime;\n\t}", "@Override\n public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n ArrayList<String> cache = new ArrayList<String>();\n String groupId = \"\";\n String earlist = \"\";\n int earlistTime = 999999;\n int latestTime = 0;\n for (Text e : values) {\n cache.add(e.toString());\n String[] input = e.toString().split(\",\");\n int time = Integer.parseInt(input[1]);\n //find the eaelistTime and latestTime of Typhoon\n if (time < earlistTime)\n earlistTime = time;\n if (time > latestTime)\n latestTime = time;\n }\n\n for (String e : cache) {\n String[] input1 = e.split(\",\");\n if (Integer.parseInt(input1[1]) == earlistTime) {\n String[] coordE = input1[2].trim().split(\"\\\\s+\");\n double tyLatE = Double.parseDouble(coordE[0]);\n double tyLngE = Double.parseDouble(coordE[2]);\n //if the start point of typhoon is west of 123E, then it may be group 2 or group 3\n if (tyLngE < 123) {\n for (String s : cache) {\n String[] input2 = s.split(\",\");\n if (Integer.parseInt(input2[1]) == latestTime) {\n String[] coordL = input2[2].trim().split(\"\\\\s+\");\n double tyLatL = Double.parseDouble(coordL[0]);\n double tyLngL = Double.parseDouble(coordL[2]);\n //if the end point of typhoon is west of 115E, then it belongs to group 3\n if (tyLngL < 115)\n groupId = \"3\";\n //if the end point of typhoon is east of 115E, then it belongs to group 2\n if (tyLngL > 115)\n groupId = \"2\";\n }\n }\n }\n //if the start point of typhoon is east of 123E, then it may be group 2 or group 3\n if (tyLngE > 123)\n groupId = \"1\";\n }\n }\n for (String e : cache) {\n context.write(null, new Text(groupId + \",\" + e));\n }\n\n }", "public static void fcfs(List<String> taskList) {\n\n Collections.sort(taskList, new Comparator<String>() {\n @Override\n public int compare(String task1, String task2) {\n int arrivalTime1 = Integer.parseInt(task1.split(\" \")[1]);\n int arrivalTime2 = Integer.parseInt(task2.split(\" \")[1]);\n\n if(arrivalTime1 < arrivalTime2) {\n return -1;\n } else if(arrivalTime1 > arrivalTime2) {\n return 1;\n } else {\n return 0;\n }\n }\n });\n // \"TaskName arTime priority burstTime compTime\"\n //\n int i = 0;\n\n double totalTurnaround = 0;\n double totalWaitingTime = 0;\n\n for(String task : taskList) {\n\n String[] taskArray = new String[5];\n int j = 0;\n for(String str : task.split(\" \")) {\n taskArray[j] = str;\n j++;\n }\n //write task to a file\n try {\n FileWriter myWriter = new FileWriter(\"output.txt\", true);\n myWriter.write(\"Will run Name: \" + taskArray[0] + \"\\n\");\n myWriter.write(\"Priority: \" + taskArray[2] + \"\\n\");\n myWriter.write(\"Burst: \" + taskArray[3] + \"\\n\\n\");\n myWriter.write(\"Finished \" + taskArray[0] + \"\\n\\n\");\n myWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n int arivalTime = Integer.parseInt(taskArray[1]);\n int burstTime = Integer.parseInt(taskArray[3]);\n if(i==0) {\n //completion time\n taskArray[4] = Integer.toString(arivalTime + burstTime);\n } else {\n int prevCompTime = Integer.parseInt(taskList.get(i-1).split(\" \")[4]);\n if(arivalTime > prevCompTime) {\n taskArray[4] = Integer.toString(arivalTime + burstTime);\n } else {\n taskArray[4] = Integer.toString(prevCompTime + burstTime);\n }\n }\n //\n int turnaround = Integer.parseInt(taskArray[4]) - arivalTime;\n totalTurnaround += turnaround;\n int waitingTime = turnaround - burstTime;\n totalWaitingTime += waitingTime;\n\n taskList.set(i, String.join(\" \", taskArray));\n i++;\n }\n\n totalTurnaround = totalTurnaround / taskList.size();\n totalWaitingTime = totalWaitingTime / taskList.size();\n\n System.out.println(\"Average turnaround: \" + totalTurnaround);\n System.out.println(\"Average waiting: \" + totalWaitingTime);\n\n }", "private Map<String, Long> getJudgeTime(Expression expr, long time) {\n \n\n if (!inTimeScope(expr, time)) {\n return null;\n }\n\n Map<String, Long> timeMap = new HashMap<String, Long>();\n long time_to = time;\n long time_from = time - (expr.getTime_to() - expr.getTime_from());\n timeMap.put(\"time_from\", time_from);\n timeMap.put(\"time_to\", time_to);\n long last_time_to;\n if (expr.getInterval() != 0) {\n\n if ((time_to - expr.getTime_to()) % expr.getInterval() == 0) {\n\n timeMap.put(\"last_time_from\", time_from - expr.getInterval());\n timeMap.put(\"last_time_to\", time_to - expr.getInterval());\n }\n else {\n return null;\n }\n }\n else {\n if ((time_to - expr.getTime_to()) % (24 * 3600 * 1000) == 0) {\n switch (expr.getUnit()) {\n case DateTimeHelper.INTERVAL_DAY:\n\n timeMap.put(\"last_time_from\", time_from - 24 * 3600 * 1000);\n timeMap.put(\"last_time_to\", time_to - 24 * 3600 * 1000);\n break;\n case DateTimeHelper.INTERVAL_WEEK:\n\n timeMap.put(\"last_time_from\", time_from - 7 * 24 * 3600 * 1000);\n timeMap.put(\"last_time_to\", time_to - 7 * 24 * 3600 * 1000);\n break;\n case DateTimeHelper.INTERVAL_MONTH:\n\n last_time_to = DateTimeHelper.getMonthAgo(new Date(time_to)).getTime();\n timeMap.put(\"last_time_to\", last_time_to);\n timeMap.put(\"last_time_from\", last_time_to - (time_to - time_from));\n break;\n case DateTimeHelper.INTERVAL_YEAR:\n\n last_time_to = DateTimeHelper.getYearAgo(new Date(time_to)).getTime();\n timeMap.put(\"last_time_to\", last_time_to);\n timeMap.put(\"last_time_from\", last_time_to - (time_to - time_from));\n break;\n }\n }\n else {\n return null;\n }\n\n }\n\n return timeMap;\n }", "public void CheckHands(){\n HashMap<CardRank, Integer> CardMap = getCardMap(ranks);\n ArrayList<Integer> MapValues = new ArrayList<>(CardMap.values());\n //sort MapValues in descending order, so that we can use\n // MapValues.get(0) to get the largest appear time and so on\n Collections.sort(MapValues, Collections.reverseOrder());\n System.out.print(\"Player 1: \");\n\n\n //Straight flush\n if (flush(suits) && straight(ranks)){\n System.out.println(ranks.get(ranks.size()-1).getName()\n + \"-high straight flush\");\n return;\n }\n\n //Four of a kind\n if (MapValues.get(0) == 4){\n CardRank rank4 = getKeysByValue(CardMap, 4).get(0);\n System.out.println(\"Four \" + rank4.getName() + \"s\");\n return;\n }\n\n //full house\n if (MapValues.get(0) == 3 && MapValues.get(1) == 2){\n CardRank rank3 = getKeysByValue(CardMap, 3).get(0);\n CardRank rank2 = getKeysByValue(CardMap,2).get(0);\n System.out.println(rank3.getName() + \"s full of \"\n + rank2.getName()+\"s\");\n return;\n }\n\n //Flush (not straight)\n if (flush(suits) && !straight(ranks)) {\n System.out.println(ranks.get(ranks.size() - 1).getName()\n + \"-high flush\");\n return;\n }\n\n //Straight (not flush)\n if (straight(ranks) && !flush(suits)){\n System.out.println(ranks.get(ranks.size() - 1).getName()\n + \"-high straight\");\n return;\n }\n\n //Three of a kind (not full house)\n if (MapValues.get(0) == 3 && MapValues.get(1) != 2){\n CardRank rank3 = getKeysByValue(CardMap, 3).get(0);\n System.out.println(\"Three \" + rank3.getName() + \"s\");\n return;\n }\n\n //Two Pair\n if (MapValues.get(0) == 2 && MapValues.get(1) == 2){\n CardRank rank21 = getKeysByValue(CardMap,2).get(0);\n CardRank rank22 = getKeysByValue(CardMap, 2).get(1);\n System.out.println(rank22.getName() + \"s over \"\n + rank21.getName() + \"s\" );\n return;\n\n }\n\n //One pair (only one)\n if (MapValues.get(0) == 2 && MapValues.get(1) == 1){\n CardRank rank2 = getKeysByValue(CardMap, 2).get(0);\n System.out.println(\"Pair of \" + rank2.getName()+ \"s\");\n return;\n }\n\n //High Card (not flush)\n if (MapValues.get(0) == 1 && !flush(suits)){\n System.out.println(ranks.get(ranks.size() - 1).getName() + \"-high\");\n return;\n }\n }", "public void testLoadMovies () {\n ArrayList<Movie> movies = loadMovies(\"ratedmoviesfull\"); \n System.out.println(\"Numero de peliculas: \" + movies.size()); \n String countInGenre = \"Comedy\"; // variable\n int countComedies = 0; \n int minutes = 150; // variable\n int countMinutes = 0;\n \n for (Movie movie : movies) {\n if (movie.getGenres().contains(countInGenre)) {\n countComedies +=1;\n }\n \n if (movie.getMinutes() > minutes) {\n countMinutes +=1;\n }\n }\n \n System.out.println(\"Hay \" + countComedies + \" comedias en la lista \");\n System.out.println(\"Hay \" + countMinutes + \" películas con más de \" + minutes + \" minutos en la lista \");\n \n // Cree un HashMap con el recuento de cuántas películas filmó cada director en particular\n HashMap<String,Integer> countMoviesByDirector = new HashMap<String,Integer> ();\n for (Movie movie : movies) {\n String[] directors = movie.getDirector().split(\",\"); \n for (String director : directors ) {\n director = director.trim();\n if (! countMoviesByDirector.containsKey(director)) {\n countMoviesByDirector.put(director, 1); \n } else {\n countMoviesByDirector.put(director, countMoviesByDirector.get(director) + 1);\n }\n }\n }\n \n // Contar el número máximo de películas dirigidas por un director en particular\n int maxNumOfMovies = 0;\n for (String director : countMoviesByDirector.keySet()) {\n if (countMoviesByDirector.get(director) > maxNumOfMovies) {\n maxNumOfMovies = countMoviesByDirector.get(director);\n }\n }\n \n // Cree una ArrayList con directores de la lista que dirigieron el número máximo de películas\n ArrayList<String> directorsList = new ArrayList<String> ();\n for (String director : countMoviesByDirector.keySet()) {\n if (countMoviesByDirector.get(director) == maxNumOfMovies) {\n directorsList.add(director);\n }\n }\n \n System.out.println(\"Número máximo de películas dirigidas por un director: \" + maxNumOfMovies);\n System.out.println(\"Los directores que dirigieron mas películas son \" + directorsList);\n }", "public void checkTimes(){\r\n\t\tcal = Calendar.getInstance();\r\n\t\t//if(alarmList.size() != 0){\r\n\t\tfor(int i = 0; i < alarmList.size(); i++){\r\n\t\t\tAlarmTime current = alarmList.get(i);\r\n\t\t\tif(current.getYear() == cal.get(Calendar.YEAR) && current.getMonth() == cal.get(Calendar.MONTH)\r\n\t\t\t\t\t&& current.getDay() == cal.get(Calendar.DAY_OF_MONTH) && current.getHour() == cal.get(Calendar.HOUR_OF_DAY)\r\n\t\t\t\t\t&& current.getMinute() <= cal.get(Calendar.MINUTE)){\r\n\t\t\t\t//display alarm / play sound\r\n\t\t\t\t\t//alarmList.get(i).setActive(true);\r\n\t\t\t\t\tcurrent.setActive(true);\r\n\t\t\t\t//if(!alarmList.get(i).isActive){\t\t\t\t\t//this can be removed if it needs to repeatedly go off\r\n\r\n//\t\t\t\t\tif(!(activeAlarms.contains(alarmList.get(i)))){\r\n//\t\t\t\t\t\tactiveAlarms.add(alarmList.get(i));\r\n//\t\t\t\t\t}\r\n\t\t\t\t\tif(!(activeAlarms.contains(current))){\r\n\t\t\t\t\t\tactiveAlarms.add(current);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(alarmList.get(i).getMinute());\r\n\t\t\t\t\t//System.out.println(current.getMinute());\r\n\t\t\t\t\tring = new AlarmRingDesign(alarmList.get(i).getMessage(), this, alarmList.get(i));\r\n\t\t\t\t\tring.init();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//do nothing\r\n\t\t\t}\r\n\t\t}\r\n\t//}\r\n\t}", "@Override\n public int compareTo(Record o) {\n if (this.result - o.result > 0) {\n return 1;\n } else if (this.result - o.result < 0) {\n return -1;\n } else {\n // press time: the less, the better.\n if (this.pressTime < o.pressTime) {\n return 1;\n } else if (this.pressTime > o.pressTime) {\n return -1;\n } else {\n // total times: the more, the better.\n if (this.totalTimes > o.totalTimes) {\n return 1;\n } else if (this.totalTimes < o.totalTimes) {\n return -1;\n }\n return 0;\n }\n }\n }", "public static Driver findFirstDriver(String time,String driverIds){\n\t\tDriver newDriver = null;\n\t\tMap<Integer,Integer> slotWrtDriverMap = new HashMap<Integer, Integer>();\n\n\t\tArrayList<Integer> slotIds = new ArrayList<Integer>();\n\t\ttry {\n\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\tSQL:{\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tResultSet resultSet = null;\n\n\t\t\t\tString sql =\"select slot_id, driver_id, time_slot_from from fapp_driver_slots where driver_id IN \"+driverIds;\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement= connection.prepareStatement(sql);\n\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\twhile (resultSet.next() ) {\n\t\t\t\t\t\tString timeSlotFrom = resultSet.getString(\"time_slot_from\");\n\t\t\t\t\t\tint slotId = resultSet.getInt(\"slot_id\");\n\t\t\t\t\t\tint driverId = resultSet.getInt(\"driver_id\");\n\t\t\t\t\t\tslotWrtDriverMap.put(slotId, driverId);\n\n\t\t\t\t\t\tif(timeSlotFrom.startsWith(time)){\n\t\t\t\t\t\t\t//String driver = String.valueOf(slotId)+\"$\"+timeSlotFrom+\"$\"+String.valueOf(driverId);\n\t\t\t\t\t\t\tslotIds.add(slotId);\n\t\t\t\t\t\t\t//timeSlotList.add(driver);\n\t\t\t\t\t\t}\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}finally{\n\t\t\t\t\tif(preparedStatement!=null){\n\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.sort(slotIds);\n\t\t\tSystem.out.println(\"Priorities :: \"+slotIds);\n\t\t\t//System.out.println(timeSlotList);\n\t\t\tint slotId = 0;\n\t\t\tfor(int i=0;i<slotIds.size();i++){\n\t\t\t\tSystem.out.println(\"Priority \"+i+\" \"+slotIds.get(i));\n\t\t\t\tslotId = slotIds.get(0);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Randomly select driver\n\t\t\t */\n\t\t\tRandom rand = new java.util.Random();\n\t\t\tint r ;\n\t\t\tr = rand.nextInt(slotIds.size());\n\t\t\tslotId = slotIds.get(r);\n\n\t\t\tint boyId =0;\n\t\t\tboyId = slotWrtDriverMap.get(slotId);\n\t\t\tSystem.out.println(\"Driver data from priority::\"+boyId);\n\n\t\t\tSystem.out.println(\"boy id = \"+boyId);\n\t\t\tSQL:{\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tResultSet resultSet = null;\n\t\t\t\tString sql =\"select delivery_boy_name,delivery_boy_phn_number,delivery_boy_user_id \"\n\t\t\t\t\t\t+ \"from vw_delivery_boy_data where delivery_boy_id=?\";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement=connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setInt(1, boyId);\n\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\tString driverUserId = (resultSet.getString(\"delivery_boy_user_id\"));\n\t\t\t\t\t\tString driverName = (resultSet.getString(\"delivery_boy_name\"));\n\t\t\t\t\t\tString contactNo =(resultSet.getString(\"delivery_boy_phn_number\"));\n\t\t\t\t\t\tnewDriver = new Driver(driverName, driverUserId, contactNo);\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}finally{\n\t\t\t\t\tif(preparedStatement!=null){\n\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t}\n\t\t\t\t\tif(connection!=null){\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn newDriver;\n\t}", "public Double getBestTime() {\n return bestTime;\n }", "public Schedule heuristicScheduling() \n\t{ \n\t\t// this creates an array, originally empty, of all the tasks scheduled in the heuristic manner\n\t\tScheduledTask[] heuristic = new ScheduledTask[tasks.length];\n\t\n\t\t// this creates an array that holds the duration of tasks on every processor\n\t\tint[] processorDuration = new int[m];\n\t\t\n\t\t// this creates a clone of the tasks array so that it can be messed with\n\t\tint[] junkTasks = tasks.clone();\n\t\t\n\t\t// this is the index of how many tasks have already been scheduled\n\t\tint index = 0;\n\t\t\n\t\twhile (index < tasks.length)\n\t\t{\n\t\t\t// this is the index of the processor with the smallest duration\n\t\t\tint smallestIndex = 0;\n\t\t\t\n\t\t\t// this finds the processor with the smallest duration\n\t\t\tfor (int i = 0; i < m; i++)\n\t\t\t{\n\t\t\t\tif (processorDuration[i] < processorDuration[smallestIndex])\n\t\t\t\t\tsmallestIndex = i;\n\t\t\t}\n\t\t\t\n\t\t\t// this is the id of the task with the largest duration\n\t\t\tint largestIndex = 0;\n\n\t\t\t// this finds the task with the largest duration\n\t\t\tfor (int i = 0; i < junkTasks.length; i++)\n\t\t\t{\n\t\t\t\tif (junkTasks[i] > junkTasks[largestIndex])\n\t\t\t\t\tlargestIndex = i;\n\t\t\t}\n\t\t\t\n\t\t\t// this schedules the task with the largest duration at the processor with the smallest duration\n\t\t\t// and assigns it to heuristic array at the index\n\t\t\theuristic[index] = new ScheduledTask(largestIndex, smallestIndex);\n\t\t\t\n\t\t\t// this increments the duration of the processor to which the task just got assigned\n\t\t\tprocessorDuration[smallestIndex] += tasks[largestIndex];\n\t\t\t\n\t\t\t// this sets the duration of the task that was just scheduled to zero\n\t\t\tjunkTasks[largestIndex] = 0;\n\t\t\t\n\t\t\t// this increments the index since another task just got assigned\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\treturn new Schedule(tasks, m, heuristic);\n\t}", "public void updateBestTime(int room_idx){\n float time = rooms[room_idx].getTimer();\n if (time<bestTime[room_idx]){bestTime[room_idx]=time;}\n curTime[room_idx] = time;\n rooms[room_idx].resetTimer();\n }", "public int compare(mess m){\n if (m.get_avail()!=this.get_avail()){\r\n \t//System.out.println(\"yes\");\r\n if (m.get_avail()>this.get_avail())return 1;\r\n else return -1;\r\n }\r\n else if (m.get_nutrition()!=this.get_nutrition()){\r\n \t//System.out.println(m.get_nutrition()+\" \"+this.get_nutrition());\r\n if (m.get_nutrition()>this.get_nutrition())return 1;\r\n else return -1;\r\n }\r\n else if (m.get_hygiene()!=this.get_hygiene()){\r\n if (m.get_hygiene()>this.get_hygiene())return 1;\r\n else return -1;\r\n }\r\n else{\r\n if (m.get_deliv()<this.get_deliv())return 1;\r\n else return -1;\r\n }\r\n }", "public static int searchForIntervalBoundary(long time) {\n\n int intakeIndex = 1;\n\n for (int i = theirIntakes.size() - 1; i > 0; i--) {\n if (theirIntakes.get(i).getCreationTime() < time) {\n intakeIndex = i;\n break;\n }\n }\n\n return intakeIndex;\n\n }", "@Override\n\t\tpublic int compare(RankingEntry o1, RankingEntry o2) {\n\t\t\tif (o2.getMurderCount() == o1.getMurderCount()) {\n\t\t\t\treturn o1.getDeathCount() - o2.getDeathCount();\n\t\t\t}\n\t\t\treturn o2.getMurderCount() - o1.getMurderCount();\n\t\t}", "@Override\n public int getFinalBeat() {\n List<Note> currentNotes = this.getNotes();\n int size = currentNotes.size();\n int farthestBeat = 0;\n\n for (int i = 0; i < size; i++) {\n Note currentNote = currentNotes.get(i);\n int currentEnd = currentNote.getBeat() + currentNote.getDuration();\n\n if (currentEnd > farthestBeat) {\n farthestBeat = currentEnd;\n }\n }\n return farthestBeat;\n }", "public Moment getOverallHappiestMoment(){\n\t\tMoment happiestMoment = null;\n\t\tfloat happiest = 0;\n\t\tfor(Moment moment: moments){\n\t\t\tfloat totalHappiness = 0;\n\t\t\tfor(float smileValue: moment.getSmileValues()){\n\t\t\t\ttotalHappiness += smileValue;\n\t\t\t}\n\t\t\tfinal float averageHappiness = totalHappiness/moment.getSmileValues().size();\n\t\t\tif(averageHappiness > happiest){\n\t\t\t\thappiest = averageHappiness;\n\t\t\t\thappiestMoment = moment;\n\t\t\t}\n\t\t}\n\t\treturn happiestMoment;\n\t}", "public int[] coldM(ArrayList<LottoDay> list)\n\t{\n\t\tint counter=0; //counts occurrences\n\t\tint low=200; //sets low to 200\n\t\tint [] megaF = new int [28]; //creates an array to store occurrences of mega numbers\n\t\tint[] check = new int [5]; //creates an array to store lowest mega numbers\n\t\tfor(int i=0; i<list.size();i++)\n\t\t{\n\t\t\tone = list.get(i);//get object\n\t\t\tmega= one.getMega();//get the mega number of the object\n\t\t\tfor(int j=0; j<megaF.length;j++)\n\t\t\t{\n\t\t\t\t//if mega number equals index\n\t\t\t\tif(mega==j)\n\t\t\t\t{\n\t\t\t\t\tcounter++; //add one to count\n\t\t\t\t\tmegaF[j]=counter+megaF[j]; //add one to occurrence\n\t\t\t\t\tcounter=0; //reset counter\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\t\tlow=200;//resets low\n\t\t//looks for the lowest number in the mega number array\n\t\tfor(int j=0; j<check.length;j++)\n\t\t{\n\t\t\tfor(int i=0; i<megaF.length;i++)\n\t\t\t{\n\t\t\t\t//if mega number is not zero and the occurrence is lower than low\n\t\t\t\tif(megaF[i]<low &&megaF[i]!=0)\n\t\t\t\t{\n\t\t\t\t\tlow = megaF[i]; //occurrence becomes new low\n\t\t\t\t\tindex=i;//store index\n\t\t\t\t\tcheck[j]=i;//store the mega number\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tlow=200;//reset low\n\t\t\tmegaF[index]=0;//set occurrence of the number to zero\n\t\t}\n\t\t//return 5 lowest mega numbers\n\t\treturn check;\n\t}", "public static Hashtable<Long, ArrayList<CollisionPair>> checkCollision(\n Asteroid[] asteroids, long max_time, long real_time, long time_limit) {\n int n = asteroids.length;\n Point[] asteroid_future_positions = new Point[n];\n\n // Search for collision with other asteroids\n double[][] radius_matrix = new double[n][n];\n\n // Not we're only computing total radius for all i<j to save computation time\n for (int i = 0; i < n; i++) {\n for (int j = i+1; j < n; j++) {\n radius_matrix[i][j] = asteroids[i].radius() + asteroids[j].radius();\n }\n }\n\n Hashtable<Long, ArrayList<CollisionPair>> collisions = new Hashtable<Long, ArrayList<CollisionPair>>();\n\n for (long dt = 0; dt <= max_time; dt++) {\n long t = real_time + dt;\n if (t >= time_limit) {\n break;\n }\n\n ArrayList<CollisionPair> collisions_at_t = new ArrayList<CollisionPair>();\n\n for (int i = 0; i < n; i++) {\n long epoch = asteroids[i].epoch;\n asteroids[i].orbit.positionAt(t - epoch, asteroid_future_positions[i]);\n }\n\n // Find lowest energy collision and return push to the simulator\n // Not we're only checking distance for all i<j to save computation time\n for (int i = 0; i < n; i++) {\n for (int j = i+1; j < n; j++) {\n if (Point.distance(asteroid_future_positions[i], asteroid_future_positions[j])\n < radius_matrix[i][j]) {\n CollisionPair collision = new CollisionPair();\n collision.asteroid1_index = i;\n collision.asteroid2_index = j;\n collisions_at_t.add(collision);\n }\n }\n }\n\n // If there was a collision at this time, add it to the table\n if (!collisions_at_t.isEmpty()) {\n // TODO: Sort collisions by some metric\n collisions.put(t, collisions_at_t);\n }\n }\n\n return collisions;\n }", "public static int[] creepsEachMinute(Match match, int participantId)\n {\n int length = match.getTimeline().getFrames().size();\n \n int[] totalCreepsAtMin = new int[length];\n \n for(int i = 0; i<length; i++)\n {\n totalCreepsAtMin[i] = match.getTimeline().getFrames().get(i).getParticipantFrames().get(participantId).getMinionsKilled();\n }\n \n return totalCreepsAtMin;\n \n }", "@Override\n\tpublic int compareTo(Time t) {\n\t\tif (this.getIndex() < t.getIndex())\n\t\t\treturn 1;\n\t\telse if (this.getIndex() == t.getIndex())\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn -1;\n\t}" ]
[ "0.53885883", "0.5353944", "0.53388697", "0.51545984", "0.51227224", "0.50913876", "0.5064817", "0.50626343", "0.49780738", "0.4974674", "0.49396682", "0.4934102", "0.49187952", "0.48911", "0.4853045", "0.48436767", "0.48352742", "0.4831015", "0.4817925", "0.4813103", "0.48083282", "0.48053408", "0.47836745", "0.47764885", "0.47761056", "0.47756767", "0.47720063", "0.4742996", "0.4731558", "0.47314677", "0.47252923", "0.47035742", "0.4694492", "0.46933576", "0.4690035", "0.46849892", "0.46842688", "0.467818", "0.4676454", "0.46677116", "0.46486953", "0.4645248", "0.46349657", "0.4630858", "0.46297845", "0.46243072", "0.46179232", "0.46042055", "0.45975533", "0.45940602", "0.45866513", "0.4579023", "0.45757294", "0.45714724", "0.45704257", "0.45616603", "0.45595953", "0.45579994", "0.45558178", "0.45523202", "0.45333445", "0.4523641", "0.45196807", "0.45190012", "0.451213", "0.450801", "0.4498238", "0.44970295", "0.44893676", "0.4487284", "0.44865203", "0.44797525", "0.44756597", "0.44728875", "0.44676337", "0.44667894", "0.44645396", "0.4463601", "0.4457487", "0.44546783", "0.44545704", "0.44535732", "0.4452935", "0.44526598", "0.44466093", "0.44378194", "0.44341835", "0.44269288", "0.44232285", "0.4415504", "0.44128305", "0.44114572", "0.44065008", "0.4401021", "0.43816435", "0.43808717", "0.43763644", "0.43756276", "0.43737656", "0.4367159", "0.43615323" ]
0.0
-1
Result is 148734 Part 2 Example Matrix where x are the minutes and y are the guard IDs 000000000011111111112222222222333333333344444444445555555555 012345678901234567890123456789012345678901234567890123456789 10 .....11111111111111111112111101111111111111111111111111..... 99 ....................................1111222223222211111..... The result is the ID of the guard times the minute you chose (e.g. 99 45 = 4455)
@Test public void test_sleep_count_matrix(){ List<GuardStatus> list = Four.sortInputByDate(Four.readInputAndParse("src/main/java/AoC2018/four/out2")); Four.buildSleepCountMatrix(list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String findMaximumValidTime1(int a, int b, int c, int d) {\n int[] arr = {a,b,c,d};\n int maxHr = -1;\n int hr_i = 0, hr_j = 0;\n\n //Find maximum HR\n for(int i=0; i < arr.length; i++){\n for(int j=i+1; j < arr.length; j++){\n int value1 = arr[i] * 10 + arr[j];\n int value2 = arr[j] * 10 + arr[i];\n if(value1 < 24 && value2 < 24){\n if(value1 > value2 && value1 > maxHr) {\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 > value1 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n }else if(value1 < 24 && value2 > 24 && value1 > maxHr){\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 < 24 && value1 > 24 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n\n }\n }\n System.out.println(maxHr);\n\n //Find maximum MM\n int[] mArr = new int[2]; //minutes array\n int k=0;\n for(int i=0; i < arr.length; i++){\n if(i != hr_i && i != hr_j){\n mArr[k++] = arr[i];\n }\n }\n\n System.out.println(Arrays.toString(mArr));\n int maxMin = -1;\n int val1 = mArr[0] * 10 + mArr[1];\n int val2 = mArr[1] * 10 + mArr[0];\n\n if(val1 < 60 && val2 < 60){\n maxMin = Math.max(val1,val2);\n }else if(val1 < 60 && val2 > 60) {\n maxMin = val1;\n }else if(val2 < 60 && val1 > 60){\n maxMin = val2;\n }\n System.out.println(maxMin);\n\n //Create answer\n StringBuilder sb = new StringBuilder();\n if(maxHr == -1 || maxMin == -1){\n return \"Not Possible\";\n }\n\n if(Integer.toString(maxHr).length() < 2){ //HR\n sb.append(\"0\"+maxHr+\":\");\n }else {\n sb.append(maxHr+\":\");\n }\n\n if(Integer.toString(maxMin).length() < 2){ //MM\n sb.append(\"0\"+maxMin);\n }else {\n sb.append(maxMin);\n }\n\n return sb.toString();\n }", "public static void addTimingPatterns(int[][] matrix) {\n\t\t\n\t\tfinal int STOP_INDEX = matrix.length - 8;\n\t\t// Horizontal line on the 6th row\n\t\t// Starts at 8th column, ends 8 cols before the end\n\t\tfor (int i = 8; i < STOP_INDEX; ++i) {\n\t\t\tmatrix[i][6] = (i % 2 == 0) ? B : W;\n\t\t}\n\t\t\n\t\t// Vertical line on the 6th column\n\t\t// Starts at 8th row, ends 8 rows before the end\n\t\tfor (int j = 8; j < STOP_INDEX; ++j) {\n\t\t\tmatrix[6][j] = (j % 2 == 0) ? B : W;\n\t\t}\n\t}", "public static long[][] testSet(){\n return new long[][]{{0, 1}, {1, 1},\n {2, 2}, {3, 6}, {4, 24}, {5, 120}, {6, 720}, {7,5040},\n {8, 40320}, {9, 362880}, {10, 3628800}, {11, 39916800},\n {12, 479001600}, {13, 6227020800L}, {14, 87178291200L},\n {15, 1307674368000L}, {16, 20922789888000L},\n {17, 355687428096000L}, {18, 6402373705728000L},\n {19, 121645100408832000L}, {20, 2432902008176640000L}\n };\n }", "public static int[] calculate(String[] in){\n int[] output = new int[in.length];\n //(int)line is added the value of x every y line is calculated\n int line =0;\n for (int i = 0; i < y; i++) {\n //repeat for length of x\n for (int j = 0+line; j < x+line; j++) {\n //If a mine is found\n if (in[j].equals(\"*\")){\n output[j]=9;\n //left\n if (j>=1+(line)) {\n output[j-1]++;\n //up\n if (j-x>=0) {\n output[j-(x+1)]++;\n }\n //down\n if ((j+x)<(x*y)) {\n output[j+(x-1)]++;\n }\n }\n //right\n if (j-(line)<(x-1)) {\n output[j+1]++;\n //up\n if (j-x>=0) {\n output[j-(x-1)]++;\n }\n //down\n if ((j+x)<(x*y)) {\n output[j+(x+1)]++;\n }\n }\n\n //up\n if (j-x>=0) {\n output[j-x]++;\n }\n //down\n if ((j+x)<(x*y)) {\n output[j+x]++;\n }\n\n }\n }\n line+=x;\n }\n return output;\n }", "private static void countRiddle(int[][] a, int m) {\n for (int i=0; i<9; ++i) {\n for (int j=0; j<9; ++j) {\n a[i][j] = ( a[i][j] * m ) % 9 + 1;\n }\n }\n }", "private void buildMatrix() {\n\n int totalnumber=this.patents.size()*this.patents.size();\n\n\n\n int currentnumber=0;\n\n\n for(int i=0;i<this.patents.size();i++) {\n ArrayList<Double> temp_a=new ArrayList<>();\n for (int j=0;j<this.patents.size();j++) {\n if (i==j) temp_a.add(0.0); else if (i<j)\n {\n double temp = distance.distance(this.patents.get(i), this.patents.get(j));\n temp = (new BigDecimal(temp).setScale(2, RoundingMode.UP)).doubleValue();\n temp_a.add(temp);\n\n\n // simMatrix.get(i).set(j, temp);\n // simMatrix.get(j).set(i, temp);\n } else {\n temp_a.add(simMatrix.get(j).get(i));\n }\n currentnumber++;\n System.out.print(\"\\r\"+ProgressBar.barString((int)((currentnumber*100/totalnumber)))+\" \"+currentnumber);\n\n }\n simMatrix.add(temp_a);\n }\n System.out.println();\n\n }", "private Object[][] MakeTableTime(int interval) {\n\t\tint hours = 0;\n\t\tint minutes = 0;\n\t\tArrayList<Object[]> timeSlots = new ArrayList<Object[]>();\n\t\tfor (minutes = 0; hours < 24; minutes = minutes + interval) {\n\t\t\tif (minutes >= 60) {\n\t\t\t\thours++;\n\t\t\t\tminutes = minutes - 60;\n\t\t\t}\n\t\t\tObject[] timeSlot = new Object[] { String.format(\"%02d\", hours) + \" : \" + String.format(\"%02d\", minutes) };\n\t\t\ttimeSlots.add(timeSlot);\n\t\t}\n\n\t\treturn (Object[][]) timeSlots.toArray(new Object[timeSlots.size()][]);\n\t}", "public void run(){\n\t\tlong start_time, end_time, time_elapsed;\n System.out.println(\"Starting Problem \"+problem_number);\n start_time = System.currentTimeMillis();\n\t\t\n\t\tint matrixRows = 20;\n\t\tint matrixColumns = 20;\n\t\tint counter = 0;\n\t\tint num_of_adj = 4;\n\t\tString source = \"08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48\";\n\t\t\n\t\tString[] individualNums = source.split(\" \");\n\t\tmyMatrix m = new myMatrix(matrixRows, matrixColumns);\n\t\tArrayList<Integer> highest_factors = new ArrayList<Integer>();\n\t\tint highest_factor_product = 0;\n\t\tint temp_highest_factor_product = 1;\n\t\t\n\t\tfor(int i=0; i<m.getNumOfRows(); i++){\n\t\t\tfor(int j=0; j<m.getNumOfColumns(); j++){\t\t\t\t\n\t\t\t\tm.setMatrixEntry(i, j, Integer.valueOf(individualNums[counter]));\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(m);\n\t\t\n\t\t//up and down products\n\t\tfor(int i=0; i<m.getNumOfRows()-num_of_adj; i++){\t\t\t\n\t\t\tfor(int j=0; j<m.getNumOfColumns(); j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i+k, j);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i+k, j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//left and right products\n\t\tfor(int i=0; i<m.getNumOfRows(); i++){\t\t\t\n\t\t\tfor(int j=0; j<m.getNumOfColumns()-num_of_adj; j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i, j+k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i, j+k));\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//NW to SE diagonals\n\t\tfor(int i=0; i<m.getNumOfRows()-num_of_adj; i++){\t\t\t\n\t\t\tfor(int j=0; j<m.getNumOfColumns()-num_of_adj; j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i+k, j+k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i, j+k));\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//SW to NE diagonals\n\t\tfor(int i=0+num_of_adj-1; i<m.getNumOfRows(); i++){\t\t\t\n\t\t\tfor(int j=0+num_of_adj-1; j<m.getNumOfColumns(); j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i-k, j+k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i-k, j+k));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(highest_factor_product + \"\\n\\n\" + highest_factors);\n\t\t\n\t\tend_time = System.currentTimeMillis();\n System.out.println(\"Finished Problem\");\n time_elapsed = end_time - start_time;\n System.out.println(\"Time taken to finish problem: \"+time_elapsed);\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test135() throws Throwable {\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n int[][] intArray0 = new int[7][8];\n int[] intArray1 = new int[0];\n intArray0[1] = intArray0[0];\n int[] intArray2 = new int[0];\n intArray0[2] = intArray2;\n int[] intArray3 = new int[6];\n intArray3[1] = 0;\n String string0 = resultMatrixGnuPlot0.doubleToString(0, 0);\n assertEquals(\"0.\", string0);\n \n intArray3[2] = 2;\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n resultMatrixSignificance0.getRevision();\n int int0 = ResultMatrix.SIGNIFICANCE_TIE;\n int int1 = resultMatrixSignificance0.getSignificance(2469, 0);\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, int1);\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n }", "public static ArrayList<ArrayList<String>> generateMatrixBRI()\r\n {\r\n\tArrayList<ArrayList<String>> binomialRapInterval = new ArrayList<>();\r\n\tArrayList<String> r = null;\r\n\t\r\n\tfor(int i=0; i<12; i++)\r\n\t{\r\n r = new ArrayList<>();\r\n if(i == 0)\r\n { \r\n r.add(0, \"P1\");\r\n r.add(1, \"d2\");\r\n r.add(2, \"3d3\");\r\n r.add(3, \"5d4\");\r\n r.add(4, \"5A5\");\r\n r.add(5, \"3A6\");\r\n r.add(6, \"A7\");\r\n }\r\n\r\n if(i == 1)\r\n {\r\n r.add(0, \"A1\");\r\n r.add(1, \"m2\");\r\n r.add(2, \"2d3\");\r\n r.add(3, \"4d4\");\r\n r.add(4, \"6A5\");\r\n r.add(5, \"4A6\");\r\n r.add(6, \"2A7\");\r\n }\r\n\r\n if(i == 2)\r\n {\r\n r.add(0, \"2A1\");\r\n r.add(1, \"M2\");\r\n r.add(2, \"d3\");\r\n r.add(3, \"3d4\");\r\n r.add(4, \"5d5\");\r\n r.add(5, \"5A6\");\r\n r.add(6, \"3A7\");\r\n }\r\n\r\n if(i == 3)\r\n {\r\n r.add(0, \"3A1\");\r\n r.add(1, \"A2\");\r\n r.add(2, \"m3\");\r\n r.add(3, \"2d4\");\r\n r.add(4, \"4d5\");\r\n r.add(5, \"5d6\");\r\n r.add(6, \"4A7\");\r\n }\r\n\r\n if(i == 4)\r\n {\r\n r.add(0, \"4A1\");\r\n r.add(1, \"2A2\");\r\n r.add(2, \"M3\");\r\n r.add(3, \"d4\");\r\n r.add(4, \"3d5\");\r\n r.add(5, \"4d6\");\r\n r.add(6, \"5A7\");\r\n }\r\n\r\n if(i == 5)\r\n {\r\n r.add(0, \"5A1\");\r\n r.add(1, \"3A2\");\r\n r.add(2, \"A3\");\r\n r.add(3, \"P4\");\r\n r.add(4, \"2d5\");\r\n r.add(5, \"3d6\");\r\n r.add(6, \"5d7\");\r\n }\r\n\r\n if(i == 6)\r\n {\r\n r.add(0, \"6A1\");\r\n r.add(1, \"4A2\");\r\n r.add(2, \"2A3\");\r\n r.add(3, \"A4\");\r\n r.add(4, \"d5\");\r\n r.add(5, \"2d6\");\r\n r.add(6, \"4d7\");\r\n }\r\n\r\n if(i == 7)\r\n {\r\n r.add(0, \"5d1\");\r\n r.add(1, \"5A2\");\r\n r.add(2, \"3A3\");\r\n r.add(3, \"2A4\");\r\n r.add(4, \"P5\");\r\n r.add(5, \"d6\");\r\n r.add(6, \"3d7\");\r\n }\r\n\r\n if(i == 8)\r\n {\r\n r.add(0, \"4d1\");\r\n r.add(1, \"5d2\");\r\n r.add(2, \"4A3\");\r\n r.add(3, \"3A4\");\r\n r.add(4, \"A5\");\r\n r.add(5, \"m6\");\r\n r.add(6, \"2d7\");\r\n }\r\n\r\n if(i == 9)\r\n {\r\n r.add(0, \"3d1\");\r\n r.add(1, \"4d2\");\r\n r.add(2, \"5A3\");\r\n r.add(3, \"4A4\");\r\n r.add(4, \"2A5\");\r\n r.add(5, \"M6\");\r\n r.add(6, \"d7\");\r\n }\r\n\r\n if(i == 10)\r\n {\r\n r.add(0, \"2d1\");\r\n r.add(1, \"3d2\");\r\n r.add(2, \"5d3\");\r\n r.add(3, \"5A4\");\r\n r.add(4, \"3A5\");\r\n r.add(5, \"A6\");\r\n r.add(6, \"m7\");\r\n }\r\n\r\n if(i == 11)\r\n {\r\n r.add(0, \"d1\");\r\n r.add(1, \"2d2\");\r\n r.add(2, \"4d3\");\r\n r.add(3, \"6A4\");\r\n r.add(4, \"4A5\");\r\n r.add(5, \"2A6\");\r\n r.add(6, \"M7\");\r\n }\r\n binomialRapInterval.add(r);\r\n\t}\r\n\treturn binomialRapInterval;\r\n }", "private void genShotMap(int[] shotMapGlob, int[] board, int xShot, int yShot){\n\t\tint i, xOff, yOff;\n\t\tfor(i = 0; i < shotMapGlob.length; i++){\n\t\t\tshotMapGlob[i] = -1;\n\t\t}\n\n\t\tshotMapGlob[yShot*GRID+xShot] = -99999;\n\t\tfor(int[] offset : MATRIX){\n\t\t\tfor(yOff = yShot+offset[0], xOff = xShot+offset[1]; (yOff > -1 && yOff < 10) && (xOff > -1 && xOff < 10); yOff += offset[0], xOff += offset[1]){\n\t\t\t\tif(board[yOff*GRID+xOff] == 0){\n\t\t\t\t\tshotMapGlob[yOff*GRID+xOff] = (((yOff&0xf) << 4) | xOff&0xf); // Rather than calling encode, doing it inline\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static int[] getTimesTable(int requiredSize, int requiredNumber) \n\t{\n\t\t// local array for the loop to amend and then return\n\t\tint [] timesArray = new int [requiredSize];\n\t\n\t\tfor (int i = 1; i <= requiredSize; i++)\n\t\t{\n\t\t\t// amends the local timesArray array\n\t\t\ttimesArray[i -1] = requiredNumber * i; \n\t\t\t//System.out.println(timesArray[i -1] = requiredNumber * i); // testing purposes so you can see the value before ammending the array\n\t\t}\n\t\t\n\t\t// returns local array as result for the main method array\n\t\treturn timesArray;\n\t}", "private double[][] xInitialization() {\n /* if (getTextToDouble(textX0)>=getTextToDouble(textX1))\n JOptionPane.showMessageDialog(null,\"X0 count can't be grater than X1 count\",\"Error message\",JOptionPane.ERROR_MESSAGE);\n */\n final double h = (getTextToDouble(textX1) - getTextToDouble(textX0)) / ( 2*getTextToDouble(textN));\n double[][] massOfY = new double[2][];\n massOfY[0] = new double[(int) getTextToDouble(textN)];\n massOfY[1] = new double[(int) getTextToDouble(textN) - 1];\n\n for (int i = 1; i <= 2*getTextToDouble(textN)-1; i++) {\n double x = getTextToDouble(textX0)+i*h;\n if (i%2!=0)\n massOfY[0][i / 2] = x;\n else\n massOfY[1][i / 2 - 1] = x;\n }\n\n return massOfY;\n }", "int getMoistureCode(int x, int y);", "public static C4924a m83577Hm() {\n C4924a c4924a = new C4924a();\n c4924a.xDb = new Field[2];\n c4924a.columns = new String[3];\n StringBuilder stringBuilder = new StringBuilder();\n c4924a.columns[0] = \"logId\";\n c4924a.xDd.put(\"logId\", \"INTEGER PRIMARY KEY \");\n stringBuilder.append(\" logId INTEGER PRIMARY KEY \");\n stringBuilder.append(\", \");\n c4924a.xDc = \"logId\";\n c4924a.columns[1] = \"liftTime\";\n c4924a.xDd.put(\"liftTime\", \"LONG\");\n stringBuilder.append(\" liftTime LONG\");\n c4924a.columns[2] = \"rowid\";\n c4924a.sql = stringBuilder.toString();\n return c4924a;\n }", "static int[][] generateShifts(int maxDistanceLeft, ThreadVariables t){\n return null;\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n ExpressionMatrixImpl expressionMatrixImpl0 = new ExpressionMatrixImpl();\n int int0 = expressionMatrixImpl0.getValue(21, 720);\n assertEquals((-1), int0);\n }", "public static int[] creepsEachMinute(Match match, int participantId)\n {\n int length = match.getTimeline().getFrames().size();\n \n int[] totalCreepsAtMin = new int[length];\n \n for(int i = 0; i<length; i++)\n {\n totalCreepsAtMin[i] = match.getTimeline().getFrames().get(i).getParticipantFrames().get(participantId).getMinionsKilled();\n }\n \n return totalCreepsAtMin;\n \n }", "public void generateMatrix() {\n\n flow = new int[MATRIX_TAM][MATRIX_TAM];\n loc = new int[MATRIX_TAM][MATRIX_TAM];\n\n for (int i = 0; i < MATRIX_TAM; i++) {\n for (int j = 0; j < MATRIX_TAM; j++) {\n\n //fill the distances matrix\n if (i != j) {\n loc[i][j] = rn.nextInt(MAX_DISTANCE - MIN_DISTANCE + 1) + MIN_DISTANCE;\n } else {\n loc[i][j] = 0;\n }\n\n //fill the flow matrix\n if (i != j) {\n flow[i][j] = rn.nextInt(MAX_FLOW - MIN_FLOW + 1) + MIN_FLOW;\n } else {\n flow[i][j] = 0;\n }\n\n }\n }\n\n }", "static double[][] makeTestData() {\n double[][] data = new double[21][2];\n double xmax = 5;\n double xmin = -5;\n double dx = (xmax - xmin) / (data.length -1);\n for (int i = 0; i < data.length; i++) {\n double x = xmin + dx * i;\n double y = 2.5 * x * x * x - x * x / 3 + 3 * x;\n data[i][0] = x;\n data[i][1] = y;\n }\n return data;\n }", "public static Matrix generate(int[] measurementGroupings) {\n\t\t\n\t\tint numRows = measurementGroupings.length;\n\t\t\n\t\tMap<Integer, List<Integer>> measurementGroups = \n\t\t\tnew HashMap<Integer, List<Integer>>();\n\t\tList<Integer> groupIndicies = new LinkedList<Integer>();\n\t\t\n\t\tfor(int i=0; i<numRows; i++){\n\t\t\tInteger groupIndex = new Integer(measurementGroupings[i]);\n\t\t\tList<Integer> group = measurementGroups.get(groupIndex);\n\t\t\tif (group == null) {\n\t\t\t\tgroup = new LinkedList<Integer>();\n\t\t\t\tmeasurementGroups.put(groupIndex, group);\n\t\t\t\tgroupIndicies.add(groupIndex);\n\t\t\t}\n\t\t\tgroup.add(new Integer(i));\n\t\t}\n\t\t\n\t\tMatrix transformMatrix = new Matrix(numRows - groupIndicies.size(), \n\t\t\t\tnumRows, 0);\n\t\t\n\t\tint rowNumber = 0;\n\t\tint groupNumber = 0;\n\t\tfor(Integer groupIndex : groupIndicies) {\n\t\t\tIterator<Integer> group = measurementGroups.get(groupIndex).iterator();\n\t\t\tint groupMember = group.next().intValue();\n\t\t\twhile(group.hasNext()){\n\t\t\t\ttransformMatrix.set(rowNumber, groupMember, 1);\n\t\t\t\tgroupMember = group.next().intValue();\n\t\t\t\ttransformMatrix.set(rowNumber, groupMember, -1);\n\t\t\t\trowNumber++;\n\t\t\t}\n\t\t\tgroupNumber++;\n\t\t}\n\t\t\n\t\treturn transformMatrix;\n\t}", "public static int[] goldEachMinute(Match match, int participantId)\n {\n int length = match.getTimeline().getFrames().size();\n \n int[] totalGoldAtMin = new int[length];\n \n for(int i = 0; i<length; i++)\n {\n totalGoldAtMin[i] = match.getTimeline().getFrames().get(i).getParticipantFrames().get(participantId).getTotalGold();\n }\n \n return totalGoldAtMin;\n \n }", "public static int[][] BuildMatrix(String X, String Y)\r\n\t{\r\n\t\tint row = X.length()+1;\r\n\t\tint col = Y.length()+1;\r\n\t\tint mat[][] = new int[row][col];\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tfor(i = 0; i < row; i++)\r\n\t\t{\r\n\t\t\tmat[i][0] = 0;\r\n\t\t}\r\n\t\tfor(j=0; j < col; j++) \r\n\t\t{\r\n\t\t\tmat[0][j] = 0;\r\n\t\t}\r\n\t\tfor(i=1; i < row; i++) \r\n\t\t{\r\n\t\t\tfor(j=1; j < col; j++) \r\n\t\t\t{\r\n\t\t\t\tif(X.charAt(i-1) == Y.charAt(j-1))\r\n\t\t\t\t\tmat[i][j] = mat[i-1][j-1] +1;\r\n\t\t\t\telse\r\n\t\t\t\t\tmat[i][j] = Math.max(mat[i-1][j], mat[i][j-1]);\r\n\t\t\t}\r\n\t\t}\r\n//\t\tint length = mat[row-1][col-1]; - the wanted length of LCS\r\n\t\treturn mat;\r\n\t}", "public int[][] keySchedule(int[] key) {\n int binkeysize = key.length * 8;\n int colsize = binkeysize + 48 - (32 * ((binkeysize / 64) - 2)); //size of key scheduling will be based on the binary size of the key.\n int[][] keyMatrix = new int[4][colsize / 4]; //creates the matrix for key scheduling\n int rconpointer = 1;\n int[] t = new int[4];\n final int keycounter = binkeysize / 32;\n int k;\n for (int i = 0; i < keycounter; i++) {//the first 1 (128-bit key) or 2 (256-bit key) set(s) of 4x4 matrices are filled with the key.\n for (int j = 0; j < 4; j++) {\n keyMatrix[j][i] = key[4 * i + j];\n }\n }\n int keypoint = keycounter;\n while (keypoint < (colsize / 4)) {\n int temp = keypoint % keycounter;\n if (temp == 0) {\n for (k = 0; k < 4; k++) {\n t[k] = keyMatrix[k][keypoint - 1];\n }\n t = schedule_core(t, rconpointer++);\n for (k = 0; k < 4; k++) {\n keyMatrix[k][keypoint] = t[k] ^ keyMatrix[k][keypoint - keycounter];\n }\n keypoint++;\n } else if (temp == 4) {\n for (k = 0; k < 4; k++) {\n int hex = keyMatrix[k][keypoint - 1];\n keyMatrix[k][keypoint] = sbox[hex / 16][hex % 16] ^ 0x42 ^ keyMatrix[k][keypoint - keycounter];\n }\n keypoint++;\n } else {\n int ktemp = keypoint + 3;\n while (keypoint < ktemp) {\n for (k = 0; k < 4; k++) {\n keyMatrix[k][keypoint] = keyMatrix[k][keypoint - 1] ^ keyMatrix[k][keypoint - keycounter];\n }\n keypoint++;\n }\n }\n }\n return keyMatrix;\n }", "@Test\r\n public void Test029generateNextPattern10CellRow()\r\n {\r\n\r\n gol.makeLiveCell(4, 4);\r\n gol.makeLiveCell(4, 5);\r\n gol.makeLiveCell(4, 6);\r\n gol.makeLiveCell(4, 7);\r\n gol.makeLiveCell(4, 8);\r\n gol.makeLiveCell(4, 9);\r\n gol.makeLiveCell(4, 10);\r\n gol.makeLiveCell(4, 11);\r\n gol.makeLiveCell(4, 12);\r\n gol.makeLiveCell(4, 13);\r\n\r\n gol.generateNextPattern();\r\n\r\n assertEquals(24, gol.getTotalAliveCells());\r\n }", "public int[][] FractalMandel(double xRangeStart, double xRangeEnd,double yRangeStart,double yRangeEnd) {\r\n\t\tMandelbrotSet man = new MandelbrotSet();\r\n\t\tint[][] fractal = new int[512][512];\r\n\t\tdouble n = 512;\r\n\t\t\r\n\r\n\t\t\r\n\t\tdouble xVal = xRangeStart;\r\n\t\tdouble yVal = yRangeStart;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tdouble xDiff = (xRangeEnd - xRangeStart) / n;\r\n\t\tdouble yDiff = (yRangeEnd - yRangeStart) / n;\r\n\t\t\r\n\t\tfor (int x = 0; x < n; x++) {\r\n\t\t\txVal = xVal + xDiff;\r\n\t\r\n\t\t\tyVal = yRangeStart;\r\n\r\n\t\t\tfor (int y = 0; y < n; y++) {\r\n\t\t\t\t\r\n\t\t\t\tyVal = yVal + yDiff;\r\n\t\t\t\t\r\n\t\t\t\tPoint2D cords = new Point.Double(xVal, yVal);\r\n\r\n\t\t\t\tint escapeTime = man.mandelbrot(cords);\r\n\t\t\t\t\r\n\t\t\t\tfractal[x][y] = escapeTime;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\treturn fractal;\r\n\t\r\n}", "public void testRotPointFromFormula() {\n // We compare to multiplication using timesXYZ().\n for(int j=0; j<20; j++) {\n // Get some initial values.\n a = getRandom();\n b = getRandom();\n c = getRandom();\n u = getRandom();\n v = getRandom();\n w = getRandom();\n double x = getRandom();\n double y = getRandom();\n double z = getRandom();\n theta = getRandom();\n\n // Build the initialized matrix.\n RotationMatrix rMInit \n = new RotationMatrix(a, b, c, u, v, w, theta);\n // Build the uninitialized matrix.\n RotationMatrix rM = new RotationMatrix();\n if(LOG) rM.logMatrix();\n\n // Compare formula to matrix multiplication.\n double[] expect = rMInit.timesXYZ(new double[] {x, y, z});\n double[] result = rM.rotPointFromFormula(a, b, c, \n u, v, w, \n x, y, z, theta);\n\n log(\"testRotPointFromFormula() expect: \"+arrayToString(expect));\n log(\"testRotPointFromFormula() result: \"+arrayToString(result));\n\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }\n }", "@Test(timeout = 4000)\n public void test136() throws Throwable {\n String[] stringArray0 = new String[6];\n stringArray0[0] = \"\";\n stringArray0[1] = \"\";\n stringArray0[2] = \" using 1:\";\n stringArray0[3] = \"<3\\\"uyx{[a7=aq,-hIYf\";\n stringArray0[4] = \":\";\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot(0, 1025);\n resultMatrixGnuPlot0.colNameWidthTipText();\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n boolean boolean0 = resultMatrixCSV0.isStdDev(0);\n assertFalse(boolean0);\n \n resultMatrixGnuPlot0.colNameWidthTipText();\n double double0 = resultMatrixGnuPlot0.getCount((-422));\n assertEquals(0.0, double0, 0.01);\n \n int int0 = resultMatrixCSV0.getVisibleColCount();\n assertEquals(1, int0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n \n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText(0, 1);\n int[][] intArray0 = new int[5][1];\n int[] intArray1 = new int[2];\n intArray1[0] = 2;\n intArray1[1] = 2;\n intArray0[0] = intArray1;\n int[] intArray2 = new int[2];\n intArray2[0] = 0;\n intArray2[1] = 1025;\n intArray0[1] = intArray2;\n int[] intArray3 = new int[7];\n intArray3[0] = 1280;\n intArray3[1] = 0;\n intArray3[2] = 1;\n intArray3[3] = 1;\n intArray3[4] = 1;\n intArray3[5] = 1025;\n intArray3[6] = 2;\n intArray0[2] = intArray3;\n int[] intArray4 = new int[9];\n intArray4[0] = 2;\n intArray4[1] = 46;\n intArray4[2] = 1;\n intArray4[3] = 1;\n intArray4[4] = 0;\n intArray4[5] = 0;\n intArray4[6] = 0;\n intArray4[7] = 2;\n intArray4[8] = (-422);\n intArray0[3] = intArray4;\n int[] intArray5 = new int[2];\n intArray5[0] = 0;\n intArray5[1] = 1280;\n intArray0[4] = intArray5;\n resultMatrixPlainText0.m_NonSigWins = intArray0;\n int int1 = resultMatrixPlainText0.getMeanPrec();\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(2, int1);\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(0, resultMatrixPlainText0.getVisibleColCount());\n }", "public static int[][] generateMap(int mines, int width, int height, int fcX, int fcY) {\n\t\tif(mines>width*height-1){\n\t\t\treturn null;\n\t\t}\n\t\tint[][] meowfield = new int[height][width];\n\t\tmeowfield[fcY][fcX] = (int)Math.random()*10;\n\t\tint[] RNGesus = new int[mines];\n\t\tfor(int i=0; i<meowfield.length;i++){\t\n\t\t\tArrays.fill(meowfield[i], -1);\n\t\t}\n\t\tArrays.fill(RNGesus, -1);\n\t\tfor (int i = 0; i < mines; i++) {\n\t\t\tint ranNum = (int) (Math.random() * width * height);\n\t\t\tSystem.out.println(ranNum);\n\t\t\tif (!contains(RNGesus, ranNum)) {\n\t\t\t\tRNGesus[i] = ranNum;\n\t\t\t} else {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Arrays.toString(RNGesus));\n\t\tfor (int i = 0; i < RNGesus.length; i++) {\n\t\t\tmeowfield[RNGesus[i] %width][RNGesus[i]/height] = 10;\n\t\t}\n\t\treturn meowfield;\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n int t = Integer.parseInt(br.readLine());\n for(int i=0;i<t;i++){\n int n = Integer.parseInt(br.readLine());\n int[][] arr = new int[n][n];\n for(int j=0;j<n;j++){\n arr[j] = Arrays.stream(br.readLine().split(\" \")).mapToInt(Integer::parseInt).toArray();\n }\n int r = Integer.parseInt(br.readLine());\n int x=-1, y=-1;\n for(int p=0;p<n;p++){\n for(int q=0;q<n;q++){\n if(group(p,q, arr, n)==r){\n x = p;\n y = q;\n }\n }\n }\n System.out.println(x+\" \"+y);\n }\n\t}", "public static void main(String[] args)throws Exception{\n BufferedReader bf = new BufferedReader(new FileReader(new File(\"data.txt\")));\n\n int t = Integer.parseInt(bf.readLine());\n map = new int[t][t];\n group = new int[t][t];\n for( int i = 0 ; i < t; i ++){\n String[] strArr = bf.readLine().split(\" \");\n for(int j = 0 ; j < t; j ++){\n map[i][j] = Integer.parseInt(strArr[j]);\n }\n }\n int g = 2;\n LinkedList<Point> gQueue = new LinkedList<>();\n for(int i = 0 ; i < t ; i ++){\n for(int j = 0 ; j < t ; j ++){\n if(map[i][j] == 1 && group[i][j] == 0){\n gQueue.add(new Point(i,j));\n while(!gQueue.isEmpty()){\n Point p = gQueue.remove();\n int startI = p.i;\n int startJ = p.j;\n group[startI][startJ] = g;\n for(int k = 0 ; k < 4; k ++){\n int tmpI = startI+mI[k];\n int tmpJ = startJ+mJ[k];\n if(tmpI >=0 && tmpJ >=0 && tmpI < t && tmpJ < t){\n if(group[tmpI][tmpJ] == 0 && map[tmpI][tmpJ] == 1){\n gQueue.add(new Point(tmpI,tmpJ));\n group[tmpI][tmpJ] = g;\n }\n }\n }\n }\n g++;\n }\n }\n }\n LinkedList<Point> queue = new LinkedList<>();\n int cnt = 0;\n while(true) {\n boolean flag = false;\n boolean match = false;\n cnt++;\n for (int i = 0; i < t; i++) {\n for (int j = 0; j < t; j++) {\n if (map[i][j] == cnt) {\n flag = true;\n int sI = i;\n int sJ = j;\n for (int k = 0; k < 4; k++) {\n int tmpI = sI + mI[k];\n int tmpJ = sJ + mJ[k];\n if (tmpI >= 0 && tmpJ >= 0 && tmpI < t && tmpJ < t) {\n if (map[tmpI][tmpJ] == 0) {\n map[tmpI][tmpJ] = map[sI][sJ] + 1;\n group[tmpI][tmpJ] = group[sI][sJ];\n }\n }\n }\n }\n }\n }\n if(!flag){\n break;\n }\n }\n for(int i = 0 ; i < t ; i ++){\n for(int j = 0 ; j < t ; j ++){\n for(int k = 0 ; k < 4 ; k ++){\n int tmpI = i + mI[k];\n int tmpJ = j + mJ[k];\n if (tmpI >= 0 && tmpJ >= 0 && tmpI < t && tmpJ < t) {\n if(group[i][j] != group[tmpI][tmpJ]){\n answer = Math.min(answer,map[i][j]+map[tmpI][tmpJ]);\n }\n }\n }\n }\n }\n System.out.println(answer-2);\n }", "public int[][] matrixCID(String[] array){\n\t\tint[][] matrix = new int[array.length-1][5];\n\t\tfor(int i = 1; i < array.length; i++){\n\t\t\tString[] words = toWord(array[i]);\t\n\t\t\tmatrix[i-1][0] = Integer.valueOf(words[0]); //CID\n\t\t\tmatrix[i-1][1] = Integer.valueOf(words[2]); //POP\n\t\t\tmatrix[i-1][2] = 0; //default length\n\t\t\tmatrix[i-1][3] = 0; //default chunk size\n\t\t\tmatrix[i-1][4] = 0; //default chunk pieces\n\t\t}\n\t\treturn matrix;\n\t}", "public int[] Conversion_Terrain_Maillage(float Xobs, float Yobs){\n\t\tint[] tmp = new int[2];\n\t\t\n\t\ttmp[0] = (int)((Xobs-Generation.x0)/interval_de_maille);\n\t\ttmp[1] = (int)((Yobs-Generation.y0)/interval_de_maille);\n\t\treturn tmp;\n\t\t\n\t}", "void create(){\n // I assign zero value to each element of the array.\n for (int i = 0;i< this.row; i++){\n for (int j = 0; j< this.column; j++){\n array[i][j]= 0;\n }\n }\n // I create random values for mines indexes\n int min = 0;\n int max = this.row;\n Random random = new Random();\n int randRow, randColumn, count=0;\n //I generate random mines quarter of the size of the array and assign it into the array.\n while(count != (this.row*this.column/4)){\n randRow = random.nextInt(max + min) + min;\n randColumn = random.nextInt(max + min) + min;\n if (array[randRow][randColumn] != -1){\n array[randRow][randColumn]= -1;\n count++;\n }\n }\n // I show the all minesweeper map\n for (int i = 0;i< this.row; i++){\n for (int j = 0; j< this.column; j++){\n if (array[i][j]==0)\n System.out.print(\"0 \");\n else\n System.out.print(\"* \");\n }\n System.out.println();\n }\n }", "private static Integer[][] createRandomStart(Integer dimension) {\n Integer[][] startmatrix = new Integer[dimension][dimension];\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n startmatrix[i][j] = (int)(Math.random() * 2);\n }\n }\n return startmatrix;\n }", "public int[] solver(int startPlayerId, int curplayer, int[][] oneP, int[][][] memory, int count) {\n\r\n int[][] one = oneP.clone(); // OnePlay Input\r\n int[] k; // onePlay points\r\n int j = curplayer;\r\n int[][][] m = memory.clone();\r\n int[] minCard = new int[3];\r\n int[] t;\r\n ArrayList<int[]> store = new ArrayList<>();\r\n minCard[2] = 100000;\r\n t = new int[3];\r\n for (int i = 0; i < 4; i++) { // 4 types of cards\r\n for (int l = 2; l < cardPerPlayer + 2; l++) {\r\n if (m[j][i][l] == 1 || m[j][i][l] == 2) {\r\n one[j][0] = i;\r\n one[j][1] = l;\r\n remove(new int[] { i, l }, m);\r\n if ((j + 1) % players != startPlayerId) {\r\n t = solver(startPlayerId, (j + 1) % players, one, m, count);\r\n one[(j + 1) % players][0] = t[0];\r\n one[(j + 1) % players][1] = t[1];\r\n }\r\n // } else if ((j + 2) % players != startPlayerId) {\r\n // t = solver(startPlayerId, (j + 2) % players, one, m, count);\r\n // one[(j + 1) % players][0] = t[0];\r\n // one[(j + 1) % players][1] = t[1];\r\n // } else if ((j + 3) % players != startPlayerId) {\r\n // t = solver(startPlayerId, (j + 3) % players, one, m, count);\r\n // one[(j + 1) % players][0] = t[0];\r\n // one[(j + 1) % players][1] = t[1];\r\n // }\r\n\r\n k = onePlay(one, startPlayerId);\r\n int curpoint = 0;\r\n if (count != cardPerPlayer - 1) { // cardPerPlayer - 1 = 12\r\n t = solver(k[0], k[0], new int[4][2], m, count++);\r\n curpoint = t[2];\r\n }\r\n\r\n if (k[0] == myID) {\r\n curpoint += k[1] + k[2] * 12;\r\n }\r\n store.add(new int[] { i, l, curpoint });\r\n if (curpoint < minCard[2]) {\r\n minCard[2] = curpoint;\r\n minCard[0] = i;\r\n minCard[1] = l;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return minCard;\r\n }", "public static long[] getTestData() {\n return new long[]{1L << 63, 1L << 62, 1L << 60, 1L << 63 | 1L << 62 | 1L << 61, 1L << 63 | 1L << 61};\n }", "public int[][] getPlotNumbers(int[][] point, int numberOfMines, int numberOfColumns,\n int numberOfRows) {\n int mineNumber = 1;\n while (mineNumber <= numberOfMines) {\n int columnNumber = mine[mineNumber][1];\n int rowNumber = mine[mineNumber][2];\n\n if (columnNumber == 1 && rowNumber == 1) { // top left corner\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == 1 && (rowNumber != 1 && rowNumber != numberOfRows)) { // left edge\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == 1 && rowNumber == numberOfRows) { // bottom left corner\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n } else if ((columnNumber != 1 && columnNumber != numberOfColumns) && rowNumber == 1) {\n // top edge\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n } else if (columnNumber == numberOfColumns && rowNumber == 1) { // top right corner\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == numberOfColumns && (rowNumber != 1 && rowNumber != numberOfRows)) {\n // right edge\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == numberOfColumns && rowNumber == numberOfRows) {\n // bottom right corner\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n } else if ((columnNumber != 1 && columnNumber != numberOfColumns)\n && rowNumber == numberOfRows) {\n // bottom edge\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n } else if ((columnNumber != 1 && columnNumber != numberOfColumns)\n && (rowNumber != 1 && rowNumber != numberOfRows)) { // not on the edge or corner\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n }\n mineNumber++;\n }\n return point;\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\n public String solve() {\n int LIMIT = 50 * NumericHelper.ONE_MILLION_INT;\n int[] nCount = new int[LIMIT+1];\n for(long y = 1; y<= LIMIT; y++) {\n for(long d= (y+3)/4; d<y; d++) { // +3 is to make d atleast 1\n long xSq = (y+d) * (y+d);\n long ySq = y * y;\n long zSq = (y-d) * (y-d);\n\n long n = xSq - ySq - zSq;\n\n if(n<0) {\n continue;\n }\n\n if(n>=LIMIT) {\n break;\n }\n\n\n nCount[(int)n]++;\n\n }\n }\n\n int ans = 0;\n for(int i = 1; i<LIMIT; i++) {\n if(nCount[i] == 1) {\n //System.out.print(i +\",\");\n ans++;\n }\n }\n\n return Integer.toString(ans);\n }", "public String[][] getBoard() {\n ArrayList<Point<Integer,Integer>> bomb_positions = new ArrayList<>(this.NUMBOMBS);\n\n int size=0;\n while ( size < this.NUMBOMBS) {\n int x=(int)Math.floor(Math.random()*this.SIZE);\n int y=(int)Math.floor(Math.random()*this.SIZE);\n if (!bomb_positions.contains(new Point<>(x,y))) {\n bomb_positions.add(new Point<>(x,y));\n size++;\n }\n }\n // [ , , , ]\n // [ ,cnrXY, , ]\n // [ , ,Bomb, ]\n // [ , , , ]\n for (Point<Integer,Integer> bomb:\n bomb_positions) {\n int cornerX = bomb.getX()-1;\n int cornerY= bomb.getY()-1;\n for (int i = cornerX; i < cornerX+3 ; i++) {\n for (int j = cornerY; j < cornerY+3; j++) {\n if(i>=0 && i<SIZE && j>=0 && j< SIZE){\n if ((new Point<>(i,j)).equals(bomb)){\n board[i][j]=\"B\";\n }else {\n if (!board[i][j].equals(\"B\") && board[i][j].equals(\" \")){\n board[i][j] = \"1\";\n }else if (!board[i][j].equals(\"B\") && !board[i][j].equals(\" \")){\n int n = Integer.parseInt(board[i][j]);\n n=n+1;\n board[i][j] = String.valueOf(n);\n }\n }\n\n }\n }\n }\n }\n return board;\n }", "private int[] buildMatrix(Vector<Integer> first, Vector<Integer> second) {\n \tint[] res = new int[4];\n \tint fValue;\n \tint sValue;\n \t\n \tfor (int i = 0; i < first.size(); ++i) {\n \t\tfValue = first.get(i);\n \t\tsValue = second.get(i);\n \t\t\n \t\tif (fValue == sValue && fValue == 1) {\n \t\t\tres[0]++;\n \t\t}\n \t\telse if (fValue == sValue && fValue == 0) {\n \t\t\tres[3]++;\n \t\t}\n \t\telse if (fValue == 1) {\n \t\t\tres[1]++;\n \t\t}\n \t\telse {\n \t\t\tres[2]++;\n \t\t}\n \t}\n \t\n \treturn res;\n }", "@Test\n public void testParseMatrix() {\n String path1 = \"c:\\\\Voici\\\\input.txt\";\n MatrixReader reader = new MatrixReader(path1);\n Matrix data = reader.getMatrix();\n Matrix[] parsedMatrix = MatrixReader.parseMatrix(data, 10);\n assertEquals(parsedMatrix[0].get(4, 2), data.get(4, 2), 0.001);\n assertEquals(parsedMatrix[2].get(0, 0), data.get(32, 0), 0.001);\n assertEquals(parsedMatrix[1].get(0, 0), data.get(16, 0), 0.001);\n }", "public static long[] vibPatternMaker(int[] vibs) {\r\n VibrationPattern vibPat = new VibrationPattern();\r\n long[] vibPattern;\r\n\r\n ArrayList<Long> minuteTensVib = vibPat.minuteTensVib;\r\n ArrayList<Long> longVib = vibPat.longVib;\r\n ArrayList<Long> minuteOnesVib = vibPat.minuteOnesVib;\r\n ArrayList<Long> signalVib = vibPat.signalVib;\r\n ArrayList<Long> hourVib = vibPat.hourVib;\r\n\r\n ArrayList<Long> vibPatList = new ArrayList<Long>();\r\n\r\n if (vibs[0] != 0) {\r\n // Hours\r\n for (int i = 0; i < vibs[0]; i++) {\r\n vibPatList.addAll(hourVib);\r\n }\r\n // Delay in between hours and minutes\r\n vibPatList.addAll(signalVib);\r\n Log.i(\"VIB\", vibs[0] + \" long vibration(s) (hours)\");\r\n } else { //case of 12 o'clock\r\n for (int i = 0; i < 12; i++) {\r\n vibPatList.addAll(hourVib);\r\n }\r\n vibPatList.addAll(signalVib);\r\n //Log.i(\"VIB\", \" long vibration(s) (hours)\");\r\n }\r\n\r\n if (vibs[1] != 0) {\r\n // Minutes (Tens)\r\n for (int i = 0; i < vibs[1]; i++) {\r\n vibPatList.addAll(minuteTensVib);\r\n }\r\n vibPatList.addAll(signalVib);\r\n Log.i(\"VIB\", vibs[1] + \" long vibration(s) (10s of minutes)\");\r\n }\r\n\r\n if (vibs[2] != 0) {\r\n // Minutes (Ones)\r\n for (int i = 0; i < vibs[2]; i++) {\r\n vibPatList.addAll(minuteOnesVib);\r\n }\r\n Log.i(\"VIB\", vibs[2] + \" short vibration(s) (minutes)\");\r\n }\r\n\r\n// Log.i(ON_TAP, vibPatList.toString());\r\n\r\n vibPattern = new long[vibPatList.size()];\r\n Long[] tempHold = vibPatList.toArray(new Long[vibPatList.size()]);\r\n for (int i = 0; i < tempHold.length; i++) {\r\n vibPattern[i] = tempHold[i].longValue();\r\n }\r\n\r\n return vibPattern;\r\n }", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "public int[][] toCloneMatrix(String[] array, int length){\n\t\tint[][] matrix = new int[length][4];\n\t\tfor(int i = 0; i < length; i++){\t\t\n\t\t\tfor(int j = 0; j < 6; j++){\t\n\t\t\t\tif(j == 0){\n\t\t\t\t\tmatrix[i][j] = Integer.valueOf(toWord(array[i])[0]); //matrix[i][0] = array[i][0] CLONE ID\n\t\t\t\t}\n\t\t\t\telse if(j == 1){\n\t\t\t\t\tString temp = toWord(array[i])[1];\n\t\t\t\t\tString[] tempArray = temp.split(\"\\\\.\");\n\t\t\t\t\tmatrix[i][j] = Integer.valueOf(tempArray[0]); //matrix[i][1] = array[i][1] FILE ID\n\t\t\t\t}\n\t\t\t\telse if(j == 2){\n\t\t\t\t\tString temp = toWord(array[i])[1];\n\t\t\t\t\tString[] tempArray = temp.split(\"\\\\.\");\n\t\t\t\t\ttemp = tempArray[1]; //bg-end\n\t\t\t\t\ttempArray = temp.split(\"\\\\-\");\n\t\t\t\t\tmatrix[i][j] = Integer.valueOf(tempArray[0]); //matrix[i][2] = array[i][2] SL\n\t\t\t\t}\n\t\t\t\telse if(j == 3){\n\t\t\t\t\tString temp = toWord(array[i])[1];\n\t\t\t\t\tString[] tempArray = temp.split(\"\\\\.\");\n\t\t\t\t\ttemp = tempArray[1]; //bg-end\n\t\t\t\t\ttempArray = temp.split(\"\\\\-\");\n\t\t\t\t\tmatrix[i][j] = Integer.valueOf(tempArray[1]); //matrix[i][3] = array[i][3] EL\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn matrix;\n\t}", "public static int[][] meDian(int[][] pixels){\r\n\t\t\t\r\n\t\t\tArrayList<Integer> a = new ArrayList<>();\r\n\t\t\tint[][] temp = new int[3][3];\r\n\t\t int height = pixels.length;\r\n\t\t int width = pixels[0].length;\r\n\t\t\t\r\n\t\t\tfor(int col = 0; col < pixels.length; col++){\r\n\t\t\t\tmResult[0][col] = pixels[0][col];\r\n\t\t\t\tmResult[width -1][col] = pixels[width - 1][col];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (int row = 0 ; row < pixels.length ; row++) {\r\n\t\t mResult[row][0] = pixels[0][row];\r\n\t\t mResult[row][height - 1] = pixels[row][height - 1];\r\n\t\t }\r\n\t\t\t\r\n\t\t\tfor (int row = 1 ; row < height - 1 ; row++) {\r\n\t\t for (int col = 1 ; col < width - 1 ; col++) {\r\n\t\t \tfor(int i = -1; i <= 1; i++){\r\n\t\t \t\tfor(int j = -1; j <= 1; j++){\r\n\t\t \t\t\ta.add(pixels[row+i][col+j]);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t \tCollections.sort(a);\r\n \t\tmResult[row][col] = a.get(4);\r\n \t\ta.clear();\r\n\t\t }\r\n\t\t}\r\n\t\t\treturn mResult;\r\n\t}", "public static int[][] firstGeneration(){\n int R = 10, C = 10;\n\n // Intiliazing the grid.\n int[][] grid = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 },\n { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },\n { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }\n };\n\n // Displaying the grid\n System.out.println(\"Original Generation\");\n for (int i = 0; i < R; i++)\n {\n for (int j = 0; j < C; j++)\n {\n if (grid[i][j] == 0)\n System.out.print(\".\");\n else\n System.out.print(\"*\");\n }\n System.out.println();\n }\n System.out.println();\n return grid;\n }", "void processScanCoordinates(List<Long> scanTimeStampList, String scanType){\n List<LatLng> scanCoordinates = new ArrayList<>();\n System.out.println(\"LENGTH BEFOREEEE\" + scanTimeStampList.size() + scanType);\n for(int i = 0; i < stepTimeStamp.size()-1;i++){\n long upperTimeBound = stepTimeStamp.get((i+1));\n long lowerTimeBound = stepTimeStamp.get(i);\n List<Integer> scanIndexWithinStep = new ArrayList<>();\n //Searches through the list of timestamps and adds the scan numbers that fall within the step to a list\n for(int j = 0; j < scanTimeStampList.size();j++){\n if(scanTimeStampList.get(j) <= upperTimeBound && scanTimeStampList.get(j)> lowerTimeBound){\n scanIndexWithinStep.add(j);\n }\n }\n if(scanIndexWithinStep.size()>0) {\n //Can loop through them as they will be sequential\n for (int k = scanIndexWithinStep.get(0); k <= scanIndexWithinStep.get(scanIndexWithinStep.size() - 1); k++) {\n //Run the algorithm for each scan that falls within the time range for each step\n double tempLat;\n double tempLong;\n //Formula from Dr. Zheng's paper\n // i here represents the number of steps as the index number in adaptiveTimeList is the step number\n if (xIncreasing) {\n tempLat = startLat + STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * yCompMotion * degToMRatio;\n } else {\n tempLat = startLat - STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * yCompMotion * degToMRatio;\n }\n if (yIncreasing) {\n tempLong = startLong + STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * xCompMotion * degToMRatio;\n } else {\n tempLong = startLong - STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * xCompMotion * degToMRatio;\n }\n scanCoordinates.add(new LatLng(tempLat, tempLong));\n }\n }\n\n }\n System.out.println(\"LENGTHHHH AFTER\" + scanCoordinates.size() + scanType);\n if(scanType == \"mag\"){\n magCoords = scanCoordinates;\n }\n else if(scanType == \"gyro\"){\n gyroCoords = scanCoordinates;\n }\n else if(scanType == \"accel\"){\n accelCoords = scanCoordinates;\n }\n else if(scanType == \"blue\"){\n blueGlobalCoords = scanCoordinates;\n }\n else if(scanType == \"red\"){\n redGlobalCoords = scanCoordinates;\n }\n }", "public int[][] get2DAsteroids(){\n int[][] result = new int[field.length][2];\n for (int i = 0; i<field.length;i++){\n //casting to int maybe inaccurate but this is used for 2d representation so its not that important\n //NOTE: being able to access the x and y fields is very unsafe (getters/setters?)\n result[i][0] = (int)field[i].x;\n result[i][1] = (int)field[i].y;\n }\n return result;\n }", "private static String[] getMinGeneIds() {\n\t\tString []output = new String[2];\n\t\tString minI = \"\", minJ = \"\";\n\t\tdouble min = Double.MAX_VALUE;\n\t\tfor (Map.Entry<String, String> entry : minMatrix.entrySet()) {\n\t\t\tString minData[] = entry.getValue().split(\";\");\n\t\t\tdouble currDist = Double.parseDouble(minData[1]);\n\t\t\tif(currDist < min) {\n\t\t\t\tminI = entry.getKey();\n\t\t\t\tminJ = minData[0];\n\t\t\t\tmin = currDist;\n\t\t\t}\n\t\t}\n\t\toutput[0] = minI;output[1] = minJ;\n\t\treturn output;\n\t}", "public static int[][] raggedArray(){\n int n=(int)(Math.random()*11);\n n+=10; \n //this randomly assigns n to between 10 and 20\n int[][] ragged=new int[n][];\n //initialize this array with n first components\n //forloop to assign each inner array a length\n for(int i=0; i<n; i++){\n int m=(int)(Math.random()*11);\n m+=10; //m is between 10 and 20\n ragged[i]=new int[m];\n //another for loop to assign values\n for(int k=0; k<m; k++){\n int val=(int)(Math.random()*1001);\n int sign=(int)(Math.random()*2);\n if(sign==0){\n \n }\n else{\n val*=-1;\n //makes it 50/50 to be negative\n }\n ragged[i][k]=val;\n //assigns value to that spot of array\n }\n }\n return ragged;\n }", "public void copiedMeasureDecoder(Integer chordNote,Integer[]previousChord, Integer[] playedChord){\n /* int c=0;\n int a=0;\n int b=0;\n int x0=0;\n int x1=0;*/\n int d1=0;\n int d2=0;\n\n\n\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==chordNote)\n d1=i;\n }\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==melody.get(melodyCounter))\n d2=i;\n /* if(melodyNotes[i]==playedChord[1])\n a=i;\n if(melodyNotes[i]==previousChord[1])\n b=i;*/\n }\n /*if(a<b){\n x0=a-b;\n x1=7+x1;\n }else{\n x0=a-b;\n x1=x0-7;\n }*/\n if(d1>d2) {\n binaryOutput += \"0\";\n }else {\n binaryOutput += \"1\";\n }\n for(int i = 0;i<4;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n }\n\n\n}", "public static String[][] createPattern()\n {\n //the game is more like a table of 6 columns and 6 rows\n\t\n\t//we're going to have to make a 2D array of 7 rows \n\n String[][] f = new String[7][15];\n\n //Time to loop over each row from up to down\n\n for (int i = 0; i < f.length; i++)\n { \n for (int j = 0; j < f[i].length; j++)\n {\n if (j % 2 == 0) f[i][j] =\"|\";\n\n else f[i][j] = \" \";\n \n if (i==6) f[i][j]= \"-\";\n } \n }\n return f;\n }", "public static void generateRoundKeys(String input){\n int i =0;\n\t\tfor (int col1 = 0; col1 <=3; col1++) {\t\t\t\n for (int row1 = 0; row1 <=3; row1 = row1+1) {\n\t\t\toriginalKey[row1][col1] = input.substring(i,i+2);\n\t\t\ti=i+2;\n } \n\t\t} \n //take the original key and make it be the first four columns of W\n for(int row2 = 0; row2<=3; row2++){\n for(int col2 = 0; col2 < 4; col2++){\n W[row2][col2] = originalKey[row2][col2];\n }\n } \n //Starting to create next 40 columns of W\n //temporary matrix temp_w for processing\n String[][] temp_w = null;\n for(int column = 4; column<=43; column++){\n /*Part 1 : if the index of column is not divisible by 4, \n XOR the fourth past and last column with respect to column index*/\n if(column % 4 != 0){\n for(int row = 0; row<=3; row++){\n W[row][column] = performXOR(W[row][column-4], W[row][column-1]); \n }\n }\n else {\n /*Part 2 : if the index of column is divisible by 4,\n step 1: Use temp matrix temp_w to store previous column values.\n Tanspose previous column values to row values\n step 2 : Shif to the left of column values of temp_w*/\n temp_w = new String[1][4]; \n \n temp_w[0][0] = W[1][column - 1];\n temp_w[0][1] = W[2][column - 1];\n temp_w[0][2] = W[3][column - 1];\n temp_w[0][3] = W[0][column - 1];\n \n //step 3 : transform each of the four bytes in temp_w using an S-box function\n for(int m =0 ; m<1; m++){\n for(int n =0; n<=3 ; n++){\n int x = Integer.parseInt(temp_w[m][n].split(\"\")[0],16);\n int y = Integer.parseInt(temp_w[m][n].split(\"\")[1],16);\n temp_w[m][n] = SBOX[x][y]; \n\t\t\t}\n }\n \n //step 4 : Getting RCon coefficient values and performing XOR operation\n //find number of round\n int numRound = column/4;\n //get RCon of the same column number form Rcon table and xOR with first element\n temp_w[0][0] = performXOR(RCON[0][numRound],temp_w[0][0]);\n \n //step 5 : Perform final XOR\n for(int row3 = 0; row3<=3; row3++){\n W[row3][column] = performXOR(W[row3][column-4], temp_w[0][row3]);\n }\n \n }\n }\n \n //Printing Round Keys\n int Rounds = 1;\n int k = 0;\n while (Rounds <=11){ \n for(int column1 = 0; column1<=3; k++, column1++){\n for(int row =0; row<=3; row++){\n System.out.print(W[row][k]);\n }\n } \n System.out.println();\n Rounds++;\n } \n System.out.println(\"\");\n }", "private void computeMiter(int ix0, int iy0, int ix1, int iy1, int ix0p,\n int iy0p, int ix1p, int iy1p, int[] m) {\n long x0 = ix0;\n long y0 = iy0;\n long x1 = ix1;\n long y1 = iy1;\n\n long x0p = ix0p;\n long y0p = iy0p;\n long x1p = ix1p;\n long y1p = iy1p;\n\n long x10 = x1 - x0;\n long y10 = y1 - y0;\n long x10p = x1p - x0p;\n long y10p = y1p - y0p;\n\n long den = (x10 * y10p - x10p * y10) >> 16;\n if (den == 0) {\n m[0] = ix0;\n m[1] = iy0;\n return;\n }\n\n long t = (x1p * (y0 - y0p) - x0 * y10p + x0p * (y1p - y0)) >> 16;\n m[0] = (int) (x0 + (t * x10) / den);\n m[1] = (int) (y0 + (t * y10) / den);\n }", "public void generateIDs() {\n Random randomGenerator = new Random();\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n identificationNumbers[i][j] = randomGenerator.nextInt(2);\n }\n }", "private static long[][] generatePerfectSquares() {\n ArrayList<Long> a = new ArrayList<>(10000);\n ArrayList<Long> b = new ArrayList<>(10000);\n\n for (long i = 1; i < 1000000; i += 2) {\n long sqr = i * i;\n if ((i + 1) % 4 == 0) {\n a.add(sqr);\n }\n\n if ((i + 1) % 3 == 0) {\n b.add(sqr);\n }\n }\n\n long[][] res = new long[2][];\n res[0] = new long[a.size()];\n res[1] = new long[b.size()];\n\n for (int i = 0; i < a.size(); i++) {\n res[0][i] = a.get(i);\n }\n\n for (int i = 0; i < b.size(); i++) {\n res[1][i] = b.get(i);\n }\n\n return res;\n }", "public void findCoordinates(int[] times) {\n int startTime = times[0];\n int endTime = times[1];\n int index = 0;\n Path questionPath = Paths.get(\"CrimeLatLonXY1990.csv\");\n File questionFile = questionPath.toFile();\n FileReader reader;\n BufferedReader br;\n //int[] res = new int[2];\n String columns[] = null;\n LinkedList<Crime> list = new LinkedList<>();\n try {\n // read CSV file\n reader = new FileReader(questionFile);\n br = new BufferedReader(reader);\n String str = null;\n try {\n while ((str = br.readLine()) != null) {\n columns = str.split(\"\\\\,\");\n try {\n //0,1 are the coordinates x, y\n double x = Double.parseDouble(columns[0].trim());\n double y = Double.parseDouble(columns[1].trim());\n // 2 is time field\n int time = Integer.parseInt(columns[2].trim());\n if (time <= endTime && time >= startTime) {\n // create a Crime instance within the time range\n Crime crime = new Crime(x, y, index++, str);\n list.add(crime);\n }\n //stop reading file after we have found the last crime at the end time\n if (time > endTime) {\n nodes = index;\n array = new Crime[index];\n // construct crime array\n for (int i = 0; i < index; i++) {\n array[i] = list.get(i);\n }\n break;\n }\n } catch (NumberFormatException e) {\n //skip the first line\n continue;\n }\n\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n\n }\n } catch (FileNotFoundException ex) {\n ex.printStackTrace();\n }\n }", "int[][] Naive(int m, Pointd[] points){\n int[][] tours = new int[m][];\n for(int i=0; i<m; i++){\n if(i<points.length%m) tours[i] = new int[points.length/m+1];\n else tours[i] = new int[points.length/m];\n }\n\n //Select the first point, find the next closest point, find the next closest point to that etc\n boolean[] alreadyInTour = new boolean[points.length];\n double minDistance;\n double distance;\n Pointd pointA;\n Pointd pointB;\n int index = 0;\n int n;\n\n for(int k=0; k<m; k++){\n //Each row of tours, first find a node that isn't in a tour\n n = 0;\n while(alreadyInTour[n]) n++;\n pointA = points[n];\n tours[k][0] = n;\n alreadyInTour[n] = true;\n\n int iterate = 0;\n int j=1;\n while(j<tours[k].length){\n if(!alreadyInTour[iterate]){\n minDistance = Double.MAX_VALUE;\n //Find next closest point to pointA\n for(int i=0; i<points.length; i++){\n pointB = points[i];\n if(!alreadyInTour[i]){\n distance = Math.sqrt( Math.pow(pointA.x - pointB.x, 2) + Math.pow(pointA.y - pointB.y, 2) );\n if(distance < minDistance){\n minDistance = distance;\n index = i;\n }\n }\n }\n //System.out.println(index);\n tours[k][j] = index;\n alreadyInTour[index] = true;\n j++;\n }\n iterate++;\n if(iterate >= points.length) iterate = 0;\n }\n }\n for(int i=0; i<tours.length; i++){\n //System.out.println(Arrays.toString(tours[i]));\n }\n return tours;\n }", "C4135d0 mo1484a(int i, long j);", "public long[] getAsDpm2() {\n if (units != 1)\n return new long[] {-1, -1};\n return new long[] { pixelsxUnitX, pixelsxUnitY };\n }", "public static void main(String[] args) {\n\t\tString[] src = null;\n\t\ttry {\n\t\t\tsrc = Files.lines(Paths.get(\"inputs/day20.txt\"))\n\t\t\t\t\t.map(s -> s.replace(\".\", \"0\").replace(\"#\", \"1\"))\n\t\t\t\t\t.collect(Collectors.joining(\"\\n\"))\n\t\t\t\t\t.split(\"\\n\\n\");\n\t\t}catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tList<Tile> tiles = new ArrayList<Tile>();\n\t\tfor(String s : src) {\n\t\t\tString[] tile = s.split(\":\\n\");\n\t\t\tlong id = Long.parseLong(tile[0].substring(5));\n\t\t\tString[] data = tile[1].split(\"\\n\");\n\t\t\ttiles.add(new Tile(id, data));\n\t\t}\n\t\t\n\t\t/* PART 1 */\n\t\t// Compile all hashes and their mirror images, each paired with its frequency\n\t\tHashMap<Integer,Integer> hashes = new HashMap<Integer,Integer>();\n\t\tfor(Tile t : tiles) {\n\t\t\tList<Integer> h = t.getHashes(); List<Integer> hr = t.getReverseHashes();\n\t\t\tfor(int i = 0; i < h.size(); i++) {\n\t\t\t\tputTileHash(hashes, h.get(i));\n\t\t\t\tputTileHash(hashes, hr.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// The corner tiles are the 4 tiles such that 2 of their edge hashes match no other hashes\n\t\t// Find these tiles and then the product of their IDs\n\t\tList<Integer> uniqueHashes = hashes.keySet().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.filter(i -> hashes.get(i) == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\t\tlong ans = tiles.stream()\n\t\t\t\t\t\t.filter(t -> isCornerTile(t, uniqueHashes))\n\t\t\t\t\t\t.mapToLong(Tile::getID)\n\t\t\t\t\t\t.reduce(1, (x,y) -> x*y);\n\t\tSystem.out.println(ans);\n\t\t\n\t\t// Assemble the image.\n\t\t// Start by placing any of the 4 corner pieces in the top left corner.\n\t\t// Build the first row by matching another tile's edge hash with the rightmost tile's right edge hash.\n\t\t// For subsequent rows, match a tile's edge hash with the bottom hash of the tile above it.\n\t\tIMG_DIM = (int)Math.sqrt(tiles.size());\n\t\tTile[][] img = new Tile[IMG_DIM][IMG_DIM];\n\t\timg[0][0] = tiles.stream()\n\t\t\t\t\t\t .filter(t -> isCornerTile(t, uniqueHashes))\n\t\t\t\t\t\t .findAny()\n\t\t\t\t\t\t .get();\n\t\twhile(!(uniqueHashes.contains(img[0][0].getLHash()) && uniqueHashes.contains(img[0][0].getTHash()))) {\n\t\t\timg[0][0].rotate(1);\n\t\t}\n\t\ttiles.remove(img[0][0]);\n\t\t\n\t\t// First row\n\t\tfor(int col = 1; col < IMG_DIM; col++) {\n\t\t\tIterator<Tile> it = tiles.iterator();\n\t\t\tTile target = null;\n\t\t\tint rHash = img[0][col-1].getRHash();\n\t\t\twhile(target == null) {\n\t\t\t\t// If the tile has a matching hash, flip it such that the existing tile's right hash\n\t\t\t\t// equals the new tile's reverse left hash\n\t\t\t\tTile t = it.next();\n\t\t\t\tif(rHash == t.getTHash()) {\n\t\t\t\t\tt.flipVertical();\n\t\t\t\t\tt.rotate(1);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getTHash())) {\n\t\t\t\t\tt.rotate(3);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == t.getRHash()) {\n\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getRHash())) {\n\t\t\t\t\tt.rotate(2);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == t.getBHash()) {\n\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\tt.rotate(1);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getBHash())) {\n\t\t\t\t\tt.rotate(1);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == t.getLHash()) {\n\t\t\t\t\tt.flipVertical();\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getLHash())) {\n\t\t\t\t\t// do nothing\n\t\t\t\t\ttarget = t;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\timg[0][col] = target;\n\t\t\ttiles.remove(target);\n\t\t}\n\t\t\n\t\t// Rest of the picture\n\t\tfor(int row = 1; row < IMG_DIM; row++) {\n\t\t\tfor(int col = 0; col < IMG_DIM; col++) {\n\t\t\t\tIterator<Tile> it = tiles.iterator();\n\t\t\t\tTile target = null;\n\t\t\t\tint bHash = img[row-1][col].getBHash();\n\t\t\t\twhile(target == null) {\n\t\t\t\t\t// If the tile has a matching hash, flip it such that the existing tile's bottom hash\n\t\t\t\t\t// equals the new tile's reverse top hash\n\t\t\t\t\tTile t = it.next();\n\t\t\t\t\tif(bHash == t.getTHash()) {\n\t\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getTHash())) {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == t.getRHash()) {\n\t\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\t\tt.rotate(1);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getRHash())) {\n\t\t\t\t\t\tt.rotate(3);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == t.getBHash()) {\n\t\t\t\t\t\tt.flipVertical();\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getBHash())) {\n\t\t\t\t\t\tt.rotate(2);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == t.getLHash()) {\n\t\t\t\t\t\tt.flipVertical();\n\t\t\t\t\t\tt.rotate(1);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getLHash())) {\n\t\t\t\t\t\tt.rotate(1);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\timg[row][col] = target;\n\t\t\t\ttiles.remove(target);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Build image\n\t\tString[] sea = new String[IMG_DIM * (TILE_DIM-2)];\n\t\tfor(int irow = 0; irow < IMG_DIM; irow++) {\n\t\t\tfor(int trow = 1; trow < TILE_DIM-1; trow++) {\n\t\t\t\tfinal int TROW = trow;\n\t\t\t\tsea[irow*(TILE_DIM-2) + (trow-1)] = Arrays.stream(img[irow])\n\t\t\t\t\t\t\t\t\t\t\t\t\t.map(tile -> tile.getData()[TROW].substring(1, TILE_DIM-1))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collect(Collectors.joining());\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* PART 2 */\n\t\t// Rotate and flip the sea image until at least one monster is found\n\t\tint[][] monsters = new int[sea.length][sea.length];\n\t\tint iter = 1; boolean done = false;\n\t\twhile(iter <= 8 && !done) {\n\t\t\tfor(int row = 1; row < sea.length-1; row++) {\n\t\t\t\tfor(int col = 0; col < sea.length-20; col++) {\n\t\t\t\t\tif(findMonster(sea, row, col)) {\n\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\tmarkMonster(monsters, row, col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(done) {break;}\n\t\t\t// Iterate\n\t\t\tif(iter == 4) {\n\t\t\t\tsea = flipGridVertical(sea);\n\t\t\t}else {\n\t\t\t\tsea = rotateGrid(sea);\n\t\t\t}\n\t\t\titer++;\n\t\t}\n\n\t\t// Count unused 1's in the original image\n\t\tfinal String[] SEA = sea;\n\t\tlong roughness = IntStream.rangeClosed(0, SEA.length-1)\n\t\t\t\t\t\t\t.flatMap(i -> IntStream.rangeClosed(0, SEA.length-1)\n\t\t\t\t\t\t\t\t\t\t\t\t.filter(j -> SEA[i].charAt(j) == '1' && monsters[i][j] == 0))\n\t\t\t\t\t\t\t.count();\n\t\tSystem.out.println(roughness);\n\t\t\n\t}", "@Override\n public int[][] generate(Difficulty difficulty) {\n switch (difficulty) {\n case MEDIUM:\n return _sg.nextBoard(50);\n case HARD:\n return _sg.nextBoard(55);\n case EASY:\n return _sg.nextBoard(35);\n case SOLVED:\n default:\n return _sg.nextBoard(0);\n }\n }", "public static List<Integer[]> generateSafeDistancesAndDurations(int exhal)\r\n\t{\r\n\t\tList<Integer[]> pairs = new ArrayList<Integer[]>();\r\n\t\tfor(int i=6; i<28; i=(i*2)+1)\r\n\t\t{\r\n\t\t\tint count = 0;\r\n\t\t\tfor(int j=15; j<121; j=j*(2*count))\r\n\t\t\t{\r\n\t\t\t\tcount+=1;\r\n\t\t\t\tif (isInterpolateSafe(i,j,exhal)) \r\n\t\t\t\t{\r\n\t\t\t\t\tpairs.add(new Integer[]{i,j});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn pairs;\r\n\t}", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public int[] pick() {\n int key = map.ceilingKey(random.nextInt(areaSum) + 1);\n int[] rectangle = map.get(key);\n\n int length = rectangle[2] - rectangle[0] + 1;\n int breadth = rectangle[3] - rectangle[1] + 1;\n\n //length denotes the no of x coordinates we can have.\n //breadth denotes the no of y coordinates we can have\n\n //random.nextInt gives a random value from x1 - x2-1 which we can add to the current x and we can have a valid x .\n //random.nextInt gives a random value from y1 - y2-1 which we can add to the current y and we can have a valid y .\n\n int x = rectangle[0] + random.nextInt(length);\n int y = rectangle[1] + random.nextInt(breadth);\n\n return new int[]{x, y};\n }", "@Test\n\tpublic void twoPieceBlackCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(35,95);\n\t\td.set(11,74);\n\t\td.set(30,99);\n\t\td.set(11,96);\n\t\td.set(4,98);\n\t\td.set(36,97);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(97);\n\t\tassertTrue(9==test_arr.get(0).getX() && 8==test_arr.get(0).getY()\n\t\t\t&& 7==test_arr.get(1).getX() && 8==test_arr.get(1).getY());\n\n\t}", "public static void generatetripletmatrix() {\n\t\tresultMatrix = new int[3][numNonZero];\n\n\t // Generating result matrix\n\t int k = 0;\n\t for (int ro = 0; ro < row; ro++) {\n\t for (int column = 0; column < 6; column++) {\n\t if (matrix[ro][column] != 0)\n\t {\n\t resultMatrix[0][k] = ro;\n\t resultMatrix[1][k] = column;\n\t resultMatrix[2][k] = matrix[ro][column];\n\t k++;\n\t }\n\t }\n\t }\n\t \n\t}", "public int[][] FractalMulti(double xRangeStart, double xRangeEnd,double yRangeStart,double yRangeEnd) {\r\n\t\tMultibrotSet multi = new MultibrotSet();\r\n\t\tint[][] fractal = new int[512][512];\r\n\t\tdouble n = 512;\r\n\t\t\r\n\r\n\t\t\r\n\t\tdouble xVal = xRangeStart;\r\n\t\tdouble yVal = yRangeStart;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tdouble xDiff = (xRangeEnd - xRangeStart) / n;\r\n\t\tdouble yDiff = (yRangeEnd - yRangeStart) / n;\r\n\t\t\r\n\r\n\t\tfor (int x = 0; x < n; x++) {\r\n\t\t\txVal = xVal + xDiff;\r\n\t\r\n\t\t\tyVal = yRangeStart;\r\n\r\n\t\t\tfor (int y = 0; y < n; y++) {\r\n\t\t\t\t\r\n\t\t\t\tyVal = yVal + yDiff;\r\n\t\t\t\t\r\n\t\t\t\tPoint2D cords = new Point.Double(xVal, yVal);\r\n\r\n\t\t\t\tint escapeTime = multi.multibrot(cords);\r\n\t\t\t\t\r\n\t\t\t\tfractal[x][y] = escapeTime;\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\treturn fractal;\r\n\t\r\n}", "public void verifyDestroyedBoatsOnLines(){\n for (int i = 0; i < canvasNumberOfLines; i++){\n int start = 0;\n int startCopy = 0;\n \n for (int j = 0; j < canvasNumberOfColumns; j++){\n if (gameMatrix[i][j] != 0 && booleanMatrixUserChoices[i][j] == 1 && booleanFoundBoats[i][j] == 0){\n if (startCopy != gameMatrix[i][j] || start == 0){\n start = gameMatrix[i][j]+1;\n startCopy = gameMatrix[i][j];\n }\n }\n \n if (gameMatrix[i][j] == 0){\n start = 0;\n startCopy = 0;\n }\n \n if (start > 0 && booleanMatrixUserChoices[i][j] == 1){\n start--;\n }\n \n if (start == 1){\n if (startCopy == 1){\n boatsNumber[0] -= 1;\n booleanFoundBoats[i][j] = 1;\n }\n else if (startCopy == 2){\n boatsNumber[1] -= 1;\n booleanFoundBoats[i][j] = 1;\n booleanFoundBoats[i][j-1] = 1;\n }\n else if (startCopy == 3){\n boatsNumber[2] -= 1;\n booleanFoundBoats[i][j] = 1;\n booleanFoundBoats[i][j-1] = 1;\n booleanFoundBoats[i][j-2] = 1;\n }\n else if (startCopy == 4){\n boatsNumber[3] -= 1;\n booleanFoundBoats[i][j] = 1;\n booleanFoundBoats[i][j-1] = 1;\n booleanFoundBoats[i][j-2] = 1;\n booleanFoundBoats[i][j-3] = 1;\n }\n else if (startCopy == 5){\n boatsNumber[4] -= 1;\n booleanFoundBoats[i][j] = 1;\n booleanFoundBoats[i][j-1] = 1;\n booleanFoundBoats[i][j-2] = 1;\n booleanFoundBoats[i][j-3] = 1;\n booleanFoundBoats[i][j-4] = 1;\n }\n \n start = 0;\n startCopy = 0;\n }\n \n } \n } \n }", "static int superSeq(String X, String Y, int m, int n)\n {\n int[][] dp = new int[m + 1][n + 1];\n\n // Fill table in bottom up manner\n for (int i = 0; i <= m; i++) {\n for (int j = 0; j <= n; j++) {\n // Below steps follow above recurrence\n if (i == 0)\n dp[i][j] = j;\n else if (j == 0)\n dp[i][j] = i;\n else if (X.charAt(i - 1) == Y.charAt(j - 1))\n dp[i][j] = 1 + dp[i - 1][j - 1];\n else\n dp[i][j] = 1\n + Math.min(dp[i - 1][j],\n dp[i][j - 1]);\n }\n }\n\n return dp[m][n];\n }", "private void setupTimesTablesArray() {\n for (int i=0; i < ARRAY_SIZE; ++i)\n for (int j=0; j < ARRAY_SIZE; ++j)\n timesTables[i][j] = i * j;\n }", "public static int[]reparacion2(int[] hijo,int ttablero){\n int aux;\n int cont=0;\n int[] hijor=hijo;\n for(int i=0;i<=ttablero;i++){\n aux=hijo[i];\n for(int j=0;j<=ttablero;j++){\n if(aux==hijo[j]){\n cont=cont+1;\n // System.out.println(\"contador \"+cont+\" se repite el hijo \" +hijo[j]);\n }\n if (cont>=2) {\n hijor= RandomizeArray(0, ttablero); \n } \n \n }\n cont=0; \n }\n \n \n return hijor;\n }", "private int[][] genBlackAdjacentTilesCount(char[][] lobby) {\n int[][] neighborsCount = new int[lobby.length][lobby[0].length];\n\n for (int i = 0; i < lobby.length; i++) {\n for (int j = 0; j < lobby[0].length; j++) {\n List<AxialCoordinates> neighbors = findNeighbors(i, j);\n int blackCount = 0;\n for (AxialCoordinates coo : neighbors) {\n if (coo.rAxialCoordinate > 0 && coo.qAxialCoordinate > 0\n && coo.qAxialCoordinate < lobby.length && coo.rAxialCoordinate < lobby[0].length) {\n if (lobby[coo.qAxialCoordinate][coo.rAxialCoordinate] == 'b') {\n blackCount++;\n }\n }\n }\n neighborsCount[i][j] = blackCount;\n }\n// System.out.println();\n }\n return neighborsCount;\n }", "private Marker isMarker(MatOfPoint2f result, Mat texture) {\n boolean[][] pattern = new boolean[4][4];\n \n // reset error allowance\n int errorAllowance = 0;\n // Check border:\n for (int i = 1; i < MARKER_GRID - 1; i++) {\n if (testSample(half + (i * step), half,\n texture) > 0)\n errorAllowance++;\n if (testSample(half, half + (i * step), texture) > 0)\n errorAllowance++;\n if (testSample(half + (i * step), MARKER_SIZE - 1 - half,\n texture) > 0)\n errorAllowance++;\n if (testSample(MARKER_SIZE - 1 - half, half + (i * step),\n texture) > 0)\n errorAllowance++;\n }\n \n // we'll allow 4 incorrect border pieces but no more\n if (errorAllowance > 4) {\n log.debug(TAG, \"Discarding over incomplete border detection!\");\n // Return null if we're not debugging – we're done in that case.\n if (!DEBUG_DRAW_MARKER_ID && !DEBUG_DRAW_MARKERS)\n return null;\n }\n // Now read pattern:\n // time: ~3ms\n for (int i = 0; i < 4; i++)\n for (int j = 0; j < 4; j++) {\n pattern[i][j] = (testSample(half + (i + 1) * step,\n half + (j + 1) * step, texture) > 0);\n }\n \n // Check corners, get rotation, and rotate pattern to correct\n // orientation:\n // time: ~0ms\n int angle;\n if (!pattern[0][0] && pattern[0][3] && pattern[3][0] && pattern[3][3]) {\n angle = -90;\n pattern = rotatePattern(3, pattern);\n } else if (pattern[0][0] && !pattern[0][3] &&\n pattern[0][3] && pattern[3][3]) {\n angle = 0;\n } else if (pattern[0][0] && pattern[0][3] &&\n !pattern[3][0] && pattern[3][3]) {\n angle = 180;\n pattern = rotatePattern(2, pattern);\n } else if (pattern[0][0] && pattern[0][3] &&\n pattern[3][0] && !pattern[3][3]) {\n angle = 90;\n pattern = rotatePattern(1, pattern);\n } else {\n // This happens when a black border is found but has no\n // orientation information.\n log.debug(TAG, \"Discarding over missing orientation information!\");\n angle = -1;\n if (!DEBUG_DRAW_MARKER_ID && !DEBUG_DRAW_MARKERS)\n return null;\n }\n \n // Get Hamming code corrected id:\n // time: ~0ms\n int id = MarkerPatternHelper.getID(pattern);\n \n // Check if id is valid.\n if (id < 0) {\n log.debug(TAG, \"Discarding over illegal ID!\");\n return null;\n }\n \n Marker marker = new Marker(result, angle, id);\n \n // For debug, we need to remember the grayTexture, otherwise not.\n if (mainInterface.DEBUG_FRAME && (DEBUG_DRAW_MARKERS || DEBUG_POLY)) {\n // INFO: Debugging with this HALFS the framerate!\n marker.setDebugParameters(pattern, texture);\n return marker;\n }\n \n return marker;\n }", "@Test\n\tpublic void leftRighBlackCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(19,38);\n\t\td.set(20,40);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(40);\n\t\tassertTrue(5==test_arr.get(0).getX() && 3==test_arr.get(0).getY());\n\n\t}", "public void frameNoteDecoder(Integer[] frameNotes){\n //for(int i = 0;i<1;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n //}\n\n if(beatCounter==15) {\n for (int i = 0; i < frameNotes.length; i++) {\n if (melody.get(melodyCounter) == frameNotes[i]) {\n if (i < 2) {\n binaryOutput += \"0\";\n binaryOutput += Integer.toBinaryString(i);\n } else {\n binaryOutput += Integer.toBinaryString(i);\n }\n }\n }\n }\n if(beatCounter==31) {\n for (int i = 0; i < frameNotes.length; i++) {\n if (melody.get(melodyCounter) == frameNotes[i]) {\n binaryOutput += Integer.toBinaryString(i);\n }\n }\n }\n beatCounter++;\n melodyCounter++;\n\n\n}", "public List<MagicSquare> buildMagicSquares() {\n solutions = new ArrayList<>();\n sampler = new Sampler(Bound.getAllElements(1, totalNumbersCnt));\n\n for (int possibleNumber : sampler.getNumbers(new Bound(1, totalNumbersCnt))) {\n if (sampler.contains(possibleNumber)) {\n buildRow(sampler.getNumber(possibleNumber), 0, 0);\n }\n }\n\n return solutions;\n }", "public static int[][] buldMatrix(char[] X, char [] Y) {\n\t\t\tint row = X.length+1, col = Y.length+1;\n\t\t\tint mat[][] = new int[row][col]; \n\t\t\tint i=0, j=0;\n\t// first column\n\t\t\tfor (i=0; i<row; i++) mat[i][0]=0;\n\t// first row\n\t\t\tfor (j=0; j<col; j++) mat[0][j]=0;\n\t// Matrix Interior \n\t\t\tfor (i=1; i<row; i++) {\n\t\t\t\tfor (j=1; j<col; j++) {\n\t\t\t\t\tif (X[i-1]==Y[j-1]){\n\t\t\t\t\t\tmat[i][j] = mat[i-1][j-1] + 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tmat[i][j] = Math.max(mat[i-1][j], mat[i][j-1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn mat;\n\t\t}", "public void generaBuits() {\r\n\r\n //FIX PARA EL OUT OF BOUNDS DE la columna 9 \r\n //int cellId = randomGenerator(N*N) - 1;\r\n //QUITAR \r\n //if (j != 0)\r\n //j = j - 1;\r\n int count = K;\r\n while (count != 0) {\r\n int cellId = generadorAleatoris(N * N) - 1;\r\n\r\n //System.out.println(cellId); \r\n // extract coordinates i and j \r\n int i = (cellId / N);\r\n int j = cellId % 9;\r\n\r\n // System.out.println(i+\" \"+j); \r\n if (mat[i][j] != 0) {\r\n count--;\r\n mat[i][j] = 0;\r\n }\r\n }\r\n }", "public static String[][] getMapMatrix(HashMap<String, Tile> tiles) {\n\n Iterator<String> tileList = tiles.keySet().iterator();\n String[][] matrix = new String[tiles.keySet().size() + 1][tiles.keySet().size() + 1];\n\n // Initialize matrix\n int i = 1;\n matrix[0][0] = \"\";\n\n\n while (i <= tiles.keySet().size()) {\n if (tileList.hasNext()) {\n String tileName = tileList.next();\n matrix[i][0] = tileName;\n matrix[0][i] = tileName;\n i++;\n }\n }\n\n\n for (int j = 1; j <= tiles.keySet().size(); j++) {\n\n Tile t = tiles.get(matrix[j][0]);\n\n List<String> neighbours = t.getNeighbourTile();\n\n int k = 1;\n\n while (k <= tiles.keySet().size()) {\n\n if (neighbours.contains(matrix[0][k]))\n matrix[j][k] = \"Yes\";\n else\n matrix[j][k] = \"No \";\n\n k++;\n }\n }\n\n // Print matrix\n for (int j = 0; j <= tiles.keySet().size(); j++) {\n\n for (int k = 0; k <= tiles.keySet().size(); k++) {\n\n if (matrix[j][k].length() == 2)\n matrix[j][k] = matrix[j][k] + \" \";\n\n System.out.print(matrix[j][k] + \" \");\n }\n System.out.println();\n }\n\n return matrix;\n }", "static long gridlandMetro(long n, int m, int k, int[][] track) {\n Map<Integer, Stack<int[]>> map = new HashMap<>();\n for (int i = 0; i < k; i++) {\n int r = track[i][0];\n int c1 = track[i][1];\n int c2 = track[i][2];\n Stack<int[]> stack = map.get(r);\n if (stack == null) {\n stack = new Stack<>();\n stack.push(new int[] { c1, c2 });\n map.put(r, stack);\n } else {\n int[] c = stack.peek();\n if (c[1] >= c1)\n c[1] = Math.max(c[1], c2);\n else\n stack.push(new int[] { c1, c2 });\n }\n }\n return (long) n * m - map.values().stream().flatMap(Collection::stream).mapToLong(c -> c[1] - c[0] + 1).sum();\n}", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n GridlandMetro ts = new GridlandMetro();\n long rows = s.nextLong();\n long cols = s.nextLong();\n long numTracks = s.nextLong();\n HashMap<Long, List<Pair>> map_t = new HashMap();\n long numLampposts = 0L;\n\n\n for(long j=0; j<numTracks; j+=1L){\n\n long current_row = s.nextLong();\n long c1 = s.nextLong();\n long c2 = s.nextLong();\n if(!map_t.containsKey(current_row))\n map_t.put(current_row, new ArrayList<Pair>());\n map_t.get(current_row).add(ts.new Pair(c1,c2));\n\n }\n\n for(long i=(map_t.keySet().size()+1); i<=rows; i++)\n numLampposts += cols;\n\n for(Long current_key:map_t.keySet()){\n Collections.sort(map_t.get(current_key));\n long current_max = 1L;\n for(int i=0; i<map_t.get(current_key).size(); i++){\n if(current_max < map_t.get(current_key).get(i).start)\n numLampposts += map_t.get(current_key).get(i).start - current_max;\n if(current_max <= map_t.get(current_key).get(i).end)\n current_max = map_t.get(current_key).get(i).end + 1L;\n }\n numLampposts += cols-current_max+1;\n }\n\n\n\n\n System.out.println(numLampposts);\n }", "public static double[] calculateID(int[] widths, double[] distances) {\n double[] indexOfDifficulty = new double[distances.length];\n for (int i = 0; i < distances.length; i++) {\n indexOfDifficulty[i] = (Math.log((2*distances[i])/(double)widths[i+1]))/Math.log(2);\n }\n return indexOfDifficulty;\n }", "int main()\n{\n cin>>a.h>>a.m>>a.s>>b.h>>b.m>>b.s;\n int x=a.s-b.s;\n int y=a.m-b.m;\n int z=a.h-b.h;\n if(y<0){\n y+=60;\n z--;\n }\n if(x<0){\n x+=60;\n y--;\n }\n cout<<z<<\":\"<<y<<\":\"<<x;\n}", "private Matrix getFeatureMatrix(int sensor_id){\n\t\t\n\t\tdouble[][] matrix_shell = new double[this.M + this.number_of_sensors][1];\n\t\t\n\t\tfor(int i=0; i<this.M; i++){\n\t\t\t\n\t\t\tdouble temp_value = past_sensor_readings[sensor_id][i];\n\t\t\t\n\t\t\tmatrix_shell[i][0] = temp_value;\n\n\t\t}\n\t\t\n\t\tfor(int i=0; i<sensor_id; i++){\n\t\t\t\n\t\t\tdouble temp_value = current_sensor_readings[i];\n\t\t\t\n\t\t\tmatrix_shell[i+this.M][0] = temp_value;\n\t\t}\n\t\t\n\t\treturn new Matrix(matrix_shell);\n\t}", "static int getMinute(byte[] bytes) {\n if (MINUTE_POS < bytes.length * 8) {\n return readBits(bytes, MINUTE_POS, MINUTE_BITS);\n }\n return 0;\n }", "private static int[] findMiddles(int width, int height, BufferedImage oldImage)\n {\n // Stores the heighest up most and left most pixels that are black\n int firstX = width;\n int firstY = -1;\n\n // Stores the heighest down most and right most pixels that are black\n int lastX = 0;\n int lastY = 0;\n\n // For every pixel in the original image\n for(int y = 0; y < height; y++)\n {\n for(int x = 0; x < width; x++)\n {\n // If the pixel is black\n if(oldImage.getRGB(x, y) != 0xFF000000)\n {\n // If the up most pixel hasn't been found yet (the first one\n // has to be the upmost because of the way the image is parsed)\n if(firstY == -1)\n {\n firstY = y;\n }\n\n // The down most pixel has to be the last black pixel found\n // because of the way the image is parsd\n lastY = y;\n\n // If the current pixel is to the left of the current left\n // most pixel found\n if(firstX > x)\n {\n firstX = x;\n }\n\n // If the current pixel is to the right of the current right\n // most pixel found\n if(lastX < x)\n {\n lastX = x;\n }\n }\n }\n }\n\n // Computes the center of the rectangle found above, this should be about\n // the center of the digit as long as there are no random black pixels\n int middleX = (lastX - firstX) / 2 + firstX;\n int middleY = (lastY - firstY) / 2 + firstY;\n int middle[] = { middleX, middleY };\n return middle;\n }", "private static int[] calculateLotto() {\r\n int [] lotto = new int[LOTTERY_JACKPOT];\r\n int [] numbers = new int[LOTTERY_END];\r\n\r\n for (int i = 0; i < LOTTERY_END; i++) {\r\n numbers[i] = i;\r\n }\r\n\r\n int index = Math.getRandom(0, numbers.length - 1);\r\n\r\n for (int i = 0; i < lotto.length; i++) {\r\n lotto[i] = numbers[index];\r\n\r\n numbers = Arrays.removeIndex(numbers, index);\r\n\r\n index = Math.getRandom(0, numbers.length - 1);\r\n }\r\n\r\n return lotto;\r\n }", "int[] mo56160d();", "private void m13725b(long j) {\n while (!this.f11098q.isEmpty()) {\n C2084a c2084a = (C2084a) this.f11098q.removeFirst();\n this.f11106y -= c2084a.f5788b;\n for (TrackOutput sampleMetadata : this.f11083I) {\n sampleMetadata.sampleMetadata(j + c2084a.f5787a, 1, c2084a.f5788b, this.f11106y, null);\n }\n }\n }", "private void generateMaze(int x, int y) {generateMaze(getCell(x, y)); // gerar a partir da celula\r\n }", "private void estimateFlatEarthPolynomial() {\n int minLine = 0;\n int maxLine = sourceImageHeight;\n int minPixel = 0;\n int maxPixel = sourceImageWidth;\n \n Rectangle rectangle = new Rectangle();\n rectangle.setSize(maxPixel, maxLine);\n \n // int srpPolynomialDegree = 5; // for flat earth phase\n int numberOfCoefficients = numberOfCoefficients(srpPolynomialDegree);\n \n double[][] position = distributePoints(srpNumberPoints, rectangle);\n \n // setup observation and design matrix\n DoubleMatrix y = new DoubleMatrix(srpNumberPoints);\n DoubleMatrix A = new DoubleMatrix(srpNumberPoints, numberOfCoefficients);\n \n double masterMinPi4divLam = (-4 * Math.PI * Constants.lightSpeed) / masterMetadata.radar_wavelength;\n double slaveMinPi4divLam = (-4 * Math.PI * Constants.lightSpeed) / slaveMetadata.radar_wavelength;\n \n // Loop throu a vector or distributedPoints()\n for (int i = 0; i < srpNumberPoints; ++i) {\n \n double line = position[i][0];\n double pixel = position[i][1];\n \n // compute azimuth/range time for this pixel\n final double masterTimeRange = pix2tr(pixel, masterMetadata);\n \n // compute xyz of this point : sourceMaster\n Point3d xyzMaster = lp2xyz(line, pixel, masterMetadata, masterOrbit);\n \n final Point2d slaveTimeVector = xyz2t(xyzMaster, slaveMetadata, slaveOrbit);\n final double slaveTimeRange = slaveTimeVector.x;\n \n // observation vector\n y.put(i, (masterMinPi4divLam * masterTimeRange) - (slaveMinPi4divLam * slaveTimeRange));\n \n // set up a system of equations\n // ______Order unknowns: A00 A10 A01 A20 A11 A02 A30 A21 A12 A03 for degree=3______\n double posL = normalize(line, minLine, maxLine);\n double posP = normalize(pixel, minPixel, maxPixel);\n \n int index = 0;\n \n for (int j = 0; j <= srpPolynomialDegree; j++) {\n for (int k = 0; k <= j; k++) {\n // System.out.println(\"A[\" + i + \",\" + index + \"]: \"\n // + Math.pow(posL, (float) (j - k)) * Math.pow(posP, (float) k));\n A.put(i, index, (Math.pow(posL, (double) (j - k)) * Math.pow(posP, (double) k)));\n index++;\n }\n }\n }\n \n // Fit polynomial through computed vector of phases\n DoubleMatrix Atranspose = A.transpose();\n DoubleMatrix N = Atranspose.mmul(A);\n DoubleMatrix rhs = Atranspose.mmul(y);\n \n // TODO: validate Cholesky decomposition of JBLAS: see how it is in polyfit and reuse!\n \n // this should be the coefficient of the reference phase\n flatEarthPolyCoefs = Solve.solve(N, rhs);\n \n /*\n System.out.println(\"*******************************************************************\");\n System.out.println(\"_Start_flat_earth\");\n System.out.println(\"*******************************************************************\");\n System.out.println(\"Degree_flat:\" + polyDegree);\n System.out.println(\"Estimated_coefficients_flatearth:\");\n int coeffLine = 0;\n int coeffPixel = 0;\n for (int i = 0; i < numberOfCoefficients; i++) {\n if (flatEarthPolyCoefs.get(i, 0) < 0.) {\n System.out.print(flatEarthPolyCoefs.get(i, 0));\n } else {\n System.out.print(\" \" + flatEarthPolyCoefs.get(i, 0));\n }\n \n System.out.print(\" \\t\" + coeffLine + \" \" + coeffPixel + \"\\n\");\n coeffLine--;\n coeffPixel++;\n if (coeffLine == -1) {\n coeffLine = coeffPixel;\n coeffPixel = 0;\n }\n }\n System.out.println(\"*******************************************************************\");\n System.out.println(\"_End_flat_earth\");\n System.out.println(\"*******************************************************************\");\n */\n \n // TODO: test inverse : when cholesky is finished\n // // ______Test inverse______\n // for (i=0; i<Qx_hat.lines(); i++)\n // for (j=0; j<i; j++)\n // Qx_hat(j,i) = Qx_hat(i,j);// repair Qx_hat\n // const real8 maxdev = max(abs(N*Qx_hat-eye(real8(Qx_hat.lines()))));\n // INFO << \"flatearth: max(abs(N*inv(N)-I)) = \" << maxdev;\n // INFO.print();\n // if (maxdev > .01)\n // {\n // ERROR << \"Deviation too large. Decrease degree or number of points?\";\n // PRINT_ERROR(ERROR.get_str())\n // throw(some_error);\n // }\n // else if (maxdev > .001)\n // {\n // WARNING << \"Deviation quite large. Decrease degree or number of points?\";\n // WARNING.print();\n // }\n // else\n // {\n // INFO.print(\"Deviation is OK.\");\n // }\n // // ______Some other stuff, scale is ok______\n // matrix<real8> y_hat = A * rhs;\n // matrix<real8> e_hat = y - y_hat;\n }", "public void agregarVidaLogica(){\n int numvida = tam * tam;\n numvida*=0.05;\n System.out.println(numvida);\n for(int i=0;i<numvida;i++){\n int x= (int)(Math.random()*tam);\n int y= (int)(Math.random()*tam);\n if(matriz[y][x]!=2 && matriz[y][x]!=1){\n matriz[y][x]=4;\n }\n }\n }", "@Test\r\n public void Test030generateNextPattern()\r\n {\r\n gol.makeLiveCell(2, 5);\r\n gol.makeLiveCell(2, 6);\r\n gol.makeLiveCell(2, 7);\r\n gol.makeLiveCell(3, 5);\r\n gol.makeLiveCell(3, 7);\r\n gol.makeLiveCell(4, 5);\r\n gol.makeLiveCell(4, 6);\r\n gol.makeLiveCell(4, 7);\r\n\r\n gol.generateNextPattern();\r\n\r\n assertEquals(8, gol.getTotalAliveCells());\r\n\r\n }", "private static void solution() {\n for (int i = 0; i < n; i++) {\n Coord here = coords[i]; // start, end, dir, gen\n for (int j = 0; j < here.gen; j++) {\n // Rotate degree of 90.\n List<Pair> changed = rotate(here.coord, here.endPoint);\n boolean first = true;\n for(Pair p: changed){\n if(first) {\n here.endPoint = new Pair(p.x, p.y);\n first = false;\n }\n here.coord.add(new Pair(p.x, p.y));\n }\n }\n }\n // count the number of squares enclosing all angles with dragon curve\n for (int i = 0; i < n; i++) {\n for(Pair p: coords[i].coord)\n board[p.y][p.x] = true;\n }\n int cnt = 0;\n for (int i = 0; i < 100; i++)\n for (int j = 0; j < 100; j++)\n if(board[i][j] && board[i + 1][j] && board[i][j + 1] && board[i + 1][j + 1])\n cnt += 1;\n System.out.println(cnt);\n }", "public Hashtable<T,ratingCoord<T>> processSamplesLandmarks_(long timer, List<T> landmarks,\n\t\t\tMatrix centralizedRatingMat) {\n\t\t// TODO Auto-generated method stub\n\t//\tMatrix mat=centralizedRatingMat.subMatrix(landmarks,landmarks);\n\t\t\n\t\tHashtable<T,ratingCoord<T>> coords = MyConvergeMMMF_bias.getInstance().compute_basicMMMF(landmarks, centralizedRatingMat, dim, level);\n\t\t//Iterator<ratingCoord<T>> ier = coords.iterator();\n\t\t\n\t\treturn coords;\t\t\n\t}", "public static void main (String[] args) {\n double[][] matrix = new double[25][25];\n for (int i = 0; i < matrix.length; i++) { //Vertical matrix (y-akse)\n for (int j = 0; j < matrix[i].length; j++) { //Horizontal matrix (x-akse)\n // Math.random gives at random number between 0 and 1\n // (int)(Math.random() * ((upperbound - lowerbound) + 1) + lowerbound); \n // Generate a random numbers between 50 and 100 \n matrix[i][j] = (int)(Math.random() * ((100 - 50) + 1) + 50);\n }\n } \n min(matrix);\n \n }", "public int[] convertLiveData(int[] points, String stringBuffer) {\n\t\tString[] dataArray = StringHelper.splitString(stringBuffer, \"\\r\", \"\\n\");\n\t\tfor (int i=2; i < dataArray.length; i++) {\n\t\t\t//0=VoltageRx, 1=Voltage, 2=Current, 3=Capacity, 4=Power, 5=Energy, 6=CellBalance, 7=CellVoltage1, 8=CellVoltage2, 9=CellVoltage3, \n\t\t\t//10=CellVoltage4, 11=CellVoltage5, 12=CellVoltage6, 13=Revolution, 14=Efficiency, 15=Height, 16=Climb, 17=ValueA1, 18=ValueA2, 19=ValueA3,\n\t\t\t//20=AirPressure, 21=InternTemperature, 22=ServoImpuls In, 23=ServoImpuls Out, \n\t\t\ttry {\n\t\t\t\tswitch (i) {\n\t\t\t\tcase 2: // 0.00A -3.4m\n\t\t\t\t\tpoints[2] = (int) (Double.parseDouble(dataArray[i].split(\"A\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[15] = (int) (Double.parseDouble(dataArray[i].split(\"A\")[1].split(\"m\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: // 16.23V +0.1m/s\n\t\t\t\t\tpoints[1] = (int) (Double.parseDouble(dataArray[i].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[16] = (int) (Double.parseDouble(dataArray[i].split(\"V\")[1].split(\"m\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: // 0W 0rpm\n\t\t\t\t\tpoints[4] = (int) (Double.parseDouble(dataArray[i].split(\"W\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[13] = (int) (Double.parseDouble(dataArray[i].split(\"W\")[1].split(\"r\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5: // 0mAh 0.00VRx\n\t\t\t\t\tpoints[3] = (int) (Double.parseDouble(dataArray[i].split(\"m\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[0] = (int) (Double.parseDouble(dataArray[i].split(\"h\")[1].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6: // 0Wmin \n\t\t\t\t\tpoints[5] = (int) (Double.parseDouble(dataArray[i].split(\"W\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7: // 0us -> |0us\n\t\t\t\t\tpoints[22] = (int) (Double.parseDouble(dataArray[i].split(\"us\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[23] = (int) (Double.parseDouble(dataArray[i].split(\"us\")[1].replace(\"|\", \"\").substring(3).trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10: // 4.04V1 4.05V2\n\t\t\t\t\tpoints[7] = (int) (Double.parseDouble(dataArray[i].split(\"V1\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[8] = (int) (Double.parseDouble(dataArray[i].split(\"V1\")[1].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 11: // 4.05V3 4.08V4\n\t\t\t\t\tpoints[9] = (int) (Double.parseDouble(dataArray[i].split(\"V3\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[10] = (int) (Double.parseDouble(dataArray[i].split(\"V3\")[1].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12: // 0.00V5 0.00V6\n\t\t\t\t\tpoints[11] = (int) (Double.parseDouble(dataArray[i].split(\"V5\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[12] = (int) (Double.parseDouble(dataArray[i].split(\"V5\")[1].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 13: // A1 0.6mV\n\t\t\t\t\tString tmpValueA1 =dataArray[i].substring(2).trim();\n\t\t\t\t\ttmpValueA1 = tmpValueA1.contains(\"|\") ? tmpValueA1.substring(0, tmpValueA1.indexOf('|')) + tmpValueA1.substring(tmpValueA1.indexOf('|')+1) : tmpValueA1;\n\t\t\t\t\tif(tmpValueA1.contains(\"mV\"))\n\t\t\t\t\t\tpoints[17] = (int) (Double.parseDouble(tmpValueA1.split(\"mV\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA1.contains(\"`C\"))\n\t\t\t\t\t\tpoints[17] = (int) (Double.parseDouble(tmpValueA1.split(\"`C\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA1.contains(\"km/h\"))\n\t\t\t\t\t\tpoints[17] = (int) (Double.parseDouble(tmpValueA1.split(\"km/h\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 14: // A2 0.6mV\n\t\t\t\t\tString tmpValueA2 =dataArray[i].substring(2).trim();\n\t\t\t\t\ttmpValueA2 = tmpValueA2.contains(\"|\") ? tmpValueA2.substring(0, tmpValueA2.indexOf('|')) + tmpValueA2.substring(tmpValueA2.indexOf('|')+1) : tmpValueA2;\n\t\t\t\t\tif(tmpValueA2.contains(\"mV\"))\n\t\t\t\t\t\tpoints[18] = (int) (Double.parseDouble(tmpValueA2.split(\"mV\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA2.contains(\"`C\"))\n\t\t\t\t\t\tpoints[18] = (int) (Double.parseDouble(tmpValueA2.split(\"`C\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA2.contains(\"km/h\"))\n\t\t\t\t\t\tpoints[18] = (int) (Double.parseDouble(tmpValueA2.split(\"km/h\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 15: // A3 0.6mV\n\t\t\t\t\tString tmpValueA3 =dataArray[i].substring(2).trim();\n\t\t\t\t\ttmpValueA3 = tmpValueA3.contains(\"|\") ? tmpValueA3.substring(0, tmpValueA3.indexOf('|')) + tmpValueA3.substring(tmpValueA3.indexOf('|')+1) : tmpValueA3;\n\t\t\t\t\tif(tmpValueA3.contains(\"mV\"))\n\t\t\t\t\t\tpoints[19] = (int) (Double.parseDouble(tmpValueA3.split(\"mV\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA3.contains(\"`C\"))\n\t\t\t\t\t\tpoints[19] = (int) (Double.parseDouble(tmpValueA3.split(\"`C\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA3.contains(\"km/h\"))\n\t\t\t\t\t\tpoints[19] = (int) (Double.parseDouble(tmpValueA3.split(\"km/h\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 18: // Druck 970.74hPa\n\t\t\t\t\tpoints[20] = (int) (Double.parseDouble(dataArray[i].substring(dataArray[i].lastIndexOf(\" \"), dataArray[i].length()-3).trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 19: // intern 32.1`C\n\t\t\t\t\tpoints[21] = (int) (Double.parseDouble(dataArray[i].substring(dataArray[i].lastIndexOf(\" \"), dataArray[i].length()-2).trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (RuntimeException e) {\n\t\t\t\t//ignore;\n\t\t\t}\n\t\t}\n\n\t\tint maxVotage = Integer.MIN_VALUE;\n\t\tint minVotage = Integer.MAX_VALUE;\n\t\tfor (int i = 7; i <= 12; i++) {\n\t\t\tif (points[i] > 0) {\n\t\t\t\tmaxVotage = points[i] > maxVotage ? points[i] : maxVotage;\n\t\t\t\tminVotage = points[i] < minVotage ? points[i] : minVotage;\n\t\t\t}\n\t\t}\n\t\tpoints[6] = (maxVotage != Integer.MIN_VALUE && minVotage != Integer.MAX_VALUE ? maxVotage - minVotage : 0) * 1000;\n\t\t\n\t\treturn points;\n\t}" ]
[ "0.5069594", "0.5020144", "0.49823195", "0.49806768", "0.49156767", "0.49148917", "0.48923466", "0.48716268", "0.48422214", "0.48384", "0.48320445", "0.4829256", "0.48262414", "0.4810128", "0.48067182", "0.47918326", "0.47875696", "0.47777313", "0.47611204", "0.4741652", "0.47365388", "0.4728279", "0.47157544", "0.47118992", "0.47033498", "0.46936506", "0.46694392", "0.46567088", "0.46524352", "0.46498016", "0.4642573", "0.46371812", "0.46265736", "0.46111345", "0.4599176", "0.45966476", "0.45917428", "0.4591734", "0.45883968", "0.4577406", "0.4572641", "0.45692548", "0.45688415", "0.45644906", "0.4558586", "0.45583594", "0.45543566", "0.45405537", "0.45364574", "0.45310867", "0.45310116", "0.4522694", "0.4517257", "0.4511722", "0.4509508", "0.45078012", "0.45008928", "0.45005324", "0.44957143", "0.44873467", "0.44831115", "0.44825977", "0.44817662", "0.4481327", "0.44811407", "0.44707862", "0.4460406", "0.4456652", "0.44562358", "0.44544005", "0.44539112", "0.4449861", "0.44451377", "0.44448787", "0.4441956", "0.44355455", "0.44335252", "0.44330403", "0.44314572", "0.443059", "0.44269055", "0.4425267", "0.44186634", "0.44168454", "0.44124952", "0.4412033", "0.44058716", "0.44058257", "0.44016674", "0.4401369", "0.4401313", "0.43942136", "0.43880945", "0.43839052", "0.43807113", "0.43799883", "0.43797177", "0.43742082", "0.43707618", "0.43609354" ]
0.48651654
8
constructore to instance Utils
public Server() throws IOException { System.out.println("\t Server Started \n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "public Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "private Util() { }", "@Override\n\tpublic void initUtils() {\n\n\t}", "public ObjectUtils() {\n super();\n }", "private Util() {\n }", "private Util() {\n }", "private Util() {\n }", "private RunUtils() {\n }", "private BuilderUtils() {}", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private CollectionUtils() {\n\n\t}", "private InstanceUtil() {\n }", "private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}", "private SnapshotUtils() {\r\n\t}", "private Utility() {\n\t}", "protected CombinatoricsUtils() {\n super();\n }", "private TriggerUtils() {\n }", "private ProcessorUtils() { }", "private DataProviderUtils() {\n }", "private ClassUtil() {}", "private J2EEUtils() {\n }", "private OMUtil() { }", "public ExceptionUtils()\n {\n // nothing to do\n }", "private UIUtils() {\n }", "private UtilsCache() {\n\t\tsuper();\n\t}", "private AuthenticationUtil(){\r\n //utility class\r\n }", "private JacobUtils() {}", "public ResourceUtils() {\r\n //stub\r\n }", "private FunctionUtils() {\n }", "private BeanUtils() {\n\t\t\n\t}", "private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }", "private ClimateAlertUtils() {\n }", "private ValidationUtils() {}", "private ClassifierUtils() {\n throw new AssertionError();\n }", "private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }", "private VlcUtils()\n {\n \n }", "private Utility() {\n throw new IllegalAccessError();\n }", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private CreateDateUtils()\r\n\t{\r\n\t}", "private NetUtils() {\r\n\t}", "public TypeUtils() {\n\t}", "private ModuleUtil()\n {\n }", "private XMLUtils()\r\n\t{\r\n\t}", "private XMLUtils() {\n }", "private SerializationUtils() {\n\n }", "private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "protected VboUtil() {\n }", "private ComparableEntitySpanUtils() {\n // Singleton\n }", "private UtilityKlasse() {\n\n }", "private MetallicityUtils() {\n\t\t\n\t}", "private SysUtils(){}", "Reproducible newInstance();", "protected HadoopUtils() { }", "private GuiUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private ReflectionUtil()\n {\n }", "private WolUtil() {\n }", "private ZipUtils() {\n }", "private RdfFormatUtils() {\n }", "private OSUtil()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not permitted.\");\n }", "private HabitTrackerUtils() {\n // Required empty private constructor (to prevent instantiation).\n }", "private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private PhoneUtils() {\n }", "private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}", "private FeedbackUtils() {\n }", "private GwtUtils() {\n }", "private KubevirtNetworkingUtil() {\n }", "private ClipboardUtils() {\n //EMPTY\n }", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "private QueryUtils() {\n\n }", "private JarUtils() {\n }", "private LangUtilities() {\n }", "private RestUtil() {\n\t}", "private PrefUtils() {\n }", "private JsonUtils() {\n\t\tsuper();\n\t}", "private XMLUtil() {\n\t}", "private XhtmlUtils()\n\t{\n\t}", "private IOUtilities() {\n }", "private DrillCalciteWrapperUtility() {\n }", "private Helper() {\r\n // empty\r\n }", "public XMLUtils() {\r\n\t\tsuper();\r\n\t}", "private ThreadUtil() {\n }", "private GeoUtil()\n\t{\n\t}", "private BytesUtils() {\n\n }", "private CLUtil()\n {\n }", "private SupplierLoaderUtil() {\n\t}", "private CheckUtil(){ }", "private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }", "private ThreadUtil() {\n \n }" ]
[ "0.8083887", "0.7980483", "0.7980483", "0.7980483", "0.7980483", "0.7866993", "0.7802252", "0.7783182", "0.7783182", "0.7783182", "0.7783182", "0.7783182", "0.7711661", "0.7711661", "0.7507937", "0.736765", "0.735699", "0.73322296", "0.73322296", "0.7315308", "0.7312255", "0.7281775", "0.7190776", "0.71689725", "0.70727426", "0.703797", "0.70232", "0.6993752", "0.69842", "0.68701357", "0.6861575", "0.685886", "0.68524146", "0.68274355", "0.6818382", "0.67980087", "0.67560685", "0.67388433", "0.6721971", "0.672065", "0.6707876", "0.6700013", "0.6697518", "0.66916054", "0.6689866", "0.66774726", "0.66773343", "0.66769546", "0.66767156", "0.6654798", "0.66479194", "0.6619101", "0.66135263", "0.66024446", "0.65989435", "0.6585801", "0.6584883", "0.6578098", "0.65762645", "0.6562901", "0.6559235", "0.6553948", "0.6551293", "0.6516634", "0.65147233", "0.65029114", "0.6488101", "0.64863575", "0.64743614", "0.64712566", "0.6462184", "0.6461187", "0.64591765", "0.64464694", "0.64383155", "0.6426609", "0.6422068", "0.64196765", "0.64089596", "0.6408605", "0.64080936", "0.64056534", "0.6403707", "0.6399762", "0.63558847", "0.6352041", "0.6350591", "0.63426775", "0.6341851", "0.6341625", "0.6335335", "0.6326614", "0.63265556", "0.63214594", "0.6320776", "0.63193583", "0.6312794", "0.6291211", "0.62710124", "0.6269005", "0.6267677" ]
0.0
-1
metodo che restuisce la port del server sul quale rimane in ascolto
public int getPort() { return port; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int serverPort ();", "default int getPort() {\n return getServer().getPort();\n }", "default Object port() {\n return metadata().get(\"server-port\");\n }", "public int getServerPort(){\n\t\treturn serverPort; \n\t}", "public int getPort();", "public int getPort();", "public int getPort();", "String getPort();", "public int getPort()\n {\n return port;\n }", "int getPort()\n {\n return port;\n }", "public int getServerPortNumber(){\n return this.serverPortNumber;\n }", "@Override\n\t\tpublic int getServerPort() {\n\t\t\treturn 0;\n\t\t}", "@Override\n\tpublic int getServerPort() {\n\t\treturn 0;\n\t}", "default int getPort()\n {\n return getInt(\"port\", 80);\n }", "public int getPort(){\r\n return localPort;\r\n }", "public int getPort(){\r\n return localPort;\r\n }", "Integer listeningPort();", "void startServer(int port) throws Exception;", "public int getPort(){\n return port;\n }", "int localPort();", "void port(int port);", "void port(int port);", "public void setPort(int port);", "public void setPort(int port);", "int getPort() {\n return port;\n }", "public static int getPort(){\n return catalogue.port;\n }", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "int getPort();", "public int getPort(){\n\treturn port;\n }", "java.lang.String getPort();", "java.lang.String getPort();", "int getServicePort();", "Builder port(int port);", "public String getPort(){\n return port;\n }", "public int getPort()\n {\n return port;\n }", "public int getPort()\n {\n\t\treturn url.getPort();\n }", "public static int getServerPort(){\n return thisServer.getPort();\n }", "public int getPort () {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getServerPort() {\n return serverPort;\n }", "public static int getServerPort() {\n return serverPort;\n }", "public void testSetPort() {\n }", "public static int getServerPort() {\n return _serverPort;\n }", "public Integer getServerport() {\n return serverport;\n }", "public int getPort() {\r\n return port;\r\n }", "public int getPort() {\r\n return port;\r\n }", "public int getPort() {\r\n return port;\r\n }", "void setServicePort( int p );", "public static void setPort(int port){\n catalogue.port = port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "int getQueryPort();", "public static int getServerPort() { return Integer.parseInt(tfJoinPort.getText()); }", "public void port (int port) {\n this.port = port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "@java.lang.Override\n public int getPort() {\n return port_;\n }", "@java.lang.Override\n public int getPort() {\n return port_;\n }", "public int getPort() {\n \t\treturn port;\n \t}", "public int getPort() {\n \t\treturn port;\n \t}", "public int getPort(Env env) {\n return client.getPort();\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getGnutellaPort();", "public int getServerPort() {\n\t\treturn serverPort;\n\t}", "public static int getPort() {\n return port;\n }", "public void setServer(int port) {\n this.server = port;\n }", "@java.lang.Override\n public int getPort() {\n return port_;\n }", "@java.lang.Override\n public int getPort() {\n return port_;\n }", "public ServeurGestion(int portClient){\r\n try {\r\n ecoute=new ServerSocket(portClient);\r\n appels=new Vector<>();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ServeurGestion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public Integer getPort() {\n return port;\n }", "@Override\n\tpublic Integer getPort() {\n\t\treturn port;\n\t}", "public void start(int port);", "int getIntegPort();", "public WebServer (int port)\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 = port; \t\t\t\t\t\t\t\t\t\t\r\n\t}", "public String getServerPort() {\r\n\t\treturn this.serverPort;\r\n\t}", "Builder setPort(String port);" ]
[ "0.74061644", "0.72150046", "0.69414914", "0.6917228", "0.6898163", "0.6898163", "0.6898163", "0.68894905", "0.6885417", "0.68381816", "0.68284523", "0.68144304", "0.6810471", "0.68101937", "0.68059504", "0.68059504", "0.67950714", "0.6795033", "0.6767385", "0.6766919", "0.67650306", "0.67650306", "0.6760622", "0.6760622", "0.67406136", "0.67292315", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.67285526", "0.6719044", "0.67095697", "0.67095697", "0.6697369", "0.66902614", "0.66880715", "0.6682123", "0.6664352", "0.6663988", "0.6663559", "0.66335446", "0.66335446", "0.66335446", "0.66335446", "0.66335446", "0.66099405", "0.66006434", "0.65995955", "0.6573842", "0.65677047", "0.6566876", "0.6566876", "0.6566876", "0.65576017", "0.651949", "0.6507277", "0.6507277", "0.6507277", "0.6507277", "0.6507277", "0.6507277", "0.6507277", "0.6507277", "0.64874387", "0.64815795", "0.6479387", "0.6477387", "0.6477387", "0.64699423", "0.64691454", "0.64633477", "0.64633477", "0.64599496", "0.645075", "0.645075", "0.645075", "0.645075", "0.64463913", "0.64103323", "0.6407313", "0.6398092", "0.63824046", "0.63824046", "0.637503", "0.6374832", "0.6361226", "0.6344388", "0.6343346", "0.6333632", "0.63315403", "0.6327106" ]
0.703886
2
TODO Autogenerated method stub
public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "chromedriver.exe"); ChromeDriver driver =new ChromeDriver(); driver.get("https://www.cleartrip.com/"); driver.manage().window().maximize(); driver.findElement(By.id("DepartDate")).click(); String dateOfTravel="2/December/2019"; String day,month,year; String date[]=dateOfTravel.split("/"); // delimeter / day=date[0]; month=date[1]; year=date[2]; String calMonth,CalYear; CalYear=driver.findElement(By.xpath(".//*[@id='ui-datepicker-div']/div[2]/div/div/span[2]")).getText(); System.out.println(CalYear); System.out.println(year); while(!CalYear.equals(year)) { driver.findElement(By.xpath(".//*[@id='ui-datepicker-div']/div[2]/div/a")).click(); CalYear=driver.findElement(By.xpath(".//*[@id='ui-datepicker-div']/div[2]/div/div/span[2]")).getText(); System.out.println("While loop printing year " +CalYear); } calMonth=driver.findElement(By.xpath(".//*[@id='ui-datepicker-div']/div[2]/div/div/span[1]")).getText(); System.out.println("current month visible is " +calMonth); System.out.println(month); while(!calMonth.equals(month)) { driver.findElement(By.xpath(".//*[@id='ui-datepicker-div']/div[2]/div/a")).click(); calMonth=driver.findElement(By.xpath(".//*[@id='ui-datepicker-div']/div[2]/div/div/span[1]")).getText(); System.out.println("while loop printing month " +calMonth); } List<WebElement> tdList=driver.findElements(By.xpath("//table[@class='calendar']/tbody/tr/td")); for(int i=0;i<tdList.size();i++) { WebElement e = tdList.get(i); if(e.getText().equals(day)) { System.out.println("date matched " +e.getText()); e.click(); break; } } }
{ "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
Set the name of the parameter that contains a locale specification in a locale change request. Default is "locale".
public void setParamName(String paramName) { this.paramName = paramName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLocale(Locale locale) {\n fLocale = locale;\n }", "public void setRequestedLocale(final Locale val) {\n requestedLocale = val;\n }", "protected void setLocale(Locale locale) {\n this.locale = locale;\n }", "public void setLocale(Locale locale)\n {\n this.locale = locale;\n }", "public void setLocale(Locale locale) {\n\n\t}", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setLocale(Locale l) {\n if (!initialized)\n super.setLocale(l);\n else {\n locale = l;\n initNames();\n }\n }", "@RequestMapping(value = \"/localechange/{locale}\", method = RequestMethod.GET)\r\n public String changeLocale(@PathVariable(\"locale\") String locale, HttpServletRequest request, HttpServletResponse response) {\r\n if (locale != null) {\r\n if (locale.equals(\"de\")) {\r\n RequestContextUtils.getLocaleResolver(request).setLocale(request, response, Locale.GERMAN);\r\n } else {\r\n RequestContextUtils.getLocaleResolver(request).setLocale(request, response, Locale.ENGLISH);\r\n }\r\n }\r\n return \"redirect:/home\";\r\n }", "public void setLocale(Locale locale) {\r\n this.locale = locale;\r\n }", "public final void setLocale( Locale locale )\n {\n }", "public void setLocale(Locale locale) {\n this.locale = locale;\n }", "public void setLocale(Locale locale) {\n this.locale = locale;\n }", "@Override\n public void setLocale(Locale arg0) {\n\n }", "public void setPreferredLocale(Locale locale);", "public void setLocale (\r\n String strLocale) throws java.io.IOException, com.linar.jintegra.AutomationException;", "@Override\n\tpublic void setLocale(Locale loc) {\n\t}", "protected void setLocale(Locale locale) {\n this.locale = locale;\n }", "public void setLocale(Locale locale) {\n/* 462 */ ParamChecks.nullNotPermitted(locale, \"locale\");\n/* 463 */ this.locale = locale;\n/* 464 */ setStandardTickUnits(createStandardDateTickUnits(this.timeZone, this.locale));\n/* */ \n/* 466 */ fireChangeEvent();\n/* */ }", "private void setLocale( String localeName )\r\n\t{\r\n\t\tConfiguration conf = getResources().getConfiguration();\r\n\t\tconf.locale = new Locale( localeName );\r\n\t\t\r\n\t\tsetCurrentLanguage( conf.locale.getLanguage() );\r\n\r\n\t\tDisplayMetrics metrics = new DisplayMetrics();\r\n\t\tgetWindowManager().getDefaultDisplay().getMetrics( metrics );\r\n\t\t\r\n\t\t// the next line just changes the application's locale. It changes this\r\n\t\t// globally and not just in the newly created resource\r\n\t\tResources res = new Resources( getAssets(), metrics, conf );\r\n\t\t// since we don't need the resource, just allow it to be garbage collected.\r\n\t\tres = null;\r\n\r\n\t\tLog.d( TAG, \"setLocale: locale set to \" + localeName );\r\n\t}", "@Override\n\tpublic final void setLocale(final Locale locale)\n\t{\n\t\tif (httpServletResponse != null)\n\t\t{\n\t\t\thttpServletResponse.setLocale(locale);\n\t\t}\n\t}", "public void setLocale(String locale)\n\t\t{\n\t\t this.setLocaleLocked(locale);\n\t\t}", "protected void localeChanged() {\n\t}", "protected String getLocaleQueryParam() {\n return LocaleInfo.getLocaleQueryParam();\n }", "@ZAttr(id=345)\n public void setLocale(String zimbraLocale) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraLocale, zimbraLocale);\n getProvisioning().modifyAttrs(this, attrs);\n }", "@Bean\n LocaleChangeInterceptor localeChangeInterceptor(){\n LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();\n localeChangeInterceptor.setParamName(\"lang\");\n return localeChangeInterceptor;\n }", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor() {\n LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();\n localeChangeInterceptor.setParamName(\"lang\");\n return localeChangeInterceptor;\n }", "public static void updateLocale(HttpServletRequest request, Locale locale) {\n\t\tupdateLocale(request.getSession(), locale);\n\t}", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor() {\n LocaleChangeInterceptor lci = new LocaleChangeInterceptor();\n lci.setParamName(\"lang\");\n return lci;\n }", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor() {\n LocaleChangeInterceptor lci = new LocaleChangeInterceptor();\n lci.setParamName(\"lang\");\n return lci;\n }", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor(){\n var lci = new LocaleChangeInterceptor();\n lci.setParamName(\"lang\");// lang para que despues desde la url escojamos el idioma\n return lci;\n }", "private void setLocale() {\n\t\tLocale locale = new Locale(this.getString(R.string.default_map_locale));\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config,\n getBaseContext().getResources().getDisplayMetrics());\n\t}", "public void updateLocale() {\r\n\t\tsuper.updateLocale();\r\n\t}", "public void setLocale(Locale loc) {\n this.response.setLocale(loc);\n }", "@Bean\r\n\tpublic LocaleChangeInterceptor localeChangeInterceptor() {\r\n\t\tLocaleChangeInterceptor localeInterceptor = new LocaleChangeInterceptor();\r\n\t\tlocaleInterceptor.setParamName(\"lang\");\r\n\t\treturn localeInterceptor;\r\n\t}", "@ApiModelProperty(value = \"The locale of the contained data\")\n public String getLocale() {\n return locale;\n }", "public void setLocale (final Locale locale) {\n\t\tthis.locale = locale;\n\t}", "public void setLocale(String locale) {\n locale = fixLocale(locale);\n this.locale = locale;\n this.uLocale = new ULocale(locale);\n String lang = uLocale.getLanguage();\n if (locale.equals(\"fr_CA\") || lang.equals(\"en\")) {\n throw new RuntimeException(\"Skipping \" + locale);\n }\n cldrFile = cldrFactory.make(locale, false);\n UnicodeSet exemplars = cldrFile.getExemplarSet(\"\",WinningChoice.WINNING);\n usesLatin = exemplars != null && exemplars.containsSome(LATIN_SCRIPT);\n for (DataHandler dataHandler : dataHandlers) {\n dataHandler.reset(cldrFile);\n }\n }", "public abstract Builder setDisplayNamesLocale(String value);", "@ZAttr(id=345)\n public Map<String,Object> setLocale(String zimbraLocale, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraLocale, zimbraLocale);\n return attrs;\n }", "public void setLocale (Locale locale) {\n _locale = locale;\n _cache.clear();\n _global = getBundle(_globalName);\n }", "protected void setLocale(Locale locale) {\n this.locale = LocaleHelper.normalize(locale);\n }", "public RequestAndSessionLocaleResolver(Locale locale) {\n\t\tsetDefaultLocale(locale);\n\t}", "protected String setlocale(String locale, String category) {\n\t\treturn \"C\";\n\t}", "public void setLocale(Locale locale)\n throws SAXException\n {\n if (\"en\".equals(locale.getLanguage()))\n {\n return;\n }\n throw new SAXException (\"AElfred2 only supports English locales.\");\n }", "public static void setLocale(Locale newLocale) {\n if (newLocale == null) {\n newLocale = Locale.getDefault();\n }\n localeInfo.set(newLocale);\n }", "public void setLocaleL(Locale localeL) {\n\t\tpanelVirtualKeyboard.setLocaleL(localeL);\n\t}", "public static void setLocale(Locale locale) {\n// Recarga las entradas de la tabla con la nueva localizacion \n RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, locale);\n}", "public static void setCurrentLocale(HttpSession session, Locale locale) {\r\n\t\tif (session == null)\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Cannot set an attribute on a null session\");\r\n\t\tif (locale == null)\r\n\t\t\tthrow new IllegalArgumentException(\"the value of the \"\r\n\t\t\t\t\t+ CURRENT_LOCALE_NAME + \" attribute should not be null\");\r\n\t\tsession.setAttribute(CURRENT_LOCALE_NAME, locale);\r\n\t}", "public void setLocale(Locale locale) {\n\t\t\n\t\tif(locale == null) throw new IllegalArgumentException(\"locale must be not null!\");\n\t\t\n\t\tLocale oldLocale = this.locale; \n\t\t\n\t\tif(oldLocale != locale) {\n\t\t\t\n\t\t\tresourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE_NAME, locale, control);\n\t\t\t\n\t\t\tthis.locale = locale;\n\t\t\t\n\t\t\tPropertiesManager propertiesManager = PropertiesManager.getInstance();\n\t\t\t\n\t\t\tString language = locale.getLanguage();\n\t\t\tString country = locale.getCountry();\n\t\t\tString variant = locale.getVariant();\n\t\t\t\n\t\t\tpropertiesManager.setProperty(\"locale.language\", language);\n\t\t\tpropertiesManager.setProperty(\"locale.country\", country);\n\t\t\tpropertiesManager.setProperty(\"locale.variant\", variant);\n\n\t\t\tfireLocaleChanged(oldLocale, locale);\n\t\t}\n\t}", "public static void resolveRestApiLocale() {\n\t\t((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest()\n\t\t\t\t.setAttribute(LocaleResolver.REST_API_LOCALE, CoreResources.getSystemLocale());\n\t\tresolveLocale();\n\t}", "public void setLocale(Object locale) throws JspTagException {\n if (locale == null) {\n this.locale = null;\n } else if (locale instanceof Locale) {\n this.locale = (Locale) locale;\n } else if (locale instanceof String) {\n this.locale = parseLocale((String) locale);\n } else\n throw new JspTagException(\"Can only accept Locale or String objects.\");\n }", "public String changeLeguage(){\r\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tLocale miLocale = new Locale(\"en\",\"US\");\r\n\t\tcontext.getViewRoot().setLocale(miLocale);\r\n\t\treturn \"login\";\r\n\t}", "Language(Locale locale) {\n this.locale = locale;\n }", "public void setLocales(List<Locale> locales);", "protected final void handleLocale(HttpServletRequest req) {\n setLocaleFromHeader(req.getParameterValues(\"LocaleFromHeader\"));\n \n if (localeFromHeader) {\n for ( Enumeration en=req.getLocales(); en.hasMoreElements(); ) {\n Locale locale = (Locale)en.nextElement();\n try {\n setLocale(locale);\n return;\n } catch ( Exception ex ) {\n logger.warning(\"locale not supported \" + locale);\n } // end of try-catch\n } // end of for ()\n }\n }", "public void setUserLocale(String userLocale) {\n sessionData.setUserLocale(userLocale);\n }", "protected LocaleAieon( String name, Locale locale )\r\n\t{\r\n\t\tsuper( name, S_LOCALE);\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( Attributes.COUNTRY.name(), locale.getCountry() );\r\n\t\tsuper.set( Attributes.VARIANT.name(), locale.getVariant() );\r\n\t}", "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n/* 28: */ throws ServletException\r\n/* 29: */ {\r\n/* 30:67 */ String newLocale = request.getParameter(this.paramName);\r\n/* 31:68 */ if (newLocale != null)\r\n/* 32: */ {\r\n/* 33:69 */ LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);\r\n/* 34:70 */ if (localeResolver == null) {\r\n/* 35:71 */ throw new IllegalStateException(\"No LocaleResolver found: not in a DispatcherServlet request?\");\r\n/* 36: */ }\r\n/* 37:73 */ localeResolver.setLocale(request, response, StringUtils.parseLocaleString(newLocale));\r\n/* 38: */ }\r\n/* 39:76 */ return true;\r\n/* 40: */ }", "public void changeLocale (final Locale locale) {\n\t\tsetModelProperty(LOCALE_PROPERTY, locale);\n\t}", "public LocaleAieon( String name ) \r\n\t{\r\n\t\tsuper( name, S_LOCALE );\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( Attributes.COUNTRY.name(), locale.getCountry() );\r\n\t\tsuper.set( Attributes.VARIANT.name(), locale.getVariant() );\r\n\t}", "public void setLanguage(String localeString) {\n\t\tdatabaseOperation.execute(\"UPDATE \" + DatabaseContents.LANGUAGE + \" SET language = '\" + localeString + \"'\");\n\t}", "@Bean\n\tpublic LocaleChangeInterceptor localeChangeInterceptor() {\n\t\tLocaleChangeInterceptor lci = new LocaleChangeInterceptor();\n\t\tlci.setParamName(\"lang\");\n\t\tlog.info(\"Setting LocaleChangeInterceptor \" + lci.toString());\n\t\treturn lci;\n\t}", "@Override\n public void setLocale(Locale arg0) {\n //\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Ignore.Locale\"));} //$NON-NLS-1$\n }", "public static void setPreferredLocale(HttpServletRequest request, Locale preferredLocale) {\r\n HttpSession session = request.getSession(true);\r\n session.setAttribute(PREFERRED_LOCALE_SESSION_ATTRIBUTE, preferredLocale);\r\n }", "void localizationChanged();", "void localizationChanged();", "void localizationChanged();", "public void setLocaleId(int aLocaleId) {\r\n\t\tlocaleId = aLocaleId;\r\n\t}", "@Override\n public void setLanguage(String lang) {\n }", "Restaurant setRestaurantName(RestaurantLocale locale, String newName);", "public void setName( String name )\n {\n this.name = name.toLowerCase( Locale.ENGLISH );\n }", "private void setTranslationKey(String name) {\n\t\t\r\n\t}", "public void setBundleName(java.lang.String param){\n localBundleNameTracker = true;\n \n this.localBundleName=param;\n \n\n }", "private String addLocaleToTemplateTypeResourcePath(String path, String locale) {\n\n if (StringUtils.isNotBlank(locale)) {\n return path + PATH_SEPARATOR + locale.toLowerCase();\n } else {\n return path;\n }\n }", "protected String getCurrentLocaleQueryParam() {\n return LocaleInfo.getCurrentLocale().getLocaleQueryParam();\n }", "public void setServerLocale(String serverLocale){\n this.serverLocale = serverLocale;\n }", "public void setFallbackLocale(Locale locale) { this.fallbackLocale = locale; }", "public Builder setLocale(ULocale locale) {\n/* 1533 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@RequestMapping(value = \"/messageresource/localize\", method = RequestMethod.GET)\n\tpublic String localizeMessageResource(Model model, Locale locale) {\n\n\t\tlogger.debug(\"localizeMessageResource()\");\n\n\t\tMessageResourceTranslationBackingBean messageResourceTranslationBackingBean = new MessageResourceTranslationBackingBeanImpl();\n\t\tmessageResourceTranslationBackingBean.setCurrentMode(MessageResource.CurrentMode.LOCALIZE);\n\t\tmodel.addAttribute(\"messageResourceTranslationFormModel\", messageResourceTranslationBackingBean);\n\t\tLong defaultLocale = Long.valueOf(Constants.REFERENCE_LOCALE__EN);\n\t\tsetTranslationDropDownContents(model, locale);\n\t\tsetDropDownContents(model, null, locale);\t\t\n\t\tmodel.addAttribute(\"defaultLocale\", defaultLocale);\n\t\t\n\t\treturn \"messages/messageresource_localize\";\n\n\t}", "@Override\n\tpublic void localeChanged(final Locale oldLocale, final Locale newLocale) throws LocalizationException {\n\t\t\n\t}", "private void setLocale(String lang) {\n Locale myLocale = new Locale(lang);\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration conf = res.getConfiguration();\n conf.setLocale(myLocale);\n res.updateConfiguration(conf, dm);\n Intent refresh = new Intent(this, MainActivity.class);\n startActivity(refresh);\n finish();\n }", "public void setLocalisation(final Room pLocalisation){this.aLocalisation = pLocalisation;}", "void setParameter(String name, String value);", "public void setLanguage(String language);", "@Override\n public void addInterceptors(InterceptorRegistry registry) {\n registry.addInterceptor(localeChangeInterceptor());\n }", "@Bean\n public CookieLocaleResolver localeResolver() {\n CookieLocaleResolver localeResolver = new CookieLocaleResolver();\n Locale defautLocal = new Locale(defLang + \"_\" + defLocal);\n localeResolver.setDefaultLocale(defautLocal);\n return localeResolver;\n }", "public void setCountryName(String value);", "static private void setLanguage(String strL) {\r\n\r\n\t\tstrLanguage = strL;\r\n\r\n\t\t// need to reload it again!\r\n\t\tloadBundle();\r\n\t}", "void setCurrentLocaleIndex(int value) {\n\n this.currentLocaleIndex = value;\n this.updateBundle();\n }", "public abstract void setCod_localidad(java.lang.String newCod_localidad);", "void setLanguage(Language language);", "public static void updateLocale(HttpSession session, Locale locale) {\n\t\tsession.setAttribute(CURRENT_SESSION_LOCALE, locale);\n\t\tConfig.set(session, Config.FMT_LOCALE, locale);\n\t}", "void changeLanguage() {\n\n this.currentLocaleIndex++;\n if(this.currentLocaleIndex > this.locales.size() - 1) this.currentLocaleIndex = 0;\n this.updateBundle();\n }", "@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }", "public Locale getLocale() { return this.locale; }", "@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}", "public final void setLanguage(@Nullable final String languageParam) {\n this.language = languageParam;\n }", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "@Override\r\n\t\tpublic void setLang(String lang)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public void setLanguageLocaleKey(java.lang.String languageLocaleKey) {\n this.languageLocaleKey = languageLocaleKey;\n }" ]
[ "0.70043826", "0.672017", "0.6686655", "0.66615766", "0.66269934", "0.65825045", "0.65825045", "0.6581535", "0.65756416", "0.6569219", "0.6482633", "0.64617133", "0.64617133", "0.64303446", "0.6339592", "0.63310593", "0.63066167", "0.62931585", "0.6291434", "0.62849516", "0.62536514", "0.61904466", "0.61802816", "0.6154123", "0.6125858", "0.6111581", "0.6045466", "0.6020901", "0.5996127", "0.59365326", "0.59295255", "0.5916018", "0.5904481", "0.5881985", "0.5878531", "0.5868525", "0.586266", "0.5860082", "0.5852077", "0.5849325", "0.5837488", "0.5833984", "0.58285755", "0.58221143", "0.58087", "0.5771759", "0.57695043", "0.57633835", "0.5759524", "0.5759334", "0.57545817", "0.57492954", "0.57297575", "0.5727096", "0.5704244", "0.5678789", "0.56327623", "0.5610414", "0.5605388", "0.5597952", "0.5564393", "0.5551685", "0.5532107", "0.55293375", "0.55107415", "0.5500704", "0.5500704", "0.5500704", "0.5498527", "0.5479164", "0.54485863", "0.54319274", "0.5390495", "0.5348248", "0.533072", "0.5329619", "0.5327169", "0.5324331", "0.53149104", "0.5299964", "0.52753663", "0.52738506", "0.5272176", "0.52687037", "0.5268024", "0.52653706", "0.5236473", "0.52172875", "0.5215888", "0.5206596", "0.5201117", "0.5197151", "0.5180139", "0.51609653", "0.5101802", "0.5097724", "0.5094095", "0.5093409", "0.507467", "0.506629", "0.50554806" ]
0.0
-1
Return the name of the parameter that contains a locale specification in a locale change request.
public String getParamName() { return this.paramName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getLocaleQueryParam() {\n return LocaleInfo.getLocaleQueryParam();\n }", "protected String getCurrentLocaleQueryParam() {\n return LocaleInfo.getCurrentLocale().getLocaleQueryParam();\n }", "java.lang.String getParameterName();", "String getLocalizedString(Locale locale);", "public static String getRequestParameter(String key) {\r\n\t\treturn FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(key);\r\n\t}", "java.lang.String getLocale();", "public java.lang.String getParameterName() {\n java.lang.Object ref = parameterName_;\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 if (bs.isValidUtf8()) {\n parameterName_ = s;\n }\n return s;\n }\n }", "public String getLocalizedName() {\n return resourceMap.getString(getLocalizationKey());\n }", "public java.lang.String getParameterName() {\n java.lang.Object ref = parameterName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n parameterName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@ApiModelProperty(value = \"The locale of the contained data\")\n public String getLocale() {\n return locale;\n }", "@Override\n\tprotected String getLookupKey(PortletRequest request) throws Exception {\n\t\treturn request.getParameter(this.parameterName);\n\t}", "public final java.lang.String getDisplayName(java.util.Locale locale) { throw new RuntimeException(\"Stub!\"); }", "public String getParameterName()\n {\n return parameterName;\n }", "public String getParameterName()\n {\n checkPrecondition(hasParameterName(), \"no parameter name\");\n return this.paramName;\n }", "public static String getPathParameterConceptId(Locale locale, Request request) throws BadRequestException {\n\t\tString conceptId = request.params(\"conceptId\");\n\t\tif (conceptId == null || conceptId.isEmpty()) {\n\t\t\tString userMessage = TemplateFiller.fillTemplate(\n\t\t\t\t\tLanguageHandler.getWord(locale, \"ERROR_BAD_REQUEST_MISSING_URI_PATH_PARAMETER\"), \"conceptId\");\n\t\t\tthrow new BadRequestException(\"The uri path parameter conceptId is missing!\", null, userMessage);\n\t\t}\n\t\treturn conceptId;\n\t}", "public String getParameterName() {\n return parameterName;\n }", "String getParameter(HttpServletRequest request, String name) throws ValidationException;", "public String getParameterName()\r\n\t{\r\n\t\treturn this.paramName;\r\n\t}", "public String getLocale ( ) {\n\t\treturn extract ( handle -> getLocale ( ) );\n\t}", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "public String getParameterName( )\n {\n return _strParameterName;\n }", "@Bean\n LocaleChangeInterceptor localeChangeInterceptor(){\n LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();\n localeChangeInterceptor.setParamName(\"lang\");\n return localeChangeInterceptor;\n }", "public static String getParam(String paramName) {\n \treturn FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(paramName);\n }", "public String getParameterName() {\r\n return parameterName;\r\n }", "String getLocaleKey(String subject);", "public static Locale getHeaderFieldAcceptLanguage(Request request) {\n\t\tHttpServletRequest httpServletRequest = request.raw();\n\t\treturn httpServletRequest.getLocale();\n\t}", "public String getParamName () {\n\treturn this.paramName;\n }", "@objid (\"c9430e32-5923-4873-9196-70620b195552\")\n public String getPatternParameterName() {\n return this.elt.getTagValue(PatternParameter.MdaTypes.PATTERNPARAMETER_NAME_TAGTYPE_ELT);\n }", "private static String getHTTPRequestParameter(PortletRequest request,\n String name) {\n String value = request.getParameter(name);\n if (value == null) {\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPRequestParameter(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPRequestParameter(request, name);\n }\n }\n return value;\n }", "protected String getChangeParameterLabel() {\n return \"Add Parameter...\";\n }", "String getCurrentLocaleString();", "String getLocalization();", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor() {\n LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();\n localeChangeInterceptor.setParamName(\"lang\");\n return localeChangeInterceptor;\n }", "public String getName() {\r\n\t\treturn LocalizedTextManager.getDefault().getProperty(name());\r\n\t}", "public String getName(Resource resource, OgemaLocale locale, boolean useRelativePathAsAlias, boolean useDefaultLanguage);", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor(){\n var lci = new LocaleChangeInterceptor();\n lci.setParamName(\"lang\");// lang para que despues desde la url escojamos el idioma\n return lci;\n }", "protected String getStringParam(HttpServletRequest request, String name) {\r\n String[] p = request.getParameterValues(name);\r\n \r\n if (p == null) {\r\n return null;\r\n } else {\r\n return p[0];\r\n }\r\n }", "public String getName(Class<? extends Resource> resourceType, OgemaLocale locale, boolean useDefaultLanguage);", "public String getParameterName() {\n return this.parameterName;\n }", "public PropertyName _findParamName(AnnotatedParameter param, AnnotationIntrospector intr) {\n if (!(param == null || intr == null)) {\n PropertyName name = intr.findNameForDeserialization(param);\n if (name != null) {\n return name;\n }\n String str = intr.findImplicitPropertyName(param);\n if (str != null && !str.isEmpty()) {\n return PropertyName.construct(str);\n }\n }\n return null;\n }", "@Override\n\tpublic String getCommerceShippingOptionLabel(String name, Locale locale) {\n\n\t\tResourceBundle resourceBundle = ResourceBundleUtil.getBundle(\"content.Language\", locale, getClass());\n\n\t\treturn LanguageUtil.get(resourceBundle, name);\n\t}", "protected String getParameterName()\n {\n return parameterName;\n }", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor() {\n LocaleChangeInterceptor lci = new LocaleChangeInterceptor();\n lci.setParamName(\"lang\");\n return lci;\n }", "public String getParameterName() {\n\t\treturn parameterName;\n\t}", "public String getParamName() {\n return paramName;\n }", "public String getLanguage()\r\n\t{\r\n\t\treturn (String) queryParams.get(AUTH_LANGUAGE);\r\n\t}", "@Override\n\tpublic Enumeration<String> getParameterNames() {\n\t\treturn null;\n\t}", "@Bean\n public LocaleChangeInterceptor localeChangeInterceptor() {\n LocaleChangeInterceptor lci = new LocaleChangeInterceptor();\n lci.setParamName(\"lang\");\n return lci;\n }", "public String locale() {\n return this.locale;\n }", "public String getParamAsString(String paramName);", "public String getInitParameter( String name ) {\n\t\treturn (String) _initParameters.get( name );\n\t}", "Enumeration getParameterNames();", "public java.lang.String getSipParamName() {\r\n return sipParamName;\r\n }", "public String getMessage(Locale locale, String key, Object... params) {\n String value;\n try {\n value = ResourceBundle.getBundle(OPP_BUNDLE_NAME, locale).getString(key);\n } catch (final Throwable e) {\n LOGGER.warn(\"missing bundle key: key=\" + key + \", locale=\" + locale, e);\n value = null;\n }\n\n if (null == value || \"\".equals(value)) {\n value = \"???\" + key + \"???\";\n return value;\n }\n String message = MessageFormat.format(value, params);\n return message;\n }", "@Bean\r\n\tpublic LocaleChangeInterceptor localeChangeInterceptor() {\r\n\t\tLocaleChangeInterceptor localeInterceptor = new LocaleChangeInterceptor();\r\n\t\tlocaleInterceptor.setParamName(\"lang\");\r\n\t\treturn localeInterceptor;\r\n\t}", "private Locale getBotLocale( HttpServletRequest request )\r\n {\r\n String strLanguage = request.getParameter( PARAMETER_LANGUAGE );\r\n\r\n if ( strLanguage != null )\r\n {\r\n return new Locale( strLanguage );\r\n }\r\n\r\n return LocaleService.getDefault( );\r\n }", "@ZAttr(id=345)\n public String getLocaleAsString() {\n return getAttr(Provisioning.A_zimbraLocale, null);\n }", "public String parameterName() {\n return parameterName;\n }", "protected String getEntryName( HttpServletRequest request )\n {\n return (String) request.getParameter( ENTRY_NAME_HTTP_PARAM );\n }", "String getParam( String paraName );", "@NotNull\n private static String maybeName(@NotNull String parameterName) {\n return compiler.parametersOptionSupported() ? String.format(\" '%s'\", parameterName) : \"\";\n }", "java.lang.String getParameterValue();", "public String getParamName()\r\n/* 23: */ {\r\n/* 24:59 */ return this.paramName;\r\n/* 25: */ }", "public String getSimulationLocale() {\n return simSpec.getSimulationLocale();\n }", "public final java.lang.String getDisplayName(android.icu.util.ULocale locale) { throw new RuntimeException(\"Stub!\"); }", "public String getInitParameter(java.lang.String name)\n {\n \treturn config.getInitParameter(name);\n }", "public abstract String getLocalizationKey();", "public static String getName(String localeID) {\n/* 350 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected String getDispatchParameter( HttpServletRequest request )\n {\n return request.getParameter( DISPATCH_HTTP_PARAM );\n }", "protected String getCurrentLocaleName() {\n return LocaleInfo.getCurrentLocale().getLocaleName();\n }", "com.google.protobuf.ByteString getParameterNameBytes();", "private String getDisplayNameI18N() throws JspException {\n Object args[] = new Object[5];\n args[0] = arg0;\n args[1] = arg1;\n args[2] = arg2;\n args[3] = arg3;\n args[4] = arg4;\n\n\n if (getKey() == null) {\n\n Object o = null;\n\n if (getScope().equals(\"session\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.SESSION_SCOPE);\n\n } else if (getScope().equals(\"request\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.REQUEST_SCOPE);\n\n } else if (getScope().equals(\"page\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.PAGE_SCOPE);\n\n }\n\n if (o != null) {\n\n try {\n\n String _property = getProperty();\n String innerPropertyName, innerGetterName;\n Method _method;\n\n while (_property.indexOf(\".\") > 0) {\n\n innerPropertyName = _property.substring(0, _property.indexOf(\".\"));\n innerGetterName = \"get\" + innerPropertyName.substring(0,1).toUpperCase() + innerPropertyName.substring(1);\n\n _method = o.getClass().getMethod(innerGetterName, null);\n\n o = _method.invoke(o, null);\n\n _property = _property.substring(_property.indexOf(\".\") +1);\n }\n\n String getterName = \"get\" + _property.substring(0,1).toUpperCase() + _property.substring(1);\n\n Method method = o.getClass().getMethod(getterName, null);\n\n if (method.getReturnType() == String.class) {\n String messageKey = (String)method.invoke(o, null);\n\n setKey(messageKey);\n }\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (SecurityException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }\n\n // Retrieve the message string we are looking for\n String message = RequestUtils.message(pageContext, this.bundle,\n this.localeKey, this.key, args);\n if (message == null) {\n message = key;\n }\n\n return message;\n }", "protected String toDisplayString(final String name, final Locale locale) {\n try {\n return ResourceBundle.getBundle(name, locale).getString(key);\n } catch (ClassCastException | MissingResourceException ignored) {\n return key; // return the non-localized key\n }\n }", "public PropertyName _findImplicitParamName(AnnotatedParameter param, AnnotationIntrospector intr) {\n String str = intr.findImplicitPropertyName(param);\n if (str == null || str.isEmpty()) {\n return null;\n }\n return PropertyName.construct(str);\n }", "public String getLocalizedName() {\n\t\treturn this.name().toUpperCase();\n\t}", "public String getParameter(String name) {\r\n return _parameters.get(name);\r\n }", "public String getParamValueAsString(String label, String defaultValue);", "private String out_name(Enum<?> e) {\n return e.name().toLowerCase();\n }", "private static final String getResourceSuffix(Locale locale)\n {\n\n String suffix = \"_\" + locale.getLanguage();\n String country = locale.getCountry();\n\n if (country.equals(\"TW\"))\n suffix += \"_\" + country;\n\n return suffix;\n }", "private static final String getResourceSuffix(Locale locale)\n {\n\n String suffix = \"_\" + locale.getLanguage();\n String country = locale.getCountry();\n\n if (country.equals(\"TW\"))\n suffix += \"_\" + country;\n\n return suffix;\n }", "public String getParameter(String name)\n {\n return parameters.get(name);\n }", "public String getParameter(String name) throws IllegalArgumentException {\n\t if ( LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getParameter() \" \n\t\t+ name);\n Via via=(Via)sipHeader;\n \n if (name == null) throw new\n IllegalArgumentException(\"JAIN-EXCEPTION: null argument\");\n return via.getParameter(name);\n }", "String getPluralisedName();", "protected String getLocaleSpecificKey(String localeKey) {\n return CONTENT_KEY.concat(\"-\").concat(localeKey);\n }", "ChangeName.Req getChangeNameReq();", "public String getLanguageValue(Locale locale) {\n\n\t\tString language = locale.getDisplayLanguage(this.locale);\n\t\t\n\t\tif(language.length() > 0) {\n\t\t\tlanguage = language.substring(0, 1).toUpperCase(this.locale) + language.substring(1);\n\t\t}\n\t\t\n\t\tString country = locale.getDisplayCountry(); \n\t\t\n\t\tif(country.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayCountry(this.locale); \n\t\t}\n\t\t\n\t\tString variant = locale.getDisplayVariant(); \n\n\t\tif(variant.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayVariant(this.locale); \n\t\t}\n\t\t\n\t\tif(locale == fallbackLocale) {\n\t\t\tlanguage = language + \" (fallback)\";\n\t\t}\n\t\t\n\t\treturn language;\n\t}", "public static String getQueryParameterApiKey(Locale locale, Request request) throws BadRequestException {\n\t\treturn getQueryParameter(locale, request, \"apiKey\", true);\n\t}", "public String getName(Locale locale) {\n return Messages.getInstance().getText(locale, \"students.editStudent.breadcrumb\");\n }", "public Label getParamLabel() {\n\t\treturn paramLabel;\n\t}", "public String getParameter(String name) {\r\n\t\treturn parameters.get(name);\r\n\t}", "public Collection<String> getParamNames();", "@Override\n\t\tpublic Enumeration getParameterNames() {\n\t\t\treturn null;\n\t\t}", "public Enumeration<String> getParaNames() {\n\t\treturn request.getParameterNames();\n\t}", "public String getName() {\n return I18nUtil.getBundle().getString(\"CTL_I18nAction\");\n }", "public String getParameterGroupName() {\n return parameterGroupName;\n }", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "public String getParameter(String name) {\n String[] values = getParameterValues(name);\n return (values != null) ? values[0] : null;\n }", "public String getParameter(String name) {\n\t\treturn parameters.get(name);\n\t}", "String getMessage(String bundleKey, Locale locale, Object... args);", "public String getParamNameOfPage()\n\t{\n\t\treturn paramNameOfPage;\n\t}" ]
[ "0.674759", "0.63088095", "0.5745942", "0.5565469", "0.54640716", "0.544989", "0.54455835", "0.54026884", "0.5346347", "0.5318821", "0.5314497", "0.5271609", "0.5263292", "0.5256371", "0.5236799", "0.52329105", "0.5231482", "0.52227944", "0.5219394", "0.5213379", "0.5198674", "0.5172759", "0.516947", "0.5161614", "0.5151533", "0.5149172", "0.51422334", "0.51311404", "0.51266104", "0.5124835", "0.512011", "0.51168776", "0.5113953", "0.5108334", "0.5104839", "0.5099936", "0.5099815", "0.50997806", "0.5099714", "0.5097258", "0.5093539", "0.5087265", "0.50797033", "0.50777984", "0.50753146", "0.50644916", "0.5061931", "0.50607175", "0.50400406", "0.5036859", "0.5010484", "0.5007545", "0.5004623", "0.5000546", "0.49901786", "0.498704", "0.49804443", "0.49727908", "0.49667668", "0.49646932", "0.4960612", "0.49592143", "0.49576128", "0.49573952", "0.49491328", "0.49429157", "0.49378988", "0.49307945", "0.49302524", "0.49284944", "0.49252722", "0.49249738", "0.49183023", "0.49147743", "0.49138767", "0.4892416", "0.4892306", "0.4891344", "0.4891208", "0.4891208", "0.48885038", "0.48843104", "0.4878607", "0.48780707", "0.4877343", "0.48769367", "0.48758623", "0.48754162", "0.48750225", "0.48618156", "0.4860017", "0.48578933", "0.48536798", "0.48516366", "0.48471016", "0.48469776", "0.48409107", "0.4831064", "0.482599", "0.48230746" ]
0.5156808
24
TODO Autogenerated method stub
public static void main(String[] args) { Typecasting t=new Typecasting(); t.typeCasting(); }
{ "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 write JavaDoc comment.
public ScopedSymbol(String name, Access access){ Objects.nonNull(name); Objects.nonNull(access); this.name = name; this.access = access; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n void init() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void prot() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private void getStatus() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n public void init() {}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public void memoria() {\n \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 }", "public void mo55254a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\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}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public void method_4270() {}", "@Override\n protected void getExras() {\n }", "public void mo6081a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override public int describeContents() { return 0; }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void mo55254a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private TMCourse() {\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}", "protected void mo6255a() {\n }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "private void init() {\n\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}" ]
[ "0.66167116", "0.65304667", "0.6461297", "0.6418639", "0.6374761", "0.6262174", "0.62297183", "0.6188897", "0.61809486", "0.61809486", "0.61651987", "0.61651987", "0.61588037", "0.61329025", "0.61167264", "0.6112293", "0.6091536", "0.6058471", "0.60450965", "0.6036706", "0.6036706", "0.6036706", "0.6036706", "0.6036706", "0.6036706", "0.60262835", "0.60259604", "0.60259604", "0.60253215", "0.60217065", "0.6019203", "0.6014819", "0.60100925", "0.59995836", "0.599883", "0.5990548", "0.5987959", "0.59743464", "0.59743196", "0.59700114", "0.59670115", "0.5961927", "0.5957683", "0.59532213", "0.59529024", "0.59389186", "0.5938416", "0.5927768", "0.59257215", "0.5917362", "0.59163433", "0.5909844", "0.5909844", "0.5909844", "0.5909844", "0.5909844", "0.5909844", "0.5909844", "0.59017897", "0.59017897", "0.59017897", "0.59017897", "0.59017897", "0.59016657", "0.59015495", "0.59015495", "0.58929574", "0.58886504", "0.5883845", "0.58611995", "0.58611995", "0.58611995", "0.58605665", "0.58582944", "0.58357424", "0.58351135", "0.5831183", "0.5829873", "0.5811782", "0.58096206", "0.58091676", "0.5803366", "0.5800904", "0.5800866", "0.57934594", "0.5792178", "0.5792178", "0.5791946", "0.57829636", "0.5782388", "0.5782388", "0.5782388", "0.5774063", "0.57706463", "0.57706463", "0.57706463", "0.5769025", "0.5759653", "0.5755312", "0.5755312", "0.5755312" ]
0.0
-1
TODO write JavaDoc comment.
public ScopedSymbol(String name){ this(name, Access.PUBLIC); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n void init() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void prot() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n public void init() {}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public void memoria() {\n \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 }", "public void mo55254a() {\n }", "public void mo4359a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\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}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public void method_4270() {}", "@Override\n protected void getExras() {\n }", "public void mo6081a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override public int describeContents() { return 0; }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void mo55254a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private TMCourse() {\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}", "protected void mo6255a() {\n }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "private void init() {\n\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}" ]
[ "0.6617578", "0.6530889", "0.64611316", "0.64184207", "0.6375358", "0.6262297", "0.62297875", "0.6189149", "0.6180833", "0.6180833", "0.6165169", "0.6165169", "0.6159239", "0.6133136", "0.61166626", "0.6112908", "0.60916996", "0.605881", "0.6044761", "0.6037181", "0.6037181", "0.6037181", "0.6037181", "0.6037181", "0.6037181", "0.60266864", "0.6026391", "0.6026391", "0.60256135", "0.60214734", "0.60196334", "0.6015095", "0.60100114", "0.59997237", "0.59987694", "0.599077", "0.59879667", "0.59746104", "0.59740025", "0.5970466", "0.5967477", "0.5963042", "0.59581167", "0.5953642", "0.5953543", "0.5939025", "0.5938582", "0.59275514", "0.59265786", "0.5917091", "0.59167135", "0.5910291", "0.5910291", "0.5910291", "0.5910291", "0.5910291", "0.5910291", "0.5910291", "0.5902409", "0.59021926", "0.59021926", "0.59021926", "0.59021926", "0.59021926", "0.5902132", "0.5902132", "0.58928865", "0.58889174", "0.5884227", "0.58615905", "0.58615905", "0.58615905", "0.58609486", "0.58588725", "0.5836246", "0.5835022", "0.5831341", "0.5830302", "0.5812289", "0.5810006", "0.5809629", "0.58038986", "0.58016324", "0.5800915", "0.5793778", "0.57925075", "0.5792494", "0.5792494", "0.57837635", "0.57827663", "0.57827663", "0.57827663", "0.57747674", "0.5771198", "0.5771198", "0.5771198", "0.5769581", "0.57602584", "0.57555854", "0.57555854", "0.57555854" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int i=10; int j=20; String x="lionel"; String y="messi"; System.out.println(i+j); System.out.println(x+y); System.out.println(x+y+i); System.out.println(x+i+j); System.out.println("helloworld"); System.out.println("the value of i is:"+i); }
{ "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
Returns the value of the 'File' attribute. If the meaning of the 'File' attribute isn't clear, there really should be more of a description here...
String getFile();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File getFileValue();", "public File getAttributeFile();", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "public String file() {\n return this.file;\n }", "String getFile() {\n\t\treturn file;\n\t}", "public File getFile() {\r\n \t\treturn file;\r\n \t}", "public File getFile() { return file; }", "public String getFile() {\n return \"null\"; // getFileTopic().getCompositeValue().getTopic(FILE_PATH);\n }", "public String getFile() {\n \n // return it\n return theFile;\n }", "public File getFile() {\n\t\treturn file;\n\t}", "public File getFile() {\n\t\treturn this.file;\n\t}", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "@Override\n\tpublic String getFileValue() {\n\t\treturn null;\n\t}", "public UploadedFileDTO getFile() {\r\n\t\ttype(ConfigurationItemType.FILE);\r\n\t\treturn fileValue;\r\n\t}", "public File getFile() {\n return _file;\n }", "@Override\n\tpublic File getFile() {\n\t\treturn file;\n\t}", "public File getFile()\n {\n return file;\n }", "public Attributes getFileAttributes()\r\n {\r\n return aFileAttributes;\r\n }", "public FileObject getFile() {\n return file;\n }", "public FileObject getFile() {\n return file;\n }", "File getFile() { return user_file; }", "@ApiModelProperty(required = true, value = \"The file in which the test is defined.\")\n public String getFile() {\n return file;\n }", "@Override\n public int getFile() {\n return file;\n }", "public final File getFile() {\n return file;\n }", "public File getFile();", "public File getFile();", "public com.google.protobuf.ByteString getFile() {\n return file_;\n }", "public com.google.protobuf.ByteString getFile() {\n return file_;\n }", "File getFilePath()\r\n\t{\r\n\t\treturn fFilePath;\r\n\t}", "public String getFILE_NAME() { return FILE_NAME; }", "public File getFile ();", "public String getFilename() {\n\treturn file.getFilename();\n }", "public File getFile() {\n // some code goes here\n return this.f;\n }", "public File getFile() {\n // some code goes here\n return m_f;\n }", "public byte[] getFile() {\n return file;\n }", "public WebFile getFile() { return _file; }", "public VMFile getFile() {\n return this.file;\n }", "@attribute(value = \"\", required = true)\t\r\n\tpublic void setFile(String file) {\r\n\t\tthis.file = file;\r\n\t}", "public String getFileType() {\n return fileType;\n }", "public com.opentext.bn.converters.avro.entity.PayloadRef getFileInfo() {\n return fileInfo;\n }", "public com.opentext.bn.converters.avro.entity.PayloadRef getFileInfo() {\n return fileInfo;\n }", "public Integer getFileType() {\n return fileType;\n }", "public String getFilename() {\r\n return filename;\r\n }", "public MultipartFile getFile() {\n\t\treturn file;\n\t}", "public String getFileType(){\n\t\treturn type;\n\t}", "public String getFilename() {\n return filename;\n }", "public String getFilename() {\n return filename;\n }", "boolean getBinaryFileAttribute();", "public File getDataFile();", "public String getFileContentType() {\r\n return (String) getAttributeInternal(FILECONTENTTYPE);\r\n }", "File getFile();", "File getFile();", "public String getImageFile() {\n\t\treturn imagefile;\n\t}", "public String getFILE_TYPE() {\r\n return FILE_TYPE;\r\n }", "public String getFilename()\n {\n return filename;\n }", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "@XmlElement\n @Nullable\n public String getFileName() {\n return this.fileName;\n }", "public String getFilename() {\n return filename;\n }", "public String getFilename() {\n return filename;\n }", "public File getFile() {\n // some code goes here\n return f;\n }", "public RandomAccessFile getFile()\n {\n \treturn f;\n }", "public MultipartFile getFile() {\n return this.file;\n }", "private String getFilename() {\r\n\t\treturn (String) txtFlnm.getValue();\r\n\t}", "public TFileType getFileType() {\n\n\t\treturn type;\n\t}", "public File getFile() {\n return this.path != null ? this.path.toFile() : null;\n }", "FileObject getFile();", "FileObject getFile();", "public String getFilename()\r\n\t{\r\n\t\treturn filename;\r\n\t}", "public String getFilename();", "public String getFileName ()\n\t{\n\t\treturn FileName;\n\t}", "public FileType getFileType() {\n return fileType;\n }", "public String getFileNumber() {\n\t\treturn fileNumber;\n\t}", "public String getFilePath() {\n return null;\n }", "public String getFilename() {\n\t\treturn this.filename;\n\t}", "public String getFilename() {\n\t\treturn this.filename;\n\t}", "public String getFilename(){\n\t\treturn filename;\n\t}", "public String getFilename(){\n\t\treturn filename;\n\t}", "public String getFile_name() {\n\t\treturn file_name;\n\t}", "@Transient\n\tpublic File getFileObj() {\n\t\treturn fileObj;\n\t}", "private File getFile() {\n\t\t// retornamos el fichero a enviar\n\t\treturn this.file;\n\t}", "public String getFilePath() {\n return this.filePath;\n }", "public String getFilePath() {\n return this.filePath;\n }", "public String getFilePath() {\n return this.filePath;\n }", "public String getFilePath() {\n return this.filePath;\n }", "public final String getFilePath() {\n\t\treturn m_info.getPath();\n\t}", "public String getName()\n {\n return( file );\n }", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n\t\treturn file.getFileName();\n\t}", "public String getFilename()\r\n\t{\r\n\t\treturn _filename; \r\n\t}", "public String getFileName()\r\n {\r\n return sFileName;\r\n }", "public String getFilename() {\n\t\treturn filename;\n\t}" ]
[ "0.79788023", "0.7920487", "0.77870375", "0.77870375", "0.76742834", "0.76171637", "0.75216347", "0.74717677", "0.74228406", "0.739267", "0.73669434", "0.73524415", "0.73073685", "0.7252915", "0.7252915", "0.7252915", "0.7252915", "0.72430587", "0.7222989", "0.72090495", "0.7198797", "0.7189903", "0.70937634", "0.7048202", "0.704741", "0.704741", "0.70184714", "0.7007147", "0.69791466", "0.69708854", "0.6955136", "0.6955136", "0.6943438", "0.6919987", "0.6919137", "0.684606", "0.6829361", "0.68220043", "0.68184906", "0.67938983", "0.67775494", "0.67714244", "0.67616314", "0.6743932", "0.67295295", "0.6722966", "0.6676655", "0.6663047", "0.66555524", "0.6633816", "0.66234463", "0.6610543", "0.6610543", "0.6610519", "0.660238", "0.66005164", "0.65937626", "0.65937626", "0.6591838", "0.6586896", "0.6549464", "0.6543652", "0.652747", "0.6513303", "0.6513303", "0.65089697", "0.650884", "0.64958465", "0.64930713", "0.6483186", "0.6481679", "0.6480512", "0.6480512", "0.64699626", "0.645792", "0.6452872", "0.64494854", "0.6448156", "0.6447073", "0.6444776", "0.6444776", "0.64403754", "0.64403754", "0.6438816", "0.64354473", "0.64267737", "0.64139587", "0.64139587", "0.64139587", "0.64139587", "0.64050895", "0.63998324", "0.6399626", "0.6399626", "0.6399141", "0.6393032", "0.6389915", "0.63856715" ]
0.6475426
75
At creation there are no active events and no pending barriers.
public EventBarrier() { // empty }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createEvents() {\n\t}", "@Test\n\tpublic void testReadyNoDevices() {\n\t\tModel contact = addContactSensor(true, false);\n\t\tstageDisarmed(addressesOf(contact));\n\t\tremoveModel(contact);\n\t\t\n\t\talarm.bind(context);\n\t\tassertInactive();\n\t}", "private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}", "protected void onBSCreate() {\n isResumed = false;\n isFinishing = false;\n dispatchOnHandleIntent = false;\n isBSLock = false;\n isAttached = true;\n mCalled = true;\n }", "@Override\n public boolean usesEvents()\n {\n return false;\n }", "public boolean acquireNoWait() {\r\n return true;\r\n }", "public void emptyBox()\n {\n this.notifications = new TreeSet<>();\n this.setUpdated();\n }", "@Override\n public boolean neverAttach() {\n return true;\n }", "protected void clearOutEvents() {\n\t}", "protected void clearOutEvents() {\n\t}", "public void clearReceivedEvents() {\n this.receivedEvents.clear();\n }", "public void verifyNoPendingNotification() {\n\t\twait.waitForLoaderToDisappear();\n\t\tAssert.assertFalse(notificationPresent(), \"Assertion Failed: There are pending notifications on the side bar\");\n\t\tlogMessage(\"Assertion Passed: There are no pending notifications on the side bar\");\n\t}", "public boolean emptyBuffer() {\n if(eventBeans.size() == 0)\n return true;\n else return false;\n }", "public boolean isEmpty(){return numEvents==0;}", "public boolean isAcquired() {\r\n return false;\r\n }", "@Override\r\n\t\t\tpublic boolean isReady() {\n\t\t\t\treturn false;\r\n\t\t\t}", "public void clearEvents()\n {\n ClientListener.INSTANCE.clear();\n BackingMapListener.INSTANCE.clear();\n }", "protected void noActiveActivity() {\n\t\tLog.i(STARTUP, \"no active activity\");\n\t\tcancelNotification();\n\t\tcreateNotification();\n\t\tstartMainService();\t\t\n\t}", "@Override\n\tpublic boolean isReady() {\n\t\treturn false;\n\t}", "@Test\n public void eventNoMemory() throws Exception {\n GCEvent event = new GCEvent();\n event.setType(G1_YOUNG_INITIAL_MARK);\n event.setTimestamp(0.5);\n event.setPause(0.2);\n // but no memory information -> all values zero there\n GCModel model = new GCModel();\n model.add(event);\n DoubleData initiatingOccupancyFraction = model.getCmsInitiatingOccupancyFraction();\n Assert.assertEquals(\"fraction\", 0, initiatingOccupancyFraction.getSum(), 0.1);\n }", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}", "private boolean noVacancy() {\r\n\t\t\treturn removed = false;\r\n\t\t}", "@Override\n public void syncState() {\n scheduledCounter.check();\n }", "@Override\n public boolean isFrozen() {\n return true;\n }", "protected void clearEvents() {\n\t\tsCInterface.clearEvents();\n\n\t}", "@Test\n public void testMultiChannelNoBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n createBuffer(2),\n createBuffer(2),\n createBuffer(0),\n createBuffer(1),\n createBuffer(0),\n createEndOfPartition(0),\n createBuffer(3),\n createBuffer(1),\n createEndOfPartition(3),\n createBuffer(1),\n createEndOfPartition(1),\n createBuffer(2),\n createEndOfPartition(2)\n };\n inputGate = createCheckpointedInputGate(4, sequence);\n\n for (BufferOrEvent boe : sequence) {\n assertEquals(boe, inputGate.pollNext().get());\n }\n\n assertEquals(0L, inputGate.getAlignmentDurationNanos());\n }", "@Override\n public boolean active() {\n return false;\n }", "@Override\n protected void initializeEventList()\n {\n }", "@Override\n public void clear()\n {\n super.clear();\n \n /*\n * we handle the aborting timed events here so that it\n * doesn't occur in the write lock which could result\n * in deadlock since the events might have locks of their own\n */\n Collection<ITimedEvent> events = Collections.emptyList();\n try\n {\n getLock().readLock().lock();\n if (_pendingTimedEvents.size() != 0)\n events = new ArrayList<ITimedEvent>(_pendingTimedEvents);\n }\n finally\n {\n getLock().readLock().unlock();\n }\n \n for (ITimedEvent element : events)\n element.abort();\n \n }", "FutureEventList() {\n q = new PriorityQueue<Event>(10, new EventComperator());\n }", "public void notDestroyable()\n\t{\n\t\tdestroyable = false;\n\t}", "protected void clearEvents() {\n\t\tsCIButtons.clearEvents();\n\t\tsCILogicUnit.clearEvents();\n\t\tsCIState.clearEvents();\n\n\t\tfor (int i = 0; i < timeEvents.length; i++) {\n\t\t\ttimeEvents[i] = false;\n\t\t}\n\t}", "private void housekeeping() {\n // Try to get the root region location from the master. \n if (!haveRootRegion.get()) {\n HServerAddress rootServer = hbaseMaster.getRootRegionLocation();\n if (rootServer != null) {\n // By setting the root region location, we bypass the wait imposed on\n // HTable for all regions being assigned.\n this.connection.setRootRegionLocation(\n new HRegionLocation(HRegionInfo.ROOT_REGIONINFO, rootServer));\n haveRootRegion.set(true);\n }\n }\n // If the todo list has > 0 messages, iterate looking for open region\n // messages. Send the master a message that we're working on its\n // processing so it doesn't assign the region elsewhere.\n if (this.toDo.size() <= 0) {\n return;\n }\n // This iterator is 'safe'. We are guaranteed a view on state of the\n // queue at time iterator was taken out. Apparently goes from oldest.\n for (ToDoEntry e: this.toDo) {\n if (e.msg.isType(HMsg.Type.MSG_REGION_OPEN)) {\n addProcessingMessage(e.msg.getRegionInfo());\n }\n }\n }", "private void initializeEvents() {\r\n\t}", "@Test\n public void testSingleChannelNoBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n createBuffer(0), createBuffer(0),\n createBuffer(0), createEndOfPartition(0)\n };\n inputGate = createCheckpointedInputGate(1, sequence);\n\n for (BufferOrEvent boe : sequence) {\n assertEquals(boe, inputGate.pollNext().get());\n }\n\n assertEquals(0L, inputGate.getAlignmentDurationNanos());\n }", "@Trace(excludeFromTransactionTrace = true, leaf = true)\n private void tracedActivityFromFlyweight() {\n TracedActivity tracedActivity = AgentBridge.getAgent().getTransaction().createAndStartTracedActivity();\n Assert.assertTrue(tracedActivity instanceof NoOpSegment);\n }", "@Override\n \tpublic boolean isReadyToInvalidate() {\n \t\treturn false;\n \t}", "@Override\r\n\tpublic void noControl() {\r\n q.put(null);\r\n v.put(null);\r\n }", "private void initEvents() {\r\n\t\teventPool = new EventPool();\r\n\t\teventPool.addEvent(new BlockGeneratorEvent(this));\r\n\t\teventPool.addEvent(new BlockOffScreenEvent(this));\r\n\t\teventPool.addEvent(new DeathEvent(myDropThis, this));\r\n\t}", "protected void dispatchSetupEvents() {\r\n TimedEvent e = null;\r\n while ((e = scenarioQueue.peek()) != null && e.time < 0) {\r\n scenarioQueue.poll();\r\n disp.dispatchEvent(e);\r\n }\r\n }", "private SyncState() {}", "public void dropWaitingStates() {\n waitlist.clear();\n }", "public boolean forceEvents() {\n if (!isStarted()) {\n return false;\n }\n\n if (listeners.isEmpty()) {\n return false;\n }\n\n LOG.debug(\"Force events for all currently connected devices\");\n\n deviceDetector.resetRoots();\n\n return true;\n }", "private EventsCollector() {\n\t\tsuper();\n\t}", "boolean hasEvents() {\n return !currentSegment.isEmpty() || !historySegments.isEmpty();\n }", "public DirtyRegionQueue() {\r\n\t\tsuper();\r\n\t}", "public boolean acquireNoWait(boolean forMerge) {\r\n return true;\r\n }", "@Override\n public boolean isReady() {\n return true;\n }", "public void reset() {\n events.clear();\n }", "public static void created() {\n\t\t// TODO\n\t}", "public TransactionEvent() {\n this.local = true;\n }", "@Override\r\n\tpublic void pending() {\n\t\tSystem.out.println(\"pending\");\r\n\t}", "@Override\n protected boolean needReadActionToCreateState() {\n return false;\n }", "@Test\n @Transactional\n public void checkStateIsRequired() throws Exception {\n assertThat(transferEventRepository.findAll()).hasSize(0);\n // set the field null\n transferEvent.setState(null);\n\n // Create the TransferEvent, which fails.\n restTransferEventMockMvc.perform(post(\"/api/transferEvents\")\n .contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(transferEvent)))\n .andExpect(status().isBadRequest());\n\n // Validate the database is still empty\n List<TransferEvent> transferEvents = transferEventRepository.findAll();\n assertThat(transferEvents).hasSize(0);\n }", "public EventQueue() {\n\t\tqueue = new LinkedList<Event>();\n\t}", "@Override\n\tprotected boolean isBindEventBusHere() {\n\t\treturn false;\n\t}", "public void clear() {\n synchronized (mLock) {\n mNumStartRangingCalls = 0;\n mOverallStatusHistogram.clear();\n mPerPeerTypeInfo[PEER_AP] = new PerPeerTypeInfo();\n mPerPeerTypeInfo[PEER_AWARE] = new PerPeerTypeInfo();\n }\n }", "@Override\n public boolean isCommitted() {\n return false;\n }", "private void clearBlocked() {\n\n blocked_ = false;\n }", "public void reportNothingToUndoYet() {\r\n Assert.isTrue(isReceiving());\r\n setNothingToUndoReported(true);\r\n }", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "boolean notifyBegin();", "public void checkEvents()\n\t{\n\t\t((MBoxStandalone)events).processMessages();\n\t}", "@Override\n public boolean isReady() {\n return true;\n }", "public boolean isSynchronizing() {\n\t\treturn false;\n\t}", "public void initializeBarriers() {\n // Initialize an entry barrier that ensures all threads in the\n // thread pool start running at the same time.\n // TODO -- you fill in here.\n \n\n // Initialize an exit barrier to ensure the waiter thread\n // doesn't finish until all the Beings finish gazing.\n // TODO -- you fill in here.\n \n\n // Iterate through all the Beings and set their barriers\n // accordingly.\n // TODO -- you fill in here.\n \n }", "private void waitForBackgroupTasks() {\n this.objectStore.getAllObjectIDs();\n this.objectStore.getAllEvictableObjectIDs();\n this.objectStore.getAllMapTypeObjectIDs();\n }", "void clearAndNotify();", "public WaitingProcessQueue() {\r\n this.data = new CustomProcess[INITIAL_CAPACITY];\r\n }", "DomainEventStream getUncommittedEvents();", "public void clear() {\n\t\tsynchronized (queue) {\n\t\t\tthis.queue.clear();\n\t\t\tthis.totalEvents = 0;\n\t\t}\n\t}", "public void dontCompleteBooking(){\r\n\t\ttempBookings.clear();\r\n\t}", "@NoProxy\n public BwEvent makeFreeBusyEvent() {\n BwEvent res = new BwEvent();\n\n // Fields needed for comparison.\n res.setEntityType(getEntityType());\n res.setColPath(getColPath());\n res.setName(getName());\n res.setUid(getUid());\n res.setRecurrenceId(getRecurrenceId());\n res.setRecurring(false);\n res.setTombstoned(false);\n\n res.setDtend(getDtend());\n res.setDtstart(getDtstart());\n res.setDuration(getDuration());\n res.setEndType(getEndType());\n res.setTransparency(getTransparency());\n res.setStatus(getStatus());\n\n res.setAttendeeSchedulingObject(getAttendeeSchedulingObject());\n res.setOrganizerSchedulingObject(getOrganizerSchedulingObject());\n\n if (getAttendeeSchedulingObject()) {\n // XXX Need at least our attendee entry\n for (BwAttendee att: getAttendees()) {\n res.addAttendee((BwAttendee)att.clone());\n }\n }\n\n res.setOwnerHref(getOwnerHref());\n\n if (getEntityType() == IcalDefs.entityTypeFreeAndBusy) {\n List<BwFreeBusyComponent> fbcs = getFreeBusyPeriods();\n List<BwFreeBusyComponent> newfbcs = new ArrayList<>();\n\n for (BwFreeBusyComponent fbc: fbcs) {\n newfbcs.add((BwFreeBusyComponent)fbc.clone());\n }\n\n res.setFreeBusyPeriods(newfbcs);\n }\n\n /* Add any peruser transp */\n res.setXproperties(getXproperties(BwXproperty.peruserPropTransp));\n\n return res;\n }", "public LateDeliverableProcessorImpl() {\r\n // Empty\r\n }", "public void unsetCreated()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CREATED$0, 0);\n }\n }", "private void init() {\n sensorEnabled = false;\n contextEventHistory = new ArrayList<ContextEvent>(CONTEXT_EVENT_HISTORY_SIZE);\n }", "public void notifyBaseObservers() {\n notifyBaseObservers(null);\n }", "@Override\n\tpublic boolean reserve() {\n\t\treturn false;\n\t}", "public void recordState() {\n this.event = null;\n flowContextInfo.setWaitingNode(currentNode);\n }", "public boolean isEmpty() {\n return indexedEvents.isEmpty();\n }", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "@Override\n public boolean needsToRunAfterFinalized() {\n return false;\n }", "protected void fireCreationEvent() {\n\t\tfireEvent(new DebugEvent(this, DebugEvent.CREATE));\n\t}", "protected void fireCreationEvent() {\n\t\tfireEvent(new DebugEvent(this, DebugEvent.CREATE));\n\t}", "public boolean isCreate() {\r\n\t\treturn controller.closedByCreate;\r\n\t}", "public void consulterEvent() {\n\t\t\n\t}", "private void ensureChangesAllowed() {\n if (lifecycle.started() == false) {\n throw new IllegalStateException(\"Can't make changes to indices service, node is closed\");\n }\n }", "@Override\n protected void initEventAndData() {\n }", "@Override\n\tprotected Object entryInitialFlow() {\n\t\treturn null;\n\t}", "@Override\n public void waitShutdown() {\n // Do nothing.\n }", "public ScheduleEvent()\n\t{\n\n\t}", "@Override\n\tpublic void initNode() {\n\t\tEFMonitorUtil.cleanAllInstance(false);\t\t\t\n\t}", "private void ensureFinalState() {\n if (!isComplete() && !isPaused() && getInternalState() != INTERNAL_STATE_QUEUED) {\n // we first try to complete a cancel operation and if that fails, we just fail\n // the operation.\n if (!tryChangeState(INTERNAL_STATE_CANCELED, false)) {\n tryChangeState(INTERNAL_STATE_FAILURE, false);\n }\n }\n }", "@Override\n\tpublic void resetEventListener() {\n\t\tcreateHists();\n\t}", "public ConsumerManagement() {\n\t\tcreateframe(\"\");\n\t}", "@Override\r\n\tprotected NewlyAllocatedFlowSet entryInitialFlow() {\n\t\treturn new NewlyAllocatedFlowSet();\r\n\t}", "@Override\n\tpublic boolean onCreate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onCreate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onCreate() {\n\t\treturn false;\n\t}" ]
[ "0.6177459", "0.6007986", "0.58836085", "0.58707535", "0.5831878", "0.58060896", "0.5790867", "0.57758135", "0.5753163", "0.5753163", "0.57221675", "0.5704974", "0.56784964", "0.56764936", "0.5640262", "0.5633141", "0.5602758", "0.55763966", "0.5561188", "0.55369097", "0.5522393", "0.5522393", "0.55147254", "0.55119663", "0.5494907", "0.54924333", "0.5473255", "0.5465959", "0.54576194", "0.5453594", "0.54518926", "0.54372555", "0.5432137", "0.54088455", "0.54032505", "0.5385244", "0.5374675", "0.53677464", "0.5364109", "0.53624934", "0.5349829", "0.5340304", "0.5338581", "0.53318214", "0.53119487", "0.5309099", "0.5305346", "0.529917", "0.52966785", "0.5283183", "0.52592206", "0.52581376", "0.5258049", "0.52559626", "0.52514184", "0.52182484", "0.52068144", "0.5198659", "0.5185854", "0.51822275", "0.5181024", "0.517902", "0.5177298", "0.5176346", "0.5174489", "0.51742935", "0.51694", "0.51673687", "0.5164859", "0.5163704", "0.516128", "0.51588315", "0.5155821", "0.5148067", "0.51442915", "0.5142601", "0.5133775", "0.5127907", "0.51191294", "0.51131886", "0.5112101", "0.51089436", "0.5104539", "0.50953764", "0.50953764", "0.5094831", "0.5089679", "0.50880474", "0.50855005", "0.5066277", "0.5066265", "0.50621104", "0.50569814", "0.5056417", "0.5056249", "0.5053823", "0.50454545", "0.50401986", "0.50401986", "0.50401986" ]
0.5710699
11
Obtain the current number of active events. This method is intended for testing and debugging.
int getNumEvents() { int cnt = eventCount; for (Entry entry : queue) { cnt += entry.eventCount; } return cnt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumEvents() {\n return numEvents;\n }", "public int getCount() {\n\t\treturn events.size();\n\t}", "long getReceivedEventsCount();", "public int getAutoEventCount()\n {\n return _autoEventList.size();\n }", "public int getNumIdle();", "public int getActiveCount() {\n return activeCount;\n }", "public int getNumActive();", "public int getTotalEvents() {\n\t\treturn totalEvents;\n\t}", "public int getNumActive() {\n return numActive;\n }", "public static int numberOfEvents() {\n List<Events> listOfEvents = retrieveEvents();\n if (listOfEvents != null) {\n return listOfEvents.size();\n } else {\n return 0;\n }\n }", "public int getEventLimit() {\n return eventLimit;\n }", "int getNumActive();", "int getUncommittedEventCount();", "public static int getNumStarted() {\n return numStarted;\n }", "public int currentCount () {\n return count;\n }", "public static int getCurrentSessionCount() {\n\t\treturn (currentSessionCount);\n\t}", "long getListenerCount();", "public static int getScriptActionEvents() {\n return threadActionEvents.size();\n }", "public int getNumberOfLastHourEvents() {\n return getNumberOfEventsByMinuteOrHour(false);\n }", "long getUnjoinedEventsCount();", "public static int totalClicks() {\n return counterClicks;\n }", "public Integer getMaxEventDrivenThreads() {\n return maxEventDrivenThreads;\n }", "public int countActive() {\n int result = 0;\n \n synchronized (m_reservableListMutex) {\n final Iterator iterator = m_reservables.iterator();\n \n while (iterator.hasNext()) {\n final Reservable reservable = (Reservable)iterator.next();\n \n if (!reservable.isClosed() && !reservable.isSentinel()) {\n ++result;\n }\n }\n }\n \n return result;\n }", "long getJoinedEventsCount();", "public int getActiveSessions();", "public synchronized int activeStreams() {\n return streams.size();\n\n }", "public int getInactiveCount() {\n return inactiveCount;\n }", "public int sizeOfEventArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(EVENT$0);\n }\n }", "public java.lang.String getNumEvento() {\n\t\treturn numEvento;\n\t}", "public int getRunningDevicesCount();", "public int getCountAtSessionStart() {\r\n return countAtSessionStart;\r\n }", "public Integer getClickCount() {\n return clickCount;\n }", "public int active() {\n return this.active;\n }", "@External\r\n\t@ClientFunc\r\n\tpublic MetaVarNumber GetNumActiveParticles();", "int getActionLogCount();", "public int getEventValue() {\n return event_;\n }", "public int getEventValue() {\n return event_;\n }", "public int getNumberOfLastMinuteEvents() {\n return getNumberOfEventsByMinuteOrHour(true);\n }", "public int getLiveCount() {\n return liveCount;\n }", "public int getActiveUserCount() {\n return activeUserCount;\n }", "public long getCount() {\n return counter.get();\n }", "private int getRunningNum() {\n\t\treturn am.getRunningAppProcesses().size();\r\n\t}", "public int get_nactive_vars()\n {\n \n int retVal = get_nactive_vars_0(nativeObj);\n \n return retVal;\n }", "public int activeDays() {return activeDay;}", "int getExecutorActiveCount();", "public final int getClickCount() {\n return clickCount;\n }", "@Override\n\tprotected int getActiveCount(long units) {\n\t\treturn units % period == 0 ? 1 : 0;\n\t}", "int getActiveSessions();", "public Integer getEventGenWindow() {\n return eventGenWindow;\n }", "public Integer getClickcount() {\n return clickcount;\n }", "int getEventMetadataCount();", "public int getCurrentCounter() {\n return currentCounter;\n }", "public Integer getCount(Class<?> type) {\n return events.containsKey(type) ? events.get(type).size() : 0;\n }", "public Integer getNumberOfActiveRunners(){\n return numberOfActiveRunners;\n }", "public int getRunningCount() {\r\n return root.getRunningCount();\r\n }", "public Integer getClicks() {\r\n return clicks;\r\n }", "public int getClicks() {\n return clicks;\n }", "public int getCapacity(){\n return eventCapacity;\n }", "public int getNumberOfLastDayEvents() {\n int counter = 0;\n long currentTimeSeconds = getCurrentTimeInSeconds();\n for (int i = 0; i < records.length; i++) {\n synchronized (records[i]) {\n if (currentTimeSeconds - records[i].getLastTimeReset() < SECONDS_IN_DAY) {\n counter += records[i].getCount();\n }\n }\n }\n\n return counter;\n }", "public int getNumAlive() {\n return numAlive;\n }", "public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}", "public int getMaxReturnEventsForQuery() {\n return maxReturnEventsForQuery;\n }", "@ApiModelProperty(value = \"The number of active threads in the NiFi.\")\r\n public Integer getActiveThreadCount() {\r\n return activeThreadCount;\r\n }", "@ApiModelProperty(example = \"null\", value = \"The number of active threads for the reporting task.\")\n public Integer getActiveThreadCount() {\n return activeThreadCount;\n }", "int getRepromptEventHandlersCount();", "public float eventAgeSeconds() { return neventAgeSeconds(address()); }", "public static long getActiveCount(Identity identity) {\n\t\tAtomicLong count = votes.get(identity);\n\t\tif (count == null)\n\t\t\treturn 0;\n\t\treturn count.get();\n\t}", "int getExchangeHistoryListCount();", "public int getCallsNb();", "public int getTotalActivitySwitches() {\n return (int) neurons.stream().filter(n -> n.getValueRange() > 0).count();\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "Long getRunningCount();", "static Map<Integer, Event> getEvents() {\n\t\treturn events;\n\t}", "int getSystemCount();", "public int getAvailableCount();", "public void setNumEvents(int numEvents) {\n this.numEvents = numEvents;\n }", "public int getCount() {\n lock.lock();\n try {\n System.out.println(Thread.currentThread().getName() + \" gets Count: \" + count.incrementAndGet());\n return count.intValue();\n } finally {\n lock.unlock();\n }\n }", "public WorkflowExecutionOpenCounts getOpenCounts() {\n return openCounts;\n }", "public final int getOpenCount() {\n\t\treturn m_openCount;\n\t}", "public static long getNumberOfOpenConnections() {\n return openConnections.size();\n }", "int getEventValue();", "protected int getTagCountInCurrentIfd() {\n return mNumOfTagInIfd;\n }", "public String getCurrentConfirmedCount() {\n return currentConfirmedCount;\n }", "public int eventQueueCapacity() {\n return eventQueueCapacity_;\n }", "public int getTouchCount()\n {\n return m_cUses;\n }", "public int getCount(){\r\n return sequence.getValue();\r\n }", "public int getUseCount() {\n\t\tint useCount=0;\n\t\tsynchronized(connStatus) {\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\tif(connStatus[i] > 0) { // In use\n\t\t\t\t\tuseCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn useCount;\n\t}", "public int getNumberOfSignals();", "public int getSeenInfoCount() {\n return instance.getSeenInfoCount();\n }", "int getActionsCount();", "int getActionsCount();", "public int howManyActivated() {\n int cont = 0;\n if(!baseProductionPanel.getProductionButton().isToken())\n cont++;\n for(int i = 0 ; i<3;i++){\n if (!productionButtons[i].isToken())\n cont++;\n }\n return cont;\n }", "public int getSleepPoints() {\n return localSleepPoints;\n }", "private static int getFlightTakeOffCount()\r\n\t{\r\n\t\treturn flightTakeOffCounter;\r\n\t}", "public long getCount() {\n return count.get();\n }", "int getInCount();", "public int getCount()\r\n {\r\n return counts.peekFirst();\r\n }", "public Map<Object, Integer> getCounter() {\n if (counterMap == null) {\n counterMap = FxSharedUtils.getMappedFunction(new FxSharedUtils.ParameterMapper<Object, Integer>() {\n @Override\n public Integer get(Object key) {\n if (counters == null) {\n counters = new HashMap<Object, Integer>();\n }\n final int ctr = FxSharedUtils.get(counters, key, -1) + 1;\n counters.put(key, ctr);\n return ctr;\n }\n }, true);\n }\n return counterMap;\n }", "int getActiveBlockRequestsNumber() {\n return blockRequests.size();\n }" ]
[ "0.7530093", "0.70338744", "0.70085454", "0.6974374", "0.6872627", "0.6861783", "0.6823759", "0.6823295", "0.68045086", "0.679988", "0.66746", "0.6614449", "0.65676033", "0.6414164", "0.6260797", "0.6222629", "0.6214743", "0.6200533", "0.61861956", "0.61198103", "0.6076044", "0.6073113", "0.6071245", "0.6039044", "0.6036815", "0.60266685", "0.60264105", "0.5993311", "0.5972454", "0.5963317", "0.5954536", "0.5949898", "0.592399", "0.5919552", "0.59130424", "0.58957523", "0.5886753", "0.58844495", "0.5875938", "0.58645564", "0.5854619", "0.5853036", "0.5850759", "0.58503586", "0.5832105", "0.5809487", "0.5809442", "0.58038443", "0.5800493", "0.57943624", "0.5788882", "0.57873607", "0.578534", "0.57839024", "0.57732683", "0.5769472", "0.57586074", "0.5755742", "0.57551223", "0.5744979", "0.5740798", "0.573981", "0.57208925", "0.57197726", "0.5719655", "0.57109815", "0.5708835", "0.57063603", "0.57038707", "0.56931686", "0.5692797", "0.5692797", "0.56848615", "0.56801033", "0.56771433", "0.5672211", "0.56703645", "0.56638527", "0.56592625", "0.56583554", "0.5654651", "0.5641178", "0.56392896", "0.5634846", "0.56305", "0.5625639", "0.56226426", "0.5620083", "0.5620041", "0.5612889", "0.5609753", "0.5609753", "0.5598832", "0.55966794", "0.55959404", "0.558398", "0.5582842", "0.55782413", "0.5573366", "0.5562522" ]
0.6849981
6
Obtain the current number of pending barriers. This method is intended for testing and debugging.
int getNumBarriers() { return queue.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final int getPendingCount()\n/* */ {\n/* 508 */ return this.pending;\n/* */ }", "public static int getPendingRequests() {\n\t\treturn writeQueue.size() + requestsBeingSending.intValue();\n\t}", "int getEnqueuedBlockRequestsNumber() {\n int count = 0;\n for (StdPeerMessage pm : sendQueue) {\n if (pm.type == StdPeerMessage.REQUEST) {\n count++;\n }\n }\n return count;\n }", "int getNumBufferedBytes() {\n ChannelBuffer buf;\n int IOQueued;\n for (IOQueued = 0, buf = inQueueHead;\n buf != null; buf = buf.next) {\n IOQueued += buf.nextAdded - buf.nextRemoved;\n }\n return IOQueued;\n }", "public int numVehiclesInQueue() {\r\n\t\treturn vehiclesInQueue.size();\r\n\t}", "private synchronized void incrementPending() {\n\t\tpending++;\n\t}", "long getSpinCount();", "public int getBranchCount() { return _brcnt; }", "int getActiveBlockRequestsNumber() {\n return blockRequests.size();\n }", "public long getPendingMessageCount() {\n return (long) this.incUpdateQueue.size();\n }", "public int UnassignedCount() {\n \t\treturn jobqueue.size();\n \t}", "public int getRingCount() {\r\n\t\treturn mRingCount;\r\n\t}", "Integer backlogCapacity();", "public int getAvailableCount();", "public long getPendingTasks()\n {\n return getTaskCount() - getCompletedTaskCount();\n }", "@PrivateAPI\n\tpublic int getReferenceCount() {\n\t\treturn this.referencesFromCapacityMap.get();\n\t}", "public Integer getFreeTimes() {\r\n return freeTimes;\r\n }", "public int getInflightingRPCCounter() {\n return inflightingRPCCounter.get();\n }", "Integer getTransactionsPending() {\n\t\tif (transactionMonitor != null) {\n\t\t\treturn transactionMonitor.getPendingTransactions();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public int getAvailNumComps(){\n return this.mFarm.getAvailNumComps();\n }", "private void setNumPendingBgJobs(int value) {\n this.bitField0_ |= 64;\n this.numPendingBgJobs_ = value;\n }", "public int getRetryWaitingCount() {\r\n return root.getRetryWaitingCount();\r\n }", "public int getFreezeTicks ( ) {\n\t\treturn extract ( handle -> handle.getFreezeTicks ( ) );\n\t}", "public int queuedPassengers() {\n return _queuedPassengers;\n }", "org.apache.xmlbeans.XmlUnsignedInt xgetSpinCount();", "private void setNumPendingFgJobs(int value) {\n this.bitField0_ |= 32;\n this.numPendingFgJobs_ = value;\n }", "public int getNumberOfRadialBuffers() {\n\t\treturn ((Integer) radialBufferSpinner.getValue()).intValue();\n\t}", "public int getTransmissionCount(){\n return networkTransmitCount + 1;\n }", "public int countActive() {\n int result = 0;\n \n synchronized (m_reservableListMutex) {\n final Iterator iterator = m_reservables.iterator();\n \n while (iterator.hasNext()) {\n final Reservable reservable = (Reservable)iterator.next();\n \n if (!reservable.isClosed() && !reservable.isSentinel()) {\n ++result;\n }\n }\n }\n \n return result;\n }", "public int numberOfRequestsEnqueued() {\n int totalRequests = 0;\n for (ElevatorController controller : elevatorControllers.values()) {\n totalRequests += controller.getRequestsQueue().size();\n }\n return totalRequests;\n }", "int getTotalFree();", "public int getNuevoNumTransaccionBR() throws BaseDeDatosExcepcion, ConexionExcepcion {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNuevoNumTransaccionBR() - start\");\n\t\t}\n\t\t\n\t\tint result = 0;\n\t\t\n\t\tincrementarNumTransBR();\n\t\tresult = numTransaccionBR;\n\t\t\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNuevoNumTransaccionBR() - end\");\n\t\t}\n\t\treturn result;\n\t}", "public int getNumSyncBatches() {\n return _numSyncBatches;\n }", "public int[] get_nrBagsPerFlight() {\r\n return (bagsPerFlight_mess);\r\n }", "public int getBinCapicityFilled() {\n int binCapicity = 0;\n for( Packet p: packets) {\n binCapicity += p.getPacketHeight();\n }\n return binCapicity;\n\n }", "public int getNumComps(){\n return this.mFarm.getNumComps();\n }", "public final int refCount ()\n {\n return _refCount;\n }", "public int getNumUnpinnedBuffers() {\n\t\treturn replace.size();\n\t}", "public final int decrementPendingCountUnlessZero()\n/* */ {\n/* */ int i;\n/* */ \n/* */ \n/* 549 */ while (((i = this.pending) != 0) && \n/* 550 */ (!U.compareAndSwapInt(this, PENDING, i, i - 1))) {}\n/* 551 */ return i;\n/* */ }", "private int getNumberOfFreeChairs() {\n return this.numberOfChairs - waitingStudents.size();\n }", "public int getStartingBombs() {\n \t\treturn 1;\n \t}", "public int getLockCount() {\n return this.l.getHoldCount();\n }", "public int numberOfPendingTasks() {\n return allBatchesStream().mapToInt(Batch::getPendingCount).sum();\n }", "public int getFree() {\n\t\t\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(!this.get(i).clientAlive) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "public static native int getConcurrency();", "public int getTotalNumCompactSyncPoints() {\n return (Integer) getProperty(\"numTotalCompactSyncPoints\");\n }", "int getReceivingMinorFragmentIdCount();", "int getReqCount();", "public default int getActiveRequirementCount() {\n\t\tint result = 0;\n\t\tif (getRequirements() != null) {\n\t\t\tfor (Requirement req : getRequirements()) {\n\t\t\t\tif (!req.isArchived()) {\n\t\t\t\t\tresult++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public int available() {\n return numAvailable;\n }", "public static int getOnGoingSends() {\n return onGoingSends.get() + sendQueue.size();\n }", "public int getExpectedNumber() {\n return getWholeProcessCount();\n }", "public final int getRefCount() { return refCount.get(); }", "public int getRemaining(){\n\t\treturn count+1;\n\t}", "public int getReceivingMinorFragmentIdCount() {\n return receivingMinorFragmentId_.size();\n }", "public int getMaxFreezeTicks ( ) {\n\t\treturn extract ( handle -> handle.getMaxFreezeTicks ( ) );\n\t}", "public Integer getDesiredCount() {\n return this.desiredCount;\n }", "private int indexOfRequestToServe() {\n // if there is no barrier currently active, avoid the iteration\n if (this.spmdManager.isCurrentBarriersEmpty()) {\n return 0;\n } else { // there is at least one active barrier\n int index = -1;\n boolean isServable = false;\n Iterator it = this.requestQueue.iterator();\n \n // look for the first request in the queue we can serve\n while (!isServable && it.hasNext()) {\n index++;\n MethodCall mc = ((Request) it.next()).getMethodCall();\n \n // FT : mc could be an awaited request\n if (mc == null) {\n return -1;\n }\n isServable = this.spmdManager.checkExecution(mc.getBarrierTags());\n }\n return isServable ? index : (-1);\n }\n }", "public int getReceivingMinorFragmentIdCount() {\n return receivingMinorFragmentId_.size();\n }", "public int getNumberOfBCs() { return numberOfBCs; }", "public Integer getFreeSlots() {\n return AvailableSlots.size();\n }", "int available() {\n return numAvailable;\n }", "public int getBlockNumbersCount() {\n return blockNumbers_.size();\n }", "@Override\n\tpublic long getFreeBlocks() {\n\t\treturn 0;\n\t}", "public ArrayList<Point> getBarriers() { return barriers; }", "public int getCount() {\n return sync.getCount();\n }", "public abstract BarrierType getBarrierType();", "public int getNumQueues() {\n return queues.size();\n }", "public int getNewNumber() {\r\n int num;\r\n num=unusedLockers.get(0);\r\n unusedLockers.remove(0);\r\n return num;\r\n }", "int numOfRemainingBlocks() {\n return blocks.size();\n }", "public final void setPendingCount(int paramInt)\n/* */ {\n/* 517 */ this.pending = paramInt;\n/* */ }", "public int amountOfBuffs() {\r\n return buffs.size();\r\n }", "public int getRemainingPcs()\n\t{\n\t\treturn pieces.length - existing.cardinality();\n\t}", "public int getFreezers ()\n {\n return (freezers);\n }", "protected int numberRemainingTickets()\n\t{\n\t\treturn tickets.size();\n\t}", "public int getBlockNumbersCount() {\n return blockNumbers_.size();\n }", "public int getBlockNumsCount() {\n return blockNums_.size();\n }", "public int getBlockNumsCount() {\n return blockNums_.size();\n }", "public int getNumCompleted()\n\t{\n\t\treturn numCompleted;\n\t}", "int getUnreachableCount();", "@Nonnegative\n @CheckReturnValue\n public abstract int getRemainingRequests();", "int getRequestsCount();", "int getRequestsCount();", "public int getNumIdle();", "public int getUnusedPortCount() {\n\t\treturn bottomPortCount;\n\t}", "public int getTotalNumSyncPoints() {\n return (Integer) getProperty(\"numTotalSyncPoints\");\n }", "protected long getBytesFree()\r\n {\r\n return this.bytesFree.get();\r\n }", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "public Integer getInProgressStackInstancesCount() {\n return this.inProgressStackInstancesCount;\n }", "public int getObjectPendingFinalizationCount();", "private static int getFlightTakeOffCount()\r\n\t{\r\n\t\treturn flightTakeOffCounter;\r\n\t}", "private static PriorityQueue<ByteBuffer> getReclaimed() {\n\n return reclaimed;\n }", "public int getSlotCount() { \n return getSlotCount0();\n }", "int numberOfWorkingWorkers();", "public int getBlockNumsCount() {\n return blockNums_.size();\n }", "public int getBlockNumsCount() {\n return blockNums_.size();\n }", "public int getBranchCount() {\n return this.branchCount;\n }", "int getDeliveredCount();", "long getExcutorTasksInWorkQueueCount();", "public int countTransmission(){\n\t\treturn this.curPackets.size();\n\t}" ]
[ "0.6932517", "0.65508235", "0.63572943", "0.62357616", "0.62273794", "0.62109447", "0.6202597", "0.61166227", "0.60842794", "0.60613286", "0.6003043", "0.5940615", "0.5897511", "0.58955383", "0.58722407", "0.5830596", "0.5815242", "0.5804498", "0.5757843", "0.5755174", "0.57469785", "0.5746316", "0.5738137", "0.5729092", "0.5720207", "0.5719404", "0.57125795", "0.5710462", "0.57069457", "0.56967443", "0.5662298", "0.5657387", "0.5649288", "0.5648051", "0.563904", "0.56213266", "0.5620464", "0.5613679", "0.5613201", "0.5606815", "0.560307", "0.56018233", "0.55996966", "0.5564964", "0.5564079", "0.55623645", "0.55617267", "0.5559276", "0.5553021", "0.5541929", "0.5540753", "0.5539989", "0.55296457", "0.55267143", "0.55253", "0.5524248", "0.55136585", "0.5507028", "0.5506176", "0.5493692", "0.5480068", "0.5475968", "0.54720956", "0.547045", "0.5470029", "0.54602534", "0.5457699", "0.5444003", "0.5442875", "0.5441032", "0.5440742", "0.543949", "0.54320395", "0.54218656", "0.54186666", "0.54181886", "0.5416498", "0.5416498", "0.54009396", "0.5399305", "0.5393273", "0.53922755", "0.53922755", "0.5389748", "0.5387214", "0.5378415", "0.5377196", "0.53755486", "0.5372972", "0.53715587", "0.53657806", "0.53646505", "0.53622293", "0.5361437", "0.5359668", "0.5359668", "0.5340561", "0.5335273", "0.53350824", "0.53342575" ]
0.8067804
0
Signal the start of an event. The value returned from this method must later be passed to the completeEvent method when signaling the completion of the event.
public int startEvent() { ++eventCount; return barrierToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "StartEvent createStartEvent();", "public void start(String event) {\n started.put(event, System.currentTimeMillis());\n }", "public synchronized void signalEvent()\r\n\t{\r\n\t\tnotifyAll();\r\n\t}", "@Override\n\tpublic boolean isEventStarted() {\n\t\treturn status>=EventStarted;\n\t}", "public void startNewEvent() {\n // JCudaDriver.cuEventRecord(cUevent,stream);\n }", "public DraggableBehavior setStartEvent(JsScopeUiEvent start)\n\t{\n\t\tthis.options.put(\"start\", start);\n\t\treturn this;\n\t}", "public static void signalStart() {\n\t\tif (!instrumenting) return;\n\t\t\n\t\trunning = true;\n\t}", "public void start() {\n enableEvents = true;\n reset();\n }", "void eventStart(String key);", "public void onStarted(long startedTime);", "public void start() {\n start(mRangeStart, mRange, mIsPositive);\n }", "public void startDetect(){\n\n EventHandle[] start = ECAAgent.getEventHandles(startDetectEventName);\n ECAAgent.raiseEndEvent(start,this);\n }", "public T start() {\n return start;\n }", "public T caseStartEvent(StartEvent object) {\n\t\treturn null;\n\t}", "void notifyStart();", "public void start() {\n LOG.entering(CLASS_NAME, \"start\");\n if (state.compareAndSet(STOPPING, STARTED)) {\n // Keep same thread running if STOPPING\n }\n else if (state.compareAndSet(STOPPED, STARTED)) {\n new Thread(this, \"XoaEventProcessor\").start();\n }\n }", "public void operationStart(BGMEvent e);", "@Override\n\tpublic void eventFinished() {\n\t\tstatus=EventCompleted;\n\t}", "public void onStart() {\n super.onStart();\n this.eventDelegate.onStart();\n }", "@Override\n\tpublic boolean getStart() {\n\t\treturn true;\n\t}", "public void buildBegin(MonitorEvent event)\n {\n }", "boolean notifyBegin();", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tdisplayEvent();\n\t}", "public boolean getStart(){\n\t\treturn this.isStart;\n\t}", "@Override\n public void onStart(boolean fromBeginning)\n {\n if(fromBeginning)\n {\n System.out.println(mLabel + \" Started!\");\n }\n else\n {\n System.out.println(mLabel + \" resumed\");\n }\n }", "public void runEvent();", "public void waitUntilStarted() {\n mStarted.block();\n }", "public synchronized void start() {\n\t\tstartSuspended();\r\n\t\tsetRunnable(true);\r\n\t}", "public void start() {\n \tthis.currentState = this.initialState;\n \tstop=false; //indica que el juego no se ha detenido\n \tnotifyObservers(new GameEvent<S, A>(EventType.Start,null,currentState,\n \t\t\t\t\tnull,\"The game started\"));\n\n }", "public void start( )\n {\n // Implemented by student.\n }", "public String getStart() {\r\n\t\treturn this.start;\r\n\t}", "private void eventProcessingStarted() {\n\t\tsynchronized(processingCounterMutex) {\n\t\t\tprocessingCounter++;\n\t\t}\n\t}", "public synchronized void signalStep() {\n s = true;\n notifyAll();\n }", "@Override\n public void start() {\n checkValue();\n super.start();\n }", "void setEventStartDate(Date startEventDate);", "void onStarted();", "public void startDocument()\n throws SAXException\n {\n // we are now in the prolog.\n inProlog = true;\n eventList.clear();\n\n // track the start document event.\n eventList.add(new StartDocumentEvent());\n }", "public void startOldEvent() {\n // JCuda.cudaEventRecord(oldEvent, oldStream);\n }", "protected void sendStartStdInSignal() {\n\t\tDownstreamMessageEvent dme = new DownstreamMessageEvent(channel, Channels.future(channel), STREAM_IN_READY, channel.getRemoteAddress());\n\t\t//channel.getPipeline().sendDownstream(dme);\n\t\tSystem.out.println(\"Sending STDIN READY\");\n\t\tchannel.write(STREAM_IN_READY).awaitUninterruptibly();\n\t\tSystem.out.println(\"Sent STDIN READY\");\n\t}", "private String makeEventStart(LocalDateTime date) {\n String name = \"DTSTART\";\n return formatTimeProperty(date, name) + \"\\n\";\n }", "@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }", "public abstract void tellStarting();", "public void processStart(MessageForm message) {\n message.setCode(Mc.start);\n hold(scheduleA.getTimeOfSleep(mySim().currentTime()), message);\n if (initialised) {\n MyMessage msg1 = new MyMessage((MyMessage) message);\n assistantFinished(msg1);\n }\n\n if (!initialised) {\n initialised = true;\n }\n }", "public State getStart() {\n \t\treturn start;\n \t}", "public void setStart(){\n\t\tthis.isStart=true;\n\t}", "public void start() {\n this.leftover = 0L;\n this.lastTick = System.nanoTime();\n if (stopped.getAndSet(false)) {\n startThread();\n }\n }", "public void fireTransferStarted(Resource resource, int requestType) {\n TransferEvent event = new TransferEvent(wagon, resource, TransferEvent.TRANSFER_STARTED, requestType);\n for (TransferListener listener : listeners) {\n listener.transferStarted(event);\n }\n }", "public long getStart() {\n return start;\n }", "private synchronized void startEventThread() {\n if (eventThread == null) {\n eventThread = new EventHandlingThread(context);\n eventThread.setDaemon(true);\n eventThread.start();\n }\n }", "private void onStartClickEvent() {\n\t\tmBtnStart.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tLog.d(TAG, \"onStartClickEvent\");\n\n\t\t\t\t//initViewConfig();\n\n//\t\t\t\tAVCom.start();\n\t\t\t\tavcom.Start();\n\t\t\t\tLog.d(TAG, \"onStartClickEvent done.\");\n\n\n\t\t\t}\n\t\t});\n\t}", "public Point start() {\r\n return this.start;\r\n }", "public void start() {\n notifyStart();\n simloop();\n notifyStop();\n }", "public void fireInquireEvent ()\n\n {\n\tJsimEvent evt = new JsimEvent (this, EventMap.INQUIRE_EVT, null);\n\tfireJsimEvent (evt);\n\n }", "protected void fireEvent() {\n\n if (!hasListeners()) {\n return;\n }\n if (this.observableChangeEvent == null) {\n this.observableChangeEvent = new ObservableEventImpl<>(this);\n }\n ObservableEventImpl<V> event = this.observableChangeEvent.start();\n fireEvent(event);\n event.end();\n }", "public String eventBeginString() {\n return DateUtils.formatExtDate(this.beginDate);\n }", "void startPumpingEvents();", "public Point getStart() {\n\t\treturn _start;\n\t}", "public Date getStart() {\n return start;\n }", "public GameAboutToStartEvent() {\n this.seconds = FIVE_SECONDS;\n }", "protected void onThreadStart() {\n\t\tparent.startLock.countDown();\n\t\t//wait for all other threads ready\n\t\ttry {\n\t\t\tparent.startLock.await();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthreadStartTime = new Date();\n\t}", "public void consulterEvent() {\n\t\t\n\t}", "public void start() {\n setClosedLoopControl(true);\n }", "public boolean start() {\n return start(0);\n }", "@Override\n public void startExecuting() {\n getActiveRoutine().startExecutingRoutine();\n }", "public void handleStart()\n {\n }", "public void actionStarted(ActionStreamEvent action);", "public void mouseEntered(MouseEvent e) {\n\t\tadaptee.botonRecibir_mouseEntered(e);\n\t}", "public void setStart(long start) { this.start = start; }", "public boolean getStartInclusive() {\n return startInclusive;\n }", "public Event nextEVPEC();", "public int start() { return _start; }", "public String getStart() {\n return start;\n }", "@Override\n\tpublic void onApplicationEvent(ContextStartedEvent event) {\n\t\tSystem.out.println(\"start event \" + event);\n\t}", "@ReactMethod\n public void start() {\n ChirpError error = chirpConnect.start();\n if (error.getCode() > 0) {\n onError(context, error.getMessage());\n } else {\n isStarted = true;\n }\n }", "public void notifySyncStarted(PropertyList syncStartedEvent);", "public TimeDateComponents getEventStartDate() {\n return getEventDates().getStartDate();\n }", "public int start() {\n return start;\n }", "public Boolean getStarted() {\n\t\treturn this.started;\n\t}", "ButEnd getStart();", "public String getStart(){\n\t\treturn mStart;\n\t}", "public void triggerEvent() {\n\t\ts.changeOpenState();\n\t\ts.setChangedAndNotify();\n\t\t\n\t}", "public Point getStart() {\n return mStart;\n }", "private void addPaymentStartEvent() {\n /*09th July 2019, Resolved Pyze library issue*/\n HashMap<String, Object> customAttributes = new HashMap<String, Object>();\n customAttributes.put(\"packageID\", String.valueOf(PackageID));\n customAttributes.put(\"userID\", String.valueOf(UserID));\n customAttributes.put(\"paymentType\", getIntent().getStringExtra(\"PaymentType\"));\n PyzeEvents.PyzeCommercePayment.postPaymentStarted(customAttributes);\n }", "public abstract void started();", "public void onResume() {\n super.onResume();\n this.eventDelegate.onResume();\n }", "public int getStart() {\n return this.start;\n }", "public void mouseEntered(MouseEvent e) {\n\t\tadaptee.botonEnviar_mouseEntered(e);\n\t}", "@Override\n public StartEventsDetectionJobResult startEventsDetectionJob(StartEventsDetectionJobRequest request) {\n request = beforeClientExecution(request);\n return executeStartEventsDetectionJob(request);\n }", "public void start(){\n\t\tstarted = true;\n\t\tlastTime = System.nanoTime();\n\t}", "public String get_start() {\n\t\treturn start;\n\t}", "private void setEventThread() {\n setEventThread(Thread.currentThread());\n }", "public void start() {\n\t\tthis.startTime = System.nanoTime();\n\t\tthis.running = true;\n\t}", "@Override\n\t\t\tpublic void contectStarted() {\n\n\t\t\t}", "public AKeyCallPoint getStartPoint() {\n\t\t\treturn startPoint;\n\t\t}", "@Override\r\n\tpublic void tellStarting() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t\t// Not used here\r\n\t}", "public void setStart( Calendar start );", "@Override\n public Result start() {\n log.info(\"Start \" + this.toString());\n\n return Result.getEmptyCopyResult();\n }", "public abstract void notifyArrayStart();" ]
[ "0.6330171", "0.6330171", "0.60822433", "0.5998895", "0.59386057", "0.5889653", "0.5823714", "0.5761758", "0.573014", "0.5701229", "0.55183077", "0.5460834", "0.5452565", "0.5349219", "0.53387797", "0.53003734", "0.5296259", "0.529183", "0.5286891", "0.52540755", "0.52513814", "0.52464235", "0.52328336", "0.5228296", "0.52192223", "0.5189683", "0.5153542", "0.5138466", "0.5135525", "0.5132349", "0.5115377", "0.51127964", "0.51114047", "0.5103092", "0.50995326", "0.50894177", "0.50717103", "0.5069795", "0.5068053", "0.50673676", "0.5063122", "0.5062451", "0.50289696", "0.50002193", "0.49997467", "0.4996645", "0.4987479", "0.4984889", "0.49825913", "0.49817088", "0.4975888", "0.49752945", "0.49746186", "0.49719477", "0.49672264", "0.49670333", "0.49648404", "0.49619573", "0.4941606", "0.4939552", "0.49368763", "0.4935225", "0.4924064", "0.4922506", "0.49137622", "0.49085122", "0.49032268", "0.49032", "0.4902328", "0.49010387", "0.48929307", "0.48872936", "0.48823264", "0.4865694", "0.48648843", "0.48619992", "0.4856871", "0.48562187", "0.48455587", "0.48436025", "0.48431432", "0.48410454", "0.48382866", "0.48140898", "0.48138297", "0.48095703", "0.48080397", "0.48069608", "0.4804433", "0.48032507", "0.48015735", "0.47956848", "0.4791754", "0.4788992", "0.47747985", "0.47719872", "0.4768985", "0.47676235", "0.47650957", "0.47647932" ]
0.61211896
2
Signal the completion of an event. The value passed to this method must be the same as the return value previously obtained from the startEvent method. This method will signal the completion of all pending barriers that were completed by the completion of this event.
public void completeEvent(int token) { if (token == this.barrierToken) { --eventCount; return; } --queue.get(queue.size() - (this.barrierToken - token)).eventCount; while (!queue.isEmpty() && queue.get(0).eventCount == 0) { queue.remove(0).handler.completeBarrier(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void eventFinished() {\n\t\tstatus=EventCompleted;\n\t}", "private void eventProcessingCompleted() {\n\t\tsynchronized(processingCounterMutex) {\n\t\t\tprocessingCounter--;\n\t\t\tif (processingCounter == 0)\n\t\t\t\tprocessingCounterMutex.notifyAll();\n\t\t}\n\t}", "public synchronized void signalEvent()\r\n\t{\r\n\t\tnotifyAll();\r\n\t}", "public void onDrainComplete();", "void synchronizationDone();", "private void eventLookupCompleted() {\n\t\tsynchronized(lookupCounterMutex) {\n\t\t\tlookupCounter--;\n\t\t\tif (lookupCounter == 0)\n\t\t\t\tlookupCounterMutex.notifyAll();\n\t\t}\n\t}", "@Override\n public void onComplete() {\n refCause.compareAndSet(null, DELIBERATE_EXCEPTION);\n }", "public void finished() {\r\n\t\t// Mark ourselves as finished.\r\n\t\tif (finished) { return; }\r\n\t\tfinished = true;\r\n\t\tif (ic != null) {\r\n\t\t\tjvr.removeEventListener(ic);\r\n\t\t\ttry {\r\n\t\t\t\tdx.stopch(dxdev,dx.EV_ASYNC);\r\n\t\t\t}\r\n\t\t\tcatch (JVRException e) { logger.throwing(getClass().getName(),\"finished\",e); }\r\n\t\t}\r\n\t\t// Notify any \"waiters\" that we are done.\r\n\t\tsynchronized (this) { notifyAll(); }\r\n\t\t// Fire an event for asynchronous JVR event listeners.\r\n\t\tnew JVREvent(this,\"finished\").fire();\r\n\t\t// For debugging only.\r\n\t\t// logger.info(\"(FINISHED)\\n\" + this);\r\n\t}", "public void inquiryCompleted(int discType) {\n synchronized (inquiryCompletedEvent) {\n inquiryCompletedEvent.notifyAll();\n }\n }", "public void awaitDone() {\n try {\n // Wait until the CountDownLatch reaches 0.\n mExitBarrier.await();\n } catch(java.lang.InterruptedException e) {\n errorLog(\"PlatformStrategyAndroid\",\n e.getMessage());\n }\n }", "public void complete() {\n\t}", "public void complete()\n {\n isComplete = true;\n }", "synchronized public void markDone() {\n this.done = true;\n }", "public void done() {\n if (!isCancelled()) {\n try {\n C0637h.this.mo7991a(get());\n } catch (InterruptedException | ExecutionException e) {\n C0637h.this.mo7992a(e.getCause());\n }\n } else {\n C0637h.this.mo7992a((Throwable) new CancellationException());\n }\n }", "@Override\n public String markComplete() {\n if (this.isDone) {\n return Ui.getTaskAlrCompletedMessage(this);\n } else {\n this.isDone = true;\n return Ui.getMarkCompleteEventMessage(this);\n }\n }", "protected void synchronizationDone() {\n }", "public void markAsDone() {\n this.done = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void signalTheWaiter();", "public void notifySyncCompleted(PropertyList syncCompletedEvent);", "public void markAsDone() {\r\n this.isDone = true;\r\n }", "public void scanningComplete() {\n\t\tif (!state.equals(ControlState.READY)) {\r\n\t\t\tthrow new RuntimeException(\"ReturnBookControl: cannot call scanningComplete except in READY state\");\r\n\t\t}\t\r\n\t\tuserInterface.setState(ReturnBookUI.UI_STATE.COMPLETED);\t\t\r\n\t}", "public void markAsDone() {\n this.isDone = true;\n\n }", "@Override\n public void complete(CompleteEvent c) {\n\n }", "public final void propagateCompletion()\n/* */ {\n/* 598 */ CountedCompleter localCountedCompleter1 = this;CountedCompleter localCountedCompleter2 = localCountedCompleter1;\n/* */ int i;\n/* 600 */ do { while ((i = localCountedCompleter1.pending) == 0) {\n/* 601 */ if ((localCountedCompleter1 = (localCountedCompleter2 = localCountedCompleter1).completer) == null) {\n/* 602 */ localCountedCompleter2.quietlyComplete();\n/* 603 */ return;\n/* */ }\n/* */ }\n/* 606 */ } while (!U.compareAndSwapInt(localCountedCompleter1, PENDING, i, i - 1));\n/* */ }", "public synchronized void setComplete() {\n status = Status.COMPLETE;\n }", "synchronized public void jobDone(){ // l'action a été réalisée\n\t\tdone = true; // changement d'état\n\t\tthis.notifyAll(); // on notifie tout le monde\n\t}", "public void onCompletion(CountedCompleter<?> paramCountedCompleter) {}", "private synchronized void notifyCompleted() {\n // since there will be no more observer messages after this, there\n // is no need to keep any observers registered after we finish here\n // so get the observers one last time, and at the same time\n // remove them from the table\n Observer[] observers = observersTable.remove(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.completed(this);\n }\n observersTable.remove(this);\n }\n\n }", "@Override\n\tpublic void complete()\n\t{\n\t}", "public void onComplete() {\n /*\n r3 = this;\n monitor-enter(r3)\n U r0 = r3.l // Catch:{ all -> 0x0022 }\n if (r0 != 0) goto L_0x0007\n monitor-exit(r3) // Catch:{ all -> 0x0022 }\n return\n L_0x0007:\n r1 = 0\n r3.l = r1 // Catch:{ all -> 0x0022 }\n monitor-exit(r3) // Catch:{ all -> 0x0022 }\n d.a.a0.c.e<U> r1 = r3.f13249d\n r1.offer(r0)\n r0 = 1\n r3.f13251f = r0\n boolean r0 = r3.f()\n if (r0 == 0) goto L_0x0021\n d.a.a0.c.e<U> r0 = r3.f13249d\n d.a.s<? super V> r1 = r3.f13248c\n r2 = 0\n d.a.a0.j.q.c(r0, r1, r2, r3, r3)\n L_0x0021:\n return\n L_0x0022:\n r0 = move-exception\n monitor-exit(r3) // Catch:{ all -> 0x0022 }\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: d.a.a0.e.d.o.b.onComplete():void\");\n }", "public int startEvent() {\n ++eventCount;\n return barrierToken;\n }", "void complete();", "void complete();", "@Override\n\tpublic void onEvent() {\n\t\tSystem.out.println(\"Performing callback after synchronous task!\");\n\t}", "@Override\n\tpublic boolean isEventComplete() {\n\t\treturn status==EventCompleted;\n\t}", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public Event setDone() {\n return new Event(this.name, this.date, true);\n }", "public synchronized void signalStep() {\n s = true;\n notifyAll();\n }", "public final void complete(O value) {\n Objects.requireNonNull(value);\n for (; ; ) {\n int s = getState();\n if (s == SDS_NO_REQUEST_HAS_VALUE || s == SDS_HAS_REQUEST_HAS_VALUE) {\n return;\n }\n if (s == SDS_HAS_REQUEST_NO_VALUE) {\n if (compareAndSetState(SDS_HAS_REQUEST_NO_VALUE, SDS_HAS_REQUEST_HAS_VALUE)) {\n Subscriber<? super O> a = downstream();\n a.onNext(value);\n a.onComplete();\n }\n return;\n }\n setValue(value);\n if (compareAndSetState(SDS_NO_REQUEST_NO_VALUE, SDS_NO_REQUEST_HAS_VALUE)) {\n return;\n }\n }\n }", "public void markAsDone() {\n // TODO consider adding assertion here\n isDone = true;\n }", "void complete() {\n try {\n try {\n subscriber.onComplete();\n } catch (Throwable e) {\n Exceptions.handleUncaught(Conformance.onCompleteThrew(e));\n }\n } finally {\n // no need to remove ourselves from psm.\n terminate();\n }\n }", "public void notifyEnd() {\n\n\t}", "public void markDone() {\n isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n this.completed = \"1\";\n }", "public void finish() {\n latch.countDown();\n }", "public void commitWait()\n {\n try{\n waitLock.lock();\n while(commitBarrierSector != -1){\n \t commitDone.awaitUninterruptibly();\n }\n return;\n }\n finally{\n waitLock.unlock();\n }\n }", "public void fire() {\n // operation finished\n dfStatus |= DF_STATUS_READY;\n }", "protected void markAsDone() {\n isDone = true;\n }", "public abstract Task markAsDone();", "public final synchronized void signalDataAvailable() {\n\n\t\t//\tNotify any waiting threads that the file data ia available\n\t\t\t\n\t\tnotifyAll();\n\t}", "@Override\n\t\t\tpublic void onComplete(Bundle values) {\n\n\t\t\t\tfinish();\n\t\t\t}", "public void markAsDone(){\n isDone = true;\n }", "public void completeNext()\n {\n\tTask t = toDo.get(0);\n\tt.complete();\n\ttoDo.remove(0);\n\tcompleted.add(t);\n }", "void onSynchronizationCancel();", "@Override\r\n\tpublic void finishEvent() {\n\t\tif(!mEventStarted)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tmEventStarted = false;\r\n\t\t\r\n\t\txmlStreamTracerService.postObsel(mURL, mTraceID, mCookie, mRoot.toString(),\r\n\t\t\t\tnew AsyncCallback<String>() {\r\n\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t// Show the RPC error message to the user\r\n\t\t\t\tSystem.out.println(\"XMLStreamTracer: Failed to post the event.\");\r\n\t\t\t}\r\n\r\n\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\tSystem.out.println(\"XMLStreamTracer: Event posted.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmDocument.removeChild(mRoot);\r\n\t}", "void completeJob();", "@Override\r\n\tpublic void complete() {\n\r\n\t}", "public void taskComplete() {\n mTasksLeft--;\n if ((mTasksLeft==0) & mHasCloRequest){\n onAllTasksCompleted();\n }\n }", "public void finished() {\n Object obj = get();\n if (obj instanceof Exception)\n mCallback.run(null, (Exception)obj, mRock);\n else\n mCallback.run(obj, null, mRock);\n }", "public synchronized void nudge() {\n notifyAll();\n }", "public void waitCompletion()\n {\n\n if (isThreadEnabled())\n {\n try\n {\n executionThread.join();\n }\n catch (InterruptedException ex)\n {\n throw new RuntimeException(ex);\n }\n }\n }", "public void onComplete(Bundle values);", "@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}", "public void completeTask() {\n completed = true;\n }", "public void shutdown() {\r\n ThreadLocalEventLoop.INSTANCE.resetEventLoop$kotlinx_coroutines_core();\r\n this.isCompleted = true;\r\n closeQueue();\r\n do {\r\n } while (processNextEvent() <= 0);\r\n rescheduleAllDelayed();\r\n }", "final void waitFinished() {\n if (selectionSyncTask != null) {\n selectionSyncTask.waitFinished();\n }\n }", "void whenComplete();", "private void await() {\n try {\n game.getBarrier().await();\n } catch (InterruptedException | BrokenBarrierException e) {\n e.printStackTrace();\n }\n }", "public synchronized void finished(int thread) \r\n {\r\n // Use a sentinel value to indicate that the thread is done with this\r\n // object.\r\n currentValue[thread] = Integer.MAX_VALUE;\r\n notifyAll();\r\n }", "private void complete(MasterProcedureEnv env, Throwable error) {\n if (isFinished()) {\n LOG.info(\"This procedure {} is already finished, skip the rest processes\", this.getProcId());\n return;\n }\n if (event == null) {\n LOG.warn(\"procedure event for {} is null, maybe the procedure is created when recovery\",\n getProcId());\n return;\n }\n if (error == null) {\n LOG.info(\"finish snapshot {} on region {}\", snapshot.getName(), region.getEncodedName());\n succ = true;\n }\n\n event.wake(env.getProcedureScheduler());\n event = null;\n }", "@Override\n\t\tpublic void onComplete() {\n\t\t\tSystem.out.println(\"onComplete\");\n\t\t}", "void notifyAllAboutChange();", "public void operationEnd(BGMEvent e);", "private void onMovementComplete() {\n Callable<Boolean> movementCompleted;\n Consumer<Method> movementFailed;\n\n synchronized (_mutex) {\n movementCompleted = _movementCompleted;\n movementFailed = _movementFailed;\n\n _movementCompleted = null;\n _movementFailed = null;\n }\n\n boolean bMovementCompleted = false;\n if (movementCompleted != null) {\n try {\n bMovementCompleted = movementCompleted.call();\n } catch (Exception e) {\n _log.error(\"An error occurred while completing a movement.\", e);\n }\n }\n\n if (!bMovementCompleted && movementFailed != null) {\n movementFailed.accept(null);\n }\n }", "public void afterCompletion(boolean committed) throws EJBException,\n\t RemoteException;", "@Override\n\tprotected void done() {\n\t\t//close the monitor \n\t\tprogressMonitorReporter.closeMonitor();\n\t\t\n\t\t//Inform application that operation isn't being in progress. \n\t\tapplicationInteractor.setOperationInProgress(false);\n\t}", "public void onComplete(Bundle data);", "public void makeComplete(Order order) {}", "public final void tryComplete()\n/* */ {\n/* 574 */ CountedCompleter localCountedCompleter1 = this;CountedCompleter localCountedCompleter2 = localCountedCompleter1;\n/* */ int i;\n/* 576 */ do { while ((i = localCountedCompleter1.pending) == 0) {\n/* 577 */ localCountedCompleter1.onCompletion(localCountedCompleter2);\n/* 578 */ if ((localCountedCompleter1 = (localCountedCompleter2 = localCountedCompleter1).completer) == null) {\n/* 579 */ localCountedCompleter2.quietlyComplete();\n/* 580 */ return;\n/* */ }\n/* */ }\n/* 583 */ } while (!U.compareAndSwapInt(localCountedCompleter1, PENDING, i, i - 1));\n/* */ }", "@Override\n\t\t\tpublic void onSubmitComplete(FormSubmitCompleteEvent event) {\n\n\t\t\t}", "public void completed(final Status status);", "@Override\n public void onCompleted() {\n System.out.println(\"Server has completed sending us response\");\n // on completed will be called right after onNext\n // Whenever server is done sending data latch is going down by 1\n latch.countDown();\n }", "public void serviceSearchCompleted(int transID, int respCode) {\n synchronized (lock) {\n lock.notify();\n }\n }", "boolean complete();", "@Override\n\tpublic void completed() {\n\t\tSystem.out.println(\"Message Completed: \" + toString());\n\t\tscheduler.putResourceIdle();\n\t\ttry {\n\t\t\tscheduler.applyScheduling();\n\t\t} catch (Exception e) {\n\t\t\t// this should be logged or on a GUI show a dialog of the error\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setCompleteConcurrency(boolean b) {\r\n\t\tthis.completeConcurrency = b;\r\n\t}", "@Override\n public void onDrainComplete()\n {\n }", "public void CompleteTask() {\n\t\tCompletionDate = new Date();\n\t}", "public void onSubmitComplete(SubmitCompleteEvent event) {\n\t DialogHelper.alert(\"Data Set has been loaded\");\n\t }", "public EventMapper done() {\n\t\tinitConsumerDelegate();\n\t\t((ConsumerDelegate)getDepPlaceholder().getDelegate()).setExplicitlyReady();\n\t\treturn this;\n\t}", "@Override\r\n\t\tpublic void operationComplete(ChannelProgressiveFuture future) {\n }", "public void setCompleted(){\r\n\t\tisCompleted = true;\r\n\t}", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }" ]
[ "0.62631327", "0.60441065", "0.60246366", "0.5768234", "0.565298", "0.5643949", "0.55489093", "0.5504607", "0.5499867", "0.54945815", "0.5490684", "0.5470709", "0.5457375", "0.53943914", "0.53893596", "0.5386823", "0.5386271", "0.53725094", "0.53725094", "0.53725094", "0.5370627", "0.5363921", "0.5358268", "0.53416526", "0.5313732", "0.53083616", "0.52883977", "0.52879447", "0.5285524", "0.52828664", "0.524526", "0.5244364", "0.5233318", "0.52279156", "0.5221615", "0.5221615", "0.5198811", "0.51773167", "0.51751816", "0.51751816", "0.51751816", "0.51723295", "0.51703906", "0.5167751", "0.51332635", "0.5101419", "0.50788355", "0.50767195", "0.507445", "0.5065588", "0.50288963", "0.50282735", "0.5027649", "0.5017055", "0.50055534", "0.5005195", "0.49815327", "0.49723795", "0.4964209", "0.49545184", "0.49544474", "0.49525416", "0.49504626", "0.49437383", "0.49422005", "0.49273422", "0.49244884", "0.4914134", "0.4900163", "0.4894555", "0.4883764", "0.4883736", "0.4882514", "0.48703954", "0.48691413", "0.4864151", "0.4860419", "0.48564544", "0.48561114", "0.48556897", "0.48322335", "0.4819757", "0.4819145", "0.48072", "0.48050374", "0.48044422", "0.47900456", "0.4789925", "0.47882324", "0.47872612", "0.47870958", "0.47868004", "0.47860786", "0.4780359", "0.4779158", "0.47752643", "0.47704315", "0.47689733", "0.47689733", "0.47689733" ]
0.6598405
0
Initiate the detection of the minimal event barrier starting now. If this method returns false it means that no events were currently active and the minimal event barrier was infinitely small. If this method returns false the handler will not be notified of the completion of the barrier. If this method returns true it means that the started barrier is pending and that the handler passed to this method will be notified of its completion at a later time.
public boolean startBarrier(BarrierWaiter handler) { if (eventCount == 0 && queue.isEmpty()) { return false; } queue.add(new Entry(eventCount, handler)); ++barrierToken; eventCount = 0; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean isEventStarted() {\n\t\treturn status>=EventStarted;\n\t}", "public int startEvent() {\n ++eventCount;\n return barrierToken;\n }", "boolean hasFenced();", "public boolean ready() {\n diff = eventTime - System.currentTimeMillis(); //Step 4,5\n return System.currentTimeMillis() >= eventTime;\n }", "private boolean preVote() {\n try {\n if (timeout > 0 ) {\n bar.attemptBarrier(timeout);\n } else {\n bar.barrier();\n }\n } catch ( Exception e ) {\n _logger.log(Level.FINE, \"synchronization.prevote.failed\", e);\n return false;\n }\n return true;\n }", "@Test\n public void testSingleChannelWithBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n createBuffer(0),\n createBuffer(0),\n createBuffer(0),\n createBarrier(1, 0),\n createBuffer(0),\n createBuffer(0),\n createBuffer(0),\n createBuffer(0),\n createBarrier(2, 0),\n createBarrier(3, 0),\n createBuffer(0),\n createBuffer(0),\n createBarrier(4, 0),\n createBarrier(5, 0),\n createBarrier(6, 0),\n createBuffer(0),\n createEndOfPartition(0)\n };\n ValidatingCheckpointHandler handler = new ValidatingCheckpointHandler();\n inputGate = createCheckpointedInputGate(1, sequence, handler);\n\n handler.setNextExpectedCheckpointId(1L);\n\n for (BufferOrEvent boe : sequence) {\n assertEquals(boe, inputGate.pollNext().get());\n }\n }", "public boolean GetWaitingFlag() { return this.mWaitingF; }", "boolean getFenced();", "boolean notifyBegin();", "@Override\n\tpublic boolean isStartingState(State state, MaxNode maxNode) {\n\t\treturn false;\n\t}", "public boolean acquireNoWait() {\r\n return true;\r\n }", "boolean isWaiting()\n {\n return waitFlags != 0;\n }", "@Test\n public void testIgnoreCancelBarrierIfCheckpointSubsumed() throws Exception {\n BufferOrEvent[] sequence = {\n // starting a checkpoint\n /* 0 */ createBuffer(2),\n /* 1 */ createBarrier(3, 1),\n createBarrier(3, 0),\n /* 3 */ createBuffer(2),\n\n // newer checkpoint barrier cancels/subsumes pending checkpoint\n /* 4 */ createBarrier(5, 2),\n\n // some queued buffers\n /* 5 */ createBuffer(1),\n createBuffer(0),\n\n // cancel barrier the initial checkpoint /it is already canceled)\n /* 7 */ createCancellationBarrier(3, 0),\n\n // some more buffers\n /* 8 */ createBuffer(0),\n createBuffer(1),\n\n // complete next checkpoint regularly\n /* 10 */ createBarrier(5, 0),\n createBarrier(5, 1),\n\n // some more buffers\n /* 12 */ createBuffer(0),\n createBuffer(1),\n createBuffer(2)\n };\n ValidatingCheckpointHandler toNotify = new ValidatingCheckpointHandler();\n inputGate = createCheckpointedInputGate(3, sequence, toNotify);\n\n long startTs;\n\n // validate the sequence\n\n check(sequence[0], inputGate.pollNext().get(), PAGE_SIZE);\n\n // beginning of first checkpoint\n check(sequence[1], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[2], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[3], inputGate.pollNext().get(), PAGE_SIZE);\n\n // future barrier aborts checkpoint\n startTs = System.nanoTime();\n assertThat(mockInputGate.getBlockedChannels(), containsInAnyOrder(0, 1));\n check(sequence[4], inputGate.pollNext().get(), PAGE_SIZE);\n assertEquals(3, toNotify.getLastCanceledCheckpointId());\n assertEquals(\n CheckpointFailureReason.CHECKPOINT_DECLINED_SUBSUMED,\n toNotify.getCheckpointFailureReason());\n assertThat(mockInputGate.getBlockedChannels(), containsInAnyOrder(2));\n check(sequence[5], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[6], inputGate.pollNext().get(), PAGE_SIZE);\n\n // alignment of next checkpoint\n check(sequence[7], inputGate.pollNext().get(), 0);\n check(sequence[8], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[9], inputGate.pollNext().get(), PAGE_SIZE);\n\n // checkpoint finished\n toNotify.setNextExpectedCheckpointId(5);\n check(sequence[10], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[11], inputGate.pollNext().get(), PAGE_SIZE);\n validateAlignmentTime(startTs, inputGate);\n assertThat(mockInputGate.getBlockedChannels(), empty());\n\n // remaining data\n check(sequence[12], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[13], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[14], inputGate.pollNext().get(), PAGE_SIZE);\n\n // check overall notifications\n assertEquals(1, toNotify.getTriggeredCheckpointCounter());\n assertEquals(1, toNotify.getAbortedCheckpointCounter());\n }", "public boolean isStartable () ;", "public boolean isSelfMessageProcessingEvent();", "public boolean acquire()\n {\n if (!paused && !running) {\n return false;\n }\n\n// if (delay > 0)\n// try {\n// //#debug debug\n// System.out.println(\"Intentional sleeping for \" + delay + \" ms\");\n//\n// Thread.sleep(delay);\n// } catch (InterruptedException e) {\n// //#debug debug\n// System.out.println(\"Interrupted.\");\n//\n// return acquire();\n// }\n\n //#mdebug debug\n if (services.isBusy()) {\n System.out.println(\"Model is buzy.\");\n }\n //#enddebug\n\n /* Be a bit lazier if the Model is busy */\n while (running && careAboutBusy && services.isBusy()) {\n //#debug debug\n System.out.println(\"Buzy-Waiting \" + BUZY_WAIT_TIMER + \" ms\");\n\n try {\n Thread.sleep(BUZY_WAIT_TIMER);\n }\n catch (InterruptedException e) {\n //#debug error\n System.out.println(\"Interrupted. \" + e);\n\n return acquire();\n }\n }\n\n if (!paused) {\n \treturn running;\n }\n\n synchronized (pauseMonitor) {\n try {\n //#debug debug\n System.out.println(\"Pause-Wait\");\n\n pauseMonitor.wait();\n }\n catch (InterruptedException e) {\n //#debug error\n \tSystem.out.println(\"Interrupted. \" + e);\n\n \treturn acquire();\n }\n }\n\n return running;\n }", "public boolean mustWait() {\n return mustWait;\n }", "public boolean isSwitchAhead() {\r\n\t\treturn robotStartPos == Position.Middle || robotStartPos == switchPos;\r\n\t}", "boolean hasMinimumBackoff();", "public synchronized void goNow() {\n\t if ((waitingCarSize > 0) && (count > 0) && (count < waitingCarSize) && (buttonPressed == false)){\n\t buttonPressed = true;\n\t }\n\t notifyAll();\n\t return;\n }", "@Test\n public void testSingleChannelNoBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n createBuffer(0), createBuffer(0),\n createBuffer(0), createEndOfPartition(0)\n };\n inputGate = createCheckpointedInputGate(1, sequence);\n\n for (BufferOrEvent boe : sequence) {\n assertEquals(boe, inputGate.pollNext().get());\n }\n\n assertEquals(0L, inputGate.getAlignmentDurationNanos());\n }", "boolean hasStart();", "public boolean Start(){\r\n\t\tif (this.getGameState().equals(GAMESTATE.READY_TO_START)){\r\n\t\t\tsetGameState(GAMESTATE.RUNNING);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean isStartable()\n {\n if (! isAlive() && nextStartTime <= System.currentTimeMillis())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public boolean isPreFreeze() {\r\n return preFreezeCheck;\r\n }", "protected void afterLockWaitingForBooleanCondition() {\n }", "public boolean isStarting() {\n\t\treturn starting;\n\t}", "private boolean isProcessorReady(int aStatus) {\n if (aStatus == Constants.CAS_PROCESSOR_READY || aStatus == Constants.CAS_PROCESSOR_RUNNING) {\n return true;\n }\n\n return false;\n }", "public EventBarrier() {\n // empty\n }", "public boolean getRingDuringIncomingEarlyMedia();", "public boolean isEventCondition() {\n return true;\n }", "@Override\n public boolean waitForNextFlight() {\n this.lock.lock();\n try {\n boolean wait = this.passengersStillMissing != 0;\n\n // update hostess state\n this.repository.updateHostessState(HostessState.WAIT_FOR_NEXT_FLIGHT);\n\n if (wait) {\n // wait for pilot\n while (!this.planeReadyForBoarding) {\n this.hostessWaitPlaneReadyToTakeOff.await();\n }\n this.planeReadyForBoarding = false;\n }\n\n return wait;\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n this.lock.unlock();\n }\n return false;\n }", "public void insertInorderBarrier() {\n\t\t\n\t}", "public synchronized boolean isMotorStarted() {\n return isMotorStarted;\n }", "@Override\n public boolean dispatchTouchEvent(MotionEvent ev) {\n return DefaultApplication.isWaiting() ? false : super.dispatchTouchEvent(ev);\n }", "public boolean isRisingEdge()\n {\n return currentlyDetecting && !previouslyDetecting;\n }", "public void checkInside() {\n checkInsideDone = false;\n }", "@Override\n public boolean isReady() {\n return (running && !opening) || packetQueue.size() > 0;\n }", "boolean isSetBegin();", "protected void beforeUnlockWaitingForBooleanCondition() {\n }", "public void onCheckAppFirstStart() {\n HwAPPStateInfo curAppInfo = getCurStreamAppInfo();\n if (curAppInfo != null && 100501 == curAppInfo.mScenceId && true == curAppInfo.mIsAppFirstStart && !curAppInfo.mIsVideoStart) {\n boolean isPoorNetwork = false;\n int curRxPackets = this.mHwHiStreamQoeMonitor.getCurTcpRxPackets(curAppInfo.mAppUID);\n if (!(-1 == this.mStartTcpRxPackets || -1 == curRxPackets || curRxPackets - this.mStartTcpRxPackets >= 300)) {\n isPoorNetwork = true;\n }\n HwHiStreamUtils.logD(\"onCheckAppFirstStart: isPoorNetwork = \" + isPoorNetwork);\n if (isPoorNetwork) {\n IHwAPPQoECallback brainCallback = getArbitrationCallback();\n if (brainCallback != null) {\n brainCallback.onAPPQualityCallBack(curAppInfo, 107);\n }\n this.mHwHiStreamCHRManager.onStallDetect(curAppInfo.mScenceId, 107, this.mQoeCallback);\n }\n }\n }", "private boolean scanPreconditions()\n\t\t{\n\t\t\tboolean statusChanged = false;\n\t\t\t\n\t\t\t//Conditional activity\n\t\t\tif(TravelToCustomer.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTravelToCustomer act = new TravelToCustomer(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Travel to Customer. \");\n\t\t\t}\n\t\t\t\n\t\t\tif(TakingLunch.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTakingLunch act = new TakingLunch(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Take Lunch. \");\n\t\t\t}\n\t\t\t\n\t\t\t// Do not change the status if already true\n\t\t\tif(statusChanged) scanInterruptPreconditions();\n\t\t\telse statusChanged = scanInterruptPreconditions();\n\t\t\treturn(statusChanged);\n\t\t}", "protected boolean enterService()\n\t{\n\t\tsynchronized(enterMutex)\n\t\t{\n\t\t\tenterRequests++;\n\t\t\tif(enterRequests == 1)\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isStartState() {\r\n\t\treturn flow.getStartState() == this;\r\n\t}", "public boolean isBlocking ( ) {\n\t\treturn extract ( handle -> handle.isBlocking ( ) );\n\t}", "public void waitUntilStarted() {\n mStarted.block();\n }", "private StreamEvent findIfActualMin(AttributeDetails latestEvent) {\n int indexCurrentMin = valueStack.indexOf(currentMin);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMin;\n // If latest event is at a distance greater than maxPostBound from min, min is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMin.notEligibleForRealMin();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", 0, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMin.getValue() + currentMin.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMin - preBound >= 0) {\n if (valueStack.get(indexCurrentMin - preBound).getValue() >= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMin);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"min\", preBound, postBound });\n currentMin.sentOutputAsRealMin();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore min is not eligible to be sent as output.\n currentMin.notEligibleForRealMin();\n return null;\n }", "public boolean shouldHaveStarted() {\n return mCameraStarted.get();\n }", "public boolean isStart () {\n if (this.equals(SquareType.START))\n return true;\n else\n return false;\n }", "public boolean start() {\n return start(0);\n }", "boolean initializeStart() {\n if (state != PlatformState.STOPPED) {\n return false;\n }\n state = PlatformState.STARTING;\n return true;\n }", "@java.lang.Override\n public boolean getFenced() {\n return fenced_;\n }", "@java.lang.Override\n public boolean getFenced() {\n return fenced_;\n }", "boolean hasStartGameRequest();", "public void nativeReady() {\n\t\t_startSem.release();\n\t}", "boolean isStarted();", "boolean isStarted();", "public boolean canStart(){\r\n try {\r\n return start.take();\r\n } catch (Exception e){\r\n return false;\r\n }\r\n }", "public void startDetect(){\n\n EventHandle[] start = ECAAgent.getEventHandles(startDetectEventName);\n ECAAgent.raiseEndEvent(start,this);\n }", "@Override\n protected boolean isFinished() {\n //stop once the left side is high enough\n return Robot.myLifter.getLeftEncoder() < pos;\n }", "@Test\n public void testMultiChannelWithBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n // checkpoint with data from multi channels\n createBuffer(0),\n createBuffer(2),\n createBuffer(0),\n createBarrier(1, 1),\n createBarrier(1, 2),\n createBuffer(0),\n createBarrier(1, 0),\n\n // another checkpoint\n createBuffer(0),\n createBuffer(0),\n createBuffer(1),\n createBuffer(1),\n createBuffer(2),\n createBarrier(2, 0),\n createBarrier(2, 1),\n createBarrier(2, 2),\n\n // checkpoint with data only from one channel\n createBuffer(2),\n createBuffer(2),\n createBarrier(3, 2),\n createBuffer(0),\n createBuffer(0),\n createBarrier(3, 0),\n createBarrier(3, 1),\n\n // empty checkpoint\n createBarrier(4, 1),\n createBarrier(4, 2),\n createBarrier(4, 0),\n\n // some trailing data\n createBuffer(0),\n createEndOfPartition(0),\n createEndOfPartition(1),\n createEndOfPartition(2)\n };\n ValidatingCheckpointHandler handler = new ValidatingCheckpointHandler();\n inputGate = createCheckpointedInputGate(3, sequence, handler);\n\n handler.setNextExpectedCheckpointId(1L);\n\n // pre checkpoint 1\n check(sequence[0], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[1], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[2], inputGate.pollNext().get(), PAGE_SIZE);\n assertEquals(1L, handler.getNextExpectedCheckpointId());\n\n long startTs = System.nanoTime();\n\n // checkpoint 1 done\n check(sequence[3], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[4], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[5], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[6], inputGate.pollNext().get(), PAGE_SIZE);\n assertEquals(2L, handler.getNextExpectedCheckpointId());\n validateAlignmentTime(startTs, inputGate);\n assertThat(mockInputGate.getBlockedChannels(), empty());\n\n // pre checkpoint 2\n check(sequence[7], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[8], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[9], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[10], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[11], inputGate.pollNext().get(), PAGE_SIZE);\n assertEquals(2L, handler.getNextExpectedCheckpointId());\n\n // checkpoint 2 barriers come together\n startTs = System.nanoTime();\n check(sequence[12], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[13], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[14], inputGate.pollNext().get(), PAGE_SIZE);\n assertEquals(3L, handler.getNextExpectedCheckpointId());\n validateAlignmentTime(startTs, inputGate);\n assertThat(mockInputGate.getBlockedChannels(), empty());\n\n check(sequence[15], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[16], inputGate.pollNext().get(), PAGE_SIZE);\n\n // checkpoint 3\n check(sequence[17], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[18], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[19], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[20], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[21], inputGate.pollNext().get(), PAGE_SIZE);\n assertEquals(4L, handler.getNextExpectedCheckpointId());\n assertThat(mockInputGate.getBlockedChannels(), empty());\n\n // checkpoint 4\n check(sequence[22], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[23], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[24], inputGate.pollNext().get(), PAGE_SIZE);\n assertEquals(5L, handler.getNextExpectedCheckpointId());\n assertThat(mockInputGate.getBlockedChannels(), empty());\n\n // remaining data\n check(sequence[25], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[26], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[27], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[28], inputGate.pollNext().get(), PAGE_SIZE);\n }", "public boolean forceEvents() {\n if (!isStarted()) {\n return false;\n }\n\n if (listeners.isEmpty()) {\n return false;\n }\n\n LOG.debug(\"Force events for all currently connected devices\");\n\n deviceDetector.resetRoots();\n\n return true;\n }", "@Override\n\tprotected boolean isStoppingConditionReached() {\n\t\t\n\t\tboolean flag = iteration > maxIteration || \n\t\t\t\tlocalSearchTime > maxLocalSearchTime || \n\t\t\t\t!isUpdate;\n\t\tisUpdate = false ;\n\t\treturn flag ;\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tdemo.meeting(barrier);\n\t\t\t\t}", "public boolean isRunning() {\r\n\t\tboolean sentinel = true;\r\n\t\trunningBalls = 0;\r\n\t\ttraversal_inorder_runningcheck(root);\r\n\t\tif (runningBalls!=0) {\r\n\t\t\treturn sentinel;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsentinel = false;\r\n\t\t\treturn sentinel;\r\n\t\t}\r\n\t}", "public boolean isFirstLaunchCalled() {\n return this.f51;\n }", "public boolean nextConditionMet() {\n return true;\n }", "private boolean isNextReady()\n {\n return __m_NextReady;\n }", "public boolean isStarted() {\n\t\treturn started.get();\n\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent evt) {\n\t\tif (evt.getAction() == MotionEvent.ACTION_DOWN) {\n\t\t\tsynchronized (mSplashThread) {\n\t\t\t\tmSplashThread.notifyAll();\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isFirstCycle() {\n return cycle == 0;\n }", "@Test\n public void testAbortOnCanceledBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n // starting a checkpoint\n /* 0 */ createBuffer(1),\n /* 1 */ createBarrier(1, 1),\n /* 2 */ createBuffer(2),\n createBuffer(0),\n\n // cancel the initial checkpoint\n /* 4 */ createCancellationBarrier(1, 0),\n\n // receiving a buffer\n /* 5 */ createBuffer(1),\n\n // starting a new checkpoint\n /* 6 */ createBarrier(2, 1),\n\n // some more buffers\n /* 7 */ createBuffer(2),\n createBuffer(0),\n\n // ignored barrier - already canceled and moved to next checkpoint\n /* 9 */ createBarrier(1, 2),\n\n // some more buffers\n /* 10 */ createBuffer(0),\n createBuffer(2),\n\n // complete next checkpoint regularly\n /* 12 */ createBarrier(2, 0),\n createBarrier(2, 2),\n\n // some more buffers\n /* 14 */ createBuffer(0),\n createBuffer(1),\n createBuffer(2)\n };\n ValidatingCheckpointHandler toNotify = new ValidatingCheckpointHandler();\n inputGate = createCheckpointedInputGate(3, sequence, toNotify);\n\n long startTs;\n\n check(sequence[0], inputGate.pollNext().get(), PAGE_SIZE);\n\n // starting first checkpoint\n check(sequence[1], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[2], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[3], inputGate.pollNext().get(), PAGE_SIZE);\n\n // cancelled by cancellation barrier\n check(sequence[4], inputGate.pollNext().get(), 0);\n check(sequence[5], inputGate.pollNext().get(), PAGE_SIZE);\n assertEquals(1, toNotify.getLastCanceledCheckpointId());\n assertEquals(\n CheckpointFailureReason.CHECKPOINT_DECLINED_ON_CANCELLATION_BARRIER,\n toNotify.getCheckpointFailureReason());\n assertThat(mockInputGate.getBlockedChannels(), empty());\n\n // the next checkpoint alignment\n startTs = System.nanoTime();\n check(sequence[6], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[7], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[8], inputGate.pollNext().get(), PAGE_SIZE);\n\n // ignored barrier and unblock channel directly\n check(sequence[9], inputGate.pollNext().get(), PAGE_SIZE);\n assertThat(mockInputGate.getBlockedChannels(), containsInAnyOrder(1));\n check(sequence[10], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[11], inputGate.pollNext().get(), PAGE_SIZE);\n\n // checkpoint 2 done\n toNotify.setNextExpectedCheckpointId(2);\n check(sequence[12], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[13], inputGate.pollNext().get(), PAGE_SIZE);\n validateAlignmentTime(startTs, inputGate);\n assertThat(mockInputGate.getBlockedChannels(), empty());\n\n // trailing data\n check(sequence[14], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[15], inputGate.pollNext().get(), PAGE_SIZE);\n check(sequence[16], inputGate.pollNext().get(), PAGE_SIZE);\n\n assertEquals(1, toNotify.getTriggeredCheckpointCounter());\n assertEquals(1, toNotify.getAbortedCheckpointCounter());\n }", "@Test\n public void testMultiChannelNoBarriers() throws Exception {\n BufferOrEvent[] sequence = {\n createBuffer(2),\n createBuffer(2),\n createBuffer(0),\n createBuffer(1),\n createBuffer(0),\n createEndOfPartition(0),\n createBuffer(3),\n createBuffer(1),\n createEndOfPartition(3),\n createBuffer(1),\n createEndOfPartition(1),\n createBuffer(2),\n createEndOfPartition(2)\n };\n inputGate = createCheckpointedInputGate(4, sequence);\n\n for (BufferOrEvent boe : sequence) {\n assertEquals(boe, inputGate.pollNext().get());\n }\n\n assertEquals(0L, inputGate.getAlignmentDurationNanos());\n }", "@Override\r\n\tpublic boolean isReady() {\n\t\treturn !finish;\r\n\t}", "public boolean acquireNoWait(boolean forMerge) {\r\n return true;\r\n }", "public void latch(boolean latched) {\n if (latched) {\n latchSolenoid.set(false); //false means latch is pressurized\n } else {\n latchSolenoid.set(true); //true means latch is NOT pressurized\n }\n\n }", "boolean start()\n {\n // log.info(\"Begin start(), instance = '\" + instance + \"'\");\n boolean retVal = false;\n\n if (isStartable())\n {\n t = new Thread(processor);\n t.start();\n nextStartTime = System.currentTimeMillis() + minDurationInMillis;\n running = true;\n retVal = true;\n }\n\n // log.info(\"End start(), instance = '\" + instance + \"', retVal = \" + retVal);\n return retVal;\n }", "public boolean startBftsIfRequired() {\n\t\tboolean bftsRequired = Utils.isConnected(getApplicationContext())\n\t\t\t\t&& Utils.isSDCardValid(getApplicationContext(), false)\n\t\t\t\t&& articlesDao.hasPendingDownloads(getApplicationContext(),\n\t\t\t\t\t\tarticleId);\n\n\t\tif (bftsRequired) {\n\t\t\tif (progressUpdateThread != null) {\n\t\t\t\tif (BuildConfig.DEBUG) {\n\t\t\t\t\tLog.d(TAG,\n\t\t\t\t\t\t\t\"Interrupting the current progress update thread.\");\n\t\t\t\t}\n\n\t\t\t\tprogressUpdateThread.interrupt();\n\t\t\t}\n\n\t\t\tif (BuildConfig.DEBUG) {\n\t\t\t\tLog.d(TAG, \"Starting a new progress update thread.\");\n\t\t\t}\n\n\t\t\tprogressUpdateThread = new ProgressUpdateThread();\n\t\t\tprogressUpdateThread.start();\n\n\t\t\tif (Utils.isServiceRunning(getApplicationContext(),\n\t\t\t\t\t\"BackgroundFileTransferService\")) {\n\t\t\t\tif (BuildConfig.DEBUG) {\n\t\t\t\t\tLog.d(TAG, \"BFTS is already running.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tif (BuildConfig.DEBUG) {\n\t\t\t\t\tLog.d(TAG, \"Starting BFTS.\");\n\t\t\t\t}\n\n\t\t\t\tWakefulIntentService.sendWakefulWork(this,\n\t\t\t\t\t\tBackgroundFileTransferService.class);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean collideWithBarrier() {\n\t\t// Gets the barrierCollisionBoxes array list from the level.\n\t\tArrayList<Rectangle2D.Double> barrierCollisonBoxes = this.level\n\t\t\t\t.getBarrierCollisonBoxes();\n\n\t\t// Loop through and check if the Digger is colliding with a\n\t\t// barrierCollisonBox.\n\t\tfor (int i = 0; i < barrierCollisonBoxes.size(); i++) {\n\t\t\tif (this.collisionBox.intersects(barrierCollisonBoxes.get(i))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public final boolean minimum(){\r\n\t\treturn minimum;\r\n\t}", "public boolean isFenceGate() {\n return this.type == Type.FENCEGATE;\n }", "boolean fenced(int x, int y);", "@Override\n public boolean waitToProceed() {\n return false;\n }", "@Override\n public boolean continueWaitState(SceKernelThreadInfo thread, ThreadWaitInfo wait) {\n SceKernelEventFlagInfo event = eventMap.get(wait.EventFlag_id);\n if (event == null) {\n thread.cpuContext._v0 = ERROR_KERNEL_NOT_FOUND_EVENT_FLAG;\n return false;\n }\n\n // Check EventFlag.\n if (checkEventFlag(event, wait.EventFlag_bits, wait.EventFlag_wait, wait.EventFlag_outBits_addr)) {\n event.threadWaitingList.removeWaitingThread(thread);\n thread.cpuContext._v0 = 0;\n return false;\n }\n\n return true;\n }", "public boolean isFallingEdge()\n {\n return !currentlyDetecting && previouslyDetecting;\n }", "private boolean isStateFullyDetermined() {\n switch (hasSubstance) {\n case No:\n case Unknown:\n return false;\n case Yes:\n // if already established has substance, continue checking only until\n // reach threshold\n return (substanceMin <= 0) ? true : substanceCnt >= substanceMin;\n }\n throw new ShouldNotHappenException();\n }", "boolean motorsAreBusy();", "public boolean isStart() {\n\t\treturn start;\n\t}", "public boolean isReady();", "public boolean isReady();", "@Override\n\tpublic boolean getStart() {\n\t\treturn true;\n\t}", "@Override\n\tprotected boolean until() {\n\t\treturn true;\n\t}", "public boolean isStarted()\r\n\t{\r\n\t\treturn currentstate == TIMER_START;\r\n\t}", "public boolean isQueued() {\r\n\t\tif (vehicleState == \"queued\") {\r\n\t\t\twasQueued = true;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@java.lang.Override\n public boolean hasFenced() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "boolean isSetSingleBetMinimum();", "public boolean queueEmpty() {\r\n\t\tif (vehiclesInQueue.size() == 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\r\n public boolean doStartTrackers() {\n boolean result = true;\r\n\r\n Tracker objectTracker = TrackerManager.getInstance().getTracker(ObjectTracker.getClassType());\r\n if (objectTracker != null)\r\n objectTracker.start();\r\n\r\n return result;\r\n }", "public final boolean searchMinimum(){\r\n\t\tif (!initialized()) minimum=true;\r\n\t\treturn minimum;\r\n\t}", "public boolean getStart(){\n\t\treturn this.isStart;\n\t}" ]
[ "0.5956804", "0.5910809", "0.5687097", "0.5646802", "0.5568705", "0.55676943", "0.5447083", "0.54198474", "0.53891605", "0.5337587", "0.5269921", "0.52565116", "0.5223092", "0.51958644", "0.51459056", "0.5140908", "0.5135383", "0.5133187", "0.5126104", "0.5108712", "0.50959265", "0.508854", "0.5074948", "0.50644165", "0.5056491", "0.5030978", "0.50049573", "0.50002146", "0.496754", "0.49592498", "0.49524397", "0.49501732", "0.4944813", "0.4922484", "0.49144924", "0.4905195", "0.48991376", "0.48961997", "0.4885963", "0.48849362", "0.48825082", "0.48808855", "0.48770553", "0.48728856", "0.48685932", "0.4846722", "0.4843361", "0.48431596", "0.481505", "0.47920993", "0.4791377", "0.47912365", "0.47903034", "0.47829854", "0.4765247", "0.47632352", "0.47632352", "0.47599277", "0.47530255", "0.47457108", "0.4732861", "0.47276068", "0.47228986", "0.47190616", "0.47124282", "0.47008383", "0.4700688", "0.4695512", "0.46917945", "0.4688202", "0.46855423", "0.46830547", "0.4664109", "0.4664023", "0.46603698", "0.4660165", "0.46601462", "0.46599132", "0.4650971", "0.4649601", "0.46417898", "0.4631424", "0.46299887", "0.46289673", "0.4627757", "0.46258166", "0.4625401", "0.46239838", "0.46225527", "0.46225527", "0.46164322", "0.46142906", "0.46138176", "0.4612973", "0.46061018", "0.45954996", "0.459468", "0.45907196", "0.45867214", "0.45854086" ]
0.7460018
0
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.home, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246451", "0.7201833", "0.7195169", "0.7176824", "0.71071094", "0.7039687", "0.70379424", "0.7011622", "0.70095545", "0.69799995", "0.6945173", "0.69389343", "0.6933555", "0.69172555", "0.69172555", "0.68906796", "0.688355", "0.687496", "0.6874772", "0.68613136", "0.68613136", "0.68613136", "0.68613136", "0.6852252", "0.6846455", "0.6818823", "0.6816676", "0.68122935", "0.68119055", "0.68119055", "0.6805087", "0.68003947", "0.6797015", "0.67904633", "0.6789411", "0.67871827", "0.6782913", "0.67593676", "0.6756442", "0.6747255", "0.6742987", "0.6742987", "0.6740183", "0.67392707", "0.67249876", "0.67237884", "0.67217875", "0.67217875", "0.6719964", "0.6711429", "0.6706682", "0.67035955", "0.6699167", "0.66980296", "0.6696009", "0.6694031", "0.66855574", "0.66825926", "0.66825926", "0.6682556", "0.66795844", "0.6678825", "0.6676161", "0.66680866", "0.66665506", "0.66625977", "0.6657122", "0.6657122", "0.6657122", "0.6656225", "0.6653723", "0.6653723", "0.6653723", "0.66520125", "0.6651581", "0.6649255", "0.6648212", "0.6646545", "0.6646233", "0.66460145", "0.6645477", "0.6644324", "0.66441935", "0.6642723", "0.66420346", "0.66412085", "0.6638387", "0.6633755", "0.66334134", "0.66321", "0.663127", "0.663127", "0.663127", "0.6628276", "0.6627496", "0.6626989", "0.6625628", "0.6623483", "0.6620039", "0.66181844", "0.66181844" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean addHotelArea(HotelArea hotelArea) { Integer result = hotelAreaDao.insert(hotelArea); return result > 0; }
{ "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 boolean updateHotelArea(HotelArea hotelArea) { Integer result = hotelAreaDao.update(hotelArea); return result > 0; }
{ "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 boolean deleteHotelArea(HotelArea hotelArea) { hotelAreaDao.delete(hotelArea); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean deleteHotelAreas(String hotelAreas) { String areaId[] = hotelAreas.split(","); //System.out.println(" hotelid:::" + hotelId.length); for(int i = 0 ; i < areaId.length; i ++) { HotelArea hi = new HotelArea(); hi.setId(Integer.parseInt(areaId[i])); //System.out.println(" hotelid+++" + Integer.parseInt(hotelId[i])); hotelAreaDao.delete(hi); } return true; }
{ "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<HotelArea> queryHotelArea(HotelAreaQuery query) { List<HotelArea> hotelAreaLs = hotelAreaDao.selectEntityList(query); return hotelAreaLs; }
{ "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 int queryHotelAreaCount(HotelAreaQuery query) { Integer result = hotelAreaDao.selectEntityCount(query); return result == null ? 0 : result; }
{ "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 int getGeneralId(HotelAreaQuery query) { Integer result = hotelAreaDao.getGeneralId(); return result == null ? 1 : result + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
La sobrecarga de metodos consiste en sobrescibir un metodo de la clase padre desde la clase hija
@Override public String comer(String c) { c="Gato No puede Comer Nada" ; return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String cualquierMetodo2() {\n return \"Método implementado en la clase hija viaje de incentivo\";\n }", "default String getTodo(){\n\t\treturn getPerimetro() + \" - \"+ getNombre();\n\t}", "public void MostrarDatos(){\n // En este caso, estamos mostrando la informacion necesaria del objeto\n // podemos acceder a la informacion de la persona y de su arreglo de Carros por medio de un recorrido\n System.out.println(\"Hola, me llamo \" + nombre);\n System.out.println(\"Tengo \" + contador + \" carros.\");\n for (int i = 0; i < contador; i++) {\n System.out.println(\"Tengo un carro marca: \" + carros[i].getMarca());\n System.out.println(\"El numero de placa es: \" + carros[i].getPlaca()); \n System.out.println(\"----------------------------------------------\");\n }\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "@Override\n\tpublic void mostrarDados() {\n\t\t\n\t}", "private void creaModuloMem() {\n /* variabili e costanti locali di lavoro */\n ArrayList<Campo> campi = new ArrayList<Campo>();\n ModuloRisultati modulo;\n Campo campo;\n\n try { // prova ad eseguire il codice\n\n campo = CampoFactory.intero(Campi.Ris.codicePiatto.getNome());\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.nomePiatto.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"piatto\");\n campo.setToolTipLista(\"nome del piatto\");\n campo.decora()\n .etichetta(\"nome del piatto\"); // le etichette servono per il dialogo ricerca\n campo.setLarghezza(250);\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.categoria.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"categoria\");\n campo.setToolTipLista(\"categoria del piatto\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteVolte.getNome());\n campo.setVisibileVistaDefault();\n campo.setLarghezza(80);\n campo.setTitoloColonna(\"quante volte\");\n campo.setToolTipLista(\n \"quante volte questo piatto è stato offerto nel periodo analizzato\");\n campo.decora().etichetta(\"quante volte\");\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quantiCoperti.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"coperti\");\n campo.setToolTipLista(\"numero di coperti che avrebbero potuto ordinare\");\n campo.decora().etichetta(\"n. coperti\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteComande.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"comande\");\n campo.setToolTipLista(\"numero di comande effettive\");\n campo.decora().etichetta(\"n. comande\");\n campo.setLarghezza(80);\n campo.setTotalizzabile(true);\n campi.add(campo);\n\n campo = CampoFactory.percentuale(Campi.Ris.gradimento.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"gradimento\");\n campo.setToolTipLista(\n \"percentuale di gradimento (è il 100% se tutti i coperti potenziali lo hanno ordinato)\");\n campo.decora().etichetta(\"% gradimento\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n modulo = new ModuloRisultati(campi);\n setModuloRisultati(modulo);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }", "public static void main(String[] args) {\n Perro perro = new Perro(1, \"Juanito\", \"Frespuder\", 'M');\n Gato gato = new Gato(2, \"Catya\", \"Egipcio\", 'F', true);\n Tortuga paquita = new Tortuga(3, \"Pquita\", \"Terracota\", 'F', 12345857);\n\n SetJuego equipo = new SetJuego(4, \"Gato equipo\", 199900, \"Variado\", \"16*16*60\", 15, \"Gatos\");\n PelotaMorder pelotita = new PelotaMorder(1, \"bola loca\", 15000, \"Azul\", \"60 diam\");\n\n System.out.println(perro.toString());//ToString original de \"mascotas\"\n System.out.println(gato.toString());//ToString sobrescrito\n System.out.println(paquita.toString());\n\n System.out.println(equipo);//ToString sobrescrito (tambien se ejecuta sin especificarlo)\n System.out.println(pelotita.toString());//Original de \"Juguetes\"\n\n //metodos clase mascota\n perro.darCredito();//aplicado de la interface darcredito\n paquita.darDeAlta(\"Terracota\",\"Paquita\");\n equipo.devolucion(4,\"Gato Equipo\");\n\n //vamos a crear un arraylist\n ArrayList<String> servicios = new ArrayList<String>();\n servicios.add(\"Inyectologia\");\n servicios.add(\"Peluqueria\");\n servicios.add(\"Baño\");\n servicios.add(\"Desparacitacion\");\n servicios.add(\"Castracion\");\n\n System.out.println(\"Lista de servicios: \" + servicios + \", con un total de \" + servicios.size());\n\n servicios.remove(3);//removemos el indice 3 \"Desparacitacion\"\n\n System.out.println(\"Se ha removido un servicio..................\");\n System.out.println(\"Lista de servicios: \" + servicios + \", con un total de \" + servicios.size());\n\n\n //creamos un vector\n Vector<String> promociones = new Vector<String>();\n\n promociones.addElement(\"Dia perruno\");\n promociones.addElement(\"Gatutodo\");\n promociones.addElement(\"10% Descuento disfraz de perro\");\n promociones.addElement(\"Jornada de vacunacion\");\n promociones.addElement(\"Serpiente-Promo\");\n\n System.out.println(\"Lista de promos: \" + promociones);\n System.out.println(\"Total de promos: \" + promociones.size());\n\n promociones.remove(4);//removemos 4 \"Serpiente-Promo\"\n System.out.println(\"Se ha removido una promocion..................\");\n\n System.out.println(\"Lista de promos: \" + promociones);\n System.out.println(\"Total de promos: \" + promociones.size());\n\n String[] dias_Semana = {\"Lunes\",\"Martes\",\"Miercoles\",\"Jueves\",\"Viernes\", \"Sabado\",\"Domingo\"};\n\n try{\n System.out.println(\"Elemento 6 de servicios: \" + dias_Semana[8]);\n } catch (ArrayIndexOutOfBoundsException e){\n System.out.println(\"Ey te pasaste del indice, solo hay 5 elementos\");\n } catch (Exception e){\n System.out.println(\"Algo paso, el problema es que no se que...\");\n System.out.println(\"La siguiente linea ayudara a ver el error\");\n e.printStackTrace();//solo para desarrolladores\n }finally {\n System.out.println(\"------------------------El curso termino! Pero sigue el de Intro a Android!!!!--------------------------\");\n }\n\n }", "public Cobra()\r\n {\r\n super();\r\n corpo = new ArrayList<CorpoCobra>();\r\n\r\n porCrescer = 0;\r\n ovosComidos = 0;\r\n vidas = 3;\r\n tonta = 0;\r\n }", "@Override\n public void memoria() {\n \n }", "public DAOPedidoMesa() {\n\t\trecursos = new ArrayList<Object>();\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "public FiltroMicrorregiao() {\r\n }", "public Celula() { // Sentinela\n\t\tthis.item = new Jogador();\n\t\tproximo = null;\n\t}", "private void asignaNombre() {\r\n\r\n\t\tswitch (this.getNumero()) {\r\n\r\n\t\tcase 1:\r\n\t\t\tthis.setNombre(\"As de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tthis.setNombre(\"Dos de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tthis.setNombre(\"Tres de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tthis.setNombre(\"Cuatro de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tthis.setNombre(\"Cinco de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tthis.setNombre(\"Seis de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tthis.setNombre(\"Siete de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tthis.setNombre(\"Diez de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tthis.setNombre(\"Once de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tthis.setNombre(\"Doce de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n\tvoid geraDados() {\n\n\t}", "public static void main(String[] args) {\n\n aluno exemplo1 = new aluno();//objeto do tipo aluno\n aluno exemplo2 = new aluno();\n exemplo1.nome = \"EPAMINONDAS\";\n exemplo1.matricula = \"MAT-1\";\n exemplo1.nota = 5;\n exemplo1.anoNacimento = 2005;\n\n\n exemplo2.nome = \"MARIA\";\n exemplo2.matricula = \"MAT-2\";\n exemplo2.nota = 10;\n exemplo2.anoNacimento = 2000;\n\n\n System.out.println(\"Nome: \"+exemplo1.nome + \" matricula: \" + exemplo1.matricula + \" nota: \" + exemplo1.nota);\n System.out.println(\"Nome: \"+exemplo2.nome + \" matricula: \" + exemplo2.matricula + \" nota: \" + exemplo2.nota);\n\n exemplo1.mostraIdade(2030);//metodos\n exemplo2.mostraIdade(2021);\n exemplo2.mostraIdade(2003, 2021);\n }", "public Medico() {\r\n\t\tsuper();\r\n\t codmedico = \"\";\r\n\t\tespecialidad = null;\r\n\t}", "public void crearClase() {\r\n\t\tsetClase(3);\r\n\t\tsetTipoAtaque(3);\r\n\t\tsetArmadura(15);\r\n\t\tsetModopelea(0);\r\n\t}", "public Persona(){\n /*super(nombresPosibles\n [r.nextInt(nombresPosibles.length)],(byte)r.nextInt(101));\n */\n super(\"Anónimo\",(byte)5);\n String[] nombresPosibles={\"Patracio\",\"Eusequio\",\"Bartolo\",\"Mortadelo\",\"Piorroncho\",\"Tiburcio\"};\n String[] apellidosPosibles={\"Sánchez\",\"López\",\"Martínez\",\"González\",\"Páramos\",\"Jiménez\",\"Parra\"};\n String[] nacionalidadesPosibles={\"Española\",\"Francesa\",\"Alemana\",\"Irlandesa\",\"Japonesa\",\"Congoleña\",\"Bielorrusa\",\"Mauritana\"};\n Random r=new Random();\n this.apellido=apellidosPosibles\n [r.nextInt(apellidosPosibles.length)];\n this.nacionalidad=nacionalidadesPosibles\n [r.nextInt(nacionalidadesPosibles.length)];\n mascota=new Mascota[5];\n this.saldo=r.nextInt(101);\n }", "public void inicializarListaMascotas()\n {\n //creamos un arreglo de objetos y le cargamos datos\n mascotas = new ArrayList<>();\n mascotas.add(new Mascota(R.drawable.elefante,\"Elefantin\",0));\n mascotas.add(new Mascota(R.drawable.conejo,\"Conejo\",0));\n mascotas.add(new Mascota(R.drawable.tortuga,\"Tortuga\",0));\n mascotas.add(new Mascota(R.drawable.caballo,\"Caballo\",0));\n mascotas.add(new Mascota(R.drawable.rana,\"Rana\",0));\n }", "public NodoArbolSintactico(String nombre, int tipo) {\r\n hijos = new ArrayList<>();\r\n this.nombre = nombre;\r\n accion = null;\r\n this.tipo = tipo;\r\n }", "@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}", "private TIPO_REPORTE(String nombre)\r\n/* 55: */ {\r\n/* 56: 58 */ this.nombre = nombre;\r\n/* 57: */ }", "private ControleurAcceuil(){ }", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "private void populaDiasTreinoCat()\n {\n DiasTreinoCat dias1 = new DiasTreinoCat(\"1 vez por semana\", 1);\n diasTreinoCatDAO.insert(dias1);\n DiasTreinoCat dias2 = new DiasTreinoCat(\"2 vez por semana\", 2);\n diasTreinoCatDAO.insert(dias2);\n DiasTreinoCat dias3 = new DiasTreinoCat(\"3 vez por semana\", 3);\n diasTreinoCatDAO.insert(dias3);\n DiasTreinoCat dias4 = new DiasTreinoCat(\"4 vez por semana\", 4);\n diasTreinoCatDAO.insert(dias4);\n DiasTreinoCat dias5 = new DiasTreinoCat(\"5 vez por semana\", 5);\n diasTreinoCatDAO.insert(dias5);\n DiasTreinoCat dias6 = new DiasTreinoCat(\"6 vez por semana\", 6);\n diasTreinoCatDAO.insert(dias6);\n DiasTreinoCat dias7 = new DiasTreinoCat(\"7 vez por semana\", 7);\n diasTreinoCatDAO.insert(dias7);\n\n }", "public static void main(String[] args) {\n Alumno aaDatos []; // El identificador es nulo\n \n aaDatos = new Alumno[tam];//Creamos un arreglo de 10 \n //alumnos - AQUI HABRA PREGUNTA\n for (int i = 0; i < aaDatos.length; i++) {\n aaDatos[i]= new Alumno(\"Dany\",\"16550518\", 0);//Para cada lugar de arreglo se crea un objeto de la clase alumno\n \n }\n for (Alumno aaDatos1: aaDatos) {\n System.out.println(\"Nombre: \"+ aaDatos1.getsNom());\n System.out.println(\"Marticula: \"+ aaDatos1.getsMatri());\n System.out.println(\"Carrera: \"+ aaDatos1.getiCar());\n \n }\n \n \n //CREAMOS UNA COPIA DEL ARREGLO\n Alumno aaCopiaDatos [];\n aaCopiaDatos = new Alumno [tam];\n \n for (int i = 0; i < aaCopiaDatos.length; i++) {\n aaCopiaDatos[i]= new Alumno(aaDatos[i].getsNom(), // <<<Se llenan todos los datos que pide el constructor por argumentos\n aaDatos[i].getsMatri(), \n aaDatos[i].getiCar());\n \n }\n for (Alumno aaCopiaDatos1 : aaCopiaDatos) {\n System.out.println(\"Nombre: \"+ aaCopiaDatos1.getsNom());\n System.out.println(\"Marticula: \"+ aaCopiaDatos1.getsMatri());\n System.out.println(\"Carrera: \"+ aaCopiaDatos1.getiCar());\n }\n System.out.println(aaDatos);\n System.out.println(aaCopiaDatos);\n }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public Moto( String nome , float valor , int ano ){\n super( nome , valor ); //define ser uma subclasse\n this.marca = \"Honda\";\n this.ano = ano;\n }", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "public void tipoDatos() {\n\t\tint num = 10;\n\t\t// Texto STring\n\t\tString cadena = \"cadena\";\n\n\t\t// Decimale O flotante\n\t\tdouble decimal = 12.16;\n\t\tfloat fl = new Float(10);\n\t\t// Bolean\n\t\tboolean bl = true;\n\n\t\t// ARREGLOS\n\t\t// string\n\t\tString[] veString = new String[5];\n\t\tveString[0] = \"hola mundo\";\n\t\tveString[1] = \"hola mundo\";\n\t\tveString[2] = \"hola mundo\";\n\t\tveString[3] = \"hola mundo\";\n\t\tveString[4] = \"hola mundo\";\n\n\t\tint[] varNum = new int[] { 0, 1, 2, 3, 4, 5 };\n\n\t}", "public Memoria(Espacio[] espacios) {\r\n\t\tthis.numEspacios = espacios.length;\r\n\t\tthis.espacios = espacios;\r\n\t\ttamaņo = 0;\r\n\t\tfor (int i = 0; i < numEspacios; i++) {\r\n\t\t\ttamaņo += espacios[i].getTamaņo();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n\t\tMulta_Trafico mt1 = new Multa_Trafico(20, \"B\");\n\t\tmt1.setResponsable(\"Paco\");\n\t\tmt1.setDescripcion(\"Exceso de velocidad\");\n\t\tmt1.setMatricula(\"MK\");\n\t\tmt1.setFecha(\"Viernes\");\n\t\tmt1.verdatos();\n\n\t\tMulta_Covid mc2 = new Multa_Covid(10, \"C\");\n\t\tmc2.setResponsable(\"Pepa\");\n\t\tmc2.setDescripcion(\"No llevaba mascarilla\");\n\t\tmc2.setMascarilla(false);\n\t\tmc2.setFecha(\"Jueves\");\n\t\tmc2.verdatos();\n\n\t\t// Para saber de qué tipo es una clase, objeto, etc... con instanceof\n\t\t// Método saberTipo\n\n\t\tExpediente expe1 = new Expediente(10, \"A\");\n\t\tSystem.out.println(saberTipo(expe1));\n\t\tSystem.out.println(saberTipo(mt1));\n\t\tSystem.out.println(saberTipo(mc2));\n\n\t\tMulta m3 = new Multa(10, \"A\"); // variables del metodo ImporteMayor\n\t\tMulta m4 = new Multa(10, \"B\");\n\t\tm3.setDescripcion(\"Multa\");\n\t\tm3.setResponsable(\"Alberto\");\n\t\tm3.setImporte(200);\n\t\tm4.setImporte(2000);\n\n\t\tSystem.out.println(ImporteMayor(m3, m4));\n\t\tSystem.out.println(conocerTipo(m3));\n\t\tSystem.out.println(m3);\n\n\t\t// array de 50 posiciones para el método MultaMayor\n\n\t\tMulta multas[] = new Multa[50];\n\n\t\tfor (int i = 0; i < multas.length; i++) { // Relleno con descripción e importe\n\t\t\tmultas[i] = new Multa(i, \"A\");\n\t\t\tmultas[i].setDescripcion(\"Descripción\" + i);\n\t\t\tmultas[i].setImporte(Math.random() * 1000 + 25);\n\t\t}\n\t\tSystem.out.println(CalcularMayor(multas));\n\n\t}", "@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}", "public NodoDoble(NodoDoble<E> anterior, E elemento, NodoDoble<E> siguiente){//a ver si no te da problema el nodo por no estar especigicando su tipo... puesto que esta clase es genérica y aquí estas creando uno sin saber, asi que creo que debería de especificarselo\n contenido = elemento;\n nodoSiguiente = siguiente;\n nodoAnterior = anterior;\n }", "@Override\n\tpublic void tipoMovimento() {\n\t\tSystem.out.println(super.getNome() + \" anda com 4 patas.\");\n\t}", "@Override public String getQueso(){\n return \"manchego \";\n }", "public void mostrarLista(){\n Nodo recorrer = inicio;\n while(recorrer!=null){\n System.out.print(\"[\"+recorrer.edad+\"]-->\");\n recorrer=recorrer.siguiente;\n }\n System.out.println(recorrer);\n }", "public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponedor1 = new Reponedor(\"Juan\", 3);\n empleados.put(reponedor1.getID(), reponedor1);\n Producto producto1 = new Producto(\"Platano\", 10, 8);\n productos.add(producto1);\n Perecedero perecedero1 = new Perecedero(LocalDateTime.now(), \"Yogurt\", 10, 8);\n }", "public Jogador(String nome, String cor){\r\n this.nome = nome;\r\n this.cor = cor;\r\n this.contaCorrente = new ContaCorrente(1500);\r\n this.propriedadesDoJogador = new ArrayList<>();\r\n this.companhiasDoJogador = new ArrayList<>();\r\n this.posicaoNoTabuleiroIndice = 0;\r\n this.possuiCartaSairDaPrisao = false;\r\n this.reclusao = 0;\r\n this.sorteNosDados = 0;\r\n monopolioNoGrupoDeCor = new ArrayList<>();\r\n }", "public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + this.nombreDePatte + \" pattes\");\n\t }", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "private static void gestionarMenuManejoJugador(int opcion) {\n\t\tswitch(opcion){\n\t\tcase 1:annadirJugador();\n\t\t\tbreak;\n\t\tcase 2:eliminarJugador();\n\t\t\tbreak;\n\t\tcase 3: System.out.println(jugadores.toString());\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "private IOferta buildOfertaEjemplo1() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tPredicates.equalTo(MedioPago.EFECTIVO),\n\t\t\t\tnew ExtraerMedioPago());\n\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoPorcentual(5.0f),\n\t\t\t\tnew ExtraerTotalBruto());\n\n\t\treturn new OfertaDinero(\"5% descuento pago en efectivo\", condicion, descuento);\n\t}", "public Socio(String nombre, int id_socio)\r\n {\r\n this.nombre = nombre;\r\n this.id_socio = id_socio;\r\n motos = new ArrayList<Moto>();\r\n System.out.println(\"Socio creado \" + id_socio + \" \" + nombre + \"\\n\");\r\n }", "public void limpiarMemoria();", "public ChConj(String metodo)\n {\n vtn = this;\n initComponents();\n setLocationRelativeTo(null);\n Shape forma = new RoundRectangle2D.Double(0, 0, this.getBounds().width, this.getBounds().height, 30, 30);\n vtn.setShape(forma);\n RSEffectFade.setFadeWindowIn(this, 30, 0.1f);\n lblMod.setText(\"Modo seleccionado: \" + metodo);\n // 248 limite de frente\n // 6 limite atras\n if (metodo.equals(\"auto\"))\n {\n lblMod.setText(\"Modo seleccionado: automatico\");\n lblTitulo.setText(\"Aleatorizando conjunto de numeros\");\n txtConjunto.setEditable(false);\n }\n if (metodo.equals(\"manual\"))\n {\n btnHiloR.setVisible(false);\n btnHiloRKill.setVisible(false);\n }\n }", "public Unidadmedida() {\r\n\t}", "public TipoPrestamo() {\n\t\tsuper();\n\t}", "@Override\r\n\tpublic String sonido() {\n\t\treturn \"Miauu\";\r\n\t}", "public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }", "public TipoObra(String descripcion) {\n this.descripcion = descripcion;\n\n switch (descripcion) {\n case \"REFORMA\": {\n this.id = 1;\n break;\n }\n case \"CASA\": {\n this.id = 2;\n break;\n }\n case \"EDIFICIO\": {\n this.id = 3;\n break;\n }\n case \"VIAL\": {\n this.id = 4;\n break;\n }\n default : this.id = 0;\n }\n }", "public Camion(int peso,Marcas marca,int kilometraje,int antiguedad) {\n super(peso,marca,kilometraje,antiguedad);\n if (super.getMarca().equals(\"FORD\")|| super.getMarca().equals(\"FIAT\"))\n {\n super.setArticulado();\n }\n if(super.getArticulado() && getPeso()<3000)\n {\n super.setCumpleNormativa();\n }\n if(!super.getArticulado() && getPeso()<2000)\n {\n super.setCumpleNormativa();\n }\n\n }", "public void mostrarTareasEnPosicionImpar(){}", "public void borrarTodo() {\n fondoJuego1 = null;\n fondoJuego2 = null;\n regresar = null;\n highLight = null;\n juegoNuevo = null;\n continuar = null;\n }", "public void Ordenamiento() {\n\n\t}", "private IOferta buildOfertaEjemplo7() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoEnSegundoProducto(\"11-111-1111\", \"11-111-1112\", 50);\n\t\treturn new OfertaDinero(\"50% en Sprite, comprando 1 Coca\", condicion,\tdescuento);\n\t}", "public int getTipoAtaque(){return tipoAtaque;}", "@Override\n\tpublic int getCodigoMoeda() {\n\t\t// TODO Auto-generated method stub\n\t\treturn super.getCodigoMoeda();\n\t}", "public Nodo_m_ario(Nodo_m_ario padre, int val, int m) {\n\t\tchiave = val;\n\t\tgrado = m;\n\t\tthis.padre = padre;\n\t\tfigli = new Nodo_m_ario[grado];\n\t\tradice = false;\n\t}", "private void populaAlimento()\n {\n Alimento a = new Alimento(\"Arroz\", 100d, 5d, 0.4d, 30d, 100d, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Abacaxi\", 96.2d, 1.2d, 2.3d, 6d, 100d, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Carne moida - Acem\", 212.4d, 26.7d, 9.8d, 0d, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Pernil Assado\", 262.3d, 32.1d, 13.1d, 0, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Pao de forma integral\", 253.2d, 9.4d, 2.9d, 49, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n }", "public void aplicarDescuento();", "public Receta(String diagnostico, String medicamentos, int idPaciente) {\r\n this.diagnostico = diagnostico;\r\n this.medicamentos = medicamentos;\r\n this.idPaciente = idPaciente;\r\n }", "public interface Comestivel {\n\t\n\t/** Metodo Que retorna o nome do item do cardapio\n\t * @return Retorna o Nome do item\n\t */\n\tpublic String getNome();\n\t\n\t/** Metodo que retorna o valor do item do cardapio\n\t * @return Retorna o Preco a ser pago\n\t */\n\tpublic double getPreco();\n\t\n\t/** Metodo que retorna uma descricao do item do cardapio\n\t * @return Retorna a Descricao do item\n\t */\n\tpublic String getDescricao();\n}", "public List<Comentario> buscaPorTopico(Topico t);", "public Nodo(datos libro)\n {\n this.libro=libro;//LA VARIABLE LIBRO TENDRA LOS DATOS DE LA CLASE LIBRO\n }", "public Logradouro(int id, String tipo, String descricao) {\n\t\tsuper(id, descricao);\n\t\tthis.tipo = tipo;\n\t}", "@Override\n\tpublic List<Materia> recuperarTodo() throws DataAccessException {\n\t\treturn null;\n\t}", "public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}", "public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }", "public Tecnico(){\r\n\t\tthis.matricula = 0;\r\n\t\tthis.nome = \"NULL\";\r\n\t\tthis.email = \"NULL\";\r\n\t\tthis.telefone = \"TELEFONE\";\r\n\t\tlistaDeServicos = new ArrayList<Servico>();\r\n\t}", "public void listar(){\n if (!esVacia()) {\n // Crea una copia de la lista.\n NodoEmpleado aux = inicio;\n // Posicion de los elementos de la lista.\n int i = 0;\n System.out.print(\"-> \");\n // Recorre la lista hasta llegar nuevamente al incio de la lista.\n do{\n // Imprime en pantalla el valor del nodo.\n System.out.print(i + \".[ \" + aux.getEmpleado() + \" ]\" + \" -> \");\n // Avanza al siguiente nodo.\n aux = aux.getSiguiente();\n // Incrementa el contador de la posi�n.\n i++;\n }while(aux != inicio);\n }\n }", "public MorteSubita() {\n }", "public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }", "public JanelaTipoContato() {\r\n initComponents();\r\n try {\r\n\r\n List<TipoContato> tipoContatos = (List<TipoContato>) (Object) tipoContatoDao.pesquisarTodos();\r\n adicionarListaTipoContatosTabela(tipoContatos);\r\n } catch (Exception exception) {\r\n }\r\n }", "public void marcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tif (!obtenerCategoria(p.getPlantaCargoDet())\r\n\t\t\t\t\t.equals(\"Sin Categoria\"))\r\n\t\t\t\tp.setReservar(true);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = listaPlantaCargoDto.size();\r\n\t}", "public void generTirarDados() {\n\r\n\t}", "public musico() {\n\t\tnombre = \" \";\n\t\tsexo = ' ';\n\n\t}", "@Override\n\tpublic void aumentar(int cantidad) {\n\t\t\n\t}", "@Override\n\tpublic void recreo() {\n\n\t}", "private void mostrarMensajes() {\r\n\t\tint indice=tablaMensajes.getSelectionIndex();\r\n\t\ttablaMensajes.removeAll();\r\n\t\tint i = 0;\r\n\t\tint numNuevos = 0;\r\n\t\t// Crear una fuente cursiva y otra negrita\r\n\t\tFontData[] fd = tablaMensajes.getFont().getFontData();\r\n\t\tfd[0].setStyle(SWT.ITALIC);\r\n\t\tFont fCursiva = new Font(tablaMensajes.getDisplay(),fd);\r\n\t\tfd[0].setStyle(SWT.BOLD);\r\n\t\tFont fNegrita = new Font(tablaMensajes.getDisplay(),fd);\r\n\t\tColor yellow = new Color(tablaMensajes.getDisplay(),255,255,0);\r\n\t\t\t\r\n\t\twhile (vista.getEmpleados().size()>0 && i + primerMensaje < vista.getTodosMensajesEntrantes().size() && i < vista.getNum_men_hoja()) {\r\n\t\t\tTableItem tItem = new TableItem(tablaMensajes, SWT.NONE);\r\n\t\t\tif (vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).isMarcado())\r\n\t\t\t{\r\n\t\t\t\ttItem.setBackground(yellow);\r\n\t\t\t}\r\n\t\t\t//TODO mostrar mensajes leídos o no leídos\r\n\t\t\tif (vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).isLeido()) \r\n\t\t\t{\r\n\t\t\t\ttItem.setImage(vista.getImagenes().getIco_mens_l());\r\n\t\t\t}\t\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\ttItem.setImage(vista.getImagenes().getIco_mens());\r\n\t\t\t\ttItem.setFont(fNegrita);\r\n\t\t\t\tnumNuevos++;\r\n\t\t\t}\r\n\t\t\tif (remitentes.size()>i)\r\n\t\t\ttItem.setText(1, remitentes.get(vista.getTodosMensajesEntrantes().size()-i-1));\r\n\t\t\t\r\n\t\t\ttItem.setText(2, Util.recortarTituloTexto(vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).getAsunto(), prevAsuntoMens));\r\n\t\t\ttItem.setText(3, Util.recortarContenidoTexto(vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).getTexto(), prevTextoMens));\r\n\t\t\ttItem.setText(4, Util.dateAString(vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).getFecha()));\r\n\t\t\ttItem.setText(5, Util.dateAStringHora(vista.getTodosMensajesEntrantes().get(vista.getTodosMensajesEntrantes().size()-i-1-primerMensaje).getFecha()));\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tint min;\r\n\t\tif(primerMensaje + vista.getNum_men_hoja()<vista.getTodosMensajesEntrantes().size())\r\n\t\t{\r\n\t\t\tmin = primerMensaje + vista.getNum_men_hoja();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmin = vista.getTodosMensajesEntrantes().size();\r\n\t\t}\r\n\t\tlMensajes.setText(bundle.getString(\"I02_lab_MostrandoMensajes1\") + \" \" + String.valueOf(primerMensaje+1) + \" \" + \r\n\t\t\t\tbundle.getString(\"I02_lab_MostrandoMensajes2\") + \" \" + String.valueOf(min)+ \" \" + \r\n\t\t\t\tbundle.getString(\"I02_lab_MostrandoMensajes3\") + \" \" + String.valueOf(vista.getTodosMensajesEntrantes().size()));\r\n\t\t/*dMensajes.setText(bundle.getString(\"I02_lab_MostrandoMensajes4\") + \" \" + String.valueOf(numNuevos) + \" \" +\r\n\t\t\t\tbundle.getString(\"I02_lab_MostrandoMensajes5\"));*/\r\n\t\ttablaMensajes.setEnabled(true);\r\n\t\ttablaMensajes.setCursor(new Cursor(tablaMensajes.getDisplay(), SWT.CURSOR_ARROW));\r\n\t\t\r\n\t\tint totalEntrantes = vista.getTodosMensajesEntrantes().size();\r\n\t\tif(primerMensaje+vista.getNum_men_hoja() < totalEntrantes)\r\n\t\t\tbSig = true;\r\n\t\telse \r\n\t\t\tbSig = false;\r\n\t\tbMensSiguientes.setEnabled(bSig);\r\n\t\t\r\n\t\tif(primerMensaje > 0)\r\n\t\t\tbAnt = true;\r\n\t\telse \r\n\t\t\tbAnt = false;\r\n\t\tbMensAnteriores.setEnabled(bAnt);\r\n\t\t\r\n\t\tbActualizar.setEnabled(true);\r\n\t\ttablaMensajes.setSelection(indice);\r\n\t}", "public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "public telefono(){\n this.telefono =\"00000000\";\n this.saldo = 0.0;\n this.marca= \"Sin Marca\";\n }", "@Override\n public void mostrar(){\n super.mostrar(); //Para evitar que este metodo se prefiera antes que el de padre(por que tienen el mismo nombre)\n //lo llamamos con super\n System.out.println(\"Nro de Paginas: \" + this.nroPag);\n }", "public Artefato() {\r\n\t\tthis.membros = new ArrayList<Membro>();\r\n\t\tthis.servicos = new ArrayList<IServico>();\r\n\t}", "public FaseDescartes faseJuego();", "public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ this.etiqueta = etiqueta;\n/* 13:19 */ this.longitud = longitud;\n/* 14: */ }", "public Puntaje() {\n nombre = \"\";\n puntos = 0;\n }", "public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}", "public static void main(String[] args) {\n\t\t\r\n\tString nombre = leerTexto(\"Ingrese un nombre:\");\r\n\tint edad = leerNumero(\"Ingrese su edad:\");\r\n\tString rut = leerTexto(\"Ingresa el RUT:\");\r\n\tchar genero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tfloat peso = leerNumero(\"Ingrese peso:\");\r\n\tfloat altura = leerNumero(\"Ingrese la altura:\");\r\n\tPersona claudia = new Persona(nombre, rut, edad, genero, peso, altura);\r\n\t\r\n\tnombre = leerTexto(\"Ingrese un nombre:\");\r\n\tedad = leerNumero(\"Ingrese su edad:\");\r\n\trut = leerTexto(\"Ingresa el RUT:\");\r\n\tgenero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tPersona juliano = new Persona(nombre, rut, edad, genero);\r\n\t\r\n\tPersona noelia = new Persona();\r\n\tnoelia.setNombre(leerTexto(\"Ingresa un nombre\"));\r\n\tnoelia.setEdad(leerNumero(\"Ingresa la edad\"));\r\n\tnoelia.setRut(leerTexto(\"Ingresa el RUT\"));\r\n\tnoelia.setGenero(leerTexto(\"Ingresa el genero\").charAt(0));\r\n\tnoelia.setAltura(leerNumero(\"Ingresa la altura\"));\r\n\tnoelia.setPeso(leerNumero(\"Ingresa el peso\"));\r\n\t\r\n\tPersona[] perso = new Persona[3];\r\n\tperso[0] = claudia;\r\n\tperso[1] = juliano;\r\n\tperso[2] = noelia;\r\n\t\r\n\tfor (Persona persona : perso) {\r\n\t\tif (persona.calcularIMC()==Persona.PESO_BAJO) {\r\n\t\t\tescribir(\"Pongale sus buenas cazuelas\");\r\n\t\t}else {\r\n\t\t\tif (persona.calcularIMC()==Persona.PESO_IDEAL) {\r\n\t\t\t\tescribir(\"Estamos tiki taka\");\r\n\t\t\t}else {\r\n\t\t\t\tescribir(\"Menos coffe break!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Mayor de edad\r\n\t\tescribir(\"La persona \" + persona.getNombre() + \" es mayor de edad? \" + persona.esMayorDeEdad());\r\n\t\t//Mostrar el toString()\r\n\t\tescribir(persona.toString());\r\n\t }\r\n\t}", "private void crearElementos() {\n\n\t\tRotonda rotonda1 = new Rotonda(new Posicion(400, 120), \"5 de octubre\");\n\t\tthis.getListaPuntos().add(rotonda1);\n\n\t\tCiudad esquel = new Ciudad(new Posicion(90, 180), \"Esquel\");\n\t\tthis.getListaPuntos().add(esquel);\n\n\t\tCiudad trelew = new Ciudad(new Posicion(450, 200), \"Trelew\");\n\t\tthis.getListaPuntos().add(trelew);\n\n\t\tCiudad comodoro = new Ciudad(new Posicion(550, 400), \"Comodoro\");\n\t\tthis.getListaPuntos().add(comodoro);\n\n\t\tCiudad rioMayo = new Ciudad(new Posicion(350, 430), \"Rio Mayo\");\n\t\tthis.getListaPuntos().add(rioMayo);\n\n\t\t// --------------------------------------------------------\n\n\t\tRutaDeRipio rutaRipio = new RutaDeRipio(230, 230, rotonda1, esquel);\n\t\tthis.getListaRuta().add(rutaRipio);\n\n\t\tRutaPavimentada rutaPavimentada1 = new RutaPavimentada(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada1);\n\n\t\tRutaPavimentada rutaPavimentada2 = new RutaPavimentada(800, 120, esquel, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada2);\n\n\t\tRutaDeRipio rutaripio3 = new RutaDeRipio(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaripio3);\n\n\t\tRutaEnConstruccion rutaConst1 = new RutaEnConstruccion(180, 70, rioMayo, comodoro);\n\t\tthis.getListaRuta().add(rutaConst1);\n\n\t\tRutaPavimentada rutaPavimentada3 = new RutaPavimentada(600, 110, rioMayo, esquel);\n\t\tthis.getListaRuta().add(rutaPavimentada3);\n\t}", "public SuperRodada(){\n this.pontos_em_disputa=0;\n this.truco=false;\n this.Desafiante=null;\n this.addPontosEmDisputa(2);\n Game game = Game.getGame();\n DonoDoBaralho=(DonoDoBaralho==null)?game.getDupla(1).getJogadorA():this.proximoAJogar(DonoDoBaralho);\n \n }", "@Override\n protected int getCodigoJuego() {\n return 5;\n }", "public Dipendente() {\r\n\t\tsetnMat();\r\n\t}", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "@Override\n\tpublic void tipoComunicacao() {\n\t\tSystem.out.println(super.getNome() + \" se comunica miando.\");\n\t}", "public TipoUsuario(int id_tipousuario) {\n this.id_tipousuario = id_tipousuario;\n }", "@Override\n\tpublic void manejoVida(int cantVida, int tipCambio) {\n\t\t\n\t}", "public List<Mobibus> darMobibus();", "public void tocarTelefone() {\n System.out.println(\"Telefone \" + getNumero() + \" está tocando!\");\n notificarTodos();\n }" ]
[ "0.66980165", "0.6517294", "0.62617016", "0.6172348", "0.6169699", "0.6124079", "0.612271", "0.611155", "0.61047745", "0.610285", "0.60580236", "0.60522515", "0.60075396", "0.5998051", "0.597455", "0.5970702", "0.5968082", "0.5965768", "0.5963499", "0.596071", "0.5956251", "0.5939431", "0.5934561", "0.5925525", "0.59178126", "0.59072196", "0.5907085", "0.590679", "0.58979416", "0.58907264", "0.5868961", "0.58687675", "0.58649135", "0.5863253", "0.58532685", "0.58506936", "0.58448493", "0.58437043", "0.58415705", "0.58403116", "0.58382344", "0.5832133", "0.58308816", "0.5829821", "0.58295125", "0.58244383", "0.5819847", "0.5818646", "0.5818283", "0.58167773", "0.58157974", "0.58062106", "0.5800639", "0.5799389", "0.5793432", "0.57922524", "0.5792126", "0.57911474", "0.57842696", "0.57827836", "0.5781213", "0.5779741", "0.5776381", "0.57673407", "0.57671356", "0.5766064", "0.5761534", "0.575851", "0.5757722", "0.5753227", "0.574856", "0.5743215", "0.57414407", "0.57379127", "0.5737445", "0.5736829", "0.57344365", "0.57307607", "0.5726051", "0.57256424", "0.5723606", "0.57189286", "0.57153106", "0.57149315", "0.57144", "0.5712914", "0.5712614", "0.5709955", "0.5706109", "0.57020426", "0.5698161", "0.56946975", "0.5683666", "0.56823045", "0.5680417", "0.56733763", "0.5670106", "0.5667252", "0.5658264", "0.5656129", "0.5654368" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onServiceConnected(ComponentName name, IBinder service) { myAIDLService = IMyAidlInterface.Stub.asInterface(service); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onServiceDisconnected(ComponentName name) { }
{ "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 protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.heat_wenkong_setup); InitView(); //启动Service Intent intent = new Intent(HeatWenkongActivity.this,LinkService.class); bindService(intent, connection, BIND_AUTO_CREATE); onClick(easy_model_bt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onDestroy() { super.onDestroy(); unbindService(connection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { switch(v.getId()){ case R.id.heat_wenkong_eashmodel_btn: easy_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_clicked); jingji_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); out_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); holiday_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); getFragmentManager().beginTransaction().replace(R.id.heat_wenkong_setup_content_ll, new WenkongEasyFrag()).commit(); break; case R.id.heat_wenkong_economicalmodel_btn: jingji_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_clicked); easy_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); out_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); holiday_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); getFragmentManager().beginTransaction().replace(R.id.heat_wenkong_setup_content_ll, new WenkongJingjiFrag()).commit(); break; case R.id.heat_wenkong_outdoormodel_btn: out_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_clicked); jingji_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); easy_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); holiday_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); getFragmentManager().beginTransaction().replace(R.id.heat_wenkong_setup_content_ll, new WenkongOutFrag()).commit(); break; case R.id.heat_wenkong_holidaymodel_btn: holiday_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_clicked); jingji_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); out_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); easy_model_bt.setBackgroundResource(R.color.heat_wenkong_setup_normal); getFragmentManager().beginTransaction().replace(R.id.heat_wenkong_setup_content_ll, new WenkongHolidayFrag()).commit(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onChange(boolean selfChange) { super.onChange(selfChange); }
{ "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
NCollection list = new NCollection(); list.add(1); list.add(2); list.add(3); list.add(4); list.add(5); System.out.println(list.first());
@Test public void testGetFirst() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T first() throws EmptyCollectionException;", "public T first() throws EmptyCollectionException;", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;", "public Object peek() {return collection.get(collection.size() - 1);}", "@Test\r\n\tvoid testFirst() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(3);\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\tint output = test.first();\r\n\t\tassertEquals(10, output);\r\n\t}", "Collection<? extends Object> getStartingHadithNo();", "public E getFirst();", "String first(String collection);", "private static <T> T identity(Collection<T> collection) {\n return identity(collection.iterator());\n }", "public Object firstElement();", "public A getFirst() { return first; }", "@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "public static <T> T getSingleElement(Collection<T> collection) {\n\t\tif (collection.size() != 1)\n\t\t\tthrow new IndexOutOfBoundsException(String.format(\n\t\t\t\t\t\"Expected collection to contain a single element, but observed %d elements: %s\", collection.size(),\n\t\t\t\t\tcollection.toString()));\n\t\treturn collection.iterator().next();\n\t}", "public E getFirst() {\n return peek();\n }", "public Object peek() {\n\t\tcheckIfStackIsEmpty();\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tObject lastElement = collection.get(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public T peek() throws EmptyCollectionException;", "public T peek() throws EmptyCollectionException;", "public Item getFirst();", "public int getFirst();", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "public E getFirst(){\n return head.getNext().getElement();\n }", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "public static void PrintCollection1(Collection<Object> c)\r\n\t{\r\n\t\tfor (Object obj : c)\r\n\t\t\tSystem.out.println(obj);\r\n\t}", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "public T getFirst();", "public T getFirst();", "public Object getFirst() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\treturn get(1);\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getFirst on an empty list\");\r\n\t\t}\r\n\t}", "T first();", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "public Item sample() {\n if (N == 0) throw new java.util.NoSuchElementException();\n return collection[rnd.nextInt(N)];\n }", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public abstract Collection<T> getFirstDimension();", "public A first() {\n return first;\n }", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "public T peek() {\n return numberList.peek();\n }", "@Test\n public void addFirst() {\n\n collection.addFirst(0000);\n collection.addFirst(0001);\n assertEquals(collection.getFirst(),0001);\n }", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public E peek()\n {\n return arrayList.get(0);\n }", "public T last() throws EmptyCollectionException;", "E top();", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "@Test\r\n\tvoid testFirst2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tint output = test.first();\r\n\t\tassertEquals(-1, output);\r\n\t}", "public Object getNext() { \t\n\t\t\tcurrIndex++;\t \n\t\t\treturn collection.elementAt(currIndex);\n\t\t}", "public static void main(String[] args) {\n\t\tList list =new ArrayList();\r\n\t\tlist.add(\"one\");\r\n\t\tlist.add(\"two\");\r\n\t\tlist.add(\"three\");\r\n\t\tlist.add(\"four\");\r\n\t\t\r\n\t\tSystem.out.println(list.size());\r\n\t\t\r\n\t\tSystem.out.println(list.get(1));\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\nList l=new ArrayList();\nIterator i=l.iterator();\nwhile(i.hasNext()){\n\tSystem.out.println(i.next());\n}\n\t}", "@Override\n public int element() {\n isEmptyList();\n return first.value;\n }", "public static IDescribable getFirst( Collection<? extends IDescribable> results )\r\n\t{\r\n\t if(( results == null ) || ( results.size() == 0 ))\r\n\t return null;\r\n\t return results.iterator().next();\r\n\t}", "public E getFirst() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\t\treturn mHead.next.data;\n\t}", "public node getFirst() {\n\t\treturn head;\n\t\t//OR\n\t\t//getAt(0);\n\t}", "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}", "public Question getFirstQ()\n {\n return questionList.get(0);\n }", "public K getFirst() {\r\n\t\treturn first;\r\n\t}", "Collection<? extends Object> getHadithNo();", "public Object getFirstObject()\n {\n \tcurrentObject = firstObject;\n\n if (firstObject == null)\n \treturn null;\n else\n \treturn AL.get(0);\n }", "public T getFirst()\n\t{\n\t\treturn head.getData();\n\t}", "public static void printCollection(Collection<?> c) {\n\tfor (Object e : c) {\r\nSystem.out.println(e);\r\n}\r\n}", "public T1 getFirst() {\n\t\treturn first;\n\t}", "public T peek() throws NoSuchElementException\n\t{\n\t\tcheckEmpty();\n\t\treturn list.get(0);\n\t}", "public static <T> T getFirstOrNull(final Collection<T> collection) {\n\n if (isEmpty(collection)) {\n return null;\n }\n if (collection instanceof List) {\n return ((List<T>) collection).get(0);\n } else {\n return collection.iterator().next();\n }\n }", "public static <T> T random(Collection<T> coll)\r\n\t{\r\n\t\tif (coll.size() == 0) return null;\r\n\t\tif (coll.size() == 1) return coll.iterator().next();\r\n\t\tint index = MCore.random.nextInt(coll.size());\r\n\t\treturn new ArrayList<T>(coll).get(index);\r\n\t}", "public static String printCollection(Collection l) {\n return printCollection(l, \"\");\n }", "public SeriesInstance getInstanceFirstRep() {\n\t\tif (getInstance().isEmpty()) {\n\t\t\treturn addInstance();\n\t\t}\n\t\treturn getInstance().get(0); \n\t}", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "public int getFirst() {\n\t\treturn first;\n\t}", "@Test\n public void whenAddSeveralIdenticalElementsThenSetHasOnlyOneSuchElement() {\n SimpleSet<Integer> set = new SimpleSet<>();\n set.add(1);\n set.add(2);\n set.add(3);\n set.add(3);\n set.add(2);\n set.add(1);\n\n Iterator<Integer> iterator = set.iterator();\n\n assertThat(iterator.next(), is(1));\n assertThat(iterator.next(), is(2));\n assertThat(iterator.next(), is(3));\n assertThat(iterator.hasNext(), is(false));\n }", "public int getFirst() {\n return first;\n }", "public Object firstElement() {\n return _queue.firstElement();\n }", "public ArrayList<T> firstThreeElements() throws EmptyCollectionException;", "public T last() throws EmptyCollectionException{\n if (rear == null){\n throw new EmptyCollectionException(\"list\");\n }\n return rear.getElement();\n }", "public Object getFirst()\n {\n return ((Node)nodes.elementAt(0)).data;\n }", "public int top() {\n \treturn list.get(list.size()-1);\n }", "private static void retriveElementInArrayList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\t\tSystem.out.println(list.get(3));\n\n\t}", "public Integer peek() {\n List<Integer> temp = new ArrayList<>();\n \n while(iterator.hasNext()){\n \ttemp.add(iterator.next());\n }\n \n Integer result = null;\n if(temp.size() > 0){\n result = temp.get(0);\n }\n \n iterator = temp.iterator();\n return result;\n\t}", "@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}", "@Override\n public E getFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[head];\n }", "Collection<? extends Object> getHadithReferenceNo();", "public T removeFirst() throws EmptyCollectionException;", "public E peek() \r\n {\r\n return list.get(getSize() - 1);\r\n }", "public T peek()\n\t{\n\t\tT ret = list.removeFirst();\n\t\tlist.addFirst(ret);\n\t\treturn ret;\n\t}", "public E peekFirst();", "@Test\n public void add() {\n\n collection.add(\"test\");\n assertEquals(collection.getLast(),\"test\");\n }", "public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }", "public T getFirst() {\n return t;\n }", "T peek(){\n\tif(m.size() == 0){\n\t throw new NoSuchElementException();\n\t}\n\tT answer = m.get(0);\n\treturn answer;\n }", "public U getFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(0);\r\n\t }", "Collection<? extends Object> getFullHadith();", "public Node getFirst()\n {\n return this.first;\n }", "public static void main(String[] args) {\n\r\n\t\tList<Integer> l = new ArrayList<Integer>();\r\n\t\t//List<Integer> l = new ArrayList<Integer>(Collection c); is also valid\r\n\t\t\r\n\t\tfor(int i=1;i<=10;i++){\r\n\t\t\tl.add(i);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(l);//[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\r\n\t\t\r\n\t\t//index based operations\r\n\t\t\r\n\t\tSystem.out.println(l.get(1));//2(element at position 1)\r\n\t\tSystem.out.println(l.set(1,12));//2(returns and replaces the element at position 1)\r\n\t\tSystem.out.println(l);//[1, 12, 3, 4, 5, 6, 7, 8, 9, 10]\r\n\t\t\r\n\t\tl.add(1,11);//inserts 11 at position 1\r\n\t\tSystem.out.println(l);//[1, 11, 12, 3, 4, 5, 6, 7, 8, 9, 10]\r\n\t\tList<Integer> l1 = Arrays.asList(97,23,34);\r\n\t\tl.addAll(4,l1);//inserts collection elements at position 4\r\n\t\tSystem.out.println(l);//[1, 11, 12, 3, 97, 23, 34, 4, 5, 6, 7, 8, 9, 10]\r\n\t\t\r\n\t\tSystem.out.println(l.remove(new Integer(4)));//true ( removes the first occurrence of object 4 )\r\n\t\tSystem.out.println(l.remove(4));//97 (removes the object at position 4)\r\n\t\r\n\t\tSystem.out.println(l.add(11));\r\n\t\tSystem.out.println(l);//[1, 11, 12, 3, 23, 34, 5, 6, 7, 8, 9, 10,11]\r\n\t\t\r\n\t\tSystem.out.println(l.indexOf(new Integer(11)));//1\r\n\t\tSystem.out.println(l.lastIndexOf(new Integer(11)));//12\r\n\t\t\r\n\t\tSystem.out.println(l.subList(3, 8));//[3, 23, 34, 5, 6]\r\n\t\r\n\t\t\r\n\t}", "public void firstOfList(List<?> instrucicones, Object n) {\n \tString m=\"\";\n \tm=instrucicones.get(1).toString();\n \t//System.out.println(m);\n \tSystem.out.println(n);\n }", "public final ManagedElementList<VirtualMachine> getFirstSet() {\r\n return (ManagedElementList<VirtualMachine>) this.set1;\r\n }", "Object front()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call front() on empty List\");\n\t\t}\n\t\treturn front.data;\n\t}", "@Override\r\n\tpublic T first() {\n\t\treturn head.content;\r\n\t}", "public interface Collection<E> {\n\n /**\n * 获取迭代器.\n * @return 迭代器\n */\n Iterator<E> iterator();\n\n /**\n * 获取集合容量.\n * @return The size of collection\n */\n int size();\n\n /**\n * 根据索引获取该位置上的值.\n * @param index 位置索引\n * @return 索引位置的值\n */\n E get(int index);\n\n}", "public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}" ]
[ "0.692565", "0.692565", "0.68115926", "0.66580236", "0.65604466", "0.6433179", "0.6419838", "0.63783145", "0.62889373", "0.6281531", "0.6274715", "0.6256125", "0.62142295", "0.6200721", "0.6194539", "0.6162047", "0.6156737", "0.6151053", "0.6151053", "0.61446637", "0.6118541", "0.6117021", "0.611431", "0.61087877", "0.6098412", "0.6096974", "0.6076929", "0.6076929", "0.6043883", "0.6016673", "0.59690064", "0.59558517", "0.59330237", "0.5923986", "0.59211075", "0.5889461", "0.5883965", "0.5879202", "0.5877413", "0.58773065", "0.5873698", "0.5861671", "0.5839487", "0.5829251", "0.5827969", "0.5821212", "0.58135974", "0.5797885", "0.57914466", "0.5786454", "0.57861", "0.5785037", "0.5776828", "0.5768776", "0.57658696", "0.57610726", "0.5756708", "0.57430834", "0.57414895", "0.5739461", "0.5736868", "0.5727732", "0.57274896", "0.5704959", "0.5701809", "0.56933975", "0.5685584", "0.56833786", "0.5682433", "0.5682433", "0.5678852", "0.5675794", "0.566888", "0.56670994", "0.566588", "0.56654185", "0.56631607", "0.5646167", "0.5631596", "0.5624782", "0.56139237", "0.5606289", "0.5598239", "0.5597284", "0.5592118", "0.55903864", "0.558253", "0.5582142", "0.55809563", "0.55726904", "0.5568004", "0.55623394", "0.5561093", "0.5545043", "0.55448765", "0.5540882", "0.5516559", "0.5515579", "0.55155736", "0.55148506", "0.55133283" ]
0.0
-1
NCollection list = new NCollection(); list.add(1); list.add(2); list.add(3); list.add(4); list.add(5); System.out.println(list.last());
@Test public void testGetLast() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T last() throws EmptyCollectionException;", "public Object last()throws ListExeption;", "public T last() throws EmptyCollectionException{\n if (rear == null){\n throw new EmptyCollectionException(\"list\");\n }\n return rear.getElement();\n }", "public Object peek() {return collection.get(collection.size() - 1);}", "public Object lastElement();", "@Test\r\n\tvoid testLast() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(3);\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\tint output = test.last();\r\n\t\tassertEquals(3, output);\r\n\t}", "public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}", "T last();", "E last() throws NoSuchElementException;", "T butLast();", "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "public Object getLast() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\tDoublyNode lastNode = head.getPrev();\r\n\t\t\treturn lastNode.getItem();\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getLast on an empty list\");\r\n\t\t}\r\n\t}", "public T removeLast()throws EmptyCollectionException;", "public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }", "public TypeHere getLast() {\n return items[size - 1];\n }", "@Test\r\n\tvoid testLast2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tint output = test.last();\r\n\t\tassertEquals(-1, output);\r\n\t}", "public Item getLast() {\n return items[size - 1];\n }", "public E getLast() {\r\n\r\n\t\treturn (E) data.get(data.size() - 1);\r\n\t}", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "public E peekLast();", "public Object peek() {\n\t\tcheckIfStackIsEmpty();\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tObject lastElement = collection.get(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public E getLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(size - 1).data;\t\r\n\t\t}\r\n\t}", "public Item getLast();", "public E last() {\n if (this.isEmpty()) return null;\r\n return this.tail.getElement();\r\n }", "public Node getLast() {\r\n\t\treturn getNode(this.size());\r\n\t}", "public E last() {\n\r\n if(tail == null) {\r\n return null;\r\n } else {\r\n return tail.getItem();\r\n\r\n }\r\n }", "public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }", "public E last() { // returns (but does not remove) the last element\n // TODO\n\n if ( isEmpty()) return null ;\n return tail.getElement();\n }", "public Object getLastObject()\n {\n\tcurrentObject = lastObject;\n\n if (lastObject == null)\n \treturn null;\n else\n \treturn AL.get(AL.size()-1);\n }", "public E getLast();", "public T getLast();", "public T getLast();", "@Override\n public E getLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[tail];\n }", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "public E getLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }", "public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "K last();", "public int top() {\n \treturn list.get(list.size()-1);\n }", "public Node getLast()\n {\n return this.last;\n }", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "@Override\r\n\tpublic T last() {\n\t\treturn tail.content;\r\n\t}", "public Node<T> getLast() {\r\n\t\treturn last;\r\n\t}", "public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }", "@Override\r\n\tpublic E getLast() {\n\t\treturn null;\r\n\t}", "public T removeLast() throws EmptyCollectionException{\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n if(count == 1){\n return removeFirst();\n }else{\n // find second to last node\n LinearNode<T> trav = front;\n while(trav.getNext() != rear){\n trav = trav.getNext();\n }\n result = rear.getElement();\n rear = trav;\n trav.setNext(null);\n count--;\n }\n return result;\n }", "private static <T> T lastItemOfList(List<T> list) {\n if (list == null || list.size() == 0) {\n return null;\n }\n return list.get(list.size() - 1);\n }", "public Object getLast() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.previous.element;\r\n }", "public int getLast() {\n\treturn _last;\n }", "Position<T> last();", "public String getLast() {\n if(first == null) return null;\n int i = 0;\n Node x = first;\n for(x = first; i < n - 1; x = x.next) {\n i++;\n }\n return x.data;\n }", "Collection<? extends Object> getEndingHadithNo();", "public int getLast() {\n\t\treturn last;\n\t}", "public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}", "public static <T> T last(ArrayList<T> lst) {\n return lst.get(lst.size() - 1);\n }", "<T> Collection<T> getMostRecent(Class<T> t, int max);", "@Override\r\n\tpublic E removeLast() {\n\t\treturn pollLast();\r\n\t}", "public E removeLast();", "public String getLastItem();", "public T getLast() {\n return this.getHelper(this.indexCorrespondingToTheLatestElement).data;\n }", "public StringListIterator last()\n {\n\treturn new StringListIterator(tail);\n }", "public E pollLast();", "public String getLast()\n {\n return lastItem;\n }", "public process get_last() {\n\t\treturn queue.getLast();\n\t}", "public E peek() \r\n {\r\n return list.get(getSize() - 1);\r\n }", "public T pop() {\n return this.list[this.size-1];\n }", "@Test\r\n public void testRemovedLast() {\r\n ObservableList<String> items = createObservableList(true);\r\n ListChangeReport report = new ListChangeReport(items);\r\n int oldSize = items.size();\r\n int lastIndex = oldSize - 1;\r\n items.remove(lastIndex);\r\n assertEquals(oldSize - 1, items.size());\r\n Change c = report.getLastChange();\r\n c.next();\r\n assertEquals(lastIndex, c.getFrom());\r\n// report.prettyPrint();\r\n }", "public E removeLast(){\r\n return null;\r\n }", "public int top() {\n\t\treturn list.get(list.size() - 1);\n\t}", "public Node<T> getLast() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.prev;\r\n }", "public Object peek() {\r\n\t\treturn al.getElementAt(al.listSize - 1);\r\n\t}", "public final Node<N> last() {\n throw new UnsupportedOperationException();\n }", "public E last() {\n if(isEmpty()){\n return null;\n }else{\n return trailer.getPrev().getElement();\n }\n }", "public T getLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> last = endMarker.prev;\r\n\t\ttry{\r\n\t\t\t//last elem\r\n\t\t\treturn last.getLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}", "public T getLast() {\n\t\t//return the data in the last node\n\t\treturn getLastNode().getData();\n\t}", "public int lastElement() {\r\n\r\n\t\treturn (usedSize - 1);\r\n\r\n\t}", "@Test\n public void testLastIndexOf() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n Integer arg = 7;\n\n int result = instance.lastIndexOf(arg);\n int expResult = 3;\n\n assertEquals(expResult, result);\n\n }", "public static <T> T getLast(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(list.size() - 1) : null;\n\t}", "public Page getLastPageObject() {\n return getPageObject(pages.length - 1);\n }", "public E peekLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "@Override\r\n\tpublic E peekLast() {\n\t\treturn null;\r\n\t}", "public synchronized ListNode getLast() {\n\t\tif (head == null)\n\t\t\treturn null;\n\t\tif (head.getNext() == null) {\n\t\t\treturn head;\n\t\t}\n\t\tListNode p = head.getNext();\n\t\twhile (p.getNext() != null) {\n\t\t\tp = p.getNext();\n\t\t}\n\t\treturn p;\n\t}", "E top();", "public Square getLastSquare() {\n\t\treturn squares.get(squares.size()-1);\n\t}", "public SeleniumQueryObject last() {\n\t\treturn LastFunction.last(this, this.elements);\n\t}", "public Item removeLast(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[last--];\r\n\t\tn--;\r\n\t\tlatter=last+1;\r\n\t\tif(last==-1){last=list.length-1;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public void addLast(E item){\r\n }", "@Test\n public void add() {\n\n collection.add(\"test\");\n assertEquals(collection.getLast(),\"test\");\n }", "@Test\n public void testSelectListLast() {\n QueryWrapper<User> queryWrapper = new QueryWrapper<>();\n queryWrapper.last(\"limit 1\");\n List<User> users = userMapper.selectList(queryWrapper);\n users.forEach(System.out::println);\n }", "public JspElement getLast() {\r\n\treturn _last;\r\n}", "public E last() {\n if (next == null) {\n return head();\n } else {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining ptr != null;\n while (ptr.next != null) {\n ptr = ptr.next;\n }\n //@ assert ptr.next == null;\n //@ assume ptr.val != null ==> \\typeof(ptr.val) <: \\type(Object);\n E ret = (ptr.val == null\n ? null\n : (ptr.val) );\n //@ assume ret != null ==> \\typeof(ret) <: elementType;\n //@ assume !containsNull ==> ret != null;\n return ret;\n }\n }", "@Override\r\n\tpublic E removeLast() {\n\t\treturn null;\r\n\t}", "public Object getNext() { \t\n\t\t\tcurrIndex++;\t \n\t\t\treturn collection.elementAt(currIndex);\n\t\t}", "public T removeLast(){\n\tT ret = _end.getCargo();\n\t_end = _end.getNext();\n\t_end.setPrev(null);\n\t_size--;\n\treturn ret;\n }", "public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}", "@Test\n public void testLastIndexOf_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n Integer arg = 7;\n\n int result = instance.lastIndexOf(arg);\n int expResult = 3;\n\n assertEquals(expResult, result);\n\n }", "public int pop() {\n \treturn list.remove(list.size()-1);\n }", "public T peek() {\r\n return get(size() - 1);\r\n\t}", "public Room getLastRoom(){return this.aLastRooms.pop();}" ]
[ "0.7877931", "0.7686189", "0.7457527", "0.73874897", "0.7250284", "0.72333586", "0.7168025", "0.7139244", "0.71151143", "0.69641006", "0.6877767", "0.6861457", "0.6836702", "0.68357205", "0.6827644", "0.67987096", "0.6786153", "0.67645264", "0.670025", "0.6682814", "0.6657287", "0.6647226", "0.66243535", "0.66194344", "0.66143686", "0.6572929", "0.655335", "0.6506655", "0.6500274", "0.64759195", "0.64748645", "0.64748645", "0.64652693", "0.6460317", "0.64509445", "0.64240164", "0.6413989", "0.64089066", "0.63998264", "0.63738686", "0.63676363", "0.6352588", "0.6352588", "0.6331458", "0.63204384", "0.63133115", "0.6303106", "0.63022923", "0.6297696", "0.629745", "0.62953377", "0.6291115", "0.6285874", "0.62384224", "0.62238294", "0.6215524", "0.6211404", "0.6207514", "0.6200335", "0.61950237", "0.6186971", "0.6185834", "0.618164", "0.6176141", "0.6168926", "0.6145346", "0.61430717", "0.6123083", "0.6120644", "0.6113163", "0.60984206", "0.6095825", "0.6093502", "0.6087892", "0.6086017", "0.6073918", "0.60696334", "0.6064527", "0.60492754", "0.60423434", "0.60310537", "0.6015963", "0.60119325", "0.6001183", "0.59979767", "0.5989953", "0.5988356", "0.5986086", "0.59859174", "0.59809124", "0.5980751", "0.5966918", "0.5961502", "0.5944794", "0.5943731", "0.593439", "0.59317106", "0.59308165", "0.59201264", "0.59083706", "0.59057796" ]
0.0
-1
Created by tomduan on 16419.
public interface Presenter { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "public void mo38117a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void init() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\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 einkaufen() {\n\t}", "private void strin() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@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\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n void init() {\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}", "@Override\n public void init() {\n\n }", "@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}", "private void init() {\n\n\n\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "private void m50366E() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void getExras() {\n }", "public void skystonePos4() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo6081a() {\n }", "public void mo55254a() {\n }", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "void berechneFlaeche() {\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }" ]
[ "0.61010474", "0.60012", "0.59855235", "0.59406507", "0.5906508", "0.5906508", "0.5880596", "0.5837107", "0.5834433", "0.5825966", "0.5822531", "0.58195037", "0.5807976", "0.5804714", "0.58043563", "0.5778891", "0.57407415", "0.57034695", "0.56955504", "0.5690413", "0.5669912", "0.5668823", "0.5667443", "0.5665733", "0.5661483", "0.5653839", "0.5653839", "0.5653839", "0.5653839", "0.5653839", "0.56439847", "0.5630005", "0.5626291", "0.5566503", "0.55553836", "0.554201", "0.5537024", "0.5524713", "0.552411", "0.552411", "0.55208874", "0.55208874", "0.55208874", "0.55208874", "0.55208874", "0.55208874", "0.55208874", "0.5519263", "0.5512289", "0.55083716", "0.55004716", "0.54981476", "0.5497329", "0.54951024", "0.54951024", "0.54951024", "0.54929775", "0.54929775", "0.54929775", "0.549176", "0.5487994", "0.54745203", "0.54705894", "0.54694515", "0.54694515", "0.54694515", "0.5469253", "0.5469253", "0.5464421", "0.5464421", "0.544076", "0.54389924", "0.5433467", "0.5428577", "0.542671", "0.54249877", "0.542496", "0.5421399", "0.54195184", "0.5419243", "0.5419051", "0.5417395", "0.5415121", "0.54120284", "0.5411852", "0.5408489", "0.54053974", "0.5404327", "0.5395924", "0.53919506", "0.53864986", "0.5384328", "0.5384058", "0.53812736", "0.5358093", "0.5358093", "0.53554773", "0.5353327", "0.5347045", "0.5337444", "0.5337444" ]
0.0
-1
Abort the given workflow.
Completable abortAsync(String resourceGroupName, String storageSyncServiceName, String workflowId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stopWorkflow() {\n\t\tassert (status == WorkflowStatus.RUNNING || status == WorkflowStatus.PAUSED);\n\t\tsetStatus(WorkflowStatus.FINISHED);\n\t}", "@Override\n\tpublic void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {\n\t}", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n\n }", "void deleteWorkflowRequest(String requestId) throws WorkflowException;", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n }", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n }", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n\t}", "public void abort() {\n isAborted = true;\n cancelCommands();\n cancel(true);\n }", "@Override\n\tpublic void stateMachineAbort() {\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "public void abortTransaction(TransID tid) throws IllegalArgumentException {//done\n\t// Check that this is actually an active transaction\n try {\n\t\tatranslist.get(tid).abort();\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\tSystem.out.println(\"IO exception\");\n\t\te.printStackTrace();\n\t\tSystem.exit(-1);\n\t}\n atranslist.remove(tid);\n }", "@Override\n public void abort() { \n abortFlag = true ;\n }", "@Override\n public void abort(RuntimeStep exe) {\n }", "protected void abortJobQuietly(ManifestCommitter committer,\n JobContext jContext,\n TaskAttemptContext tContext) {\n describe(\"\\naborting task\");\n try {\n committer.abortTask(tContext);\n } catch (Exception e) {\n log().warn(\"Exception aborting task:\", e);\n }\n describe(\"\\naborting job\");\n try {\n committer.abortJob(jContext, JobStatus.State.KILLED);\n } catch (Exception e) {\n log().warn(\"Exception aborting job\", e);\n }\n }", "@Override\n public void cleanUpPendingTask(String workflowExtRef) throws WorkflowException {\n\n if (log.isDebugEnabled()) {\n log.debug(\"Starting cleanup task for APIStateChangeWSWorkflowExecutor for :\" + workflowExtRef);\n }\n String errorMsg;\n super.cleanUpPendingTask(workflowExtRef);\n try {\n ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance();\n apiMgtDAO.deleteWorkflowRequest(workflowExtRef);\n } catch (APIManagementException axisFault) {\n errorMsg = \"Error sending out cancel pending application approval process message. cause: \" + axisFault\n .getMessage();\n throw new WorkflowException(errorMsg, axisFault);\n }\n }", "private void abortTxn() throws InterruptedException {\n LOG.info(\"Aborting Txn id {} on End Point {}\", txnBatch.getCurrentTxnId(), endPoint);\n try {\n callWithTimeout(new CallRunner<Void>() {\n @Override\n public Void call() throws StreamingException, InterruptedException {\n txnBatch.abort(); // could block\n return null;\n }\n });\n } catch (InterruptedException e) {\n throw e;\n } catch (TimeoutException e) {\n LOG.warn(\"Timeout while aborting Txn \" + txnBatch.getCurrentTxnId() + \" on EndPoint: \" + endPoint, e);\n } catch (Exception e) {\n LOG.warn(\"Error aborting Txn \" + txnBatch.getCurrentTxnId() + \" on EndPoint: \" + endPoint, e);\n // Suppressing exceptions as we don't care for errors on abort\n }\n }", "void abortProcess(Long processInstanceId);", "protected abstract void abortTxn(Txn txn) throws PersistException;", "public static void unlockWorkflow(final LocalExplorerFileStore workflow) {\n File loc;\n try {\n loc = workflow.toLocalFile(EFS.NONE, null);\n } catch (CoreException e) {\n return;\n }\n if (!VMFileLocker.isLockedForVM(loc)) {\n return;\n }\n assert AbstractExplorerFileStore.isWorkflow(workflow);\n VMFileLocker.unlockForVM(loc);\n }", "@Override\r\n public void abortJob(JobContext context, int runState) \r\n throws IOException {\n cleanupJob(context);\r\n }", "public void abort()\n\t{\n\t\tif(process != null)\n\t\t\tprocess.destroy();\n\t}", "public synchronized void abort() {\r\n\t\tif (done) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdone = true;\r\n\r\n\t\tabortScheduledTasks();\r\n\t}", "public void abort() throws IOException;", "public void cancel() {\n target.setAllowFlight(false);\n target.setWalkSpeed(0.01F);\n target.setFlySpeed(0.01F);\n targets.remove(target);\n\n JavaUtils.broadcastStage(\"done\",this);\n }", "private void abortOrder() {\n OrderDataService.cancelOrder(eventUid, isMarkedSeats, order);\n\n String orderInvalidMessage = \"שים לב! לא נותרו כרטיסים בכמות שבחרת. במידה ולא אזלו הכרטיסים, נסה שוב\";\n Toast.makeText(PaymentActivity.this, orderInvalidMessage, Toast.LENGTH_LONG).show();\n final Intent detailActivityIntent = new Intent(this, EventDetailsActivity.class);\n detailActivityIntent.putExtra(\"eventUid\", eventUid);\n\n // Send user back to event details activity after toast was shown for long enough\n Thread thread = new Thread(){\n @Override\n public void run() {\n try {\n Thread.sleep(2500);\n startActivity(detailActivityIntent);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n };\n\n thread.start();\n }", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n\t\t\n\t\tSystem.out.println(\"entry abort work item====\");\n\t\t\n\t\tmanager.abortWorkItem(workItem.getId());\n\t\t\n\t\tSystem.out.println(\"aborting process====\");\n\t\t\n\t}", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "@Override\n\tpublic void doAbortTask(String batchName, String username) throws PladipusReportableException {\n\t\tClientToControlMessage msg = new ClientToControlMessage(ClientTask.ABORT);\n\t\tmsg.setBatchName(batchName);\n\t\tmakeRequest(msg, username);\n\t\tcmdLineIO.printOutput(MessageFormat.format(cmdLine.getString(\"abort.success\"), (batchName != null && !batchName.isEmpty()) ? batchName : \"all\"));\n\t}", "TransitionRequestResult forceCancel(String namespace, String wid) throws Exception;", "private void cancel() {\n\t\tfinish();\n\t}", "public void abort() throws StreamingException, TxnBatchFailure, InterruptedException {\n synchronized (txnBatchLock) {\n abortTxn();\n nextTxn(true); // roll to next\n }\n }", "public void aborted() {\n System.out.println(\"Aborted\");\n }", "public synchronized void cancelExecution() {\n this.status = EXECUTION_CANCELED;\n if (this.context != null)\n context.close(true);\n }", "public synchronized void cancel() {\n }", "public void stopAct(View view){\n finish();\n }", "public synchronized void writeAbort(Transaction t) {\n\t\tflush();\n\t\tpw.println(t.transactionId() + \" abort\");\t\n\t\tflush();\n\t}", "void abort() {\n\n // Revision number = 0 indicates an aborted transaction.\n this.targetRevisionNumber.set( 0L );\n\n // Clean up aborted revisions ...\n for ( AbstractVersionedItem versionedItem : this.versionedItemsWritten ) {\n versionedItem.removeAbortedRevision();\n }\n\n this.versionedItemsRead.clear();\n this.versionedItemsWritten.clear();\n\n // Trigger any clean up that is possible from no longer needing our source version.\n this.cleanUpOlderRevisions();\n\n }", "public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }", "public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}", "public boolean cancel(String experimentID, String taskID, String gatewayID, String tokenId)throws GFacException;", "public void cancel() {\n\t}", "ActivityType stop();", "protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }", "@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }", "public void cancel() {\n\t\tcancel(false);\n\t}", "public void cancel()\n\t{\n\t}", "protected abstract void rollback(WorkFlowChainContext chainContext) throws WorkFlowException;", "public void cleanupTask(HttpServletRequest request, Workflow wf)\n\t{\n\t\t\n\t\t//super.cleanupTask(request, wf);\n\t}", "public void abort() {\n reservedSpace.clear();\n this.abortRequested = true;\n stop();\n }", "@Override\r\n\t\tpublic void abort(Executor executor) throws SQLException {\n\t\t\t\r\n\t\t}", "public void cancel() {\n ei();\n this.fd.eT();\n this.oJ.b(this);\n this.oM = Status.CANCELLED;\n if (this.oL != null) {\n this.oL.cancel();\n this.oL = null;\n }\n }", "public void cancel() {\n\t\tinterrupt();\n\t}", "TransactionContext cancelTransaction() throws IOException;", "public boolean cancel();", "void cancelProduction();", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "@Override\n public void abort() {\n giocoinesecuzione = null;\n }", "@Override\n\t\t\tpublic void cancel() {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "public void abortBuilding() {\n buildTarget = null;\n buildStep = 0;\n buildInstructions = null;\n buildLocation = null;\n buildHeight = null;\n\n knowledge.myState = RobotState.IDLE;\n }", "void cancelDataflow(TimelyResultProcessor resultProcessor, String queryId);", "public void cancel();", "@Override\n public StepResult undoStep(FlightContext context) throws InterruptedException {\n return StepResult.getStepResultSuccess();\n }", "public void cancel( String reason );", "public void cancelTask(String id);", "@Test\n public void filesAbortTest() throws ApiException {\n String owner = null;\n String repo = null;\n String identifier = null;\n FilesAbort data = null;\n api.filesAbort(owner, repo, identifier, data);\n\n // TODO: test validations\n }", "public abstract boolean cancel();", "public void halt() {\n\t\t// Task can not currently be halted.\n\t}", "public void actionCancel() {\n stage.close();\n }", "public void cancel() {\n btCancel().push();\n }", "@Test\n public void abortSisImportTest() {\n String accountId = null;\n String id = null;\n // SisImport response = api.abortSisImport(accountId, id);\n\n // TODO: test validations\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}", "void cancelOriginal();", "public void abort(int tid) {\n List<Lock> lockList = null;\n for (Integer varIndex : _lockTable.keySet()) {\n lockList = _lockTable.get(varIndex);\n int size = lockList.size();\n for (int i = size - 1; i >= 0; i--) {\n if (lockList.get(i).getTranId() == tid) {\n if (lockList.get(i).getType() == Lock.Type.WRITE) {\n _uncommitDataMap.remove(varIndex);\n }\n lockList.remove(i);\n break;\n }\n }\n }\n // remove this transaction from accessed list\n _accessedTransactions.remove(tid);\n }", "@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}", "public void onAbort() {\n releaseInitialRef.run();\n }", "public void exitActivity() {\n\n finish();\n\n }", "public synchronized void abort() throws IOException {\n ensureOpen();\n // need check again .\n //\tif(isDone) {\n //\t throw new IOException(\"Operation has already ended\");\n //\t}\n\n //no compatible with sun-ri\n if ((isDone) && (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE)) {\n throw new IOException(\"Operation has already ended\");\n }\n\n exceptionMessage = \"Operation aborted\";\n if ((!isDone) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n isDone = true;\n /*\n * Since we are not sending any headers or returning any headers then\n * we just need to write and read the same bytes\n */\n parent.sendRequest(0xFF, null, replyHeaders, null);\n\n if (replyHeaders.responseCode != ResponseCodes.OBEX_HTTP_OK) {\n throw new IOException(\"Invalid response code from server\");\n }\n\n exceptionMessage = null;\n }\n\n close();\n }", "public void cancel() {\n if( this.attachedThread != null ) {\n this.attachedThread.interrupt();\n }\n else {\n this.attachedFuture.cancel( true );\n\n if( this.attachedHipanFuture != null ) {\n this.attachedHipanFuture.fail( new InterruptedException( \"Task was canceled\" ) );\n }\n }\n }", "public void abandonConversation ( Conversation conversation ) {\n\t\texecute ( handle -> handle.abandonConversation ( conversation ) );\n\t}", "void abortChallenge();", "public synchronized void stopActivity(final Activity activity) {\n\tif (activity.getName().equals(\"Curtains\")) {\r\n\t\ttry {\r\n\t\t\tString response = Request.Post(\"https://\" + slideHost + \"/rpc/Slide.SetPos\").bodyString(\"{\\\"pos\\\": 0}\", ContentType.APPLICATION_JSON).execute().returnContent().asString();\r\n\t\t\tSystem.out.println(\"Slide response: \" + response);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n if (!this.isActive(activity)) {\r\n throw new IllegalStateException(\"Activity is not active\");\r\n }\r\n final PyhActivity oldValue = this.createPyhActivity(activity);\r\n if (activity.getModules().getPhilipsHue() != null) {\r\n this.taskExecutor.execute(() -> this.deactivateHueModule(activity.getModules().getPhilipsHue()));\r\n }\r\n if (activity.getModules().getInfraRed() != null) {\r\n this.taskExecutor.execute(() -> this.deactivateIrModule(activity.getModules().getInfraRed()));\r\n }\r\n this.activeActivity = null;\r\n final PyhActivity newValue = this.createPyhActivity(activity);\r\n this.eventPublisher.publishEvent(new ActivityChangedEvent(oldValue, newValue));\r\n }", "public void cancel() {\n cancelSoftwareAnimations();\n }", "public void stop()\n {\n if (task == -1) {\n return;\n }\n\n library.getPlugin().getServer().getScheduler().cancelTask(task);\n task = -1;\n }", "public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {\n executable.getParent().checkAbortPermission();\n interrupt();\n rsp.forwardToPreviousPage(req);\n }", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }" ]
[ "0.6755327", "0.64589834", "0.640204", "0.63425654", "0.63043296", "0.6274604", "0.6184551", "0.61611533", "0.6024936", "0.60244805", "0.60244805", "0.60244805", "0.60244805", "0.5977983", "0.5940993", "0.58967966", "0.5896635", "0.58905965", "0.5872829", "0.5868077", "0.58348894", "0.58063227", "0.57584816", "0.5752719", "0.5714059", "0.56686217", "0.5656721", "0.56335306", "0.5593412", "0.55868775", "0.55868775", "0.55868775", "0.55868775", "0.55868775", "0.55868775", "0.5578003", "0.5555746", "0.55107147", "0.55093175", "0.5476904", "0.5473751", "0.5468269", "0.54449326", "0.5378697", "0.53783816", "0.53764623", "0.53751963", "0.53695315", "0.53593445", "0.5353763", "0.53448695", "0.53347236", "0.5294434", "0.52847433", "0.5280653", "0.52651656", "0.5247899", "0.52446145", "0.52395743", "0.5231712", "0.523044", "0.52281594", "0.52220386", "0.521732", "0.521732", "0.521732", "0.521732", "0.521732", "0.5216866", "0.51972073", "0.5183363", "0.51827633", "0.5182471", "0.517503", "0.51577234", "0.5142321", "0.51408", "0.51300156", "0.5126315", "0.5123102", "0.51228887", "0.51197183", "0.51191145", "0.5103091", "0.51014715", "0.50944275", "0.5062875", "0.5060716", "0.5059055", "0.50280607", "0.5022467", "0.5017827", "0.501466", "0.50106335", "0.50090563", "0.50066197", "0.49979457", "0.49950016", "0.49950016", "0.49950016" ]
0.7016582
0
20 inputs number of +s, ve, odd, even and 0s
public void NumberOf(int arr[], int n){ int positive = 0, negative = 0, odd = 0, even = 0, zero = 0; System.out.print("\nInput Array : ["); for(int j=0; j<n; j++){ System.out.print(arr[j]+","); } System.out.print("\b]\n"); for(int k =0; k<n; k++){ if(arr[k] > 0){ positive++; } else if(arr[k] < 0){ negative++; } else{ zero++; } if(arr[k] != 0){ if(arr[k] % 2 == 0 ){ even++; } else{ odd++; } } } System.out.println("\nPositive : "+positive+"\nNegative : "+negative+"\nZero : "+zero+"\nOdd : "+odd+"\nEven : "+even+"\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\r\n\tint a=1;\r\n\twhile(a>=1 && a<10) {\r\n\t\ta+=1;\r\n\t\tif(a%2==0) {\r\n\t\t\tSystem.out.println(\"\"+a);\r\n\t\t}\r\n\t}\r\n\tint max = 50;\r\n\tint add =0;\r\n\tfor(int s =0;s<=max;s+=1) {\r\n\t\tadd+= s;\r\n\t}\r\n\tSystem.out.println(\"\"+add);\r\n\t/*Adding up odd numbers 1-25\r\n\t * \r\n\t */\r\n\tint sum = 0;\r\n\tint c = 25;\r\n\tfor(int b=1 ;b<=c;b+=2) {\r\n\t\tsum+=b;\r\n\t\tSystem.out.println(\"\"+sum);\r\n\t}\r\n\t\r\n}", "public static void main(String[] args) {\nScanner s =new Scanner(System.in);\r\nint n=s.nextInt();\r\nfor(int i=n;i>=0;i--)\r\n{ int a=n;\r\n for(int j=n;j>=i;j--)\r\n {System.out.print(a+\" \");a--;}\r\n a=a+1;\r\n for(int k=1;k<=2*i-1;k++)\r\n {System.out.print(\" \"+\" \");}\r\n if(a!=0) {\r\n for(int l=n;l>=i;l--)\r\n {System.out.print(a+\" \");a++;}\r\n }\r\n else {for(int m=1;m<=n;m++)\r\n {System.out.print(m+\" \");}\r\n }\r\n System.out.print(\"\\n\");\r\n}\r\nfor(int x=1;x<=n;x++)\r\n{ int c=n;\r\n for(int y=n;y>=x;y--)\r\n {System.out.print(c+\" \");c--;}\r\n c=c+1;\r\n for(int z=1;z<=2*x-1;z++)\r\n {System.out.print(\" \"+\" \");}\r\n for(int p=x;p<=n;p++)\r\n {System.out.print(c+\" \");c++;}\r\n \r\n\t\r\nSystem.out.print(\"\\n\");\r\n\r\n\r\n}\r\n}", "private static void addInputs() {\n\t\tinput.put('A',\"All pixels, three LSB\");\n\t\tinput.put('B', \"All pixels, two LSB\");\n\t\tinput.put('C', \"Every even pixel, three LSB\");\n\t\tinput.put('D', \"Every odd pixel, three LSB\");\n\t\tinput.put('E', \"Every pixel, one LSB\");\n\t\tinput.put('F', \"Every even pixel, two LSB\");\n\t\tinput.put('G', \"Every odd pixel, two LSB\");\n\t\tinput.put('H', \"Every third pixel, three LSB\");\n\t\tinput.put('I', \"Every third pixel, two LSB\");\n\t\tinput.put('J', \"Every even pixel, one LSB\");\n\t\tinput.put('K', \"Every odd pixel, one LSB\");\n\t\tinput.put('L', \"Every third pixel, one LSB\");\n\t\tinput.put('M', \"Every prime-numbered pixel, three LSB\");\n\t\tinput.put('N', \"Every prime-numbered pixel, two LSB\");\n\t\tinput.put('O', \"Every prime-numbered pixel, one LSB\");\n\t}", "public static void main(String[] args) {\n\t\r\nfor (int i=1; i<=20; i++) {\r\n\tif (i!=20) {\r\n\t\t\r\n\tSystem.out.print(i+\"+\");\r\n}\r\nelse {\r\n\tSystem.out.println(i);\r\n}\r\n\t}\r\n\r\n}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int len = in.nextInt();\n int total = len * len;\n int count = 1;\n int d1Sum = 0; \n int d2Sum = 0;\n int d1Count = 1;\n int d2Count = len;\n boolean d1 = true;\n boolean d2 = true;\n \n for(int i = 0; i < total; i++){\n int temp = in.nextInt();\n if(count > len){\n count -= len;\n d1 = true;\n d2 = true;\n }\n if(count == d1Count && d1){\n d1Sum += temp;\n d1Count ++;\n d1 = false;\n }\n if(count == d2Count && d2){\n d2Sum += temp;\n d2Count--;\n d2 = false;\n }\n count++;\n }\n \n System.out.println(Math.abs(d1Sum - d2Sum));\n }", "public static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint tc = sc.nextInt();\n\n\t\tfor (int num = 1; num <= tc; num++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tString str = \"\";\n\t\t\tint arr[] = new int[n];\n\t\t\tboolean flag = false;\n\t\t\tboolean visit[]=new boolean[1001];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = sc.nextInt();\n\t\t\t\tif (!flag && arr[i] == 0)\n\t\t\t\t\tflag = true;\n\t\t\t\tstr += arr[i];\n\t\t\t}\n\t\t\tif (flag) {\n\t\t\t\tint ans = 0;\n\t\t\t\tboolean p=false;\n\t\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\t\tfor (int j = 0; j + i <= n; j++) {\n\t\t\t\t\t\t\tint tmp = Integer.parseInt(str.substring(j, j + i));\n\t\t\t\t\t\t\tvisit[tmp]=true;\n\t\t\t\t\t}\n\t\t\t\t\tint amount=(int)Math.pow(10, i);\n\t\t\t\t\tfor(int k=0;k<amount;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!visit[k])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tans=k;\n\t\t\t\t\t\t\tp=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(p)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"#\" + num + \" \" + ans);\n\t\t\t} else\n\t\t\t\tSystem.out.println(\"#\" + num + \" \" + 0);\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n \n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n \n long[] sp = new long[n+1];\n long[] bl = new long[n+1];\n \n sp[1] = 1;\n bl[1] =1;\n \n \n for(int i = 2; i < n+1; i++){\n sp[i] = sp[i-1] + bl[i-1];\n bl[i] = sp[i-1];\n }\n \n long way = sp[n] + bl[n];\n long bothWay = way*way;\n \n System.out.println(bothWay);\n \n }", "public static void main(String[] args) {\n\t\tSystem.out.println((0+15)/2);\r\n\t\tSystem.out.println(2.0e-6*10000000000.1);\r\n\t\tSystem.out.println(true&&false||true&&true);\r\n\t\t\r\n\t\t//1.1.2\r\n\t\tSystem.out.println((1+2.236)/2);\r\n\t\tSystem.out.println(1+2+3+4.0);\r\n\t\tSystem.out.println(4.1>=4);\r\n\t\tSystem.out.println(1+2+\"3\");\r\n\t\t\r\n\t\t//1.1.3\r\n//\t\tSystem.out.println(\"Please enter three nums\");\r\n\t\tScanner scanner=new Scanner(System.in);\r\n//\t\tint num=scanner.nextInt();\r\n//\t\tint num2=scanner.nextInt();\r\n//\t\tint num3=scanner.nextInt();\r\n//\t\r\n//\t\tif(num==num2&&num==num3) {\r\n//\t\t\tSystem.out.println(\"Eqaul:\");\r\n//\t\t}else {\r\n//\t\t\tSystem.out.println(\"Not equal:\");\r\n//\t\t}\r\n//\r\n//\t\t\t\r\n//\t\t//1.1.4\r\n//\t\t//a. then 语法错误\r\n//\t\t//b. ok\r\n//\t\t//c. ok\r\n//\t\t//d. ok\r\n//\r\n//\t\t\r\n//\t\t//1.1.5\r\n//\t\tint x=scanner.nextInt();\r\n//\t\tint y=scanner.nextInt();\r\n//\t\tif(x<1.0 && y<1.0 && x>0 && y>0) {\r\n//\t\t\tSystem.out.println(\"true\");\r\n//\t\t}\r\n//\t\telse {\r\n//\t\t\tSystem.out.println(\"false\");\r\n//\t\t}\r\n//\t\t\r\n\t\t\r\n\t\t//1.1.6\r\n//\t\tint f=0;\r\n//\t\tint g=1;\r\n//\t\tfor(int i=0;i<=15;i++) {\r\n//\t\t\tSystem.out.print(f+\"\\t\");\r\n//\t\t\tf=f+g;\r\n//\t\t\tg=f-g;\r\n//\t\t}\r\n\t\t\r\n\t\t//1.1.7\r\n//\t\tdouble t=9.0;\r\n//\t\twhile(Math.abs(t-9.0/t)> .001) {\r\n//\t\t\tt=(9.0/t+t)/2.0;\r\n//\t\t}\r\n//\t\tSystem.out.printf(\"%.5f\\n\", t);\r\n//\t\t\r\n//\t\t\r\n//\t\tint sum=0;\r\n//\t\tfor(int i=1;i<1000;i++)\r\n//\t\t\tfor(int j=0;j<i;j++)\r\n//\t\t\t\tsum++;\r\n//\t\tSystem.out.println(sum);\r\n//\t\r\n//\t\t\r\n//\t\tint sum2=0;\r\n//\t\tfor(int i=1;i<1000;i*=2)\r\n//\t\t\tfor(int j=0;j<1000;j++)\r\n//\t\t\t\tsum2++;\r\n//\t\tSystem.out.println(sum2);\r\n\t\r\n\t\t//1.1.8\r\n//\t\tSystem.out.println('b');\r\n//\t\tSystem.out.println('b'+'c');\r\n//\t\tSystem.out.println((char)('a'+4));\r\n\t\t\r\n\t\t//1.1.9\r\n//\t\tSystem.out.println(\"Please enter one num and return with a binary code\");\r\n//\t\tint N=scanner.nextInt();\r\n//\t\tString string=\"\";\r\n//\t\tfor(int n=N;n>0;n/=2) {\r\n//\t\t\tstring=(n%2)+string;\r\n//\t\t}\r\n//\t\tSystem.out.println(string);\r\n\t\t\r\n\t\t//1.1.10\r\n\t\t//int[] a=new int[10];\r\n\t\t\r\n\t\t//1.1.11\r\n//\t\tboolean[][] arrays= {{true,true,true},\r\n//\t\t\t\t{false,false,false},\r\n//\t\t\t\t{true,false,true},\r\n//\t\t};\r\n//\t\t\r\n//\t\tfor(int i=0;i<arrays.length;i++)\r\n//\t\t\tfor(int j=0;j<arrays.length;j++) {\r\n//\t\t\t\tif(arrays[i][j]) {\r\n//\t\t\t\t\tSystem.out.print(\"*\"+\"\\t\");\r\n//\t\t\t\t}\r\n//\t\t\t\telse {\r\n//\t\t\t\t\tSystem.out.print(\"^\"+\"\\t\");\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t//1.1.12\r\n//\t\tint[] a=new int[10];\r\n//\t\tfor(int i=0;i<10;i++)\r\n//\t\t\ta[i]=9-i;\r\n//\t\tfor(int i=0;i<10;i++)\r\n//\t\t\ta[i]=a[a[i]];\r\n//\t\tfor(int i=0;i<10;i++)\r\n//\t\t\tSystem.out.println(i);\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t \n while(true){\n int flag = 0, N2 = 0, N1 = 0,N3=0;\n char ch = scn.next().charAt(0);\n if (ch == 'x'|| ch == 'X')\n {\n System.out.println(ch);\n return;\n }\n else if(ch== '+') flag = 1;\n else if (ch =='-')flag = 1;\n else if (ch =='*')flag = 1;\n else if(ch =='%')flag = 1;\n else if(ch =='/')flag = 1;\n \n if(flag!=1)System.out.println(\"Invalid operation. Try again.\");\n else\n {\n N1 = scn.nextInt();\n N2 = scn.nextInt();\n if(ch == '+') N3 = N2+ N1;\n else if (ch =='-')N3 =N2-N1;\n else if (ch =='*')N3 = N2*N1;\n else if(ch =='%')N3 = N2%N1;\n else if(ch =='/')N3 = N2/N1;\n System.out.println(N3);\n }\n }\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint t=sc.nextInt();\n\t\tfor(int Case = 1;Case<=t;Case++){\n\t\t\tString stck = sc.next();\n\t\t\tint move =0;\n\t\t\tboolean ok = false;\n\t\t\tif(stck.indexOf('+')==-1)\n\t\t\t{\n\t\t\t\tmove=1;\n\t\t\t}else if(stck.indexOf('-')==-1)\n\t\t\t{\n\t\t\tmove =0;\n\t\t\t}else{\n\t\t\t\tString oper = stck.substring(0, stck.lastIndexOf('-')+1);\n\t\t\t\t\n\t\t\t\tif(oper.lastIndexOf('-')==0)\n\t\t\t{\n\t\t\tchar[] temp = oper.toCharArray();\n\t\t\t temp[oper.lastIndexOf('-')] = '+';\n\t\t\toper = String.valueOf(temp);\n\t\t\tmove+=1;\n\t\t\t\t\t}\n\t\t\telse if(oper.indexOf('-')==oper.length()-1)\n\t\t\t\t{\n\t\t\t\tchar[] temp = oper.toCharArray();\n\t\t\t\t temp[oper.indexOf('-')] = '+';\n\t\t\t\toper = String.valueOf(temp);\n\t\t\t\tmove+=2;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tfor(int i =0;i<=oper.lastIndexOf('-');i++){\n\t\t\t\t\t\t\t\tif(oper.charAt(i)=='+')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tok=true;\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\tif(!ok){\n\t\t\t\t\t\t\t\tmove=1;\n\t\t\t\t\t\t\t\toper=\"+\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t//System.out.println(1+oper);\n\t\t\t\n\t\t\twhile(oper.indexOf('-')!=-1){\n\t\t\tint k = 0;\n\t\t\t\tif(oper.indexOf('+')==0){\n\t\t\t\t\tchar[] temp = oper.toCharArray();\n\t\t\t\t\t temp[0] = '-';\n\t\t\t\t\toper = String.valueOf(temp);\n\t\t\t\twhile(oper.charAt(k+1)=='+')\n\t\t\t\t\t{\n\t\t\t\t\tk++;\n\t\t\t\t\tchar[] temp1 = oper.toCharArray();\n\t\t\t\t\t temp1[k] = '-';\n\t\t\t\t\toper = String.valueOf(temp1);\n\t\t\t\t\t}\n\t\t\t\t//System.out.println(2+oper);\n\t\t\t\tchar[] temp1 = oper.toCharArray();\n\t\t\t\tfor(int i =0;i<temp1.length;i++){\n\t\t\t\t\tif(temp1[i]=='+')\n\t\t\t\t\t\ttemp1[i]='-';\n\t\t\t\t\telse\n\t\t\t\t\t\ttemp1[i]='+';\n\t\t\t\t\t//System.out.print(temp1[i]);\n\t\t\t\t}\n\t\t\t\toper = String.valueOf(temp1);\n\t\t\t\tStringBuilder s = new StringBuilder(oper);\n\t\t\t\toper = (s.reverse()).toString();\n\t\t\t\tmove+=2;\n\t\t\t\t//System.out.println(3+\" \"+temp1.length+\"\"+oper);\n\t\t\t\toper = oper.substring(0, oper.lastIndexOf('-')+1);\n\t\t\t\t//System.out.println(3+\" \"+temp1.length+\"\"+oper);\n\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchar[] temp1 = oper.toCharArray();\n\t\t\t\t\tfor(int i =0;i<temp1.length;i++){\n\t\t\t\t\t\tif(temp1[i]=='+')\n\t\t\t\t\t\t\ttemp1[i]='-';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttemp1[i]='+';\n\t\t\t\t\t\t//System.out.print(temp1[i]);\n\t\t\t\t\t}\n\t\t\t\t\toper = String.valueOf(temp1);\n\t\t\t\t\tStringBuilder s = new StringBuilder(oper);\n\t\t\t\t\toper = (s.reverse()).toString();\n\t\t\t\t\tmove+=1;\n\t\t\t\t\t//System.out.println(3+\" \"+temp1.length+\"\"+oper);\n\t\t\t\t\toper = oper.substring(0, oper.lastIndexOf('-')+1);\n\t\t\t\t\t//System.out.println(3+\" \"+temp1.length+\"\"+oper);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Case #\"+Case+\": \"+move);\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n System.out.println(\"your number?\");\n Scanner s = new Scanner(System.in);\n int i1 = s.nextInt();\n int i2 = s.nextInt();\n int i3 = s.nextInt();\n int i4 = s.nextInt();\n int i5 = s.nextInt();\n int sum = i1 + i2 + i3 + i4 + i5;\n if (sum % 2 == 0) {\n System.out.println(sum);\n }\n }", "public static int Main()\n\t {\n\t\t int x;\n\t\t int j;\n\t\t int[] a = new int[16];\n\t\t x = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t int i = 1;\n\t\t int k = 0;\n\t\t while (x != -1)\n\t\t {\n\t\t\ta[i] = x;\n\t\t\ti++;\n\t\t if (x != 0)\n\t\t {\n\t\t\t k = i;\n\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\tint sum = 0;\n\t\t\t for (i = 1;i <= k;i++)\n\t\t\t {\n\t\t\t\t for (j = 1;j <= k ;j++)\n\t\t\t\t {\n\t\t\t\t if (a[i] == 2 * a[j])\n\t\t\t\t {\n\t\t\t\t\t sum++;\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t\t\t\tSystem.out.print((sum - 1));\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t\ti = 1;\n\t\t\t }\n\t\t\tx = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t }\n\t\t\treturn 0;\n\t }", "public static void main(String[] args) {\n\n\t\tfor (int i = 15; i <= 35; i++) {\n\n\t\t\tif (i % 6 == 0) {\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tSystem.out.print(i + \" \");\n\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int a = 15; a < 36; a++) {\n\t\t\tif (a % 2 == 0 && a % 3 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.print(a + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tfor (int x = 0; x <= 10; x++) {\n\t\t\tif (x == 4) {\n\t\t\t\tSystem.out.println(\"I am stopping the loop\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.print(x + \" \");\n\t\t}\n\t\tSystem.out.print(\" \");\n\t\tfor (int y = 1; y <= 10; y++) {\n\t\t\tif (y == 4) {\n\t\t\t\tSystem.out.println(\"i am skipping the loop\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.print(y+\"-)\");\n\t\t\tSystem.out.println(\" i am inside the loop\");\n\t\t}\n\t\t/*\n\t\t * write a program that needs a range of integers(start and end point)\n\t\t * provided by a user and then from that range prints the sum of the even\n\t\t */\n\t\tSystem.out.println(\" \");\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"please write a min number\");\n\t\tint min=scan.nextInt();\n\t\tSystem.out.println(\"please write a max number\");\n\t\tint max=scan.nextInt();\n\t\t\n\t\tint sumEven=0;\n\t\tint sumOdd=0;\n\t\tfor(int n=min; n<max+1; n++) {\n\t\t\tif(n%2==0) {\n\t\t\t\tsumEven=sumEven+n;\n\t\t\t}else if(n%2!=0) {sumOdd=sumOdd+n;\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\tSystem.out.println(sumEven+\" is sum of even numbers\");\n\t\tSystem.out.println(sumOdd+\" is sum of odd numbers\");\n\n}", "public static void main(String[] args) {\n int method,result;String string;\r\n String[] input=new String[3];\r\n ArrayList<String> inputs=new ArrayList<String>();\r\n\r\n\r\n\t\t// declare a Scanner object to read input\r\n Scanner sc=new Scanner(System.in);\r\n\r\n\t\t// read input and process them accordingly\r\n method=sc.nextInt();\r\n sc.nextLine();\r\n\r\n if(method == 1){\r\n int number=sc.nextInt();\r\n sc.nextLine();\r\n for(int i=0;i<number;i++){\r\n string=sc.nextLine();\r\n inputs.add(string);\r\n }\r\n for(int i=0;i<number;i++){\r\n input=inputs.get(i).split(\" \");\r\n result=0;\r\n if(input[0].equals(\"AND\")){\r\n if(input[1].equals(\"1\") &&input[2].equals(\"1\")){\r\n result=1;\r\n }\r\n }\r\n else{\r\n if(input[1].equals(\"1\") ||input[2].equals(\"1\"))\r\n result=1;\r\n }\r\n System.out.println(result); \r\n\r\n } \r\n\r\n\r\n }\r\n else if(method==2){\r\n int counter=0;\r\n while(true){\r\n string=sc.nextLine();\r\n inputs.add(string);\r\n if(string.equals(\"0\"))\r\n break;\r\n counter+=1;\r\n }\r\n for(int i=0;i<counter;i++){\r\n input=inputs.get(i).split(\" \");\r\n result=0;\r\n if(input[0].equals(\"AND\")){\r\n if(input[1].equals(\"1\") && input[2].equals(\"1\")){\r\n result=1;\r\n }\r\n\r\n }\r\n else{\r\n if(input[1].equals(\"1\") || input[2].equals(\"1\"))\r\n result=1;\r\n }\r\n \r\n System.out.println(result);\r\n \r\n \r\n }\r\n } \r\n else{\r\n int counter=0;\r\n while(sc.hasNextLine()){\r\n string=sc.nextLine();\r\n inputs.add(string);\r\n counter+=1;\r\n \r\n }\r\n for(int i=0;i<counter;i++){\r\n input=inputs.get(i).split(\" \");\r\n result=0;\r\n if(input[0].equals(\"AND\")){\r\n if(input[1].equals(\"1\") && input[2].equals(\"1\"))\r\n result=1;\r\n \r\n }\r\n else{\r\n if(input[1].equals(\"1\")||input[2].equals(\"1\"))\r\n result=1;\r\n }\r\n System.out.println(result);\r\n }\r\n\r\n\r\n }\r\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nint n=sc.nextInt();\r\n\r\nList<Integer> l=new ArrayList<Integer>();\r\nfor(int i=1;i<=n;i++){\r\n\tif(i%2!=0)\r\n\t{\r\n\t\tl.add(i);\r\n\t}\r\n}\r\n\tSystem.out.println(l);\r\n\tint n1=l.get(0);\r\n\tfor(int i=0;i<l.size();i++){\r\n\tif(i%2==0)\r\n\t\r\n\t\tn1=n1-l.get(i);\r\n\t//System.out.println(s);\r\n\telse\r\n\t\tn1=n1+l.get(i);\r\n\t}\r\n\tSystem.out.println(n1+1);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint number = in.nextInt();\r\n\t\tdouble sum = 0;\r\n\t\tint symbol = 1;\r\n\t\tfor(int i=1;i<=number;i++)\r\n\t\t{\r\n\t\t\tsum = sum + symbol*1.0/i;\r\n\t\t\t\r\n\t\t\tsymbol = -symbol;\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\tSystem.out.println(\"ºÍΪ:\"+sum);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\tint sumEven = 0;\n\t\tint sumOdd = 0;\n\t\tint num1,num2=0;\n\t\tScanner kevin = new Scanner(System.in);\n\t\tSystem.out.println(\"enter start num\");\n\t\tnum1 = kevin.nextInt();\n\t\tSystem.out.println(\"enter end num\");\n\t\tnum2 = kevin.nextInt();\n\n\t\tfor (int x = num1; x < num2; x++) {\n\t\t\tif (x%2==0) {\n\t\t\t\tsumEven+=x;\n\t\t\t\n\t\t\t}else {\n\t\t\t\tsumOdd+=x;\n\t\t\t\n\t\t\t}\n\t\t}\nSystem.out.println(\"sum of odd : \"+sumOdd);\nSystem.out.println(\"sum of even : \"+sumEven);\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n StringTokenizer st = new StringTokenizer(f.readLine());\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int c = Integer.parseInt(st.nextToken());\n int d = Integer.parseInt(st.nextToken());\n int x = -1;\n int y = -1;\n for(int i = 1; i < 45000; i++) {\n if(i*(i-1)/2 == a) {\n x = i;\n }\n if(i*(i-1)/2 == d) {\n y = i;\n }\n }\n if(x == -1 || y == -1) {\n out.println(\"Impossible\");\n } else {\n if(x*y == b+c) {\n int w = c/x;\n int z = c%x;\n out.println(\"1\".repeat(w)+\"0\".repeat(x-z)+\"1\".repeat(z > 0 ? 1 : 0)+\"0\".repeat(z)+\"1\".repeat(y-w-(z > 0 ? 1 : 0)));\n } else {\n if(b+c > 0) {\n out.println(\"Impossible\");\n } else if(x == 1) {\n out.println(\"1\".repeat(y));\n } else if(y == 1) {\n out.println(\"0\".repeat(x));\n } else {\n out.println(\"Impossible\");\n }\n }\n }\n f.close();\n out.close();\n }", "private int condense(int[] inputs) {\n\t\tint total = 0;\n\t\tflag = false;\n\t\tfor(int i = 0; i < inputs.length; i++) {\n\t\t\tinputs[i] -= 48;\n\t\t\tif(inputs[i] < 0 || inputs[i] > 9) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttotal *= 10;\n\t\t\ttotal += inputs[i];\n\t\t}\n\t\treturn total;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tScanner scan=new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter start point\");\n\t\tint startPoint=scan.nextInt();\n\t\t\n\t\tSystem.out.println(\"Enter end point\");\n\t\tint endPoint=scan.nextInt();\n\t\t\n\t\tint sumO=0; int sumE=0;\n\t\t\n\t\tfor (int a=startPoint; a<=endPoint; a++ ) {\n\t\t\tif(a%2==0) {\n\t\t\t\tsumE+=a; // the same-> sumE=a+sumE\n\t\t\t}else {\n\t\t\t\tsumO+=a; // the same-> sumO=a+sumO\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"The sum of even numbers from \"+startPoint+\" to \"+endPoint+\" is \"+sumE); \n\t\tSystem.out.println(\"The sum of odd numbers from \"+startPoint+\" to \"+endPoint+\" is \"+sumO); \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n int n = in.nextInt();\n long[] ar = new long[n];\n \n for(int ar_r=0; ar_r<n; ar_r++){\n ar[ar_r] = in.nextLong();\n }\n \n double[] result = findPlusMinus(n, ar);\n System.out.println(result[0]);\n System.out.println(result[1]);\n System.out.println(result[2]);\n }", "public static void main(String[] args) {\n\n\t\tScanner s=new Scanner(System.in);\n\t\tint t=s.nextInt();\n\t\twhile(t>0)\n\t\t{\n\t\t\tStringBuilder st=new StringBuilder();\n\t\t\tint a=s.nextInt();\n\t\t\tint b=s.nextInt();\n\t\t\tString s1=Integer.toBinaryString(a);\n\t\t\tString s2=Integer.toBinaryString(b);\n\t\t\tint l1=s1.length();\n\t\t\tint l2=s2.length();\n\t\t\tif(l1<l2)\n\t\t\t{\n\t\t\t\tst.append(s1);\n\t\t\t\tfor(int i=0;i<l2-l1;i++)\n\t\t\t\t{\n\t\t\t\t\tst.append('0');\n\t\t\t\t}\n\t\t\t\ts1=st.toString();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tst.append(s2);\n\t\t\t\tfor(int i=0;i<l1-l2;i++)\n\t\t\t\t{\n\t\t\t\t\tst.append('0');\n\t\t\t\t}\n\t\t\t\ts2=st.toString();\n\t\t\t}\n\t\t\tint xor=Integer.parseInt(s1,2)^Integer.parseInt(s2,2);\n\t\t\tSystem.out.println(xor);\n\t\t\tt--;\n\t\t}\n\t}", "public static void main(String[] arrr){\n\t\tlong mod = 10000000011L;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tarr[i]=sc.nextInt();\n\t\t}\n\t\tlong total=0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\ttotal = (total+((long)Math.pow((countBit(arr[i])),(i+1))%mod))%mod;\n\t\t}\n\t\tSystem.out.println(total);\n\t}", "public static void main (String[] args){\n Scanner sc=new Scanner(System.in);\n int num=sc.nextInt();int sum=1;\n int lol=String.valueOf(num).length();\n while(num>0)\n {\n int h=num%10;\n sum=sum+fact(h);\n num=num/10;\n }\n int len=String.valueOf(sum).length();\n if(len==lol)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint arr[]=new int[n];\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tarr[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\thoares(arr,n);\n\t\tSystem.out.println(\"odd and even\"+Arrays.toString(arr));\n\t\t\n\t\tint arr1[]=new int[n];\n\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\tarr1[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\tLomuto(arr1,n);\n\t\tSystem.out.println(\"negative and positive\"+Arrays.toString(arr1));\n\t}", "public static void main(String[] args) {\n Scanner s=new Scanner(System.in);\n int n = s.nextInt();\n for(int i=1; i<n+1; i++){\n int a = s.nextInt();\n int b = s.nextInt();\n int terms = s.nextInt();\n double c= a;\n for(int j=1; j<terms+1; j++){\n c = c + Math.pow(2,j-1)*b;\n System.out.printf(\"%.0f \", c);\n }\n System.out.printf(\"%n\");\n } \n }", "private void addTwoNumbers() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint num,i=0,ch,sum=0,sum2=0,count=0,last=0;\n\t\tbutton = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter number \");\n\t\tnum= button.nextInt();\n\t\tSystem.out.println(\"1/Even number: \");\n\t\tSystem.out.println(\"2/Odd Number : \");\n\t\tSystem.out.println(\"3/print five of even\");\n\t\tSystem.out.println(\"4/The first 25% of numbers\");\n\t\tSystem.out.println(\"5/The last 75% of numbers\");\n\t\tch = button.nextInt();\n\t\tswitch(ch){\n\t\tcase 1: \n\t\t\ti=1;\n\t\t\tSystem.out.println(\"even\");\n\t\t\twhile(i<=num){\n\t\t\t\t\n\t\t\t\tif(i%2==0){\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\ti++;\n\t\t\t\t\tsum+=i;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The sum of even \" + sum);\n\t\t\t\tbreak;\n\t\tcase 2: \n\t\t\t\tSystem.out.println(\"The odd\");\n\t\t\t\twhile(i<=num){\n\t\t\t\t\tif(i%2!=0){\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\ti++;\n\t\t\t\t\tsum2+=i;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The sum of odd \" + sum2);\n\t\t\t\tbreak;\n\t\tcase 3: System.out.println(\"The last five of even \");\n\t\t\t\ti =1;\n\t\t\t\twhile(i<=num){\n\t\t\t\t\tif(count<5){\n\t\t\t\t\tif(i%2==0){\n\t\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tlast+=i;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The sum even last five \" + last);\n\t\t\t\tbreak;\n\t\tcase 4: System.out.println(\"The last 25% of numbers \");\n\t\t\t\tint n;\n\t\t\t\ti=1;\n\t\t\t\tn = (int) ((int) num * 0.25);\n\t\t\t\tSystem.out.println(n);\n\t\t\t\twhile(i<=n){\n\t\t\t\t\tif(i%2==0){\n\t\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\t//TV IS HARMING\n\t\t\t\tbreak;\n\t\tcase 5: \n\t\t\t\tn = 25;\n\t\t\t\t\tfor(int k = num - n; k<=num;k++){\n\t\t\t\t\t\tif(k%2==0){\n\t\t\t\t\t\t\tSystem.out.println(k);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\tdefault : break;\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input = br.readLine();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!input.equals(\"#\")) {\n\t\t\tint[] arr = new int[2];\n\t\t\tchar[] inputs = input.toCharArray();\n\t\t\tfor (int i = 0; i < inputs.length - 1; i++) {\n\t\t\t\tarr[inputs[i] - '0']++;\n\t\t\t}\n\t\t\t\n\t\t\tsb.append(input.substring(0, input.length() - 1));\n\t\t\tif (inputs[inputs.length - 1] == 'e') {\n\t\t\t\tif (arr[1] % 2 == 1) {\n\t\t\t\t\tsb.append(1);\n\t\t\t\t} else {\n\t\t\t\t\tsb.append(0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (arr[1] % 2 == 1) {\n\t\t\t\t\tsb.append(0);\n\t\t\t\t} else {\n\t\t\t\t\tsb.append(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(System.lineSeparator());\n\t\t\tinput = br.readLine();\n\t\t}\n\t\t\n\t\tSystem.out.print(sb.toString());\n\t}", "public static int Main()\n\t{\n\t\tint[] num = new int[16];\n\t\tint i;\n\t\tint k;\n\t\tint j;\n\t\tint count;\n\t\tfor (;;) //????\n\t\t{\n\t\t\ti = -1; //?????i?count\n\t\t\tcount = 0;\n\t\t\tdo\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tnum[i] = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\t\tif (num[0] == -1) //?????????-1???\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t} while (num[i] != 0); //????0??\n\t\t\tfor (j = 0 ; j <= i - 1 ; j++)\n\t\t\t{\n\t\t\t\tfor (k = j ; k <= i - 1 ; k++)\n\t\t\t\t{\n\t\t\t\t\tif ((num[j] == 2 * num[k]) || (num[j] * 2 == num[k])) //????\n\t\t\t\t\t{\n\t\t\t\t\t\tcount++; //??\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(count);\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}", "public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\n\t\tint n = new.nextInt();\n\t\tint v1=1,v2=0,v3=0;\n\t\tfor(int a=n;a>=1;a--){\n\t\t\tv3=v2+v1;\n\t\t\tSystem.out.print(v3+\"\\t\");\n\t\t\tv1=v2;\n\t\t\tv2=v3;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tint a[]=new int[n];\r\n\t\tint even_count=0,odd_count=0;\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\ta[i]=s.nextInt();\r\n\t\t\tif(a[i]%2==0) {\r\n\t\t\t\teven_count+=1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\todd_count+=1;\r\n\t\t}\r\n\t\tSystem.out.println(\"even numbers are\"+even_count+\" \"+\"odd numbers are\"+odd_count);\r\n\t\ts.close();\r\n\t\t\r\n\r\n\t}", "private static void run() {\n\t\tScanner s = new Scanner(System.in);\n\t\tint num = (s.nextInt());\n\t\tList<char[]> ccNumbers = new ArrayList<char[]>(num);\n\n\t\tfor (int i = 1; i <= num; i++) {\n\t\t\tccNumbers.add(s.next().toCharArray());\n\t\t}\n\n\t\tfor (char[] chars : ccNumbers) {\n\t\t\tint A = calculateSumEvenFromRight(chars);\n\t\t\tint B = calculateSumOddFromRight(chars);\n\t\t\tif ((A + B) % 10 == 0) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tfor(int i=1;i<20;i++)\r\n\t\t{\r\n\t\t\tif(i%2!=0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(i+\" is an ODD Number\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t}", "public static void sumZero(int n) {\n\t\tScanner input = new Scanner(System.in);\n\t\tArrayList<Integer> arr = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tarr.add(input.nextInt());\n\t\t}\n\t\tfor (int i = 0; i < arr.size(); i++) {\n\t\t\tfor (int j = i + 1; j < arr.size(); j++) {\n\t\t\t\tif (arr.get(j) + arr.get(i) == 0) {\n\t\t\t\t\tSystem.out.println(arr.get(i) + \" \" + arr.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\n\t\tScanner sc = new Scanner(System.in);\n\t\teq e=new eq();\n\n\t\tlong sum = 0;\n\n\t\tint N = sc.nextInt();\n\n\t\tfor (int i = 0; i < N; i++) {\n\n\t\tfinal long x = sc.nextLong(); // read input\n\n\t\tString str = Long.toString((long) e.power(1 << 1, x));\n\t\tif(e.len(str)>2)\n\t\t{\n\t\t\tstr=str.substring(e.len(str) - 2);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstr=str;\n\t\t}\n\n\t\tsum += Integer.parseInt(str);\n\n\t\t}\n\n\t\tSystem.out.println(sum%100);\n\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint len=in.nextInt();\n\t\tint a1=0;\n\t\tint a2=0;\n\t\tint a3=0;\n\t\tdouble a4=0;\n\t\tint a5=0;\n\t\tint count=0;\n\t\tint count2=0;\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tint num=in.nextInt();\n\t\t\tint ca=num%5;\n\t\t\tswitch (ca) {\n\t\t\tcase 0:\n\t\t\t\tif (num%2==0) a1+=num;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif (count%2==0) a2+=num;\n\t\t\t\telse a2-=num;\n\t\t\t\tcount++;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ta3++;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tcount2++;\n\t\t\t\ta4+=num;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tif(num>a5) a5=num;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tin.close();\n\t\tSystem.out.print(a1==0?\"N\":a1);\n\t\tSystem.out.print(\" \"+String.valueOf(count==0?\"N\":a2));\n\t\tSystem.out.print(\" \"+String.valueOf(a3==0?\"N\":a3));\n\t\tSystem.out.print(\" \");\n\t\tSystem.out.print(a4==0?\"N\":String.format(\"%.1f\", a4/count2));\n\t\tSystem.out.print(\" \"+String.valueOf(a5==0?\"N\":a5));\n\t}", "public static void main(String[] args) {\n \n\t\tfor (int i=1;i<=100; i++){\n\t System.out.print(i+\" \");\n }System.out.println();\n\t\tSystem.out.println(\"----------------2-------------\");\n\t\tfor(int b=100; b>=1;b--) {\n\t\t\tSystem.out.print(b+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"----------------3---------------\");\n\t\t\n\t\tfor (int c=20; c>=1;c-=2) {\n\t\t\tSystem.out.print(c+ \" \");\n\t\t}System.out.println();\n\t\t\n\t\t\n\t\tSystem.out.println(\"----------------4---------------\");\n\t\tfor (int d=21; d<=50;d+=2) {\n\t\t\tSystem.out.print(d+ \" \");\n\t\t\n\t}System.out.println();\n\tSystem.out.println(\"----------------2(even)-------------\");\n\tfor(int z=20; z>=1; z-=2) {\n\t\tif (z%2==0) {\n\t\t\tSystem.out.print(z+ \" \");\t\n\t\t}\n\t}System.out.println();\nSystem.out.println(\"What is the ouptut\");\n\tint sum=0;\n\t\tfor(int i=1;i<=5; i++) {\n\t\t\tsum=sum+i;\n\t\t}\tSystem.out.println(sum);\n\t\tSystem.out.println(\" -------------------What is the otput-------------\");\n\t\tint result =0;\n\t\tfor(int i=2;i<10;i+=2) {\n\t\t\tresult+=i;\n\t\t\t}System.out.println(result);\n\t\t}", "public static long sumof20(String input){\n\t\tlong total = 0;\n\t\tfor(int i = 0; i <input.length(); i++){\n\t\t\tchar numberAt = input.charAt(i);\n\t\t\tlong sum = (long) Math.pow(Character.getNumericValue(numberAt), 2);\n\t\t\ttotal += sum;\t\n\t\t}\n\t\treturn total;\n\t}", "public static void main(String[] args) {\nScanner s=new Scanner(System.in);\nint n=s.nextInt();\nint a[]=new int[n];\nint x=0;\nfor(int i=1;i<=n;i++)\n{\n\tif(i%2!=0)\n\t{\n\t\ta[x++]=i;\n\t}\n}\nint sum=0;\nsum=a[0];\nfor(int i=0;i<x;i++)\n{\n\tif((i+1)<x)\n\t{\n\tif(i%2==0)\n\t\tsum=sum+a[i+1];\n\telse\n\t\tsum=sum-a[i+1];\n\t}\n}\nSystem.out.println(sum);\n\t}", "public static void main(String args[])\n {\n Scanner sc= new Scanner(System.in);\n double a=1,b,x=3,i,n,s=0;\n System.out.println(\"enter a number\");\n n=sc.nextInt();\n for(i=1;i<=n;i++)\n {\n a=a*x;\n b=1/a;\n s=s+b;\n x=x+2;\n }\n \n System.out.println(s);\n }", "private static void evaluateCase() {\n try {\n int n = SYS_IN.nextInt();\n int m = SYS_IN.nextInt();\n SYS_IN.nextLine();\n int mn = Integer.MAX_VALUE;\n long sum = 0L;\n int num;\n int sign = 1;\n for (int ni = 0; ni < n; ni++) {\n for (int mi = 0; mi < m; mi++) {\n num = SYS_IN.nextInt();\n if (num < 0) {\n sign *= -1;\n num = -num;\n }\n sum += num;\n mn = Math.min(mn, num);\n }\n SYS_IN.nextLine();\n }\n if (sign == -1) {\n sum -= 2 * mn;\n }\n System.out.println(sum);\n } catch (Exception e) {}\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tScanner s=new Scanner (System.in);\r\n\t\tint n=s.nextInt();\r\n\t\tfor(int i=0;i<n;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<=2*n;j++)\r\n\t\t\t{\r\n\t\t\t\tif(i+j==n||j-i==n)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"&\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n FastReader sc = new FastReader();\n int tc = sc.nextInt();\n while (tc-- > 0) {\n int n = sc.nextInt();\n StringBuilder s = new StringBuilder(sc.next());\n int numberofzeros = 0;\n boolean flag = false;\n for (int i = 0; i < s.length(); i++) {\n if(s.charAt(i) == '1'){\n flag = true;\n }\n if(s.charAt(i) == '0' && flag){\n numberofzeros++;\n }\n }\n //System.out.println(numberofzeros);\n for (int i = 0; i < s.length()-1; ) {\n if(s.charAt(i) == '1' && s.charAt(i+1) == '0'){\n if(numberofzeros != 1){\n s.deleteCharAt(i+1);\n numberofzeros--;\n continue;\n }\n else {\n s.deleteCharAt(i);\n // System.out.println(\"In else block\"+s);\n if(i >= 1){\n i--;\n }\n else\n i=0;\n continue;\n }\n }\n //System.out.println(s);\n //System.out.println(s.length());\n i++;\n }\n System.out.println(s);\n }\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number : \");\r\n\t\tint num=scan.nextInt();\r\n\t\tint even_count=0;\r\n\t\tint odd_count=0;\r\n\t\twhile(num>0)\r\n\t\t{\r\n\t\t\tint rem=num%10;\r\n\t\t\tif(rem%2==0)\r\n\t\t\t\teven_count+=1;\r\n\t\t\telse\r\n\t\t\t\todd_count+=1;\r\n\t\t\tnum=num/10;\r\n\t\t}\r\n\t\tSystem.out.println(\"Odd digits : \"+odd_count);\r\n\t\tSystem.out.println(\"Even digits : \"+even_count);\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tlong min=s.nextLong(),max=s.nextLong(),sum=0;\n\t\tboolean[] arr=new boolean[(int)(max-min+1)];\n\t\tfor(int i=2;;i++) {\n\t\t\tlong p=(long) Math.pow(i, 2),add=p;\n\t\t\tif((p-min)>=arr.length) break;\n\t\t\t//\t\t\tif((p-min)<0) continue;\n\t\t\t//\t\t\tif(p==1) continue;\n\t\t\twhile((p-min)<arr.length) {\n\t\t\t\t//\t\t\t\tSystem.out.println(p);\n\t\t\t\tif(!((p-min)<0)) arr[(int)(p-min)]=true;\n\t\t\t\tp+=add;\n\t\t\t}\n\t\t}\n\t\t//\t\tSystem.out.println(Arrays.toString(arr));\n\t\tfor(int i=0;i<arr.length;i++) if(!arr[i]) sum++;\n\t\tSystem.out.println(sum);\n\t}", "public static void main(String[] args) {\n\n int sum = 0;\n int n = 5;\n\n for (int i = 0; i < n; i++) {\n sum = sum + (2 * i);\n }\n System.out.println(sum);\n // prints 20 which is sum of 1st 5 even numbers (0,2,4,6,8)\n }", "public static void main(String[] args) {\nint N,i,fac=1;\nScanner fn=new Scanner(System.in);\nN =fn.nextInt();\nif(N<=20) {\n\tfor(i=N;i>=1;i--) {\n\t\tfac=fac*i;\n\t}\n}\nSystem.out.println(fac);\n\t}", "public static int Main()\n\t{\n\t\t//cout << \"?????????n\" << endl;\n\t\tint n; //n????????a,b,c???,y??????x??????\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tint y;\n\t\tint x;\n\t\tint z;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (int i = 1; i <= n; i++) //n???\n\t\t{\n\t\t\tx = 0;\n\t\t\ty = 0;\n\t\t\ta = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\tb = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\tc = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\tif (b > c) //?b??c\n\t\t\t{\n\t\t\t\tz = c;\n\t\t\t\tc = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tif ((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0)) //????\n\t\t\t{\n\t\t\t\ty = 1;\n\t\t\t}\n\t\t\tfor (; b <= c - 1; b++) //??????\n\t\t\t{\n\t\t\t\tswitch (b)\n\t\t\t\t{\n\t\t\t\tcase 1 :\n\t\t\t\tcase 3 :\n\t\t\t\tcase 5 :\n\t\t\t\tcase 7 :\n\t\t\t\tcase 8 :\n\t\t\t\tcase 10 :\n\t\t\t\tcase 12 :\n\t\t\t\t\tx = x + 31;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4 :\n\t\t\t\tcase 6 :\n\t\t\t\tcase 9 :\n\t\t\t\tcase 11 :\n\t\t\t\t\tx = x + 30;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\tx = x + 28 + y;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x % 7 == 0) //??????????\n\t\t\t{\n\t\t\t\tSystem.out.print(\"YES\");\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.print(\"NO\");\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}", "public static void main (String[] args) throws java.lang.Exception\n\t{\n int T, N;\nScanner sc= new Scanner(System.in);\n T=sc.nextInt();\n for(int i=0;i<T;i++)\n {\n N=sc.nextInt();\n int K=N;\n String str=N+\"\";\n if(N==0)\n {\n System.out.println(\"Case #\"+(i+1)+\": INSOMNIA\");\n continue;\n }\n while(true)\n {\n if(str.contains(\"0\") && str.contains(\"1\") && str.contains(\"2\") && str.contains(\"3\") &&str.contains(\"4\")\n && str.contains(\"5\") &&str.contains(\"6\") &&str.contains(\"7\") && str.contains(\"8\") &&str.contains(\"9\"))\n {\n System.out.println(\"Case #\"+(i+1)+\": \"+N);\n break;\n }\n else\n {\n N+=K;\n str+=N;\n } \n }\n\t}\n}", "public static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint n = sc.nextInt();\r\n\t\tint m = sc.nextInt();\r\n\t\tint k = sc.nextInt();\r\n\t\tfor (int i = -1; i < n*k+1; i++) {\r\n\t\t\tif (i == -1 || i == n*k) {\r\n\t\t\t\tSystem.out.println(String.format(\"+%s +\",\" -\".repeat(m*k)));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.print(\"| \");\r\n\t\t\t\tfor (int j = 0; j < m*k*2; j+=2) {\r\n\t\t\t\t\tif (i % (2*k) < k && j % (k*4) < k*2 || i % (2*k) >= k && j % (k*4) >=k *2)\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"|\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint N = sc.nextInt();\r\n\t\tint[] arr = new int[N+1];\r\n\t\tfor (int i = 1; i < arr.length; i++) {\r\n\t\t\tarr[i] = sc.nextInt();\r\n\t\t}\r\n\r\n\t\tint num = sc.nextInt();\r\n\r\n\t\tfor (int i = 0; i < num; i++) {\r\n\t\t\tint s = sc.nextInt(); // 성별\r\n\t\t\tint n = sc.nextInt(); // 받은 수\r\n\r\n\t\t\tif (s == 1) { // 남자\r\n\t\t\t\tfor (int j = 1; j < arr.length; j++) {\r\n\t\t\t\t\tif (j % n == 0) { // 자기가 받은 수의 배수이면\r\n\t\t\t\t\t\tarr[j] = Math.abs(arr[j] - 1); // 스위치 상태 변경\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else { // 여자\r\n\t\t\t\tarr[n] = Math.abs(arr[n] - 1); // 스위치 상태 변경\r\n\t\t\t\tint left = n - 1;\r\n\t\t\t\tint right = n + 1;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (left <= 0 || right >= arr.length || arr[left] != arr[right])\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tarr[left] = Math.abs(arr[left] - 1); // 스위치 상태 변경\r\n\t\t\t\t\tarr[right] = Math.abs(arr[right] - 1); // 스위치 상태 변경\r\n\t\t\t\t\tleft -= 1;\r\n\t\t\t\t\tright += 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 1; i < arr.length; i++) {\r\n\t\t\tSystem.out.print(arr[i] + \" \");\r\n\t\t\tif(i % 20 == 0) {\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tint a = input.nextInt();\r\n\t\tint b = input.nextInt();\r\n\t\tint num = a ^ b;\r\n\t\tint count = 0;\r\n\t\twhile(num != 0) {\r\n\t\t\tcount++;\r\n\t\t\tnum = (num - 1) & num;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(count);\r\n\t}", "private String generateInput() {\n Random rdm = new Random();\n int r, r_m, r_M, c = 0, c_max;\n String input = \"\";\n char ops[] = {'+', '-', '*', '/'};\n\n //r_m = 1;\n //r_M = 100;\n //c_max = rdm.nextInt(r_M - r_m + 1) + r_m;\n c_max = 4;\n\n if(c_max%2 == 0)\n c_max += 1;\n\n while(c < c_max){\n if(c%2 == 0){\n r_m = 0;\n //r_M = 1000;\n r_M = 9;\n r = rdm.nextInt(r_M - r_m + 1) + r_m;\n input += Integer.toString(r);\n } else {\n /* 4 operators [0-3] */\n r_m = 0;\n r_M = 3;\n /* get a random operation */\n r = rdm.nextInt(r_M - r_m + 1) + r_m;\n input += ops[r];\n }\n c++;\n }\n return input;\n }", "private void add() {\n // PROGRAM 1: Student must complete this method\n // This method must use the addBit method for bitwise addition.\n adder = addBit(inputA[0],inputB[0], false); //begin adding, no carry in\n output[0] = adder[0]; //place sum of first addBit iteration into output[0]\n //loop thru output beginning at index 1 (since we already computed index 0)\n for (int i = 1; i < output.length; i++) {\n cin = adder[1]; //set carry-out bit of addBit() iteration to cin\n adder = addBit(inputA[i], inputB[i], cin); //call addBit with index i of inputA and inputB and cin and place into adder.\n output[i] = adder[0]; //place sum into output[i]\n }\n }", "public static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tint n = t.nextInt();\n\t\tint[] a = new int[n];\n\t\tArrayList<Integer> odd = new ArrayList<>();\n\t\tArrayList<Integer> even = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = t.nextInt();\n\n\t\t\tif (a[i] % 2 == 0)\n\t\t\t\teven.add(i + 1);\n\t\t\telse\n\t\t\t\todd.add(i + 1);\n\t\t}\n\n\t\tif (even.size() == 1)\n\t\t\tSystem.out.println(even.get(0));\n\t\telse\n\t\t\tSystem.out.println(odd.get(0));\n\n\t}", "public static void main(String[] args) {\n Scanner scn =new Scanner(System.in);\n boolean b=true;\n while(b)\n {\n \n char ch=scn.next().charAt(0);\n \n if(ch=='+'||ch=='-'||ch=='*'||ch=='/'||ch=='%')\n {\n\t int N1 =scn.nextInt();\n\t int N2 =scn.nextInt();\n\t calculator(ch,N1,N2);\n }\n else if(ch!='X'&&ch=='x')\n\t {System.out.println(\"try again\");}\n else\n\tbreak;\n }\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int t = in.nextInt();\n for(int a0 = 0; a0 < t; a0++){\n long n = in.nextLong();\n long sum=0;\n n--;\n long x=n-n%3;\n sum+=(x)*(x+3)/6;\n x=n-n%5;\n sum+=(x)*(x+5)/10;\n x=n-n%15;\n sum-=(x)*(x+15)/30;\n System.out.println(sum);\n in.close();\n }\n }", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint a = scn.nextInt();\n\t\tint b=0;\n\t\tfor (int i = 1; i <a; i++) {\n\t\t\t b=1;\n\t\t\tint sum = 0;\n\t\t\tfor (int j = i; j < a; j++) {\n\t\t\t\tsum += j;\n\t\t\t\tif (sum == a) {\n\t\t\t\t\tSystem.out.print(\"=\");\n\t\t\t\t\tfor (int o = i; o <=j; o++) {\n\t\t\t\t\t\tSystem.out.print(o);\n\t\t\t\t\t\tif (o < j) {\n\t\t\t\t\t\t\tSystem.out.print(\"+\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}System.out.print(\" \");\n\t\t\t\t}\n\t\t\t\t}if (b==0) {\n\t\t\t\t\tSystem.out.print(\"No\");\n\t\t\t}\n\t\t}\n\t}", "public static void main (String[] args){\n Scanner in = new Scanner (System.in);\n int num = in.nextInt();\n int sum=1,sum1=0,n,check=num;\n for(;num!=0;)\n {\n n=num%10;\n sum=1;\n for( int i=n;i>0;i--){\n sum=sum*i;\n }\n sum1 = sum1+sum;\n num=num/10;\n \n }\n if(check==sum1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n\n\n\t}", "public static void main(String[] args) {\nint i =1;\r\nfor(i=1; i<=20; i++)\r\n{\r\n\tif(i % 2 == 1)\r\nSystem.out.println(i);\r\n}\r\nSystem.out.println(\"Printing only the odd numbers from 1 to 20\");\r\n\t}", "public static void main(String[] args) {\n\n System.out.print(\"All numbers: \");\n for(int i = 1; i <= 50; i++ ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n // even numbers:\n System.out.print(\"Even Numbers: \");\n for(int i = 2; i <= 50; i+= 2 ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n // Odd numbers:\n System.out.print(\"Odd Numbers\");\n for(int i = 1; i<=49; i += 2 ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n System.out.println(\"======================================================\");\n for(int i = 1; i <= 50; i++ ){\n if(i%2 != 0){ // if i' value is odd\n continue; // skip\n }\n System.out.print(i+\" \");\n }\n\n System.out.println();\n\n for(int i = 1; i <= 50; i++ ){\n if(i%2==0){ // if i is odd number\n continue; // skip it\n }\n\n System.out.print(i+\" \");\n\n if(i == 29){\n break; // exits the loop\n }\n\n }\n\n\n System.out.println(\"Hello\");\n\n\n\n }", "private void prepareInput() {\n\t\tif(input.charAt(0) == '-') input = \"0\" + input;\n\t\tfor(int i = 0; i < input.length() - 1; i++) {\n\t\t\tif(input.charAt(i) == '(' && input.charAt(i+1) == '-') input = input.substring(0, i+1) + \"0\" + input.substring(i+1); \n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint sum;\n\t\tScanner sc=new Scanner(System.in);\n\t\tdo{ System.out.println(\"Vuvedi chislo ...\");\n\t\t\tsum=sc.nextInt();\n\t\t\t\n\t\t}while(sum<2||sum>27);\n\t\tfor (int i=100;i<=999;i++){\n\t\t\tint a=i/100;\n\t\t\tint b=i%100/10;\n\t\t\tint c=i%10;\n\t\t\tif((a+b+c)!=sum){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st;\n\t\tT = Integer.parseInt(br.readLine());\n\t\t\n\t\t// 2^6+1 ( 기준의 루트값만 조사하면 되니깐)\n\t\t// 2000001 전 까지의 소수를 구하여 소수로만 리스트화\n\t\tarr = new boolean[2000001];\n\t\tarr[1] = true;\n\t\tprime = new ArrayList<>();\n\t\tfor (int i = 2; i < arr.length; i++) {\n\t\t\tif(arr[i]) continue;\n\t\t\telse {\n\t\t\t\tprime.add(i);\n\t\t\t\tfor (int j = i+i; j < arr.length; j+=i) {\n\t\t\t\t\tarr[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tfor (int i = 0; i < T; i++) {\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tlong a = Long.parseLong(st.nextToken());\n\t\t\tlong b = Long.parseLong(st.nextToken());\n\t\t\t\n\t\t\tlong sum = a+b;\n\t\t\tif(sum < 4) {\n\t\t\t\tsb.append(\"NO\" +\"\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(sum %2 == 0) {\n\t\t\t\tsb.append(\"YES\" +\"\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// 2(소수)와 sum-2로 나눠본다면 sum-2가 소수이면 되는 문제인 것이다 \n\t\t\tsum-=2;\n\t\t\tif(checkPrime(sum)) {\n\t\t\t\tsb.append(\"YES\" +\"\\n\");\n\t\t\t}else {\n\t\t\t\tsb.append(\"NO\" +\"\\n\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sb);\n\t}", "public static void main(String[] args) {\n\t\tScanner n= new Scanner(System.in);\r\n\t\tint num= n.nextInt();\r\n\t\tint m=num/2;\r\n\t\tfor(int i=0;i<m;i++) {\r\n\t}\r\n\t}", "public static void main(String[]args)\n {\n /*prompt user to input non-negative integer*/\n \n System.out.println(\"Please enter a non-negative integer value:\");\n Scanner keyboard = new Scanner(System.in);\n \n int input = keyboard.nextInt();\n \n /*keep prompting user until they enter an acceptable (non-negative) \n value*/\n if (input < 0)\n { while(input < 0)\n {\n System.out.println(\"Please enter a non-negative integer value:\");\n input = keyboard.nextInt();\n }\n }\n \n /* call convertToBinary on the acceptable integer that is input by the user, store \n this binary value in an int variable named binaryConversion\n */\n int binaryConversion = convertToBinary(input);\n \n //System.out.println(\"Binary conversion is: \" + binaryConversion);\n \n /* to easily count the number of ones in the binary number, convert \n binaryConversion to a string using Integer wrapper class*/\n \n String binaryString = Integer.toString(binaryConversion);\n //System.out.println(\"Binary string is: \" + binaryString);\n \n /*initialize number of ones to 0, then accumulate using a for loop; check \n each index value using the string method charAt(index) to see if the character\n at that index is a 1; if so, add one to numOnes*/\n \n int numOnes = 0;\n for (int i = 0; i < binaryString.length();i ++)\n { if (binaryString.charAt(i) == '1')\n numOnes ++;\n }\n \n /*if numOnes is divisible by two, it's even, which means the input decimal \n number has even parity\n */\n if (numOnes%2 == 0)\n System.out.println(\"The number \" + input + \" has EVEN parity.\");\n \n /*if numOnes is NOT divisible by two, it's odd, which means the input decimal \n number has ODD parity\n */\n \n else \n System.out.println(\"The number \" + input + \" has ODD parity.\");\n }", "public static void main(String args[] ) throws Exception {\n Scanner in = new Scanner(System.in);\n \n String original = in.next();\n int n = original.length();\n long moda = 1000000007;\n long ones = 1;\n long sum=0; \n for (int s=original.length()-1; s>=0; s--) {\n sum = (sum + (s+1) * (original.charAt(s) - '0') * ones) %moda; \n ones = (ones * 10 + 1) % moda;\n \n }\n \n System.out.println(sum);\n \n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < n; i++)\n\t\t\tsum += in.nextInt();\n\t\tn++;\n\t\t\n\t\tint res = 0;\n\t\tfor(int i = 1; i <= 5; i++)\n\t\t\tif((sum+i)%n != 1)\n\t\t\t\tres++;\n\t\tSystem.out.println(res);\n\t}", "static void plusMinus(int[] arr) \r\n {\r\n \tint positive=0, negative=0, zeroes=0;\r\n \tList<String> list = new ArrayList<>();\r\n \tfor(int a: arr)\r\n \t{\r\n \t\tif(a>0)\r\n \t\t{\r\n \t\t\tpositive = positive+1;\r\n \t\t}\r\n \t\t\r\n \t\tif(a<0)\r\n \t\t{\r\n \t\t\tnegative = negative+1;\r\n \t\t}\r\n \t\t\r\n \t\telse if(a==0)\r\n \t\t{\r\n \t\t\tzeroes = zeroes+1;\r\n \t\t}\r\n \t}\r\n \t\r\n \tdouble answer = (double)positive/arr.length;\r\n \tlist.add(findResult(answer));\r\n \t\r\n \tanswer = (double)negative/arr.length;\r\n \tlist.add(findResult(answer));\r\n \t\r\n \tanswer = (double)zeroes/arr.length;\r\n \tlist.add(findResult(answer));\r\n \t\r\n \t\r\n \tfor(String d: list)\r\n \t{\r\n \t\tSystem.out.println(d);\r\n \t}\r\n }", "public static void main(String[] args) {\n\n\t int even=20;\n\t do {\n\t\tSystem.out.println(even);\n\t even+=2;\n\t }while (even<=50);\n//2. way\n\t int even1=20;\n\t do {\n\t\t if (even1%2==0) {\n\t\t\t System.out.println(even1);\n\t\t }\n\t even1++;\n\t }while (even1<=50);\n}", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 1\r\n\t\t*/\r\n\t\t\r\n\t\tint c = 0;\r\n\t\tint s = 1;\r\n\t\tint f = 0;\r\n\t\tint b = 0;\r\n\t\t\r\n\t\twhile( c < 8 ) {\r\n\t\t\t\r\n\t\t\tb = f + s;\r\n\t\t\tf = s;\r\n\t\t\ts = b;\r\n\t\t\tc++;\r\n\t\t\tSystem.out.println(b);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 2\r\n\t\t */\r\n\t\t\r\n\t\tdouble[][] notas = new double[6][2];\r\n\t\tSystem.out.println(\"Digite a notas dos 6 alunos, em ordem (primeiro aluno: primeira nota depois segunda nota)\");\r\n\t\tfor(int i = 0; i <6; i++) {\r\n\t\t\tfor(int j = 0; i <2; i++) {\r\n\t\t\t\tnotas[i][j] = scan.nextDouble();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tdouble m = (notas[i][0] + notas[i][1]) / 2;\r\n\t\t\tnotas[i][2] = m;\r\n\t\t\tSystem.out.println(notas[i][2]);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tSystem.out.println(notas[i][2] >= 6 ? \"Aluno \"+(i)+\" Passou\" : \"Aluno \"+(i)+\" Recuperação\");\r\n\t\t}\r\n\t\t\r\n\t\tint a = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif(notas[i][2] >= 6) {\r\n\t\t\t\ta++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(a+\" Alunos passaram\");\r\n\t\t\r\n\t\tint d = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif(notas[i][2] <= 3) {\r\n\t\t\t\td++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(d+\" Alunos reprovaram\");\r\n\t\t\r\n\t\tint e = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif((notas[i][2] <= 6)||(notas[i][2] >= 3)) {\r\n\t\t\t\te++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(e+\" Alunos de recuperação\");\r\n\t\t\r\n\t\tdouble g = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tg = g + notas[i][2];\r\n\t\t}\r\n\t\tSystem.out.println(\"Media da sala: \"+g/6);\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 3\r\n\t\t */\r\n\t\t\r\n\t\tboolean prime = true;\r\n\t\tSystem.out.println(\"Insira o numero que desejas saber se é primo ou não (inteiro positivo) \");\r\n\t\tint h = scan.nextInt();\r\n\t\tfor(int i = 2; i <= h; i ++) {\r\n\t\t\tif( (h % i == 0) && (i != h) ) {\r\n\t\t\t\tprime = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(prime)\r\n\t\t\tSystem.out.print(\"O numero \"+h+\" é primo\");\r\n\t\telse\r\n\t\t\tSystem.out.print(\"O numero \"+h+\" não é primo\");\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 4\r\n\t\t */\r\n\t\t\r\n\t\tSystem.out.println(\"Insira notas dos alunos (Ordem: Primeira nota, segunda nota, presença)\");\r\n\t\tint[][] Sala = new int[5][3];\r\n\t\tfor(int i = 0; i < 5; i++) {\r\n\t\t\tfor(int j = 0; j < 3; j++) {\r\n\t\t\t\tSala[i][j] = scan.nextInt();\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < 5; i++) {\r\n\t\t\tif((Sala[i][0] + Sala[i][1] >= 6) && (Sala[i][2] / 18 >= 0.75)){\r\n\t\t\t\tSystem.out.println(\"Aluno \"+i+\" aprovado\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Aluno \"+i+\" reprovado\");\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 5\r\n\t\t */\r\n\t\t\r\n\t\tint[] first = {1,2,3,4,5,};\r\n\t\tint[] second = {10,9,8,7,6,5,4,3,2,1,};\r\n\t\tint[][] third = {{1,2,3,},\r\n\t\t\t\t\t {4,5,6},\r\n\t\t\t\t\t {7,8,9},\r\n\t\t\t\t\t {10,11,12}};\r\n\t\tint[][] fourth = new int[4][3]; \r\n\t\tint m = 0;\r\n\t\t//If they were random numbers, would i need to use the lowest integer? or just be clever\r\n\t\tint n = 1;\r\n\t\t\r\n\t\tfor(int i = 0; i < first.length; i++) {\r\n\t\t\tif(first[i] > m)\r\n\t\t\t\tm = first[i];\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < second.length; i++) {\r\n\t\t\tif(second[i] < n)\r\n\t\t\t\tn = second[i];\r\n\t\t}\r\n\t\t\r\n\t\tint x = n*m;\r\n\t\tint k = 0;\r\n\t\tint l = 0;\r\n\t\tint o = 0;\r\n\t\tint p = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i ++) {\r\n\t\t\tfor(int j = 0; j < 3; j++) {\r\n\t\t\t\tfourth[i][j] = third[i][j] + x;\r\n\t\t\t\r\n\t\t\t\tif(fourth[0][j] % 2 == 0) {\r\n\t\t\t\t\tk += fourth[0][j]; \r\n\t\t\t\t}\r\n\t\t\t\tif(fourth[1][j] % 2 == 0) {\r\n\t\t\t\t\tl += fourth[1][j];\r\n\t\t\t\t}\t\r\n\t\t\t\tif(fourth[0][j] % 2 == 0) {\r\n\t\t\t\t\to += fourth[2][j];\r\n\t\t\t\t}\r\n\t\t\t\tif(fourth[3][j] % 2 == 0) {\r\n\t\t\t\t\tp += fourth[3][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 6\r\n\t\t */\r\n\t\t\r\n\t\tboolean[][] assentos = new boolean[2][5];\r\n\t\tfor(int i = 0; i < 2; i++) {\r\n\t\t\tfor(int j = 0; j < 5; j++) {\r\n\t\t\t\tassentos[i][j] = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tscan.close();\r\n\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int lonelyNumber = 0;\n int a[] = new int[n];\n for(int a_i=0; a_i < n; a_i++){\n a[a_i] = in.nextInt();\n }\n \n for (int index = 0; index < a.length; index++) {\n lonelyNumber ^= a[index];\n }\n \n System.out.println(lonelyNumber);\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner (System.in);\n int n;\n for (int i = 0; i < 20; i++) {\n if (i%2 == 0) {\n System.out.print(\" \");\n }else{\n n = 2*i;\n System.out.println(\"Output: \" + n);\n }\n }\n }", "int main() {\n \n \n int n1=0;\n int n2=0;\n int n3=0;\n int res=0;\n cin >> n1 >> n2 >> n3;\n res = n1 + n2 + n3;\n cout << res << endl;\n return 0;\n}", "public static void main(String[] args) {\nScanner Sc= new Scanner(System.in);\nSystem.out.printf(\"Nhap vao so N = \");\nint N = Sc.nextInt();\nint S=0,i;\nfor (i=1;i<=N;i++)\n S=S+(10*i+i);\nSystem.out.printf(\"\\n%d\",S);\n\n\t}", "@Test\n\tpublic void testInputWithMoreNumbers() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\tsb.append(i);\n\t\t\tif (i <100) {\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\tassertEquals(\"Many numbers in input string\", 5050L, calculator.calculeteSum(sb.toString()).longValue());\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.print(\"ENter Octal Number : \");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint n = sc.nextInt();\r\n\t\tint temp = 0, j = 0;\r\n\t\tint b[] = new int[20];\r\n\t\tSystem.out.print(\"Binary Number : \");\r\n\t\twhile ( n != 0 )\r\n\t\t{\r\n\t\t\tint rem = n % 10;\r\n\t\t\t\r\n\t\t\twhile( rem != 0)\r\n\t\t\t{\r\n\t\t\t\ttemp = rem % 2;\r\n\t\t\t\trem = rem / 2;\r\n\t\t\t\tb[j++] = temp;\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tn = n / 10;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=j-1; i>=0; i--)\r\n\t\t\tSystem.out.print(b[i]+\" \");\r\n\t\r\n\t\tsc.close();\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint evensum=0;\n\t\tint oddsum=0;\n\t\tfor( int num=1; num<=99; num++) {\n\t\t\t\n\t\t\tif(num%2==0) {\n\t\t\tevensum=evensum+num;\n\t\t\t\t\n\t\t\t}else {oddsum=oddsum+num;}\n\t\t}\n\t\tSystem.out.println(evensum+\" \"+ oddsum);\n\t\t\n\t}", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tlong t = s.nextLong();\n\t\twhile(t-->0){\n\t\t long n = s.nextLong();\n\t\t long a = s.nextLong();\n\t\t long b = s.nextLong();\n\t\t System.out.println( (2*(180+n)) - (a+b));\n\t\t}\n\t}", "int main()\n{\n int a,t,sum1=0,sum2=0;\n cin>>a;\n while(a>0)\n {\n t=a%10;\n if(t%2!=0)\n {\n sum1=sum1+t;\n }\n else\n {\n sum2=sum2+t;\n }\n a=a/10;\n }\n (sum1==sum2)?cout<<\"Yes\":cout<<\"No\";\n return 0;\n}", "public static void main(String[] args) {\nint sum=0,a=0;\r\n\t\t\r\n\t\tfor(int i=2;i<=8;i++){\r\n\t\t\tif(i%2==0){\r\n\t\t\tsum=sum+i;\r\n\t\t\t\r\n\t\t\tSystem.out.println(sum);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tScanner in = new Scanner(System.in);\r\n int n = in.nextInt();\r\n int arr[] = new int[n];\r\n for(int arr_i=0; arr_i < n; arr_i++){\r\n arr[arr_i] = in.nextInt();\r\n }\r\n \r\n //判断正负数\r\n float counter_p=0,counter_n=0,counter_z=0;\r\n for(int i:arr)\r\n {\r\n \tif(i==0){\r\n \t\t//System.out.println(i+\" z+1\");\r\n \t\tcounter_z++;\r\n \t}\r\n \t\t\r\n \telse if(i>0){\r\n \t\t//System.out.println(i+\" p+1\");\r\n\r\n \t\tcounter_p++;\r\n \t}\r\n \telse {\r\n \t\t//System.out.println(i+\" p+1\");\r\n \t\tcounter_n++;\r\n \t}\r\n\t\t\t\t\r\n }\r\n \r\n float result_p = counter_p/n;\r\n float result_n = counter_n/n;\r\n float result_z = counter_z/n;\r\n \r\n // System.out.println(counter_p+\" \"+counter_n+\" \"+counter_z);\r\n \r\n DecimalFormat df = new DecimalFormat(\"0.000000\");\r\n //第一行 正数 第二行负数 第三行0\r\n System.out.println(df.format(result_p));\r\n System.out.println(df.format(result_n));\r\n System.out.println(df.format(result_z));\r\n\r\n\t}", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n int input = 1;\n String output = \"\";\n\n\n do {\n input = scanner.nextInt();\n if (input % 2 == 0 && input != 0) {\n output = output + \"even\\n\";\n }\n if (input % 2 != 0 && input != 0) {\n output = output + \"odd\\n\";\n }\n } while (input != 0);\n System.out.println(output);\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t int a = 0;\n\t\t a=scan.nextInt();\n\t\t int [] arr=new int[a+1];\n\t\t arr[1]=arr[2]=1;\n\t\t for(int i=3;i<arr.length;i++){\n\t\t arr[i]=(arr[i-1]+arr[i-2])%10007;//对每一个斐波那契数列进行取余数\n\t\t }\n\t\t System.out.println(arr[a]);\n\t\t }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint t=scan.nextInt();\n\t\tfor(int l=0;l<t;l++)\n\t\t{\n\t\tint s=scan.nextInt();\n\t\tlong[] a=new long[s];\n\t\tfor(int i=0;i<s;i++)\n\t\t\ta[i]=scan.nextLong();\n\t\tsell=new boolean[s];\n\t\t\n\t\tif(reverse(a)||equal(a)||a.length<=1)\n\t\t{\n\t\t\tSystem.out.println(\"0\");\n\t\t\tcontinue;\n\t\t\t\n\t\t}\n\t\tgen(a);\n\t\tSystem.out.println(profit(a));\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint cases = in.nextInt();\n\t\tint numcase = 1;\n\t\tfor (int i = 0; i < cases; i++) {\n\t\t\tint friends = 0;\n\t\t\tint total = 0;\n\t\t\tin.next();\n\t\t\tchar[] dig = in.next().toCharArray();\n\t\t\tfor (int j = 0; j < dig.length; j++) {\n\t\t\t\tif (total >= j) {\n\t\t\t\t\ttotal += Character.getNumericValue(dig[j]);\n\t\t\t\t} else {\n\t\t\t\t\tfriends += j - total;\n\t\t\t\t\ttotal += Character.getNumericValue(dig[j]) + j - total;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Case #\"+numcase+\": \"+friends);\n\t\t\tnumcase++;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t\tint n = sc.nextInt();\r\n\t\tint[] a = new int[n];\r\n\t\tfor(int i = 0; i < n; i++){\r\n\t\t\ta[i] = sc.nextInt();\r\n\t\t}\r\n\t\tint res = 0, p = 0, t = 0;\r\n\t\twhile(true){\r\n\t\t\tp = 0; t = 0;\r\n\t\t\tfor(int i = 0; i < a.length; i++){\r\n\t\t\t\t\r\n\t\t\t\tif(i == a.length-1){\r\n\t\t\t\t\ta[i] /= 2;\r\n\t\t\t\t\tt = a[i];\r\n\t\t\t\t\ta[i] += p;\r\n\t\t\t\t\tp = t;\r\n\t\t\t\t\ta[0] += p;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\ta[i] /= 2;\r\n\t\t\t\t\tt = a[i];\r\n\t\t\t\t\ta[i] += p;\r\n\t\t\t\t\tp = t;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tboolean flag = true;\r\n\t\t\tint temp = a[0];\r\n\t\t\tfor(int j = 1; j < a.length; j++){\r\n\t\t\t\tif(a[j] != temp){\r\n\t\t\t\t\tflag = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(flag){\r\n\t\t\t\tSystem.out.println(res);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(int j = 0; j < a.length; j++){\r\n\t\t\t\tif(a[j] % 2 != 0){\r\n\t\t\t\t\ta[j] += 1;\r\n\t\t\t\t\tres++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args){\n Scanner input = new Scanner(System.in);\n int result = 0;\n\n System.out.print(\"Enter three integer number : \");\n String num = input.nextLine();\n\n String [] operand = num.split(\" \");\n int x = Integer.parseInt(operand[0]);\n int y = Integer.parseInt(operand[1]);\n int z = Integer.parseInt(operand[2]);\n\n System.out.print(\"Enter two operand : \");\n String operator = input.nextLine();\n\n String [] op = operator.split(\" \");\n String a = op[0];\n String b = op[1];\n\n int temp = 0;\n\n for(int i = 0; i< op.length; i++){\n if(a.equals(\"X\") || a.equals(\"D\") || a.equals(\"M\") || b.equals(\"X\") || b.equals(\"D\") || b.equals(\"M\")){\n\n if(a.equals(\"X\") || b.equals(\"X\")){\n if(a.equals(\"X\")){\n if(i == 0) temp = x*y;\n else result = temp * x;\n a = \"\";\n }\n else if(b.equals(\"X\")){\n if(i == 0) temp = y*z;\n else result = temp * z;\n b = \"\";\n }\n }\n\n else if(a.equals(\"D\") || b.equals(\"D\")){\n if(a.equals(\"D\")){\n if(i==0) temp = x/y;\n else result = x/temp;\n a = \"\";\n }\n else if(b.equals(\"D\")){\n if(i == 0) temp = y/z;\n else result = temp / z;\n b = \"\";\n }\n }\n\n else if(a.equals(\"M\") || b.equals(\"M\")){\n if(a.equals(\"M\")){\n if(i == 0)temp = x % y;\n else result = x % temp;\n a = \"\";\n }\n\n else if(b.equals(\"M\")) {\n if(i == 0) temp = y % z;\n else result = temp % z;\n b = \"\";\n }\n }\n\n } else{\n if(a.equals(\"A\")){\n if(b.equals(\"A\")) result = x+y+z;\n else if(b.equals(\"S\")) result = x+y-z;\n else result = temp + x;\n }\n\n else if(b.equals(\"A\")){\n if(a.equals(\"A\")) result = x+y+z;\n else if(a.equals(\"S\")) result = x-y+z;\n else result = temp + z;\n }\n }\n }\n System.out.println(x + \" \" + op[0] + \" \" + y + \" \" + op[1] + \" \" + z + \" = \" + result);\n\n }", "public static void main(String[] args) throws IOException{\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\t //TODO Take First line using buffer reader and seperate element by space.\n\t String[] firstMultipleInput = bufferedReader.readLine().replaceAll(\"\\\\s+$\", \"\").split(\" \");\n\t \t \t \tArrayList<Integer> inpArray = new ArrayList<Integer>(firstMultipleInput.length);\n\t \t \t \tfor (int i = 0; i < firstMultipleInput.length; i++) {\n\t\t\t\t\tinpArray.add(Integer.valueOf(firstMultipleInput[i]).intValue());\n\t\t\t\t}\n\t \t System.out.println(DifferenceEvenOdd.solve( inpArray));\n }", "public static void main(String[] args) {\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tint n = scan.nextInt();\r\n\t\tint[] nums = new int[n];\r\n\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tnums[i] = scan.nextInt();\r\n\t\t}\r\n\r\n\t\tint pCount = 0, nCount = 0, zCount = 0;\r\n\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tif (nums[i] > 0)\r\n\t\t\t\tpCount++;\r\n\t\t\telse if (nums[i] < 0)\r\n\t\t\t\tnCount++;\r\n\t\t\telse\r\n\t\t\t\tzCount++;\r\n\t\t}\r\n\r\n\t\tSystem.out.printf(\"%.6f \\n%.6f \\n%.6f\", pCount / (double) n, nCount / (double) n, zCount / (double) n);\r\n\r\n\t\tscan.close();\r\n\t}", "private void addRangeIntegers() {\r\n ent_2_i.put(\"< 0\", -1); ent_2_i.put(\"== 0\", 0); ent_2_i.put(\"== 1\", 1); ent_2_i.put(\"< 10\", 10);\r\n ent_2_i.put(\"< 100\", 100); ent_2_i.put(\"< 1K\", 1000); ent_2_i.put(\"< 10K\", 10000); ent_2_i.put(\"< 100K\", 100000);\r\n ent_2_i.put(\"> 100K\", 1000000);\r\n }", "public void generateNumbers() {\n number1 = (int) (Math.random() * 10) + 1;\n number2 = (int) (Math.random() * 10) + 1;\n operator = (int) (Math.random() * 4) + 1;\n //50% chance whether the displayed answer will be right or wrong\n rightOrWrong = (int) (Math.random() * 2) + 1;\n //calculate the offset of displayed answer for a wrong equation (Error)\n error = (int) (Math.random() * 4) + 1;\n generateEquation();\n }", "public static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tint n = t.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] b = new int[n];\n\t\tint one = 0, sum = 0, csum = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = t.nextInt();\n\n\t\t\tif (a[i] % 2 == 1) {\n\t\t\t\tone++;\n\t\t\t\tcsum--;\n\t\t\t} else\n\t\t\t\tcsum++;\n\n\t\t\tsum = Math.max(sum, csum);\n\t\t\tcsum = Math.max(0, csum);\n\t\t}\n\n\t\tif (n == one)\n\t\t\tsum = n - 1;\n\t\telse\n\t\t\tsum = one + sum;\n\n\t\tSystem.out.println(sum);\n\t}", "public static void main(String[] args) {\n\t\tScanner in= new Scanner(System.in);\n\t\tint n=in.nextInt();\n\t\tint i;\n\t\tint sum=0;\n\t\tfor (i=3; i<n; i++) //0 does not affect the sum, 1 and 2 \n\t\t{\n\t\t\tif ((i%3==0) || (i%5==0))\n\t\t\t{\n\t\t\t\tsum+=i;\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(sum);\n\t\tin.close();\n\t}", "public static void main(String[] args) {\n\r\n int i = +10;\r\n int i2 = -10;\r\n int i3 = ++i;\r\n int i4 = i++;\r\n int i5 = --i;\r\n int i6 = i--;\r\n\r\n // *** Binary Arithmetic Operators\r\n\r\n//\t\t+\r\n//\t\t-\r\n//\t\t/\r\n//\t\t%\r\n//\t\t*\r\n\r\n int i7 = 10 + 1;\r\n int i8 = i7 - 1;\r\n int i9 = i8 / 2;\r\n int i10 = i9 % 2;\r\n int i11 = 5 % 10;\r\n int i12 = i10 * 3;\r\n\r\n System.out.println(i7);\r\n System.out.println(i8);\r\n System.out.println(i9);\r\n System.out.println(\"Hello \" + \"World\" + \"!\"); // used for concatination\r\n\r\n // ============ Assignment Operators\r\n\r\n//\t\t=\r\n//\t\t+=\r\n//\t\t-=\r\n//\t\t*=\r\n//\t\t/=\r\n//\t\t%=\r\n\r\n int i13 = 10;\r\n i13 += 2;\r\n System.out.println(i13);\r\n\r\n // ============ Relational Operators\r\n\r\n//\t\t==\r\n//\t\t!=\r\n//\t\t>\r\n//\t\t<\r\n//\t\t>=\r\n//\t\t<=\r\n\r\n System.out.println(\"===== Relational Operators =====\");\r\n\r\n int y = 10;\r\n int j = 20;\r\n\r\n System.out.println(y == j);\r\n System.out.println(y != j);\r\n System.out.println(y > j);\r\n System.out.println(y < j);\r\n System.out.println(y >= j);\r\n System.out.println(y <= j);\r\n\r\n // ============ Logical Operators\r\n\r\n//\t\t&\r\n//\t\t&&\r\n//\t\t|\r\n//\t\t||\r\n//\t\t!\r\n//\t\t^\r\n\r\n System.out.println(false && (5 / 5 == 0) );\r\n System.out.println(true || (5 / 7 == 0) );\r\n System.out.println(\"!true = \" + !true);\r\n System.out.println(true ^ false);\r\n\r\n\r\n // ============ Bitwise Operators\r\n\r\n//\t\t&\r\n//\t\t|\r\n//\t\t^\r\n//\t\t~\r\n//\t\t>>\r\n//\t\t>>>\r\n//\t\t<<\r\n\r\n System.out.println(\"4 & 5 = \" + (4 & 5)); // 4\r\n /*\r\n * \t\t\t\t1 0 0\r\n * \t\t\t\t& & &\r\n * \t\t\t\t1 0 1\r\n * \t\t\t\t-----\r\n * \t\t\t\t1 0 0 = 4\r\n */\r\n\r\n System.out.println(\"4 | 5 = \" + (4 | 5)); // 5\r\n /*\r\n * \t\t\t\t1 0 0\r\n * \t\t\t\t| | |\r\n * \t\t\t\t1 0 1\r\n * \t\t\t\t-----\r\n * \t\t\t\t1 0 1 = 5\r\n */\r\n\r\n System.out.println(\"4 ^ 5 = \" + (4 ^ 5)); // 1\r\n /*\r\n * \t\t\t\t1 0 0\r\n * \t\t\t\t^ ^ ^\r\n * \t\t\t\t1 0 1\r\n * \t\t\t\t-----\r\n * \t\t\t\t0 0 1 = 1\r\n */\r\n\r\n // ============ Ternary Operator\r\n\r\n//\t\t(condition) ? true expression : false expression\r\n\r\n System.out.println(5 > 1 ? \"2 is greater than one\" : \"2 is not less than one\");\r\n System.out.println(2 < 1 ? \"2 is greater than one\" : \"2 is not less than one\");\r\n\r\n // ============ Operator Precedence\r\n//\r\n//\t\tPrecedence highest to lowest among brackets.\r\n//\t\t()\r\n//\t\t[]\r\n//\t\t·\r\n//\r\n// Precedence highest to lowest among postfix and prefix.\r\n//\t\t++\r\n//\t\t--\r\n//\r\n// Precedence highest to lowest among urinary operators.\r\n//\t\t+\r\n//\t\t—\r\n//\t\t!\r\n//\t\t~\r\n//\t\t( type )\r\n//\r\n// Precedence highest to lowest among binary operators.\r\n//\t\t*\r\n//\t\t/\r\n//\t\t%\r\n//\t\t+\r\n//\t\t–\r\n//\r\n// Precedence highest to lowest among shift operator.\r\n//\t\t<<\r\n//\t\t>>\r\n//\t\t>>>\r\n//\r\n// Precedence highest to lowest among rational operators.\r\n//\t\t<\r\n//\t\t<=\r\n//\t\t>\r\n//\t\t>=\r\n//\t\tinstanceof\r\n//\r\n// Precedence highest to lowest among equality operator.\r\n//\t\t==\r\n//\t\t!=\r\n//\r\n// Precedence highest to lowest among bitwise operator.\r\n//\r\n//\t\t&\r\n//\r\n//\r\n//\t\t^\r\n//\r\n//\r\n//\t\t|\r\n//\r\n//\r\n//\t\t&&\r\n//\r\n//\r\n//\t\t||\r\n//\r\n//\r\n//\t\t? :\r\n//\r\n// Precedence highest to low among Assignment operators\r\n//\t\t=\r\n//\t\t+=\r\n//\t\t-=\r\n//\t\t*=\r\n//\t\t/=\r\n//\t\t%=\r\n\r\n // Using Parantheses\r\n\r\n /*\r\n Parentheses raise the precedence of the operations that are inside them. This is\r\n often necessary to obtain the result you desire. For example, consider the\r\n following expression:\r\n\r\n a >> b + 3\r\n\r\n This expression first adds 3 to b and then shifts a right by that result. That is,\r\n this expression can be rewritten using redundant parentheses like this:\r\n a >> (b + 3)\r\n\r\n However, if you want to first shift a right by b positions and then add 3 to that result,\r\n you will need to parenthesize the expression like this:\r\n\r\n (a >> b) + 3\r\n */\r\n\r\n int a = 5;\r\n int b = 5;\r\n System.out.println(\"------------------------------\");\r\n System.out.println(a >> (b + 3)); // 0\r\n\r\n // After altering parantheses\r\n\r\n System.out.println((a >> b) + 3); //3\r\n\r\n\r\n // Test equality btw String and other objects using == and equals()\r\n\r\n String s = new String(\"hello\");\r\n String h = \"hello\";\r\n System.out.println(\"*******************\");\r\n\r\n System.out.println(s==h); //false\r\n System.out.println(s.equals(h)); //true\r\n\r\n int n = 78;\r\n int v = 79;\r\n\r\n System.out.println(n==v); //false\r\n\r\n int[] ar = {1,2,3};\r\n int[] yu = {1,2,3};\r\n\r\n System.out.println(Arrays.equals(ar, yu)); //true\r\n System.out.println(ar == yu); //false\r\n\r\n }", "public boolean or35 (int n) {\n if ( (n % 3 == 0) || (n % 5 == 0)){\n return true;\n }\n return false;\n}", "public static void main(String[] args) {\n Scanner scan = new Scanner(\"11\");\n\n int input_x;\n\n int output;\n\n input_x = scan.nextInt();\n\n for (output = 1000 ; output > 0; output--) {\n if (input_x - output * 5 < 0) {\n continue;\n } else if ((input_x - output * 5) % 3 == 0) {\n break;\n }\n }\n\n if (output == 0 && input_x % 3 != 0) {\n System.out.println(-1);\n } else {\n System.out.println(output + (input_x - output * 5) / 3);\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner scan = new Scanner(System.in) ;\r\n\t\t\r\n\t\tSystem.out.println(\"Enter number of equations(x%num=rem)\");\r\n\t\tint count = scan.nextInt() ;\r\n\t\t\r\n\t\tint[] num = new int[count] ;\r\n\t\tSystem.out.println(\"Enter num values\");\r\n\t\tfor(int i = 0 ; i <count ; i++)\r\n\t\t{\r\n\t\t\tnum[i] = scan.nextInt() ;\r\n\t\t}\r\n\t\t\r\n\t\tint[] rem = new int[count] ;\r\n\t\tSystem.out.println(\"Enter rem values\");\r\n\t\tfor(int i = 0 ; i <count ; i++)\r\n\t\t{\r\n\t\t\trem[i] = scan.nextInt() ;\r\n\t\t}\r\n\t\t\r\n\t\tint M = 1 ;\r\n\t\tfor(int i = 0 ; i <count ; i++)\r\n\t\t{\r\n\t\t\tM = M * num[i];\r\n\t\t}\r\n\t\t\r\n\t\tint[] m = new int[count] ;\r\n\t\tfor(int i = 0 ; i <count ; i++)\r\n\t\t{\r\n\t\t\tm[i] = M / num[i] ;\r\n\t\t}\r\n\t\t\r\n\t\tint[] y = new int[count] ;\r\n\t\tfor(int i = 0 ; i < count ; i++)\r\n\t\t{\r\n\t\t\tif(m[i] > num[i])\r\n\t\t\t{\r\n\t\t\t\ty[i] = m[i] % num[i] ;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//Use eegcd\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\tint x = 0;\r\n\t\tfor(int i = 0 ; i < count ; i++)\r\n\t\t{\r\n\t\t\tx = x + y[i]*m[i]*rem[i];\r\n\t\t}\r\n\t\tx = x%M ;\r\n\t\tSystem.out.println(\"X = \" + x);\r\n\t}", "public static void ishappy20(String number, String input){\n\t\tlong tester = sumof20(input);\n\t\tint cond = 0;\n\t\tif(cond == 0){\n\t\t\tif(tester == 1){\n\t\t\t\tcond = 1;\n\t\t\t\tSystem.out.println(input); //Prints the intermediate result\n\t\t\t\tSystem.out.println(\"The number \" + number + \" is a happy number\");\n\t\t\t}\n\t\t\telse if(tester == 4){\n\t\t\t\tcond = 1;\n\t\t\t\tSystem.out.println(input); //Prints intermediate result\n\t\t\t\tSystem.out.println(\"The number \" + number + \" is a unhappy number\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(input);\n\t\t\t\tishappy20(number, \"\" + sumof20(input));\n\t\t\t}\n\t\t}\n\t}", "private static void drukaf()\n\t{\n\t\tint a;\n\t\tint oplossing;\n\t\tfor(a=1; a<10; a++)\n\t\t{\n\t\t\tint b;\n\t\t\tfor(b=1; b<10; b++)\n\t\t\t{\n\t\t\t\toplossing = a*b;\n\t\t\t\tSystem.out.println(a + \" x \" + b + \" = \" + oplossing);\n\t\t\t}\t\n\t\t}\n\t}" ]
[ "0.56079304", "0.5486418", "0.54614705", "0.5405385", "0.540043", "0.53818935", "0.53274614", "0.5325016", "0.53095007", "0.5304262", "0.53041357", "0.52340347", "0.5232135", "0.5228289", "0.52205515", "0.5170587", "0.5165414", "0.51530635", "0.5151706", "0.5135921", "0.51354384", "0.51220614", "0.51128334", "0.5100502", "0.510041", "0.5098128", "0.5096217", "0.5086923", "0.50861573", "0.5085492", "0.5081186", "0.5079829", "0.50647485", "0.5063214", "0.5048589", "0.5041096", "0.50384927", "0.50282943", "0.5015265", "0.50025934", "0.5001152", "0.49926868", "0.4992583", "0.498788", "0.49675992", "0.49505112", "0.4949193", "0.49405015", "0.49396473", "0.49386024", "0.4936469", "0.49330005", "0.49247727", "0.49204433", "0.49157637", "0.4909119", "0.4898553", "0.48946944", "0.48899817", "0.48860517", "0.48817664", "0.48735175", "0.48667112", "0.48659927", "0.48602605", "0.48580787", "0.48531514", "0.48500934", "0.4849455", "0.48439762", "0.48347184", "0.48287043", "0.48257622", "0.48220173", "0.48219362", "0.4821266", "0.48136705", "0.48073685", "0.4807081", "0.48030096", "0.479972", "0.47993144", "0.4799055", "0.4798422", "0.47965086", "0.47956967", "0.47927442", "0.47913477", "0.47889614", "0.47886375", "0.4787489", "0.4783601", "0.47792444", "0.47709662", "0.4764495", "0.47601855", "0.47599295", "0.47569957", "0.4754779", "0.47486737", "0.47485438" ]
0.0
-1
Check if other player is not null and IDs match.
@Override public boolean equals(Object otherPlayer) { return otherPlayer != null && mName.contentEquals(((Player)otherPlayer).mName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Player)) {\n return false;\n }\n Player other = (Player) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Player)) {\n return false;\n }\n Player other = (Player) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean isValid(int playerId, IGame game) {\n boolean retVal = false;\n for (int index = 0; (index < entityIds.length) && !retVal; index++) {\n if ((game.getEntity(entityIds[index]) != null)\n && (playerId == game.getEntity(entityIds[index])\n .getOwnerId())) {\n retVal = true;\n }\n }\n return retVal;\n }", "boolean hasPlayerId();", "boolean hasTargetPlayerId();", "default boolean isOpponent(Player player, UUID playerToCheckId) {\n return !player.getId().equals(playerToCheckId);\n }", "@Override\n public boolean equals(Object other) {\n if(this == other)\n return true;\n if(other instanceof Player)\n return this.hashCode() == other.hashCode();\n return false;\n }", "@Override\r\n\tprotected boolean prerequisites() {\n\t\treturn _player1.getClient().getPlayer().getWrappedObject().getPosition()\r\n\t\t\t\t.equals(_player2.getClient().getPlayer().getWrappedObject().getPosition());\r\n\t}", "public Integer getIDByOpponents(Player player1, Player player2){\n synchronized (games) {\n for (Integer id: games.keySet()){\n CheckersGame game = games.get(id);\n if (game.hasPlayer(player1) && game.hasPlayer(player2) && !game.isGameOver()) {\n return id;\n }\n }\n return null;\n }\n }", "public boolean method_1894(@Nullable EntityPlayer var1) {\n return var1 != null && Intrinsics.areEqual((Object)var1, (Object)Minecraft.getMinecraft().player) ^ true && !FriendManager.Companion.isFriend(var1) && (!CollectionsKt.contains((Iterable)field_1241, var1) || CollectionsKt.contains((Iterable)field_1242, var1));\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Player player = (Player) o;\n return id == player.id &&\n color == player.color;\n }", "public boolean idNewPlayerCheck(TennisPlayer inPlayer) {\n \t\n TennisPlayerContainerNode node = this.root;\n \n for (int i = 0; i < playerCount; i++) {\n \t\n if (node.getPlayer().getId().equals(inPlayer.getId())) {\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean equals(@Nullable final Object obj) {\n return obj instanceof Player && pseudo.equals(((Player) obj).pseudo);\n }", "public boolean isOtherPlayerReady(int[] details)throws RemoteException{\n if(details[1] == 0){\n return sd.getGames().get(details[0]).getPlayers()[1].isReady();\n } return sd.getGames().get(details[0]).getPlayers()[0].isReady();\n }", "public Player isMatchWon(final String matchId) throws MatchNotFoundException {\r\n LOGGER.debug(\"--> isMatchWon: matchId=\" + matchId);\r\n Match match = getMatchById(matchId);\r\n Player player1 = match.getPlayer1();\r\n Player player2 = match.getPlayer2();\r\n int sunkBoatsP1 = countOfStatus(player1, FIELD_SUNK);\r\n int sunkBoatsP2 = countOfStatus(player2, FIELD_SUNK);\r\n if(sunkBoatsP1 == 30){\r\n return player2;\r\n }else if(sunkBoatsP2 == 30){\r\n return player1;\r\n } else {\r\n return null;\r\n }\r\n}", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof Player)) {\n return false;\n }\n\n return (playerColor().equals(((Player) other).playerColor()));\n }", "private boolean isEqual(Roster r2)\n\t{\n\t\tIterator<Player> it1 = iterator();\n\t\twhile(it1.hasNext())\n\t\t{\n\t\t\tPlayer p = it1.next();\n\t\t\tif(!r2.has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tIterator<Player> it2 = r2.iterator();\n\t\twhile(it2.hasNext())\n\t\t{\n\t\t\tPlayer p = it2.next();\n\t\t\tif(!has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean equals(Object object) {\n if (this == object) return true;\n if (!(object instanceof Player)) return false;\n Player player = (Player) object;\n return getId().equals(player.getId()) &&\n username.equals(player.username);\n }", "public boolean equals(Player player){\n\t\treturn this.jid.equals(player.getJid());\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Game)) {\n return false;\n }\n Game other = (Game) object;\n if ((this.idGame == null && other.idGame != null) || (this.idGame != null && !this.idGame.equals(other.idGame))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Game)) {\n return false;\n }\n Game other = (Game) object;\n if ((this.idGame == null && other.idGame != null) || (this.idGame != null && !this.idGame.equals(other.idGame))) {\n return false;\n }\n return true;\n }", "boolean hasSendPlayerId();", "@Override\n\tpublic boolean equals(Object obj) {\n if (obj == this) { \n return true; \n } \n // Check if obj is an instance of Position or not \n if (!(obj instanceof Player)) { \n return false; \n } \n // Type cast obj to \"Player\" so that we can compare the name & side attributes \n Player p = (Player) obj; \n return ( this.name == p.getName() && this.side == p.getSide() ); \n }", "private static boolean checkWinner(Player playerA, Player playerB) {\n\t\tboolean gameOver = false;\n\t\tif (playerA.getShips().isEmpty()) {\n\t\t\tSystem.out.println(playerB.getName() + \" Won the Battle\");\n\t\t\tgameOver = true;\n\t\t} else if (playerB.getShips().isEmpty()) {\n\t\t\tSystem.out.println(playerA.getName() + \" Won the Battle\");\n\t\t\tgameOver = true;\n\t\t} else if (playerA.getTargetList().isEmpty() && playerB.getTargetList().isEmpty()) {\n\t\t\tSystem.out.println(\"peace\");\n\t\t\tgameOver = true;\n\t\t}\n\t\treturn gameOver;\n\t}", "@Test\n public void equalsFalseNull() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertFalse(player1.equals(null));\n }", "@Test\n public final void testPlayer2Win() {\n checkPlayerWin(player2);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof PlikPotw)) {\r\n return false;\r\n }\r\n PlikPotw other = (PlikPotw) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "private boolean validateOrder() {\n\t\t// players with no id\n\t\tList<String> playersNoId = new ArrayList<>();\n\t\tList<ChesspairingPlayer> players = mTournament.getPlayers();\n\t\tfor (ChesspairingPlayer player : players) {\n\t\t\tif (player.getInitialOrderId() <= 0) {\n\t\t\t\tplayersNoId.add(player.getName());\n\t\t\t}\n\t\t}\n\t\tif (playersNoId.size() > 0) {\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(\"You have players with no initialOrderId: \");\n\t\t\tfor (String name : playersNoId) {\n\t\t\t\tsb.append(name + \", \");//\n\t\t\t}\n\t\t\tint id = sb.lastIndexOf(\", \");\n\t\t\tsb.replace(id, sb.length(), \"\");\n\t\t\tPairingSummary parringSummary = new PairingSummary();\n\t\t\tparringSummary.setShortMessage(PairingSummary.PARRING_NOT_OK);\n\t\t\tparringSummary.setLongMessage(sb.toString());\n\t\t\tmTournament.setParringSummary(parringSummary);\n\t\t\treturn false;\n\t\t}\n\n\t\t// players with the same id\n\t\tMap<Integer, ChesspairingPlayer> map = new HashMap<>();\n\t\tfor (ChesspairingPlayer player : players) {\n\t\t\tif (map.containsKey(player.getInitialOrderId())) {\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(\"You have players with the same initialOrderId: \");\n\t\t\t\tsb.append(map.get(player.getInitialOrderId()).getName() + \" and \");\n\t\t\t\tsb.append(player.getName());\n\t\t\t\tPairingSummary parringSummary = new PairingSummary();\n\t\t\t\tparringSummary.setShortMessage(PairingSummary.PARRING_NOT_OK);\n\t\t\t\tparringSummary.setLongMessage(sb.toString());\n\t\t\t\tmTournament.setParringSummary(parringSummary);\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tmap.put(player.getInitialOrderId(), player);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private List<String> validatePlayer(String playerName, CommandSender sender) {\n\n\t\tList<Player> players = new ArrayList<Player>();\n\t\tList<String> match = new ArrayList<String>();\n\n\t\tplayers = this.getServer().matchPlayer(playerName);\n\t\tif (players.isEmpty()) {\n\t\t\t// Check for an offline player (exact match).\n\t\t\tfor (OfflinePlayer player : Bukkit.getOfflinePlayers()) {\n\t\t\t\tif (player.getName().equals(playerName)) {\n\t\t\t\t\tmatch.add(player.getUniqueId().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\tif (Arrays.asList(this.getServer().getOfflinePlayers()).contains(Bukkit.getOfflinePlayer(playerName))) {\n\t\t\t\tmatch.add(Bukkit.getOfflinePlayer(playerName).getName()); //.getUniqueId().toString());\n\t\t\t\t//match.add(Bukkit.getOfflinePlayer(Bukkit.getPlayer(playerName).getUniqueId()).getName()); //.getUniqueId().toString());\n\t\t\t} else {\n\t\t\t\t// look for partial matches\n\t\t\t\tfor (OfflinePlayer offline : this.getServer().getOfflinePlayers()) {\n\t\t\t\t\tif (offline.getName().toLowerCase().startsWith(playerName.toLowerCase()))\n\t\t\t\t\t\tmatch.add(offline.getName()); //.getUniqueId().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\n\t\t} else {\n\t\t\tfor (Player player : players) {\n\t\t\t\tmatch.add(player.getUniqueId().toString());\n\t\t\t}\n\t\t}\n\n\t\tif (match.isEmpty()) {\n\t\t\tsender.sendMessage(ChatColor.RED + \"Player not found!\");\n\t\t\treturn null;\n\t\t} else if (match.size() > 1) {\n\t\t\tsender.sendMessage(ChatColor.RED + \"Too many matches found! (\" + match.toString() + \")\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn match;\n\n\t}", "boolean hasPlayerBagId();", "boolean hasPlayerBagId();", "boolean hasPlayerBagId();", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Owner)) {\n return false;\n }\n Owner other = (Owner) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Play)) {\n return false;\n }\n Play other = (Play) object;\n if ((this.pid == null && other.pid != null) || (this.pid != null && !this.pid.equals(other.pid))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean isValid(int playerId, Entity entity, IGame game) {\n return ((null != entity) && (entity.getOwnerId() == playerId) && isValidEntity(\n entity, game));\n }", "public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }", "public boolean versus(Player player1, Player player2, Player player3) {\n Card player1FaceCard = player1.getHand().removeCardFromTop();\n Card player2FaceCard = player2.getHand().removeCardFromTop();\n Card player3FaceCard = player3.getHand().removeCardFromTop();\n if (player1FaceCard == null || player2FaceCard == null || player3FaceCard == null)\n return false;\n // modifyPile(pile, player1FaceCard, player2FaceCard, player3FaceCard);\n return compareAllPlayers(player1FaceCard, player2FaceCard, player3FaceCard);\n }", "public boolean isValid(int playerId, IGame game) {\n return playerId == this.playerId;\n }", "@java.lang.Override\n public boolean hasPlayerId() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "@Test\n public final void testPlayer1Win() {\n checkPlayerWin(player1);\n }", "private void checkPlayerCollisions() {\r\n\t\tGObject left = getElementAt(player.getX() - 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tGObject right = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tif(dragon1 != null && (left == dragon1 || right == dragon1)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t\tif(dragon2 != null && (left == dragon2 || right == dragon2)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}", "public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}", "public boolean setPlayerID(int ID){\n\t\tif(playersFinished.size()==0){\n\t\t\treturn false;\n\t\t}\n\t\tif(markedNum>9999){\n\t\t\treturn false;//upperLimit of # of racers\n\t\t}\n\t\tfor(Player p: playersFinishedMarked){\n\t\t\tif(p.getID()==ID){\n\t\t\t\tSystem.out.println(\"Player exists in list\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tfor(Player p: DNFs){\n\t\t\tif(p.getID()==ID){\n\t\t\t\tSystem.out.println(\"Player exists in list\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(markedNum < playersFinished.size()){\n\t\tPlayer temp = playersFinished.get(markedNum++);\n\t\ttemp.setID(ID);\n\t\ttemp.setZeroOffset(\"\");//clear ambigous offset\n\t\tplayersFinishedMarked.add(temp);//add to marked list\n\t\t//playersFinished.remove(0); //remove the player from temp list \n\t\treturn true;\n\t\t}\n\t\treturn false;//prompted setID more times than players exist\n\t}", "public boolean hasPlayerId() {\n return ((bitField0_ & 0x00000002) != 0);\n }", "@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }", "private void isMatchInfoValid(String firstPlayerId, String secondPlayerId, String tennisMatchDate\r\n , String locationOfMatch, String score) throws TennisDatabaseException {\r\n if(firstPlayerId == null) {\r\n throw new TennisDatabaseException(\"firstPlayer Id is not a valid Id\");\r\n } else if (secondPlayerId == null) {\r\n throw new TennisDatabaseException(\"Second player Id is not a valid Id\");\r\n } else if (tennisMatchDate == null) {\r\n throw new TennisDatabaseException(\"tennisMatchDate is not a valid date\");\r\n } else if (locationOfMatch == null) {\r\n throw new TennisDatabaseException(\"locationOfMatch is not valid\");\r\n } else if (score == null) {\r\n throw new TennisDatabaseException(\"scores is not valid\");\r\n }\r\n }", "int otherPlayer(int player) {\n switch (player) {\n case 0: return 1;\n case 1: return 0;\n default: return 0;\n }\n }", "@Test\n\tpublic void test_equals2() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(521,\"Joe Tsonga\");\n\tassertFalse(c1.equals(c2));\n }", "@Test\n public void testGetOtherPlayer2Player() {\n Player p = new Player();\n Player p2 = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n pL.add(p2);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n\n Player l = j.getOtherPlayer(p);\n\n assertEquals(\"Le player ne devrai pas etre le même que celui mis dans la fonction\", p2, l);\n }", "public boolean areOnSameTeam(Player p1, Player p2) {\n\t\treturn areOnSameTeam(p1.getUniqueId(), p2.getUniqueId());\n\n\t}", "public boolean isPlayer1() {\n\t\treturn currentPlayer.equals(player1);\n\t}", "public boolean betterEquals(Object obj)\n\t{\n\t\tif (obj instanceof Player)\n\t\t{\n\t\t\tPlayer other = (Player) obj;\n\t\t\treturn this.name.equals(other.name) && this.pawn == other.pawn;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ONG)) {\n return false;\n }\n ONG other = (ONG) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "private Player checkIfEatsRedPlayer(Player player)\n {\n int x_cord = getMidPoint(player.x_cordinate);//player.x_cordinate;\n int y_cord = getMidPoint(player.y_cordinate);//player.y_cordinate;\n int redx1 = getMidPoint(getRed_player1().x_cordinate);\n int redx2 = getMidPoint(getRed_player2().x_cordinate);\n int redx3 = getMidPoint(getRed_player3().x_cordinate);\n int redx4 = getMidPoint(getRed_player4().x_cordinate);\n int redy1 = getMidPoint(getRed_player1().y_cordinate);\n int redy2 = getMidPoint(getRed_player2().y_cordinate);\n int redy3 = getMidPoint(getRed_player3().y_cordinate);\n int redy4 = getMidPoint(getRed_player4().y_cordinate);\n if (collisionDetection(x_cord, y_cord, redx1, redy1) == 1)\n {\n return getRed_player1();\n }\n else if (collisionDetection(x_cord, y_cord, redx2, redy2) == 1)\n {\n return getRed_player2();\n }\n else if (collisionDetection(x_cord, y_cord, redx3, redy3) == 1)\n {\n return getRed_player3();\n }\n else if (collisionDetection(x_cord, y_cord, redx4, redy4) == 1)\n {\n return getRed_player4();\n }\n else\n {\n return null;\n }\n }", "private boolean compareChatUsers(ID id1, ID id2) {\n IChatID cid1 = (IChatID) id1.getAdapter(IChatID.class);\n IChatID cid2 = (IChatID) id2.getAdapter(IChatID.class);\n if (cid1 == null || cid2 == null)\n return false;\n return (cid1.getUsername().equals(cid2.getUsername()) && cid1.getHostname().equals(cid2.getHostname()));\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Turnos)) {\n return false;\n }\n Turnos other = (Turnos) object;\n if ((this.idTurnos == null && other.idTurnos != null) || (this.idTurnos != null && !this.idTurnos.equals(other.idTurnos))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n DiscordUser discordUser = (DiscordUser) o;\n if (discordUser.getId() == null || getId() == null) {\n return false;\n }\n return Objects.equals(getId(), discordUser.getId());\n }", "public boolean GameOver() {\r\n if(Main.player1.SuaVida()==0 || Main.player2.SuaVida()==0)\r\n return true;\r\n return false;\r\n }", "@Test\n public void equalsFalseDifferentColor() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n Player player2 = new Player(PlayerColor.WHITE, \"\");\n assertFalse(player1.equals(player2));\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Song)) {\n return false;\n }\n Song other = (Song) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public boolean equals (Object o){\n if (o == this) {\n return true;\n }\n if (!(o instanceof Player)) {\n return false;\n }\n Player other = (Player) o;\n return this.name == other.name;\n }", "public boolean isEqual(MatchingCardsTile other){\n return this.getNumber() == other.getNumber();\n }", "private boolean comparePersistentIdEntrys(@Nonnull PairwiseId one, @Nonnull PairwiseId other)\n {\n // Do not compare times\n //\n return Objects.equals(one.getPairwiseId(), other.getPairwiseId()) &&\n Objects.equals(one.getIssuerEntityID(), other.getIssuerEntityID()) &&\n Objects.equals(one.getRecipientEntityID(), other.getRecipientEntityID()) &&\n Objects.equals(one.getSourceSystemId(), other.getSourceSystemId()) &&\n Objects.equals(one.getPrincipalName(), other.getPrincipalName()) &&\n Objects.equals(one.getPeerProvidedId(), other.getPeerProvidedId());\n }", "@Test\n public void equalsFalseDifferentPiece() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n player1.addPiece(new Piece(PlayerColor.BLACK, 1));\n\n Player player2 = new Player(PlayerColor.BLACK, \"\");\n player2.addPiece(new Piece(PlayerColor.BLACK, 2));\n\n assertFalse(player1.equals(player2));\n }", "private static boolean comparePlayerPosition(RSTile tile) {\n RSTile player_position = Player07.getPosition();\n if (tile == null || player_position == null) {\n return false;\n }\n return tile.equals(player_position);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Owner)) {\n return false;\n }\n Owner other = (Owner) object;\n if ((this.ownerId == null && other.ownerId != null) || (this.ownerId != null && !this.ownerId.equals(other.ownerId))) {\n return false;\n }\n return true;\n }", "public boolean isEnd(int player) {\n\t\tif (\n\t\t\t\t(fields[0][0].getPlayer() == player &&\n\t\t\t\t fields[1][0].getPlayer() == player &&\n\t\t\t\t fields[2][0].getPlayer() == player)\n\t\t\t\t||\n\t\t\t\t(fields[0][1].getPlayer() == player &&\n\t\t\t\t fields[1][1].getPlayer() == player &&\n\t\t\t\t fields[2][1].getPlayer() == player)\n\t\t\t\t||\n\t\t\t\t(fields[0][2].getPlayer() == player &&\n\t\t\t\t fields[1][2].getPlayer() == player &&\n\t\t\t\t fields[2][2].getPlayer() == player)\n\t\t\t\t||\n\t\t\t\t(fields[0][0].getPlayer() == player &&\n\t\t\t\t fields[0][1].getPlayer() == player &&\n\t\t\t\t fields[0][2].getPlayer() == player)\n\t\t\t\t||\n\t\t\t\t(fields[1][0].getPlayer() == player &&\n\t\t\t\t fields[1][1].getPlayer() == player &&\n\t\t\t\t fields[1][2].getPlayer() == player)\n\t\t\t\t||\n\t\t\t\t(fields[2][0].getPlayer() == player &&\n\t\t\t\t fields[2][1].getPlayer() == player &&\n\t\t\t\t fields[2][2].getPlayer() == player)\n\t\t\t\t||\n\t\t\t\t(fields[0][0].getPlayer() == player &&\n\t\t\t\t fields[1][1].getPlayer() == player &&\n\t\t\t\t fields[2][2].getPlayer() == player)\n\t\t\t\t||\n\t\t\t\t(fields[0][0].getPlayer() == player &&\n\t\t\t\t fields[1][1].getPlayer() == player &&\n\t\t\t\t fields[2][2].getPlayer() == player)\n\t\t\t\t||\n\t\t\t\t(fields[2][0].getPlayer() == player &&\n\t\t\t\t fields[1][1].getPlayer() == player &&\n\t\t\t\t fields[0][2].getPlayer() == player)\n\t\t\t\t\n\t\t) return true;\n\t\treturn false;\n\t}", "private boolean checkMatch(String first, String second, String third)\n {\n // First makes sure the given inputs aren't empty\n if (!first.isEmpty())\n {\n // Set the winner to be the current player\n return first.equals(second) && first.equals(third);\n }\n /*\n * If one or more of them are empty, set he current winner to -1 and\n * return false\n */\n return false;\n }", "@Test\n public void equalsFalseOtherObject() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n String player2 = \"abcd\";\n assertFalse(player1.equals(player2));\n }", "public boolean isPlayerInThisGame(Player player) {\n return player.equals(getRedPlayer()) || player.equals(getWhitePlayer());\n }", "@Override\n public boolean equals(Object o) {\n if (o instanceof GameLobby) {\n GameLobby other = (GameLobby) o;\n return this.getGameID() == other.getGameID();\n } else {\n return false;\n }\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Puntori)) {\n return false;\n }\n Puntori other = (Puntori) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return id.getText().equals(card.id.getText())\n && person.equals(card.person);\n }", "public boolean checkIfPlayerInList(Player player, Player player1) {\n for(int i = 0; i < core.getPlayers().get(player).size(); i++) {\n /*\n if(core.getPlayers().get(player).contains(configList.get(i))) {\n core.getPlayers().get(player).add(configList.get(i));\n }\n */\n if (core.getPlayers().get(player).get(i).equalsIgnoreCase(player1.getName())) {\n return true;\n }\n }\n return false;\n }", "private int containsInOldList(ID id) {\n\t\tfor (Player player : playerList)\n\t\t\tif (player.getPlayerID().compareTo(id) == 0)\n\t\t\t\treturn playerList.indexOf(player);\n\t\treturn -1;\n\t}", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof UTS)) {\n return false;\n }\n UTS other = (UTS) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public boolean isGameOver() {\r\n for (String player : this.playerIds) {\r\n\r\n //If player has an empty card\r\n if(hasEmptyHand(player)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Match)) {\n return false;\n }\n return id != null && id.equals(((Match) o).id);\n }", "private static boolean isNotConnected(ProxiedPlayer player, ServerInfo server) {\n for (ProxiedPlayer serverPlayer : server.getPlayers()) {\n if (player.getUniqueId().equals(serverPlayer.getUniqueId())) {\n return false;\n }\n }\n\n return true;\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof PrivateCardData)) {\n return false;\n }\n return id != null && id.equals(((PrivateCardData) o).id);\n }", "public boolean areOnSameTeam(UUID s1, UUID s2) {\n\t\tTeam team = plugin.getTeamManager().getPlayerTeam(s1);\n\t\tTeam warpeeTeam = plugin.getTeamManager().getPlayerTeam(s2);\n\n\t\tif (team == null || warpeeTeam == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (team != warpeeTeam)\n\t\t\treturn false;\n\n\t\tif (team == warpeeTeam)\n\t\t\treturn true;\n\t\treturn false;\n\n\t}", "@Test\n public void testGetMarkForPlayerNonExisting() {\n Player player = Player.builder().build();\n Map<Player, Character> players = new HashMap<>();\n players.put(player, 'O');\n Assertions.assertNull(GameUtil.getMarkForPlayerId(Game.builder().players(players).build(), \"X\"),\n \"Test non existing player in list.\");\n }", "@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }", "@Override\n public boolean gameOver() {\n return player1Wins() || player2Wins();\n }", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Thjerreza)) {\r\n return false;\r\n }\r\n Thjerreza other = (Thjerreza) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Puesto)) {\n return false;\n }\n Puesto other = (Puesto) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public boolean equals(Object o){\n Game comparedGame = (Game) o;\n\n //Comparing current player names\n if (!comparedGame.getCurrentPlayer().equals(this.getCurrentPlayer())) return false;\n\n //Comparing queued player order\n for (int i = 0; i<this.getPlayersList().size(); i++){\n if (!this.getPlayersList().get(i).equals(comparedGame.getPlayersList().get(i))) return false;\n }\n\n //Comparing all territories\n for(int i = 0; i<this.getGenericWorldMap().getAllTerritories().size(); i++){\n if (!this.getGenericWorldMap().getAllTerritories().get(i).equals(comparedGame.getGenericWorldMap().getAllTerritories().get(i)))return false;\n }\n\n return true;\n }", "@java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }", "private boolean checkIdentity(Order otherOrder) {\n\t\treturn getId() != otherOrder.getId();\n\t}", "public boolean isEqual(AutoPlaylist other) {\n return other == this || other != null\n && other.matchAllRules == this.matchAllRules\n && other.sortAscending == this.sortAscending\n && other.truncateAscending == this.truncateAscending\n && other.maximumEntries == this.maximumEntries\n && other.playlistName.equals(this.playlistName);\n }", "public boolean isOwner(EntityPlayer player) {\n\t\treturn player.getDisplayName().equals(owner) /*|| Platform.worldType() != Platform.WorldMode.MP*/;\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Local)) {\n return false;\n }\n Local other = (Local) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public boolean checkPlays(Player player){\n return true;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj == null) \n\t\t\treturn false;\n\t\t\n\t\tif (!(obj instanceof Player))\n\t\t\treturn false;\n\t\t\n\t\tPlayer other = (Player) obj;\n\t\t\n\t\treturn this.getName().equals(other.getName());\n\t}", "final int getShareOfOne() { return getPlayerId() == 0 ? 1 : 0; }", "private boolean isOver() {\n for (Player player : players) {\n if (player.getHand().length == 0) {\n System.out.println(\"Player '\" + player.getName() + \"' won!\");\n winner = player.getID();\n return true;\n }\n }\n\n return false;\n }", "public void checkPlayerCollisions() {\n\t\t//Iterate over the players\n\t\tfor (PlayerFish player : getPlayers()) {\n\t\t\t//Get collidables parallel.\n\t\t\tcollidables.parallelStream()\n\t\t\t\n\t\t\t//We only want the collidables we actually collide with\n\t\t\t.filter(collidable -> player != collidable && player.doesCollides(collidable))\n\t\t\t\n\t\t\t//We want to do the for each sequentially, otherwise we get parallelism issues\n\t\t\t.sequential()\n\t\t\t\n\t\t\t//Iterate over the elements\n\t\t\t.forEach(collidable -> {\n\t\t\t\tplayer.onCollide(collidable);\n\t\t\t\tcollidable.onCollide(player);\n\t\t\t});\n\t\t}\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof PositionInTimeEntity)) {\n return false;\n }\n PositionInTimeEntity other = (PositionInTimeEntity) object;\n return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));\n }" ]
[ "0.69545096", "0.69545096", "0.6625724", "0.64623964", "0.6393666", "0.6284673", "0.62750363", "0.62677765", "0.61950034", "0.61724436", "0.60798573", "0.60389245", "0.59864604", "0.5978716", "0.59756285", "0.5935615", "0.5920966", "0.5861931", "0.5831973", "0.58213437", "0.58213437", "0.5790803", "0.5789034", "0.57842094", "0.57625544", "0.574819", "0.5744335", "0.5712982", "0.57014763", "0.56879634", "0.56879634", "0.56879634", "0.56772846", "0.5664984", "0.5631904", "0.5626851", "0.56157285", "0.56078947", "0.5603329", "0.55861837", "0.5585629", "0.5553692", "0.5547479", "0.5543539", "0.553747", "0.55302405", "0.55256665", "0.552252", "0.551949", "0.5514773", "0.55007595", "0.5484854", "0.5475864", "0.54751104", "0.54643935", "0.54622567", "0.5454475", "0.5451725", "0.5446556", "0.54425484", "0.5440255", "0.5436243", "0.5418507", "0.541744", "0.54124874", "0.54123694", "0.54107195", "0.54080003", "0.54074305", "0.5404762", "0.54004973", "0.53876305", "0.5381857", "0.5380104", "0.536701", "0.5363059", "0.53587735", "0.5356242", "0.5353082", "0.5352885", "0.5352697", "0.53501326", "0.5348725", "0.5337542", "0.5332166", "0.53314376", "0.5330968", "0.53309274", "0.5315475", "0.5315046", "0.5308824", "0.5306413", "0.52941614", "0.52854586", "0.5282903", "0.52806926", "0.5271572", "0.5268948", "0.52578443", "0.52549034" ]
0.63820446
5
Java impl of old C++ approach: //github.com/codelucas/puzzles/blob/master/java_interview/StringNumAdd.java
static String addStringInteger(String s1, String s2) { //return String.valueOf(Integer.parseInt(s1) + Integer.parseInt(s2)); return String.valueOf(Integer.valueOf(s1) + Integer.valueOf(s2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testPlus() {\r\n\t\tString ans;\r\n\t\tString expected = \"115590435626074\";\r\n\t\tNumberStrings tester = new NumberStrings();\r\n\t\tString number1 = \"115555222112553\";\r\n\t\tString number2 = \"35213513521\";\r\n\t\tans = tester.plus(number1, number2);\r\n\t\tAssert.assertEquals(expected, ans);\r\n\t}", "public String addStrings(String num1, String num2) {\n int prev = 0, i = num1.length() - 1, j = num2.length() - 1;\n StringBuilder res = new StringBuilder();\n\n while (i >= 0 || j >= 0) {\n int cur = prev;\n if (i >= 0) cur += num1.charAt(i--) - '0';\n if (j >= 0) cur += num2.charAt(j--) - '0';\n prev = cur / 10;\n cur %= 10;\n res.append(cur);\n }\n if (prev != 0) res.append(prev);\n return res.reverse().toString();\n }", "public static String addStrings(String num1, String num2) {\n\t\tif (num1 == null || num1.length() == 0 || num2 == null || num2.length() == 0) return null;\n char[] c1 = num1.toCharArray();\n char[] c2 = num2.toCharArray();\n int n1 = c1.length;\n int n2 = c2.length;\n \n StringBuilder sb = new StringBuilder();\n int i, j;\n int add = 0;\n for (i = n1 - 1, j = n2 - 1; i >= 0 && j >= 0; i--, j--) {\n \tint sum = (c1[i] - '0') + (c2[j] - '0') + add;\n \tsb.append(sum % 10);\n \tadd = sum / 10;\n }\n if (j > 0) {\n \tc1 = c2;\n }\n for (i = Math.max(i, j); i >= 0; i--) {\n \t\tint v = c1[i] - '0' + add;\n \t\tsb.append(v % 10);\n \t\tadd = v / 10;\n \t}\n \tif (add > 0) {\n \t sb.append(add);\n \t}\n \t\n \treturn sb.reverse().toString();\n }", "public static String add(String num1, String num2) {\n\t\t// *** WRITE YOUR CODE HERE ***\n\t}", "public static String add(String num1,String num2)\n\t{\n\t\t\n\t\tString num3=\"\";\n\t\tint res, carry=0;\n\t\t\n\t\t\n\t\t//appending zeros to num1 if length of num1 is less\n\t\tif(num1.length()<num2.length())\n\t\t{\n\t\t\tint n=num2.length()-num1.length();\n\t\t\twhile(n!=0)\n\t\t\t{\n\t\t\t\tnum1=\"0\"+num1;\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//appending zeros to num2 if length of num2 is less\n\t\telse if(num2.length()<num1.length())\n\t\t{\n\t\t\tint n=num1.length()-num2.length();\n\t\t\twhile(n!=0)\n\t\t\t{\n\t\t\t\tnum2=\"0\"+num2;\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//running the loop till strings are not null\n\t\twhile(num1.length()!=0)\n\t\t{\n\t\t\t\n\t\t\tchar c1=num1.charAt(num1.length()-1);\n\t\t\tchar c2=num2.charAt(num2.length()-1);\n\t\t\t\n\t\t\t//convert c1 and c2 into integer and then add\n\t\t\tres=Integer.parseInt(\"\"+c1)+ Integer.parseInt(\"\"+c2)+carry;\t\t\n\t\t\t\n\t\t\t//if we get a 2 digit number after addition then breaking the carry and storing the units part\n\t\t\tif(res/10!=0)\n\t\t\t{\n\t\t\t\tnum3=(res%10)+num3;\n\t\t\t\tcarry=res/10;\n\t\t\t}\n\t\t\t\n\t\t\telse\t\n\t\t\t{\n\t\t\t\tnum3=res+num3;\t\n\t\t\t\tcarry=0;\n\t\t\t}\n\t\t\n\t\t\t//truncating the last digit of num1 and num2\n\t\t\tnum1=num1.substring(0,num1.length()-1);\n\t\t\tnum2=num2.substring(0,num2.length()-1);\n\t\t}\n\t\t\n\t\tif(carry!=0)\n\t\tnum3=carry+num3;\n\t\t//System.out.println(\"num3= \"+num3);\n\t\treturn num3;\n\t}", "public static String addStrings(String nums1, String nums2) {\n int i = nums1.length() - 1;\n int j = nums2.length() - 1;\n StringBuilder sb = new StringBuilder();\n int carry = 0;\n\n while (i >= 0 || j >= 0) {\n int sum = carry;\n if (i >= 0) {\n sum += nums1.charAt(i--) - '0';\n }\n if (j >= 0) {\n sum += nums2.charAt(j--) - '0';\n }\n sb.append(sum % 10);\n carry = sum / 10;\n }\n if (carry != 0) {\n sb.append(carry);\n }\n return sb.reverse().toString();\n }", "public static void main(String[] args) {\r\n String s1 = \"123\";\r\n String s2 = \"30\";\r\n System.out.println(addStringInteger(s1, s2));\r\n }", "public static int addString(String s){\n\t\tint a = 0;\n\t\tfor (int i=0; i<s.length(); i++)\n\t\t\ta += (int)s.charAt(i);\n\t\treturn a;\n\t}", "public static String addToNumberString(String numberString, long addAmount) {\n if (numberString == null) {\n return null;\n }\n int origLength = numberString.length();\n long number = Long.parseLong(numberString);\n return padNumberString(Long.toString(number + addAmount), origLength);\n }", "public static void main(String[] args) {\n\t\tString num1 = \"123455\";\n\t\tString num2 = \"56789\";\n\t\tSystem.out.println(addStrings(num1, num2));\n\t}", "public static String Add_pandy(String a, String b)\n\t{\n\t\tString ans = \"\";\n\t\tif (a.length() != b.length())\n\t\t{\n\t\t\tint len1 = a.length();\n\t\t\tint len2 = b.length();\n\t\t\tint lenght_max = Math.max(len1, len2);\n\n\t\t\tfor (int i = 0; i < lenght_max - len1; i++)\n\t\t\t{\n\t\t\t\ta = \"0\" + a;\n\t\t\t}\n\t\t\tfor (int i = 0; i < lenght_max - len2; i++)\n\t\t\t{\n\t\t\t\tb = \"0\" + b;\n\t\t\t}\n\t\t}\n\n\t\tint carry = 0;\n\t\tint tem = 0;\n\t\tfor (int i = a.length() - 1; i >= 0; i--)\n\t\t{\n\t\t\ttem = Integer.parseInt(String.valueOf(a.charAt(i)))\n\t\t\t\t\t+ Integer.parseInt(String.valueOf(b.charAt(i))) + carry;\n\t\t\tif (tem >= 10)\n\t\t\t\tcarry = 1;\n\t\t\telse\n\t\t\t\tcarry = 0;\n\t\t\tans = String.valueOf(tem % 10) + ans;\n\t\t}\n\t\tif (carry == 1)\n\t\t\tans = String.valueOf(carry) + ans;\n\n\t\t// System.out.println(a);\n\t\t// System.out.println(b);\n\n\t\treturn ans;\n\t}", "public static String plusInt(String num1, String num2){\n\t\tString result =\"\";\n\t\tif(null != num1 && !\"\".equals(num1) && null != num2 && !\"\".equals(num2)){\n\t\t\tresult = String.valueOf((Integer.parseInt(num1)+Integer.parseInt(num2)));\n\t\t}\n\t\treturn result;\n\t}", "private static String wrapAdd(String lhsString, int rhs) {\n int lhs = Integer.parseInt(lhsString, 2);\n int result = lhs + rhs;\n String bitString = zeroPaddedBitString(result);\n return bitString.substring(BITS_IN_INTEGER - lhsString.length());\n }", "static int size_of_add(String passed){\n\t\treturn 1;\n\t}", "public int add(String s1, String s2) {\n int int1 = Integer.parseInt(s1);\r\n int int2 = Integer.parseInt(s2);\r\n return int1 + int2;\r\n }", "public StringNum add(StringNum n1, StringNum n2) {\n\t\tint emptyArr[];\n\t\ttry {\n\t\t\tString addends[] = {n1.getNumber(), n2.getNumber()};\n\t\t\tif(n1.getNumber().length() > n2.getNumber().length()) {\n\t\t\t\temptyArr = new int[n1.getNumber().length()];\n\t\t\t\tint j = 0;\n\t\t\t\tfor(int i = n1.getNumber().length()-1; i >= 0; i--) {\n\t\t\t\t\temptyArr[i] = getSumOfCol(addends, j);\n\t\t\t\t\tif(i < n1.getNumber().length()-1) {\n\t\t\t\t\t\temptyArr[i] += emptyArr[i+1]/10;\n\t\t\t\t\t\tString ans = Integer.toString(emptyArr[i+1]);\n\t\t\t\t\t\temptyArr[i+1] = Character.getNumericValue(ans.charAt(ans.length()-1));\n\t\t\t\t\t}\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(n2.getNumber().length() > n1.getNumber().length()) {\n\t\t\t\temptyArr = new int[n2.getNumber().length()];\n\t\t\t\tint j = 0;\n\t\t\t\tfor(int i = n2.getNumber().length()-1; i >= 0; i--) {\n\t\t\t\t\temptyArr[i] = getSumOfCol(addends, j);\n\t\t\t\t\tif(i < n2.getNumber().length()-1) {\n\t\t\t\t\t\temptyArr[i] += emptyArr[i+1]/10;\n\t\t\t\t\t\tString ans = Integer.toString(emptyArr[i+1]);\n\t\t\t\t\t\temptyArr[i+1] = Character.getNumericValue(ans.charAt(ans.length()-1));\n\t\t\t\t\t}\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\temptyArr = new int[n2.getNumber().length()+1];\n\t\t\t\tint j = 0;\n\t\t\t\tfor(int i = n2.getNumber().length()-1; i >= 0; i--) {\n\t\t\t\t\temptyArr[i+1] = getSumOfCol(addends, j);\n\t\t\t\t\tif(i < n2.getNumber().length()-1) {\n\t\t\t\t\t\temptyArr[i+1] += emptyArr[i+2]/10;\n\t\t\t\t\t\tString ans = Integer.toString(emptyArr[i+2]);\n\t\t\t\t\t\temptyArr[i+2] = Character.getNumericValue(ans.charAt(ans.length()-1));\n\t\t\t\t\t}\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NullPointerException e) {\n\t\t\treturn new StringNum();\n\t\t}\n\t\treturn stripLeadingZeros(new StringNum(emptyArr));\n\t}", "public int addNum(int a, int b){\n return a+b;\n }", "public String addBinary(String a, String b) {\n\t\tint alen = a.length();\n\t\tint blen = b.length();\n int rslen = alen;\n\t\tif(blen > rslen)\n\t\t\trslen = blen;\n\t\trslen++;\n\t\tint[] rs = new int[rslen];\n\t\tfor(int i = 0; i < rslen; i++){\n\t\t\trs[i] = 0;\n\t\t}\n\t\tint next = 0;\n\t\tString result;\n\t\tfor(int i = rslen-1; i >= 0; i--){\n\t\t\talen--;\n\t\t\tblen--;\n\t\t\tint ae = 0;\n\t\t\tint be = 0;\n\t\t\t\n\t\t\tif(alen >= 0)\n\t\t\t\tae = (a.charAt(alen) - '0');\n\t\t\t\n\t\t\tif(blen >= 0)\n\t\t\t\tbe = (b.charAt(blen) - '0');\n\t\t\t\n\t\t\tint curr = ae + be + next;\n\t\t\tif(curr >= 2){\n\t\t\t\tnext = 1;\n\t\t\t\tcurr = curr - 2;\n\t\t\t} else\n\t\t\t\tnext = 0;\n\t\t\trs[i] = curr;\n\t\t}\n\t\t\n\t\tStringBuilder st = new StringBuilder();\n\t\tfor(int i = 0; i < rslen; i++){\n\t\t\tst.append(rs[i]);\n\t\t}\n\t\tresult = st.toString();\n\t\tif(rs[0] == 0){\n\t\t\tresult = result.substring(1);\n\t\t}\n\t\t\n\t\treturn result;\n\t\t\n }", "private int Add ( int s, int a){\r\n if (Num10.contains(Card[a].substring(0, 1))) { //To make \"T\",\"J\",\"Q\",\"K\" represent value of 10.\r\n s += 10;\r\n }\r\n if (Card[a].substring(0, 1).equals(\"A\")) { //To make \"A\" represent value of 1.\r\n s += 1;\r\n }\r\n if (!(Num10.contains(Card[a].substring(0, 1))) && !(Card[a].substring(0, 1).equals(\"A\"))){\r\n s += Integer.parseInt(Card[a].substring(0, 1));\r\n }\r\n return s;\r\n }", "private static String addLeadingZeroToString(String numString) {\n\t\tif (Integer.parseInt(numString) < 10){\n\t\t\tnumString = \"0\" + numString;\n\t\t}\n\t\treturn numString;\n\t}", "public static int add(int...nums) { // String array + any primitive datatype\n\t\t// we will return the sum of all of the parameters passed:\n\t\tint sum=0;\n\t\t\n\t\tfor (int n : nums) {\n\t\t\t//sum = sum + n; this is the longer way of writing it out...\n\t\t\tsum += n;\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public int sumNumb(String str) {\n\t\tint sum = 0;\n\t\tString tempStr = \"\";\n\t\t//change to char array in order to iterate\n\t\tfor (char c:str.toCharArray()){\n\t\t\t//if it is a digit append to tempStr\n\t\t\tif(Character.isDigit(c)){\n\t\t\t\ttempStr += c;\n\t\t\t}\n\t\t\t//if it is a char, add the previously stored digites and empty the tempstr\n\t\t\telse{\n\t\t\t if(tempStr.length() >= 1){\n\t\t\t\t sum = sum + Integer.parseInt(tempStr);\n\t\t\t }\n\t\t\t\ttempStr = \"\";\n\t\t\t}\n\t\t}\n\t\t//add the number at the end of the string\n\t\tif(tempStr.length() >= 1){\n\t\t\tsum = sum + Integer.parseInt(tempStr);\n\t\t}\n\t\treturn sum;\n\t}", "public int addString(String v) {\n int addr = findString(v);\n if (addr < 0) {\n addr = maxIndex;\n maxIndex += (v.length() + 1);\n final Integer index = addr;\n str2addr.put(v, index);\n addr2str.put(index, v);\n }\n return addr;\n }", "public static int add(String numbers) {\n\t\t\n String[] numbersArray = numbers.split(\",\");\n \n //throw exception if more than two numbers are provided for addition \n if (numbersArray.length > 2) {\n throw new RuntimeException(\"upto two numbers are allowed seperated by comma\");\n } else {\n\t\t\tfor (String num : numbersArray) {\n\t\t\t\t\n\t\t//check if string is empty or not \n\t\t\t\tif (!num.isEmpty()) {\n\t\t\t\t\tInteger.parseInt(num);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n //return zero if the string is empty\n\t\treturn 0; \n\t}", "java.lang.String getNum2();", "public StringBuilder add(StringBuilder m, StringBuilder n)\n {\n \n int carryover=0 , sum=0;\n StringBuilder result=new StringBuilder();\n if(m.length()>=n.length())\n {\n n=align(n,m.length());\n }\n else{\n m=align(m,n.length());\n }\n \n String temp1=new String();\n String temp2=new String();\n for (int i=m.length()-1;i>=0;i--) {\n \n \n temp1=temp1+m.charAt(i);\n temp2=temp2+n.charAt(i);\n sum=Integer.parseInt(temp1)+Integer.parseInt(temp2)+carryover;\n //sum=(int) m.charAt(i)+(int)n.charAt(i)+carryover;\n if (sum>=10)\n {\n carryover=1;\n sum=sum-10;\n result.insert(0,sum);\n temp1=\"\";\n temp2=\"\";\n }\n else{\n carryover=0;\n result.insert(0,sum);\n temp1=\"\";\n temp2=\"\";\n } \n }\n if (carryover==1) {\n result.insert(0,carryover);\n }\n //int value=Integer.parseInt(result.toString());\n //result.delete(0,result.length());\n //result.append(value);\n //if (result.length()<m.length())\n // result=align(result,m);\n \n return result;\n \n }", "public static String addBinaryNumbers(String num1, String num2) {\r\n\t\tif (num1 == null || num2 == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tint index1 = num1.length() - 1;\r\n\t\tint index2 = num2.length() - 1;\r\n\t\tboolean carry = false;\r\n\t\tString result = \"\";\r\n\t\t\r\n\t\twhile(index1 >= 0 && index2 >= 0) {\r\n\t\t\tint sum = Integer.parseInt(num1.substring(index1, index1 + 1)) + Integer.parseInt(num2.substring(index2, index2 + 1));\r\n\t\t\tif (sum == 0) {\r\n\t\t\t\tif (carry) {\r\n\t\t\t\t\tresult += '1';\r\n\t\t\t\t\tcarry = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tresult += '0';\r\n\t\t\t} else if (sum == 1) {\r\n\t\t\t\tif (carry)\r\n\t\t\t\t\tresult += '0';\r\n\t\t\t\telse\r\n\t\t\t\t\tresult += '1';\r\n\t\t\t} else { // sum == 2\r\n\t\t\t\tif (carry)\r\n\t\t\t\t\tresult += '1';\r\n\t\t\t\telse {\r\n\t\t\t\t\tresult += '0';\r\n\t\t\t\t\tcarry = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex1--;\r\n\t\t\tindex2--;\r\n\t\t}\r\n\t\t\r\n\t\twhile(index1 >= 0) {\r\n\t\t\tif (num1.charAt(index1) == '0') {\r\n\t\t\t\tif (carry) {\r\n\t\t\t\t\tresult += '1';\r\n\t\t\t\t\tcarry = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tresult += '0';\r\n\t\t\t} else { // num1.charAt(index1) == '1'\r\n\t\t\t\tif (carry)\r\n\t\t\t\t\tresult += '0';\r\n\t\t\t\telse\r\n\t\t\t\t\tresult += '1';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex1--;\r\n\t\t}\r\n\t\t\r\n\t\twhile(index2 >= 0) {\r\n\t\t\tif (num2.charAt(index2) == '0') {\r\n\t\t\t\tif (carry) {\r\n\t\t\t\t\tresult += '1';\r\n\t\t\t\t\tcarry = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tresult += '0';\r\n\t\t\t} else { // num2.charAt(index2) == '1'\r\n\t\t\t\tif (carry)\r\n\t\t\t\t\tresult += '0';\r\n\t\t\t\telse\r\n\t\t\t\t\tresult += '1';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tindex2--;\r\n\t\t}\r\n\t\t\r\n\t\tif (carry)\r\n\t\t\tresult += '1';\r\n\t\t\r\n\t\t// reverse result string\r\n\t\tString reverseResult = \"\";\r\n\t\tfor (int i = result.length() - 1; i >= 0; i--)\r\n\t\t\treverseResult += result.charAt(i);\r\n\t\t\r\n\t\treturn reverseResult;\r\n\t}", "@Test\n\tpublic void test_StringCalculator_WhenNumberMoreThanThousantUsed_Then_ReturnTheOtherNumber() {\n\t\tAssert.assertEquals(2 ,calc.Add(\"1002,2\"));\n\t}", "public static void main(String[] args) {\n int num1 = 10;\n int num2 = 20;\n String word = \"Hello\";\n int num3 = num1 + num2;\n String wordNum = word + num1;\n System.out.println(num3 + \"\" + wordNum);\n }", "public String addBinary(String a, String b) {\n StringBuilder result = new StringBuilder();\n int carr = 0;\n for (int i = a.length() - 1, j = b.length() - 1; i >= 0 || j >= 0; i--, j--) {\n int ai = i >= 0 ? a.charAt(i) - '0' : 0;\n int bi = j >= 0 ? b.charAt(j) - '0' : 0;\n int sum = carr + ai + bi;\n result.append(sum & 1);\n carr = (sum >>> 1) & 1;\n }\n result.append(carr > 0 ? carr : \"\");\n return result.reverse().toString();\n }", "public static String addBinary(String a, String b) {\r\n\r\n \r\n \tlong a1=0,b1=0;\r\n \tString s2 = \"\";\r\n \tfor(int i =a.length()-1, j=0 ; (a.length()-j)!=0;i--,j++) {\r\n \t\tint d = a.charAt(i);\r\n \t\tif(d==48)\r\n \t\t\td = 0;\r\n \t\telse\r\n \t\t\td = 50-d;\r\n \t\r\n \t\ta1 = (long) (a1+d*(Math.pow(2, j)));\r\n \t\t\r\n \t}\r\n \tfor(int i =b.length()-1, j=0 ; (b.length()-j)!=0;i--,j++) {\r\n \t\tint d = b.charAt(i);\r\n \t\tif(d==48)\r\n \t\t\td=0;\r\n \t\telse\r\n \t\t\td=50-d;\r\n \t\tb1 = (long) (b1+d*(Math.pow(2, j)));\r\n \t\t\r\n \t}\r\n \tSystem.out.println(a1+\" \"+b1);\r\n \tlong ans1 = a1+b1;\r\n \tif(ans1 == 0)\r\n \t\ts2 = \"0\";\r\n \telse\r\n \twhile(ans1>0) {\r\n \t\tlong rem = ans1%2;\r\n \t\ts2 = rem+s2;\r\n \t\tans1=ans1/2;\r\n \t}\r\n \t\r\n return s2;\r\n }", "@Test\n\tpublic void test_StringCalculator_WhenMultipleDigitsUsed_ThenReturmSum() {\n\t\tAssert.assertEquals(10, calc.Add(\"1,2,3,2,2\"));\n\t}", "public BigNum( String s)\r\n { \r\n int i = 0;\r\n myArray = new int[SIZE];\r\n for ( int j = s.length()-1; j >= 0 ; j--)\r\n {\r\n \r\n myArray[i] = s.charAt(j)- '0';\r\n i++;\r\n }\r\n }", "public static int add(String numbers) throws IllegalArgumentException {\t\t\n\t\tint sum = 0; //resultado da soma;\n\t\tboolean negatives = false; //verifica se existem negativos;\n\t\tString ExceptMessage = \"negativos proibidos [\", //mensagem de erro quando negativo eh lido;\n\t\t\t RegEx = \"\"; //caracteres a serem considerados delimitadores;\n\t\t\n\t\tif(numbers.length() > 0) {\n\t\t \ti = 1; dl = false;\n\t\t\tRegEx = delimiters(numbers); //leitura dos novos delimitadores, se existirem;\n\t\t\t\n\t\t\t//remocao do inicio de numbers, caso hajam definicoes de novos delimitadores;\n\t\t\tif(dl) numbers = numbers.substring(i, numbers.length()); \n\t\t}\n\t\t\t\t\t\t\n\t\tString[] splt = numbers.split(\",|\\\\n|\\\\s\" + RegEx); //quebra de numbers nos delimitadores;\n\t\t\n\t//tratamento dos caracteres restantes apos remocao dos delimitadores; - - - - - - - - - - - - - - -\n\t\ttry {\n\t\t\tfor(String w:splt) {\n\t\t\t\tif(w.length() == 0) //string vazia, desconsiderar;\n\t\t\t\t\tcontinue;\n\n\t\t\t\telse if(Integer.parseInt(w) < 0) { //numero negativo, joga excecao + mensagem de erro;\n\t\t\t\t\tif(negatives)\n\t\t\t\t\t\tExceptMessage += \" \"; //realiza espaçamento correto na mensagem de erro;\n\n\t\t\t\t\tExceptMessage += w;\n\t\t\t\t\tnegatives = true;\n\t\t\t\t\t\n\t\t\t\t\tcontinue; //impede processamento do numero negativo na soma;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint par = Integer.parseInt(w); //converte a string em numero;\n\t\t\t\t\n\t\t\t\tif(par > 1000) //desconsidera numeros maiores que 1000;\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tsum += par; //se tudo der certo, atualiza a soma;\n\t\t\t}\n\t\t}\n\t\tcatch (NumberFormatException e) { throw new IllegalArgumentException(); }\n\t//fim do tratamento dos caracteres; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\t\t\n\t\tif(negatives) { //se houverem numeros negativos, joga excecao apos registrar os negativos na entrada;\n\t\t\tExceptMessage += \"]\\n\";\n\t\t\tthrow new IllegalArgumentException(ExceptMessage);\n\t\t}\n\t\t\n\t\treturn sum; //se der tudo certo, retorna a soma dos numeros em numbers;\n\t}", "public static String addBinary(String a, String b){\n\t\tint size_a = a.length(), size_b = b.length();\n\t\tint i = size_a-1, j = size_b-1, carryon = 0;\n\t\tint aa, bb;\n\t\tString result = \"\";\n\t\twhile(i > -1 || j > -1 || carryon != 0){\n\t\t\taa = (i > -1) ? Integer.parseInt(a.substring(i,i+1)) : 0;\n\t\t\tbb = (j > -1) ? Integer.parseInt(b.substring(j,j+1)) : 0;\n\t\t\tresult = (aa+bb+carryon)%2 + result;\n\t\t\tcarryon = (aa+bb+carryon)/2;\n\t\t\ti--;\n\t\t\tj--;\n\t\t}\n\t\treturn result;\n\t}", "public static ArthurString add(ArthurString one, ArthurNumber two) {\n String t = \"\" + two.val;\n return add(one, new ArthurString(t));\n }", "public void add(String str);", "public void add(String str);", "public String multiply(String num1, String num2) \n\t{\n if(num1 == null || num1.length() == 0) return num2;\n if(num2 == null || num2.length() == 0) return num1;\n if(num1.equals(\"0\") || num2.equals(\"0\")) return \"0\";\n \n int num2Ind = num2.length()-1;\n \n String result = \"0\";\n while(num2Ind >= 0)\n {\n String multiplied = multiplyDigit(num1, num2.charAt(num2Ind), num2.length()-num2Ind);\n --num2Ind;\n result = add(result, multiplied);\n }\n return result;\n }", "public static int numeralSum(String s) {\n\t\tString[] numbs = s.split(\"\");\n\t\t//ArrayList<Integer> ints = new ArrayList<Integer>();\n\t\tint ints = 0;\n\t\tfor (int i = 0; i < numbs.length; i++) {\n\t\t\ttry {\n\t\t\t\tints = ints + Integer.parseInt(numbs[i]);\n\t\t\t\t\n\t\t\t}catch(Exception e) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn ints;\n\t}", "public String addBinString(String s1, String s2) {\r\n // not invalid input, only 0 and 1, no leading 0, \r\n // first char is the most significant\r\n // no perf requirement\r\n // formal api requirement ( documentations, comments, meaningful names), or focus on correctness of the implementation first.\r\n if(s1==null || s1.length() ==0)\r\n return s2;\r\n if(s2==null || s2.length() ==0)\r\n return s1;\r\n \r\n StringBuffer buf1 = new StringBuffer(s1);\r\n StringBuffer buf2 = new StringBuffer(s2);\r\n if(s1.length()<s2.length()) {\r\n StringBuffer tmp = buf1;\r\n buf1 = buf2;\r\n buf2 = tmp;\r\n }\r\n \r\n buf1.reverse();\r\n buf2.reverse();\r\n StringBuffer res = new StringBuffer(); \r\n int carry = 0;\r\n for(int i=0;i< buf1.length();i++) {\r\n char c1 = buf1.charAt(i);\r\n char c2 = '0';\r\n if(i<buf2.length())\r\n c2 = buf2.charAt(i);\r\n int sum = (c1 -'0') + (c2 -'0') + carry;\r\n if(sum%2 ==1)\r\n res.append('1');\r\n else\r\n res.append('0');\r\n carry = sum / 2;\r\n }\r\n if(carry ==1)\r\n res.append(\"1\");\r\n return res.reverse().toString();\r\n\r\n }", "java.lang.String getNum1();", "static int type_of_add(String passed){\n\t\tif(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 1;\n\t\telse if(passed.charAt(4)=='M')\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}", "public String addBinary(String a, String b) {\n StringBuilder ans = new StringBuilder();\n int carry = 0, tempRes = 0;\n int indexA = a.length() - 1, indexB = b.length() - 1;\n while (indexA >= 0 || indexB >= 0) {\n int digitA = 0, digitB = 0;\n if (indexA >= 0) digitA = a.charAt(indexA) - '0';\n if (indexB >= 0) digitB = b.charAt(indexB) - '0';\n tempRes = digitA + digitB + carry;\n carry = tempRes / 2;\n char ch = (char) (tempRes % 2 + '0');\n ans.insert(0, ch);\n indexA--;\n indexB--;\n }\n if (carry > 0) {\n char ch = (char) (carry + '0');\n ans.insert(0, ch);\n }\n return ans.toString();\n }", "public static void main(String[] args) {\n\n\t\tSolution_415 sl = new Solution_415();\n\t\tSystem.out.println(sl.addStrings2(\"0\", \"0\"));\n\n\t\t\n\t}", "int mo23349e(String str, String str2);", "private void add(String thestring) {\n\t\t\n\t}", "void mo64942a(String str, long j, long j2);", "public static Value makeAnyStrNumeric() {\n return theStrNumeric;\n }", "public String digit(String digit);", "void mo9058ad(String str, int i);", "public static int Add(String numbers){\r\n \r\n int sum = 0;\r\n String negString = \"\";\r\n boolean negFlag = false;\r\n boolean commaFlag = false;\r\n \r\n String numberComponent[];\r\n String delimiterString;\r\n String delimiters[];\r\n String delimiterRegEx = \"\";\r\n \r\n System.out.println(\"Working string:\\n\"+numbers);\r\n //separate delimiter and number strings\r\n String newlineSplit[] = numbers.split(\"\\n\");\r\n \r\n if(numbers == null || numbers.isEmpty()){ //check for empty or null input\r\n System.out.println(\"String is empty or null\\n\");\r\n return 0;\r\n }\r\n else if(newlineSplit[0].charAt(0) != '/' || newlineSplit[0].charAt(1) != '/') { //check if string begins with '//'\r\n \tSystem.out.println(\"String is invalid\\n\");\r\n \treturn 0;\r\n }\r\n else { //get here if string has content and begins with '//'\r\n \t//take delimiter string of first split and ignore '//'\r\n \tdelimiterString = newlineSplit[0].substring(2);\r\n \t\r\n \t//check if ',' is one of the delimiters (do this since comma is also delimiter in delimiter string\r\n \tif(delimiterString.contains(\",,\") || delimiterString.equals(\",\")) {\r\n \t\tcommaFlag = true;\r\n \t}\r\n \t\r\n \tdelimiters = delimiterString.split(\",\");\r\n \t\r\n \t//add comma as delimiter if it existed (split erases comma if used as delimiter previously)\r\n \tif(commaFlag == true) {\r\n \t\tdelimiterRegEx += \"\\\\,\";\r\n \t\t\tcommaFlag = false;\r\n \t\t}\r\n \t\r\n \t//for each delimiter found\r\n \tfor(String temp:delimiters) {\r\n \t\t//escape all characters\r\n \t\ttemp = temp.replace(\"\"+temp.charAt(0), \"\\\\\"+temp.charAt(0));\r\n \t\t//continuously add to new regex (separate with OR for multiple delimiters)\r\n \t\tif(delimiterRegEx.length() == 0) {\r\n \t\t\tdelimiterRegEx += temp;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tdelimiterRegEx += \"|\"+temp;\r\n \t\t}\r\n \t}\r\n }\r\n \r\n System.out.println(\"Start of calculation...\");\r\n //split using regex generated, get every number as string\r\n numberComponent = newlineSplit[1].split(delimiterRegEx);\r\n \r\n for (String tempVal: numberComponent){\r\n \tif(Integer.valueOf(tempVal) < 0) { //raise error and record number if negative\r\n \t\tif(negString.length() == 0) {\r\n \t\t\tSystem.out.println(\"Negatives not allowed\");\r\n \t\t\tnegFlag = true;\r\n \t\t\tnegString += tempVal;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tnegString += \",\"+tempVal;\r\n \t\t}\r\n \t\tcontinue;\r\n \t}\r\n \telse if(Integer.valueOf(tempVal) > 1000) { //raise message and ignore if number is >1000\r\n \t\tSystem.out.println(\"Large number found and ignored\");\r\n \t\tcontinue;\r\n \t}\r\n \telse { //if passes all checks, add to sum\r\n \t\tsum += Integer.valueOf(tempVal);\r\n \t}\r\n \r\n }\r\n \r\n //display end message, depending if negatives were found or not\r\n if(negFlag == true) {\r\n \tSystem.out.println(\"Negative number(s) found: \"+negString+\"\\n\");\r\n }\r\n else {\r\n \tSystem.out.println(\"Sum is \"+sum);\r\n \tSystem.out.println(\"End of calculation!\\n\");\r\n }\r\n return 0;\r\n }", "private void addTwoNumbers() {\n\t\t\n\t}", "public native int add(int a,int b);", "@Test\n\tpublic void test_StringCalculator_WhenTwoDigitsNumbersUsed_Then_ReturnValidSum() {\n\t\tAssert.assertEquals(24,calc.Add(\"12,12\"));\n\t}", "private int additionWithoutCarrying(int param1, int param2) {\n String num1 = String.valueOf(param1);\n String num2 = String.valueOf(param2);\n int tamanioNum1 = num1.length();\n int tamanioNum2 = num2.length();\n\n //2. build a formatter in order to pad with zeroes in the left\n String formatter = \"%0\" + Math.max(tamanioNum1, tamanioNum2) + \"d\";\n num2 = String.format(formatter, param2);\n num1 = String.format(formatter, param1);\n\n //3. construct a StringBuilder which saves the result as a string. Also, a simple integer to perform the\n // real arithmetic sum.\n StringBuilder resultBadSum = new StringBuilder();\n int digitSum;\n\n //4. for each String position I sum up the digits and ask if it's greater than 10 (more than 1 digit); if so,\n //I save only the right-most digit.\n for (int i = 0; i < Math.max(tamanioNum1, tamanioNum2); i++) {\n digitSum = Integer.parseInt(String.valueOf(num1.charAt(i)))\n + Integer.parseInt(String.valueOf(num2.charAt(i)));\n if (digitSum < 10) {\n resultBadSum.append(digitSum);\n } else {\n resultBadSum.append(digitSum % 10); //% 10 preserves only the last digit.\n }\n }\n\n return Integer.parseInt(resultBadSum.toString());\n }", "int mo23351i(String str, String str2);", "private String doAddition(String answer)\n\t{\n\t\tint signSpot;\n\t\tString stringToDelete;\n\t\tdouble number1;\n\t\tdouble number2;\n\t\tint minValue = 0;\n\t\tint maxValue = 0;\n\n\t\twhile (answer.contains(\"+\"))\n\t\t{\n\t\t\tsignSpot = answer.indexOf(\"+\");\n\n\t\t\t// start\n\t\t\tfor (int count = signSpot - 1; count >= 0; count -= 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count, count + 1)) == true\n\t\t\t\t\t\t|| answer.substring(count, count + 1).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tminValue = count;\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\t\t\t// finish\n\t\t\tfor (int count = signSpot + 2; count <= answer.length(); count += 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count - 1, count)) == true\n\t\t\t\t\t\t|| answer.substring(count - 1, count).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tmaxValue = count;\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\tstringToDelete = answer.substring(minValue, maxValue);\n\t\t\tString myString = answer.substring(minValue, signSpot);\n\t\t\tnumber1 = Double.parseDouble(myString);\n\t\t\tmyString = answer.substring(signSpot + 1, maxValue);\n\t\t\tnumber2 = Double.parseDouble(myString);\n\t\t\tDouble numberAnswer1 = number1 + number2;\n\t\t\tanswer = answer.replace(stringToDelete, \"\" + numberAnswer1);\n\t\t\tSystem.out.println(answer);\n\t\t}\n\t\treturn answer;\n\t}", "@Test\n\tpublic void test_StringCalculator_WhenOneNumberIsGiven_Then_ReturnSameNumber() {\n\t\tAssert.assertEquals(1,calc.Add(\"1\"));\n\t}", "static void separateNumbers(String s) {\n \tlong flag = 0;\n \tif(s.charAt(0) == '0') {\n \t\tflag = -1;\n \t}\n\t\tif (flag == 0) {\n\t\t\tfor (int length = 1; length * 2 <= s.length(); length++) {\n\t\t\t\tlong firstNumber = Long.parseLong(s.substring(0, length));\n\n\t\t\t\tStringBuilder sequence = new StringBuilder();\n\t\t\t\tlong number = firstNumber;\n\t\t\t\twhile (sequence.length() < s.length()) {\n\t\t\t\t\tsequence.append(number);\n\t\t\t\t\tnumber++;\n\t\t\t\t}\n\t\t\t\tif (sequence.toString().equals(s)) {\n\t\t\t\t\tflag = firstNumber;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \tif(flag <= 0 ) {\n \t\tSystem.out.println(\"NO\");\n \t}\n \telse {\n \t\tSystem.out.println(\"YES \"+flag);\n \t}\n \t\n }", "int mo5867a(String str, long j);", "private long getNumber(String num, int l, int r) {\n if (num.charAt(l) == '0' && r > l)\n return -1;\n int i = l;\n long sum = 0;\n while (i <= r) {\n sum = sum * 10 + num.charAt(i) - '0';\n i++;\n }\n return sum;\n }", "private int getNumberFromString(String text){\n\t\t\n\t\tint result = 0;\n\t\t\n\t\tfor(int i=text.length() - 1, j=0; i >= 0 ; i--, j++){\n\t\t\t\n\t\t\tresult += (Character.getNumericValue(text.charAt(i))) * Math.pow(10, j);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private native int nativeAdd(int x, int y);", "java.lang.String getNumber();", "java.lang.String getNumber();", "java.lang.String getNumber();", "void mo5875b(String str, long j);", "public static String addBinary(String a, String b) {\n \tint m = a.length();\n \tint n = b.length();\n \tint l = (m-n) > 0 ? m:n;\n \tint[] sum = new int[l+1];\n \tfor (int i=0;i<l;i++){\n \t\tint a_value = (i < m) ? a.charAt(m -1 - i) - '0': 0;\n \t\tint b_value = (i < n) ? b.charAt(n -1 - i) - '0': 0;\n \t\tint tmp = a_value + b_value;\n \t\tsum[l - i - 1] = (sum[l - i] + tmp)/2;\n \t\tsum[l - i] = (sum[l - i] + tmp )% 2;\n \t}\n \t\n \tString result = Arrays.toString(sum);\n \tStringBuilder sb = new StringBuilder();\n \tfor (int i=0;i<sum.length;i++){\n \t\tif (i==0 && sum[i] == 0) continue;\n \t\tsb.append(sum[i]);\n \t}\n\n \tSystem.out.println(\"result is \" + result);\n \tSystem.out.println(\"result is in String \" + sb);\n\n \t\n \treturn sb.toString();\n \n }", "public String multiply(String s1, String s2) {\n assert s1 != null;\n assert s2 != null;\n int len1 = s1.length(), len2 = s2.length();\n int[] digits = new int[len1 + len2];\n //compute the products of every digit pair\n for (int i = 0; i < len1; i++) {\n for (int j = 0; j < len2; j++) {\n int d1 = s1.charAt(i) - '0';\n int d2 = s2.charAt(j) - '0';\n digits[i+j+1] += d1 * d2;\n }\n }\n StringBuilder sb = new StringBuilder();\n int carry = 0;\n //carry every digit over\n for (int p = len1+len2-1; p >= 0 ; p--) {\n int num = carry + digits[p];\n int stay = num % 10;\n carry = num / 10;\n digits[p] = stay;\n }\n //trim the leading zeros\n int begin = 0;\n while (begin < len1+len2-1 && digits[begin] == 0) {\n begin++;\n }\n for (int i = begin; i < len1+len2; i++) {\n sb.append(digits[i]);\n }\n return sb.toString();\n }", "public String multiply(String num1, String num2) {\n\t\tif (num1 == null || num1.length() == 0 || num2 == null || num2.length() == 0) {\n\t\t\treturn null;\t// invalid input\n\t\t}\n\t\t\n\t\t// reverse the strings\n\t\tnum1 = new StringBuilder(num1).reverse().toString();\n\t\tnum2 = new StringBuilder(num2).reverse().toString();\n\t\tint n1 = num1.length(), n2 = num2.length();\n\t\t\n\t\t// calculate each digit (from ones place to tens, hundreds places...)\n\t\tint[] d = new int[n1 + n2];\n\t\tfor (int i = 0; i < n1; i++) {\n\t\t\tint d1 = num1.charAt(i) - '0';\n\t\t\tfor (int j = 0; j < n2; j++) {\n\t\t\t\tint d2 = num2.charAt(j) - '0';\n\t\t\t\td[i + j] += d1 * d2;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// deal with carry\n\t\tStringBuilder str = new StringBuilder();\n\t\tint carry = 0;\n\t\tfor (int i = 0; i < n1 + n2; i++) {\n\t\t\td[i] += carry;\n\t\t\tcarry = d[i] / 10;\n\t\t\tstr.append(d[i] % 10);\n\t\t}\n\t\t\n\t\t// trim starting zeros\n\t\tString result = str.reverse().toString();\n\t\tint start = 0;\n\t\twhile (start < str.length()) {\n\t\t\tif (str.charAt(start) != '0') {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstart++;\n\t\t}\n\t\t\n\t\treturn start == str.length() ? \"0\" : result.substring(start);\n\t}", "static void perform_add(String passed){\n\t\tint type = type_of_add(passed);\n\t\tif(type==1)\n\t\t\tadd_with_reg(passed);\n\t\telse if(type==2)\n\t\t\tadd_with_mem(passed);\n\t}", "public static String addLeadingZeros(Number numeric,int nbLength)\n {\n Double theNumerDbl = toDoubleObj(numeric);\n Integer theNumerInt = theNumerDbl.intValue();\n String thePattern = \"%0\"+nbLength+\"d\";\n return String.format(thePattern, theNumerInt);\n }", "@Override\r\n\tpublic int addNo(int a, int b) {\n\t\treturn a+b;\r\n\t}", "public double addDec(String s3, String s4) {\n double doub3 = Double.parseDouble(s3);\r\n double doub4 = Double.parseDouble(s4);\r\n return doub3 + doub4;\r\n }", "private static Symbol number(String text, int base)\r\n\t{\r\n\t\tint linepos = line_;\r\n\t\tint charpos = char_;\r\n\t\tint colpos = col_;\r\n\t\tscan(text);\r\n\t\tToken token = new Token(fname, text, linepos, charpos, colpos);\r\n\t\ttoken.number = convertNumber(text, base);\r\n\t\treturn new Symbol(sym.NUMBER, linepos, colpos, token);\r\n\t}", "String d(String paramString, int paramInt)\r\n/* 613: */ {\r\n/* 614:609 */ int i1 = e(paramString, paramInt);\r\n/* 615:610 */ if (paramString.length() <= i1) {\r\n/* 616:611 */ return paramString;\r\n/* 617: */ }\r\n/* 618:614 */ String str1 = paramString.substring(0, i1);\r\n/* 619: */ \r\n/* 620:616 */ int i2 = paramString.charAt(i1);\r\n/* 621:617 */ int i3 = (i2 == 32) || (i2 == 10) ? 1 : 0;\r\n/* 622:618 */ String str2 = b(str1) + paramString.substring(i1 + (i3 != 0 ? 1 : 0));\r\n/* 623: */ \r\n/* 624:620 */ return str1 + \"\\n\" + d(str2, paramInt);\r\n/* 625: */ }", "private static long convertNumber(String text, int base)\r\n\t{\r\n\t\tlong result = 0;\r\n\t\ttext = text.toLowerCase();\r\n\t\tfor (int i = 2; i < text.length(); i++)\r\n\t\t{\r\n\t\t\tint d;\r\n\t\t\tchar c = text.charAt(i);\r\n\t\t\tif (c > '9')\r\n\t\t\t\td = (int) (c - 'a') + 10;\r\n\t\t\telse\r\n\t\t\t\td = (int) (c - '0');\r\n\t\t\tresult = (result * base) + d;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "int mo23347d(String str, String str2);", "public static int numeralSum(String s) {\n \tint sum = 0;\n \tfor(int i = 0; i<s.length(); i++) {\n \t\tif(Character.isDigit(s.charAt(i))) {\n \t\t\tsum += Integer.parseInt(s.substring(i, i + 1));\n \t\t}\n \t}\n return sum;\n }", "void add(String value);", "public static long inetAton(String add) {\n long result = 0;\n // number between a dot\n long section = 0;\n // which digit in a number\n int times = 1;\n // which section\n int dots = 0;\n for (int i = add.length() - 1; i >= 0; --i) {\n if (add.charAt(i) == '.') {\n times = 1;\n section <<= dots * 8;\n result += section;\n section = 0;\n ++dots;\n } else {\n section += (add.charAt(i) - '0') * times;\n times *= 10;\n }\n }\n section <<= dots * 8;\n result += section;\n return result;\n }", "int mo23353w(String str, String str2);", "public int addDigits(int num) {\n\tif(num<10)\n\t return num;\n\telse if(num%9 ==0)\n\t return 9;\n\telse\n\t return num%9; \n}", "public static Value makeAnyStrOtherNum() {\n return theStrOtherNum;\n }", "void mo34677H(String str, int i, int i2);", "static Integer stringToInt(String s){\n int result = 0;\n for(int i = 0; i < s.length(); i++){\n //If the character is not a digit\n if(!Character.isDigit(s.charAt(i))){\n return null;\n }\n //Otherwise convert the digit to a number and add it to result\n result += (s.charAt(i) - '0') * Math.pow(10, s.length()-1-i);\n }\n return result;\n }", "public String multiply(String num1, String num2) {\n\t int[] result=new int[num1.length()+num2.length()];\n\t int[] temp1=new int[num1.length()];\n\t int[] temp2=new int[num2.length()];\n\t for(int i=0;i<temp1.length;i++) {\n\t \ttemp1[i]=num1.charAt(i)-'0';\n\t }\n\t for(int i=0;i<temp2.length;i++){\n\t \ttemp2[i]=num2.charAt(i)-'0';\n\t }\n\t \n\t for(int j=temp1.length-1;j>=0;j--) {\n\t \tfor(int k=temp2.length-1;k>=0;k--) {\n\t \t\t result[j+k+1]+=temp1[j]*temp2[k];\n\t \t}\n\t }\n\t int carry=0;\n\t for(int i=result.length-1;i>=0;i--) {\n\t \t int temp=(result[i]+carry)%10;\n\t \t carry=(result[i]+carry)/10;\n\t \t result[i]=temp;\n\t }\n\t StringBuilder b1=new StringBuilder();\n\t for(int num:result) b1.append(num);\n\t while (b1.length() != 0 && b1.charAt(0) == '0') b1.deleteCharAt(0);\n return b1.length() == 0 ? \"0\" : b1.toString();\n\t \n }", "public int numDecodings(String s) {\r\n\t\tif ((s==null)||(s.length()<1)||(s.charAt(0)=='0')){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint index = 0;\r\n\t\tMap<Integer,Integer> c = new HashMap<Integer,Integer>();\r\n\t\tc.put(index, 1);\r\n\t\tindex++;\r\n\t\twhile(index <s.length()) {\r\n\t\t\tint value = 0;\r\n\t\t\tchar pre = s.charAt(index-1);\r\n\t\t\tchar cur = s.charAt(index);\r\n\t\t\tint preprevalue = 0;\r\n\t\t\tif(index==1) {\r\n\t\t\t\tpreprevalue = 1;\r\n\t\t\t}else {\r\n\t\t\t\tpreprevalue = c.get(index- 2);\r\n\t\t\t}\r\n\t\t\tif (cur=='0') {\r\n\t\t\t\tif((pre!='1')&&(pre!='2')) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tvalue = preprevalue;\t\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\tif(((pre!='1')&&(pre!='2')) || ((cur-'0')>6)&& (pre!='1') ) {\r\n\t\t\t\t\tvalue = c.get(index-1);\t\r\n\t\t\t\t}else {\r\n\t\t\t\t\tvalue = c.get(index-1) + preprevalue;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tc.put(index, value);\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\treturn c.get(s.length()-1);\r\n\t}", "public int a(String paramString)\r\n/* 454: */ {\r\n/* 455:451 */ if (paramString == null) {\r\n/* 456:452 */ return 0;\r\n/* 457: */ }\r\n/* 458:454 */ int i1 = 0;\r\n/* 459:455 */ int i2 = 0;\r\n/* 460:457 */ for (int i3 = 0; i3 < paramString.length(); i3++)\r\n/* 461: */ {\r\n/* 462:458 */ char c1 = paramString.charAt(i3);\r\n/* 463: */ \r\n/* 464:460 */ int i4 = a(c1);\r\n/* 465:461 */ if ((i4 < 0) && (i3 < paramString.length() - 1))\r\n/* 466: */ {\r\n/* 467:462 */ c1 = paramString.charAt(++i3);\r\n/* 468:464 */ if ((c1 == 'l') || (c1 == 'L')) {\r\n/* 469:465 */ i2 = 1;\r\n/* 470:466 */ } else if ((c1 == 'r') || (c1 == 'R')) {\r\n/* 471:467 */ i2 = 0;\r\n/* 472: */ }\r\n/* 473:469 */ i4 = 0;\r\n/* 474: */ }\r\n/* 475:471 */ i1 += i4;\r\n/* 476:472 */ if ((i2 != 0) && (i4 > 0)) {\r\n/* 477:473 */ i1++;\r\n/* 478: */ }\r\n/* 479: */ }\r\n/* 480:477 */ return i1;\r\n/* 481: */ }", "private void convertToNum(String s)\n\t{\n\t\tchar charArray[] = s.toCharArray();\n\t\tmyMessage = new BigInteger[(int)Math.ceil(s.length()/(double)BLOCK_SIZE)];\n\t\tfor(int i = 0; i < myMessage.length; i++)\n\t\t{\n\t\t\tString chars = \"\";\n\t\t\tfor(int j = 0; j < BLOCK_SIZE; j++)\n\t\t\t{\n\t\t\t\tif(charArray.length > j+(i*BLOCK_SIZE))\n\t\t\t\t{\n\t\t\t\t\tchars += (int)charArray[j+(i*BLOCK_SIZE)];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tchars += \"256\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyMessage[i] = new BigInteger(chars);\n\t\t}\n\t}", "int mo54403a(String str, String str2);", "public static int numeralSum(String s) {\n\t\tint yeehaw=0;\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tif(Character.isDigit(s.charAt(i))==true) {\n\t\t\tyeehaw+=Character.getNumericValue(s.charAt(i));\n\t\t\t}\n\t\t\t}\n\t\treturn yeehaw;\n\t}", "private static int eatNumber (String s, int pos[]) {\r\n int sign = 1;\r\n int result = 0;\r\n int i = 0;\r\n if (s.charAt(pos[0])=='-') {\r\n pos[0]++;\r\n sign = -1;\r\n }\r\n for (; pos[0]<s.length(); i++) {\r\n char c=s.charAt(pos[0]);\r\n if (! Character.isDigit(c)) {\r\n break;\r\n }\r\n result = 10*result + (c-'0');\r\n pos[0]++;\r\n if (i==0 && result==0) return 0;\r\n }\r\n if (i==0) throw new RuntimeException();\r\n return result*sign;\r\n }", "public void putNum(final String key, final String value) {\n this.put(key, value == null ? \"\" : Formatter.number(value));\n }", "BaseNumber add(BaseNumber operand);", "int mo23352v(String str, String str2);", "@Override\n\tpublic int func1(String s) {\n\t\tfor(int i=s.length()-1; i>=0; i--) {\n\t\t\tif(s.charAt(i)>=48 && s.charAt(i)<=57) {\n\t\t\t\treturn Integer.parseInt(\"\"+s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "String getZero_or_more();", "java.lang.String getNumb();" ]
[ "0.72154814", "0.7074397", "0.68705314", "0.6685752", "0.6629722", "0.661236", "0.660113", "0.6441821", "0.6421569", "0.63319236", "0.62020475", "0.6132476", "0.60988957", "0.6097407", "0.60888857", "0.60026807", "0.5932669", "0.5908549", "0.59069496", "0.58901846", "0.5881149", "0.58787966", "0.5874793", "0.587035", "0.58571297", "0.5856168", "0.5828499", "0.5797658", "0.576459", "0.57212234", "0.57193655", "0.5706282", "0.57057583", "0.56976694", "0.5687544", "0.5676886", "0.5675058", "0.5675058", "0.5666971", "0.56262845", "0.5615252", "0.5604322", "0.5599531", "0.55980074", "0.55889577", "0.55682737", "0.55599236", "0.55579627", "0.55493635", "0.5547328", "0.5541027", "0.5527698", "0.5499456", "0.54969347", "0.54911625", "0.54875886", "0.5480772", "0.54762787", "0.5475575", "0.5463818", "0.54576814", "0.5454819", "0.54432094", "0.54257965", "0.54228944", "0.54228944", "0.54228944", "0.5413406", "0.54132324", "0.5410921", "0.5407538", "0.5404656", "0.5402748", "0.5402682", "0.54026425", "0.5394979", "0.53843373", "0.53841317", "0.5383226", "0.53727233", "0.5370019", "0.5364399", "0.5362006", "0.5360412", "0.53599757", "0.5356836", "0.53555477", "0.5336606", "0.5336108", "0.53297955", "0.5327196", "0.53222245", "0.5321522", "0.5320934", "0.5316281", "0.53132474", "0.5304452", "0.5296085", "0.5293289", "0.5290999" ]
0.6598018
7
Bonus SQL "interview question" Binary Tree Nodes to scare newbies/interviewees and still feel smart/academic (but don't be a silly copycat at least try test it yourself).
public static void main(String[] args) { String s1 = "123"; String s2 = "30"; System.out.println(addStringInteger(s1, s2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface BinNode<T> {\n\n /**\n * Returns the element in the node\n * @return the element in the node\n */\n public T getElement();\n \n /**\n * Changes the element of the node to the element provided\n * @param newvalue\n */\n public void setElement(T newvalue);\n \n /**\n * Returns the left child of the node\n * @return the left child\n */\n public BinNode<T> getLeft();\n \n /**\n * Returns the right child of the node\n * @return the right child\n */\n public BinNode<T> getRight();\n \n /**\n * Returns whether or not the node has any non-null children\n * @return whether the node is a leaf\n */\n public boolean isLeaf();\n \n}", "public static void main(String[] args) {\n// TreeNode node1 = new TreeNode(0);\n// TreeNode node2l = new TreeNode(3);\n// TreeNode node2r = new TreeNode(5);\n//// TreeNode node3l = new TreeNode(2);\n// TreeNode node3r = new TreeNode(2);\n//// TreeNode node4l = new TreeNode(4);\n// TreeNode node4r = new TreeNode(1);\n//\n// node1.left = node2l;\n// node1.right = node2r;\n//// node2l.left = node3l;\n// node2l.right = node3r;\n// node3r.right = node4r;\n//\n\n int[] nums = {3, 2, 1, 6, 0, 5};\n\n }", "@Test\n\tpublic void testInsert4() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\tT.insert(new Long(55), \"Fifty-Five\");\n\t\tT.insert(new Long(65), \"Sixty-Five\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(1, root.keys.size());\n\t\tassertEquals(60, (long) root.keys.get(0));\n\t\tassertEquals(2, root.children.size());\n\t\t\n\t\tInnerNode<Long,String> left = (InnerNode<Long,String>) root.children.get(0);\n\t\tInnerNode<Long,String> right = (InnerNode<Long,String>) root.children.get(1);\n\t\t\n\t\tassertEquals(30, (long) left.keys.get(0));\n\t\tassertEquals(50, (long) left.keys.get(1));\n\t\t\n\t\tassertEquals(70, (long) right.keys.get(0));\n\t\t\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) left.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) left.children.get(1);\n\t\t\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) left.children.get(2);\n\t\t\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) right.children.get(0);\n\t\tLeafNode<Long, String> child4 = (LeafNode<Long, String>) right.children.get(1);\n\t\t\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\t\t\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\t\t\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(55, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(60, (long) child3.children.get(0).key);\n\t\tassertEquals(65, (long) child3.children.get(1).key);\n\t\t\n\t\tassertEquals(70, (long) child4.children.get(0).key);\n\t\tassertEquals(80, (long) child4.children.get(1).key);\n\t\t\n\t}", "private static void test2() {\n BinaryTreeNode node1 = new BinaryTreeNode(1);\n BinaryTreeNode node2 = new BinaryTreeNode(2);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(4);\n BinaryTreeNode node5 = new BinaryTreeNode(5);\n BinaryTreeNode node6 = new BinaryTreeNode(6);\n BinaryTreeNode node7 = new BinaryTreeNode(7);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node5.left = node7;\n node3.right = node6;\n test(\"Test2\", node1, true);\n }", "public static void main(String[] args) {\n BinayTree root = new BinayTree();\n root.data = 8;\n root.left = new BinayTree();\n root.left.data = 6;\n root.left.left = new BinayTree();\n root.left.left.data = 5;\n root.left.right = new BinayTree();\n root.left.right.data = 7;\n root.right = new BinayTree();\n root.right.data = 10;\n root.right.left = new BinayTree();\n root.right.left.data = 9;\n root.right.right = new BinayTree();\n root.right.right.data = 11;\n printTree(root);\n System.out.println();\n mirror(root);\n printTree(root);\n // 1\n // /\n // 3\n // /\n // 5\n // /\n // 7\n // /\n // 9\n BinayTree root2 = new BinayTree();\n root2.data = 1;\n root2.left = new BinayTree();\n root2.left.data = 3;\n root2.left.left = new BinayTree();\n root2.left.left.data = 5;\n root2.left.left.left = new BinayTree();\n root2.left.left.left.data = 7;\n root2.left.left.left.left = new BinayTree();\n root2.left.left.left.left.data = 9;\n System.out.println(\"\\n\");\n printTree(root2);\n System.out.println();\n mirror(root2);\n printTree(root2);\n\n // 0\n // \\\n // 2\n // \\\n // 4\n // \\\n // 6\n // \\\n // 8\n BinayTree root3 = new BinayTree();\n root3.data = 0;\n root3.right = new BinayTree();\n root3.right.data = 2;\n root3.right.right = new BinayTree();\n root3.right.right.data = 4;\n root3.right.right.right = new BinayTree();\n root3.right.right.right.data = 6;\n root3.right.right.right.right = new BinayTree();\n root3.right.right.right.right.data = 8;\n System.out.println(\"\\n\");\n printTree(root3);\n System.out.println();\n mirror(root3);\n printTree(root3);\n\n\n }", "public String printBFSTree(){\n if(root==null)return \"\";\n String binstr=\"\";\n String valuestr=\"\";\n String codestr=\"\";\n LinkedList<HCNode> list=new LinkedList<HCNode>();\n root.code=\"\";\n list.add(root);\n HCNode node;\n while(list.size()>0){\n node=list.getFirst();\n if(node.left==null && node.right==null){\n binstr=binstr+\"0\";\n valuestr=valuestr+((byte)node.str.charAt(0))+\"\\n\";\n codestr=codestr+node.code;\n }else{\n binstr=binstr+\"1\";\n }\n if(node.left!=null){node.left.code=node.left.parent.code+\"0\";list.addLast(node.left);}\n if(node.right!=null){node.right.code=node.right.parent.code+\"1\";list.addLast(node.right);}\n list.removeFirst();\n }\n String res=binstr+\"\\n\"+valuestr+codestr+\"\\n\";\n System.out.println(binstr);\n System.out.print(valuestr);\n System.out.println(codestr);\n return res;\n }", "@Override\npublic int compareTo(BinaryTreeNode arg0) {\n\treturn 0;\n}", "public interface BinaryNode<T> { }", "@Test\n\tpublic void testInsert3() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(3, root.keys.size());\n\t\tassertEquals(30, (long) root.keys.get(0));\n\t\tassertEquals(50, (long) root.keys.get(1));\n\t\tassertEquals(70, (long) root.keys.get(2));\n\t\t\n\t\tassertEquals(4, root.children.size( ));\n\t\tassertTrue( root.children.get(0) instanceof LeafNode );\n\t\tassertTrue( root.children.get(1) instanceof LeafNode );\n\t\tassertTrue( root.children.get(2) instanceof LeafNode );\n\t\tassertTrue( root.children.get(3) instanceof LeafNode );\n\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) root.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) root.children.get(1);\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) root.children.get(2);\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) root.children.get(3);\n\t\t\n\t\tassertEquals(2, child0.children.size());\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\n\t\tassertEquals(2, child1.children.size());\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\n\t\tassertEquals(2, child2.children.size());\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(60, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(2, child3.children.size());\n\t\tassertEquals(70, (long) child3.children.get(0).key);\n\t\tassertEquals(80, (long) child3.children.get(1).key);\n\t}", "public void createBinaryTree()\r\n\t{\n\t\t\r\n\t\tNode node = new Node(1);\r\n\t\tnode.left = new Node(2);\r\n\t\tnode.right = new Node(3);\r\n\t\tnode.left.left = new Node(4);\r\n\t\tnode.left.right = new Node(5);\r\n\t\tnode.left.right.right = new Node(10);\r\n\t\tnode.left.left.left = new Node(8);\r\n\t\tnode.left.left.left.right = new Node(15);\r\n\t\tnode.left.left.left.right.left = new Node(17);\r\n\t\tnode.left.left.left.right.left.left = new Node(18);\r\n\t\tnode.left.left.left.right.right = new Node(16);\r\n\t\tnode.left.left.right = new Node(9);\r\n\t\tnode.right.left = new Node(6);\r\n\t\tnode.right.left.left = new Node(13);\r\n\t\tnode.right.left.left.left = new Node(14);\r\n\t\tnode.right.right = new Node(7);\r\n\t\tnode.right.right.right = new Node(11);\r\n\t\tnode.right.right.right.right = new Node(12);\r\n\t\troot = node;\r\n\t\t\r\n\t}", "private static void test1() {\n BinaryTreeNode node1 = new BinaryTreeNode(8);\n BinaryTreeNode node2 = new BinaryTreeNode(6);\n BinaryTreeNode node3 = new BinaryTreeNode(10);\n BinaryTreeNode node4 = new BinaryTreeNode(5);\n BinaryTreeNode node5 = new BinaryTreeNode(7);\n BinaryTreeNode node6 = new BinaryTreeNode(9);\n BinaryTreeNode node7 = new BinaryTreeNode(11);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node3.left = node6;\n node3.right = node7;\n test(\"Test1\", node1, true);\n }", "public BinaryTree(){}", "public boolean isBinary() {\n/* Queue<Node<E>> treeData = new LinkedList<>();\n treeData.offer(this.root);\n int counter;\n boolean isBinary = true;\n while (!treeData.isEmpty() && isBinary) {\n counter = 0;\n Node<E> el = treeData.poll();\n for (Node<E> child : el.leaves()) {\n treeData.offer(child);\n if (++counter > 2) {\n isBinary = false;\n }\n }\n }\n return isBinary;*/\n\n int counter = 0;\n boolean isBinary = true;\n Iterator it = iterator();\n while (it.hasNext() && isBinary) {\n counter = 0;\n Node<E> currentNode = (Node<E>) it.next();\n for (Node<E> child : currentNode.leaves()) {\n counter++;\n if (counter > 2) {\n isBinary = false;\n }\n }\n }\n return isBinary;\n }", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public static void main(String[] args) {\n BinaryTreeNode root = new BinaryTreeNode();\n root.value = 8;\n root.left = new BinaryTreeNode();\n root.left.value = 6;\n root.left.left = new BinaryTreeNode();\n root.left.left.value = 5;\n root.left.right = new BinaryTreeNode();\n root.left.right.value = 7;\n root.right = new BinaryTreeNode();\n root.right.value = 10;\n root.right.left = new BinaryTreeNode();\n root.right.left.value = 9;\n root.right.right = new BinaryTreeNode();\n root.right.right.value = 11;\n printFromToBottom(root);}", "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "public static TreeNode getTree() {\n\t\tTreeNode a = new TreeNode(\"a\", 314);\n\t\tTreeNode b = new TreeNode(\"b\", 6);\n\t\tTreeNode c = new TreeNode(\"c\", 271);\n\t\tTreeNode d = new TreeNode(\"d\", 28);\n\t\tTreeNode e = new TreeNode(\"e\", 0);\n\t\tTreeNode f = new TreeNode(\"f\", 561);\n\t\tTreeNode g = new TreeNode(\"g\", 3);\n\t\tTreeNode h = new TreeNode(\"h\", 17);\n\t\tTreeNode i = new TreeNode(\"i\", 6);\n\t\tTreeNode j = new TreeNode(\"j\", 2);\n\t\tTreeNode k = new TreeNode(\"k\", 1);\n\t\tTreeNode l = new TreeNode(\"l\", 401);\n\t\tTreeNode m = new TreeNode(\"m\", 641);\n\t\tTreeNode n = new TreeNode(\"n\", 257);\n\t\tTreeNode o = new TreeNode(\"o\", 271);\n\t\tTreeNode p = new TreeNode(\"p\", 28);\n\t\t\n\t\ta.left = b; b.parent = a;\n\t\tb.left = c; c.parent = b;\n\t\tc.left = d;\t d.parent = c;\n\t\tc.right = e; e.parent = c;\n\t\tb.right = f; f.parent = b;\n\t\tf.right = g; g.parent = f;\n\t\tg.left = h; h.parent = g;\n\t\ta.right = i; i.parent = a;\n\t\ti.left = j; j.parent = i;\n\t\ti.right = o; o.parent = i;\n\t\tj.right = k; k.parent = j;\n\t\to.right = p; p.parent = o;\n\t\tk.right = n; n.parent = k;\n\t\tk.left = l; l.parent = k;\n\t\tl.right = m; m.parent = l;\n\t\t\n\t\td.childrenCount = 0;\n\t\te.childrenCount = 0;\n\t\tc.childrenCount = 2;\n\t\tb.childrenCount = 6;\n\t\tf.childrenCount = 2;\n\t\tg.childrenCount = 1;\n\t\th.childrenCount = 0;\n\t\tl.childrenCount = 1;\n\t\tm.childrenCount = 0;\n\t\tn.childrenCount = 0;\n\t\tk.childrenCount = 3;\n\t\tj.childrenCount = 4;\n\t\to.childrenCount = 1;\n\t\tp.childrenCount = 0;\n\t\ti.childrenCount = 7;\n\t\ta.childrenCount = 15;\n\t\t\n\t\treturn a;\n\t}", "public interface TreeNode {\r\n\r\n /**\r\n * Function to return Code of this node.\r\n *\r\n * @return Character that is the code that the node represents.\r\n */\r\n Character getCode();\r\n\r\n /**\r\n * Method to add a child to a Tree node. The method returns reference to the node that was just\r\n * added or the node with the entered code if it was already present.\r\n *\r\n * @param node a treenode with the code to be added to the intermediate node\r\n * @return an already existing tree node with given code or create a new tree node and return it.\r\n */\r\n TreeNode addChild(TreeNode node);\r\n\r\n /**\r\n * Given a node with a character code, return the node in the tree with the same code.\r\n *\r\n * @param node the node with character to be checked for in the tree.\r\n * @return the node with code equal to the code of the parameter passed.\r\n */\r\n TreeNode returnNode(TreeNode node);\r\n\r\n /**\r\n * Given a size, check if all nodes in the tree have number of children equal to the size passed.\r\n *\r\n * @param size the value to be checked against.\r\n * @return true or false according to if the check passes or fails.\r\n */\r\n boolean isCodeComplete(int size);\r\n}", "public static void main(String[] args) {\n TreeNode t1 = new TreeNode(1);\n TreeNode t2 = new TreeNode(1);\n TreeNode t3 = new TreeNode(1);\n TreeNode t4 = new TreeNode(1);\n TreeNode t5 = new TreeNode(1);\n\n t1.left = t2;\n t1.right = t3;\n t2.left = t4;\n t2.right = t5;\n System.out.println(new CountCompleteTreeNodes().countNodes(t1));\n System.out.println(new CountCompleteTreeNodes().countNodesBinary(t1));\n }", "public interface INode {\n INode[] children();\n INode getParent();\n void setParent(INode parent);\n INode copySubTree();\n INode copyWholeTree();\n String getNodeChar();\n void setChildren(INode[] newKids);\n void setNodeChar(String c);\n INode getRoot();\n boolean isRoot();\n Bit getBit();\n void setBit(Bit bit);\n void tellChildAboutParent();\n INode addBrackets();\n INode removeBrackets();\n String toPlainText();\n}", "public static void main(String[] args) {\r\n\t\t\r\n\t\t binarytree bt = new binarytree(); bt.display();\r\n\t\t System.out.println(bt.size2()); System.out.println(bt.size());\r\n\t\t System.out.println(bt.max()); System.out.println(bt.min());\r\n\t\t \r\n\t\t System.out.println(bt.height()); System.out.println(bt.find(87));\r\n\t\t System.out.println(bt.find(5)); //bt.mirror(); bt.display();\r\n\t\t \r\n\t\t bt.preOrder(); bt.postOrder(); bt.inOrder();\r\n\t\t System.out.println(\"**************************************\");\r\n\t\t bt.levelorder(); bt.preorderI();\r\n\t\t \r\n\t\t/*\r\n\t\t * System.out.println(bt.find(87)); System.out.println(bt.find(5));\r\n\t\t * \r\n\t\t * System.out.println(bt.height());\r\n\t\t * \r\n\t\t * // bt.display();\r\n\t\t */// bt.mirror();\r\n\t\t\t// bt.display();\r\n\t\t/*\r\n\t\t * bt.preOrder(); bt.postOrder(); bt.inOrder(); bt.levelOrder();\r\n\t\t * bt.preOrderI();33\r\n\t\t * \r\n\t\t * System.out.println(bt.postOrderPred(50));\r\n\t\t * System.out.println(bt.postOrderSucc(50));\r\n\t\t * \r\n\t\t * bt.multiCalculator();\r\n\t\t */\r\n\t\tint[] pre = { 50, 25, 12, 49, 62, 87, 75 };\r\n\t\tint[] in = { 12, 25, 49, 50, 62, 75, 87 };\r\n\t\tbinarytree b2 = new binarytree(pre, in);\r\n\t\tbt.display();\r\n\t\tSystem.out.println(b2.diameter());\r\n\t\tSystem.out.println(b2.isbst());\r\n\t\tSystem.out.println(b2.isbst3());\r\n\t}", "public BinaryTree()\n {\n //this is the constructor for the BinaryTree object\n data = null;\n left = null;\n right = null;\n }", "public interface BinaryTree<T> {\t\r\n\t/**\r\n\t * Binary tree Node interface.\r\n\t * @param <T> Node contents\r\n\t */\r\n\tpublic interface BinaryNode<T> { }\r\n\t\r\n\t/**\r\n\t * Searches through the tree for a specified value, returning the Node\r\n\t * containing the value.\r\n\t * @param v The value to search for\r\n\t * @return The Node containing the value\r\n\t */\r\n\tpublic BinaryNode<T> find(T v);\r\n\t\r\n\t/**\r\n\t * Checks whether the tree is empty (i.e., its root is null).\r\n\t * @return {@code true} if the tree is empty, {@code false} otherwise\r\n\t */\r\n\tpublic boolean isEmpty();\r\n}", "public interface TreeNode{\r\n\t\r\n\t// enumerated node types\r\n\tpublic enum NodeType {\r\n\t\tMIN {\r\n\t\t\t@Override\r\n\t\t\tpublic NodeType opposite() {\r\n\t\t\t\treturn MAX;\r\n\t\t\t}\r\n\t\t}, MAX {\r\n\t\t\t@Override\r\n\t\t\tpublic NodeType opposite() {\r\n\t\t\t\treturn MIN;\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\tpublic abstract NodeType opposite();\r\n\t};\r\n\t\r\n\t// the type of node represented\r\n\tpublic NodeType getNodeType();\r\n\t\r\n\t// a possibly empty list of children\r\n\tpublic List<TreeNode> getChildrenNodes();\r\n\t\r\n\t// request a new child node after executing a move\r\n\tpublic TreeNode getChildNode(GameMove move) throws IllegalArgumentException;\r\n\t\r\n\t// the parent node of the current node\r\n\t// current Node == getParentNode for ROOT\r\n\tpublic TreeNode getParentNode();\r\n \r\n\t// whether the current node is the root node\r\n\tpublic Boolean isRootNode();\r\n \r\n\t// returns an object modeling some external state \r\n\tpublic GameState getGameState();\r\n \r\n\t// depth of node in tree\r\n\tpublic int getDepth();\r\n \r\n\t// evaluates/scores the leaf node\r\n\tpublic int scoreLeafNode();\r\n}", "public BinNode (E data)\n {\n this.data = data;\n left = null;\n right = null;\n }", "public void add(Comparable obj)\n { \n \t //TODO\n \t //add code\n \t Node n = new Node(); \n \t n.data = obj;\n \t // \tn.left = null;\n \t // \tn.right = null;\n\n \t Node y = null;\n \t // \tNode x = root;\n \t Node current = root;\n \t while(current != null)\n \t {\n \t\t y = current;\n \t\t if(n.data.compareTo(root.data) < 0)\n \t\t\t current = current.left;\n \t\t else\n \t\t\t current = current.right;\n \t }\n\n\n \t n.parent = y;\n \t if(y == null)\n \t\t root = n;\n \t else\n \t\t if(n.data.compareTo(y.data) < 0)\n \t\t\t y.left = n;\n \t\t else\n \t\t\t y.right = n;\n \t n.left = null;\n \t n.right = null;\n \t n.color = RED;\n \t // \troot = new Node();\n \t // \troot.data = \"k\";\n \t // \tNode test = new Node();\n \t // \ttest.data = \"g\";\n \t // \troot.left= test;\n// \t System.out.println(\"the insertion looks like:\");\n// \t System.out.println(BTreePrinter.printNode(root));\n\n \t fixup(root,n);\n \t /*\n \tThe insert() method places a data item into the tree.\n\n \tInsertions\n \tpseudocode for\n \tRB-Insert(T,z)\n \ty = nil[T]\n \tx = root[T]\n \twhile x != nil[T]\n \ty = x\n \tif key[z] < key[x] then\n \tx = left[x]\n \telse\n \tx = right[x]\n \tp[z] = y\n \tif y = nil[T]\n \troot[T] = z\n \telse\n \tif key[z] < key[y] then\n \tleft[y] = z\n \telse\n \tright[y] = z\n \tleft[z] = nil[T]\n \tright[z] = nil[T]\n \tcolor[z] = RED\n \tRB-Insert-fixup(T,z)\n \t */\n }", "public BinaryTree() {\n count = 0;\n root = null;\n }", "@Test\n\tpublic void testBuildTree() {\n\t\tTree<Integer> tree = new Tree<Integer> ();\n\t\t//add first level children, 1\n\t\tNode<Integer> root = tree.getRoot();\n\t\troot.addChild(new Node<Integer>());\n\t\tNode<Integer> c1 = root.getFirstChild();\n\t\tassertTrue(c1.getData() == null);\n\t\t//add second level children, 3\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tassertTrue(c1.countChildren() == 3);\n\t\t//add third level children, 3 * 3\n\t\tint[][] leafData = {\n\t\t\t\t{8,7,2},\n\t\t\t\t{9,1,6},\n\t\t\t\t{2,4,1}\n\t\t};\n\t\tNode<Integer> c2 = c1.getFirstChild();\n\t\tint i = 0;\n\t\twhile (c2 != null) {\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][0]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][1]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][2]));\n\t\t\tc2 = c2.next();\n\t\t\ti++;\n\t\t}\n\t\tassertTrue(tree.countDepth() == 3);\n\t\tNode<Integer> leaf = root;\n\t\twhile (leaf.countChildren() > 0) {\n\t\t\tleaf = leaf.getFirstChild();\n\t\t}\n\t\tassertTrue(leaf.getData() == 8);\t\t\t\n\t}", "Node insertBinary(Node node, int key) {\n // BST rotation\n if (node == null) {\n return (new Node(key));\n }\n if (key < node.key) {\n node.left = insertBinary(node.left, key);\n } else if (key > node.key) {\n node.right = insertBinary(node.right, key);\n } else\n {\n return node;\n }\n\n // Update height of descendant node\n node.height = 1 + maxInt(heightBST(node.left),\n heightBST(node.right));\n int balance = getBalance(node); \n \n // If this node becomes unbalanced, then there \n // are 4 cases Left Left Case \n if (balance > 1 && key < node.left.key) \n return rightRotate(node); \n \n // Right Right Case \n if (balance < -1 && key > node.right.key) \n return leftRotate(node); \n \n // Left Right Case \n if (balance > 1 && key > node.left.key) { \n node.left = leftRotate(node.left); \n return rightRotate(node); \n } \n \n // Right Left Case \n if (balance < -1 && key < node.right.key) { \n node.right = rightRotate(node.right); \n return leftRotate(node); \n } \n \n /* return the (unchanged) node pointer */\n return node; \n }", "static BTNode newNode(int k)\r\n{\r\n\tBTNode temp = new BTNode();\r\n temp.key = k;\r\n temp.left = temp.right = null;\r\n return temp;\r\n}", "private static void test01() {\n BinaryTreeNode node10 = new BinaryTreeNode();\n node10.value = 10;\n BinaryTreeNode node6 = new BinaryTreeNode();\n node6.value = 6;\n BinaryTreeNode node14 = new BinaryTreeNode();\n node14.value = 14;\n BinaryTreeNode node4 = new BinaryTreeNode();\n node4.value = 4;\n BinaryTreeNode node8 = new BinaryTreeNode();\n node8.value = 8;\n BinaryTreeNode node12 = new BinaryTreeNode();\n node12.value = 12;\n BinaryTreeNode node16 = new BinaryTreeNode();\n node16.value = 16;\n node10.left = node6;\n node10.right = node14;\n node6.left = node4;\n node6.right = node8;\n node14.left = node12;\n node14.right = node16;\n System.out.print(\"Before convert: \");\n printTree(node10);\n System.out.println(\"null\");\n BinaryTreeNode head = convert(node10);\n System.out.print(\"After convert : \");\n printList(head);\n System.out.println();\n }", "public BinaryTree()\n {\n this.root = null;\n this.actualNode = null;\n this.altMode = false;\n this.deepestRight = null;\n }", "public interface Node extends Serializable {\n\n\tvoid setOwner(Object owner);\n Object getOwner();\n\n String getName();\n Node getChild(int i);\n List<Node> childList();\n\n Node attach(int id, Node n) throws VetoTypeInduction;\n void induceOutputType(Class type) throws VetoTypeInduction;\n int getInputCount();\n\tClass getInputType(int id);\n List<Class> getInputTypes();\n Class getOutputType();\n Tuple.Two<Class,List<Class>> getType();\n\n Object evaluate();\n\n boolean isTerminal();\n\n <T extends Node> T copy();\n String debugString(Set<Node> set);\n}", "private static void test4() {\n BinaryTreeNode node1 = new BinaryTreeNode(5);\n BinaryTreeNode node2 = new BinaryTreeNode(4);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(2);\n BinaryTreeNode node5 = new BinaryTreeNode(1);\n node1.left = node2;\n node2.left = node3;\n node3.left = node4;\n node4.left = node5;\n test(\"Test4\", node1, false);\n }", "public myBinaryNode<T> my_root();", "@Test\n public void whenAddNineNodesOnDifferentLevelsThenResultNineNodesFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(new TreeNode(), \"1\");\n tree.addChild(new TreeNode(), \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 3, 3, 2, 2, 2, 1, 1, 1]\"));\n }", "public abstract TreeNode getNode(int i);", "private static void test02() {\n BinaryTreeNode node1 = new BinaryTreeNode();\n node1.value = 1;\n BinaryTreeNode node2 = new BinaryTreeNode();\n node2.value = 2;\n BinaryTreeNode node3 = new BinaryTreeNode();\n node3.value = 3;\n BinaryTreeNode node4 = new BinaryTreeNode();\n node4.value = 4;\n BinaryTreeNode node5 = new BinaryTreeNode();\n node5.value = 5;\n node5.left = node4;\n node4.left = node3;\n node3.left = node2;\n node2.left = node1;\n System.out.print(\"Before convert: \");\n printTree(node5);\n System.out.println(\"null\");\n BinaryTreeNode head = convert(node5);\n System.out.print(\"After convert : \");\n printList(head);\n System.out.println();\n }", "public static void main(String args[]) \n{ \n\t/* Create following Binary Tree \n\t\t1 \n\t\t/ \\ \n\t\t2 3 \n\t\t\\ \n\t\t4 \n\t\t\\ \n\t\t5 \n\t\t\t\\ \n\t\t\t6*/\n\tNode root = newNode(1); \n\troot.left = newNode(2); \n\troot.right = newNode(3); \n\troot.left.right = newNode(4); \n\troot.left.right.right = newNode(5); \n\troot.left.right.right.right = newNode(6); \n\tSystem.out.println( \"Following are nodes in top view of Binary Tree\\n\"); \n\ttopView(root); \n}", "public abstract boolean isBinarySearchTree();", "public interface BPTreeNode {\n\n /*\n * Method returns the node index in the B+ tree organization.\n *\n * Returns:\n * node index in B+ tree\n * */\n public long getNodeIndex();\n\n\n /*\n * Method identifies the node as a leaf node or a child (non-leaf) node.\n *\n * Returns:\n * true, if leaf node; false if child node\n * */\n public boolean isLeaf();\n\n /*\n * Method inserts the node item appropriate to the item's key value.\n *\n * Returns:\n * Node item inserted successfully.\n * */\n public boolean insertItem(BPTreeNodeItem item);\n\n /*\n * Method deletes the node item appropriate to the item's index.\n *\n * Returns:\n * Node item deleted successfully.\n * */\n public boolean deleteItem(int index);\n\n /*\n * Method returns the number of items assigned to the node.\n *\n * Returns:\n * Count of node items contained in the node\n * */\n public int getItemCount();\n\n /*\n * Method returns the indexed node item.\n *\n * Returns:\n * Indexed node item.\n * */\n public BPTreeNodeItem getItem(int index);\n\n /*\n * Method returns the lowest chromosome name key belonging to the node.\n *\n * Returns:\n * Lowest contig/chromosome name key; or null for no node items.\n * */\n public String getLowestChromKey();\n\n /*\n * Method returns the highest chromosome name key belonging to the node.\n *\n * Returns:\n * Highest contig/chromosome name key; or null for no node items.\n * */\n public String getHighestChromKey();\n\n /*\n * Method returns the lowest chromosome ID belonging to the node.\n *\n * Returns:\n * Lowest contig/chromosome ID; or -1 for no node items.\n * */\n public int getLowestChromID();\n\n /*\n * Method returns the highest chromosome ID belonging to the node.\n *\n * Returns:\n * Highest contig/chromosome ID; or -1 for no node items.\n * */\n public int getHighestChromID();\n\n /*\n * Method prints the nodes items and sub-node items.\n * Node item deleted successfully.\n * */\n public void printItems();\n\n}", "private static void test03() {\n BinaryTreeNode node1 = new BinaryTreeNode();\n node1.value = 1;\n BinaryTreeNode node2 = new BinaryTreeNode();\n node2.value = 2;\n BinaryTreeNode node3 = new BinaryTreeNode();\n node3.value = 3;\n BinaryTreeNode node4 = new BinaryTreeNode();\n node4.value = 4;\n BinaryTreeNode node5 = new BinaryTreeNode();\n node5.value = 5;\n node1.right = node2;\n node2.right = node3;\n node3.right = node4;\n node4.right = node5;\n System.out.print(\"Before convert: \");\n printTree(node1);\n System.out.println(\"null\");\n BinaryTreeNode head = convert(node1);\n System.out.print(\"After convert : \");\n printList(head);\n System.out.println();\n }", "private static TreeNode getNode() {\n TreeNode treeNode = new TreeNode(1);\n TreeNode left = new TreeNode(2);\n TreeNode right = new TreeNode(3);\n treeNode.left = left;\n treeNode.right = right;\n\n left.left = new TreeNode(4);\n right.left = new TreeNode(5);\n right.right = new TreeNode(6);\n return treeNode;\n }", "private int Nodes(BTNode n){\r\n if (n == null)\r\n return 0;\r\n else {\r\n return ( (n.left == null? 0 : Nodes(n.left)) + (n.right == null? 0 : Nodes(n.right)) + 1 );\r\n }\r\n }", "public static void main(String[] args) {\n Node root = newNode(1);\n\n root.left = newNode(2);\n root.right = newNode(3);\n\n root.left.left = newNode(4);\n root.left.right = newNode(5);\n\n root.left.left.left = newNode(8);\n root.left.left.right = newNode(9);\n\n root.left.right. left = newNode(10);\n root.left.right. right = newNode(11);\n\n root.right.left = newNode(6);\n root.right.right = newNode(7);\n root.right.left .left = newNode(12);\n root.right.left .right = newNode(13);\n root.right.right. left = newNode(14);\n root.right.right. right = newNode(15);\n System.out.println(findNode(root, 5, 6, 15));\n }", "public static void main(String args[]){\n SimpleBST<Integer> t = new SimpleBST<Integer>();\n\n //build the tree / set the size manually\n //only for testing purpose\n Node<Integer> node = new Node<>(112);\n Node<Integer> node2 = new Node<>(330);\n node2 = new Node<>(440,node2,null);\n node = new Node<>(310,node,node2);\n t.root = node;\n t.size = 4;\n\n // Current tree:\n //\t\t\t 310\n // / \\\n // 112 440\n // /\n // 330\n\n\n //checking basic features\n if (t.root.data == 310 && t.contains(112) && !t.contains(211) && t.height() == 2){\n System.out.println(\"Yay 1\");\n }\n\n //checking more features\n if (t.numLeaves() == 2 && SimpleBST.findMax(t.root)==440\n && SimpleBST.findPredecessor(t.root) == 112){\n System.out.println(\"Yay 2\");\n }\n\n //toString and toArray\n if (t.toString().equals(\"112 310 330 440 \") && t.toArray().length==t.size()\n && t.toArray()[0].equals(310) && t.toArray()[1].equals(112)\n && t.toArray()[2].equals(440) && t.toArray()[3].equals(330) ){\n System.out.println(\"Yay 3\");\n //System.out.println(t.toString());\n }\n\n // start w/ an empty tree and insert to build the same tree as above\n t = new SimpleBST<Integer>();\n if (t.insert(310) && !t.insert(null) && t.size()==1 && t.height()==0\n && t.insert(112) && t.insert(440) && t.insert(330) && !t.insert(330)\n ){\n System.out.println(\"Yay 4\");\n }\n\n if (t.size()==4 && t.height()==2 && t.root.data == 310 &&\n t.root.left.data == 112 && t.root.right.data==440\n && t.root.right.left.data == 330){\n System.out.println(\"Yay 5\");\n }\n\n // more insertion\n t.insert(465);\n t.insert(321);\n t.insert(211);\n\n //\t\t\t 310\n // / \\\n // 112 440\n // \\ / \\\n // 211 330 465\n // /\n // 321\n\n\n\n //remove leaf (211), after removal:\n //\t\t\t 310\n // / \\\n // 112 440\n // / \\\n // 330 465\n // /\n // 321\n\n if (t.remove(211) && !t.contains(211) && t.size()==6 && t.height() == 3\n && SimpleBST.findMax(t.root.left) == 112){\n System.out.println(\"Yay 6\");\n }\n\n //remove node w/ single child (330), after removal:\n //\t\t\t 310\n // / \\\n // 112 440\n // / \\\n // 321 465\n\n if (t.remove(330) && !t.contains(330) && t.size()==5 && t.height() == 2\n && t.root.right.left.data == 321){\n System.out.println(\"Yay 7\");\n }\n\n //remove node w/ two children (440), after removal:\n //\t\t\t 310\n // / \\\n // 112 321\n // \\\n // 465\n\n if ((t.root!=null) && SimpleBST.findPredecessor(t.root.right) == 321 && t.remove(440) && !t.contains(440)\n && t.size()==4 && t.height() == 2 && t.root.right.data == 321){\n System.out.println(\"Yay 8\");\n }\n\n }", "static binaryTreeNode inorderConstruct(int[] keys){\n binaryTreeNode head = null;\n binaryTreeNode lnode = null;\n binaryTreeNode rnode = null;\n for(int i:keys){\n if(head == null){\n head = new binaryTreeNode(i);\n continue;\n }\n if(lnode == null){\n lnode = head;\n head = new binaryTreeNode(i);\n continue;\n }\n if(rnode == null){\n rnode = new binaryTreeNode(i);\n head.lnode = lnode;\n head.rnode = rnode;\n rnode = null;\n lnode = null;\n }\n }\n return head;\n }", "private void levelOrderTraversal() {\n\t\tif(root==null) {\n\t\t\tSystem.out.println(\"\\nBinary node is empty.\");\n\t\t\treturn;\n\t\t}\n\t\tQueue<OO8BinaryTreeNode> queue = new LinkedList<OO8BinaryTreeNode>();\n\t\tqueue.add(root);\n\t\tOO8BinaryTreeNode currentNode = null;\n\t\twhile(!queue.isEmpty()) {\n\t\t\tcurrentNode=queue.remove();\n\t\t\tSystem.out.print(currentNode.getValue() + \" \");\n\t\t\tif(currentNode.getLeftNode()!=null)\n\t\t\t\tqueue.add(currentNode.getLeftNode());\n\t\t\tif(currentNode.getRightNode()!=null)\n\t\t\t\tqueue.add(currentNode.getRightNode());\n\t\t}\n\t\tSystem.out.println();\n\t}", "void inOrder(TreeNode node) \n { \n if (node == null) \n return; \n \n inOrder(node.left); \n System.out.print(node.val + \" \"); \n \n inOrder(node.right); \n }", "@DISPID(1611006012) //= 0x6006003c. The runtime will prefer the VTID if present\n @VTID(87)\n boolean relationsNodeInTree();", "public BinaryTree()\n\t{\n\t\troot = null;\n\t}", "static binaryTreeNode levelorderConstruct(int[] keys){\n binaryTreeNode head = new binaryTreeNode(keys[0]);\n int count = 1;\n binaryTreeNode temp;\n List<binaryTreeNode> l = new ArrayList<>();\n temp = head;\n while(count < keys.length){\n if(temp.lnode == null){\n temp.lnode = new binaryTreeNode(keys[count]);\n count++;\n l.add(temp.lnode);\n } else if(temp.rnode == null){\n temp.rnode = new binaryTreeNode(keys[count]);\n count++;\n l.add(temp.rnode);\n temp = l.remove(0);\n }\n }\n return head;\n }", "public static TreeNode generateBinaryTree2() {\n // Nodes\n TreeNode root = new TreeNode(12);\n TreeNode rootLeft = new TreeNode(4);\n TreeNode rootLeftLeft = new TreeNode(3);\n TreeNode rootLeftLeftLeft = new TreeNode(1);\n TreeNode rootLeftLeftLeftLeft = new TreeNode(20);\n TreeNode rootRight = new TreeNode(5);\n // Edges\n root.left = rootLeft;\n rootLeft.left = rootLeftLeft;\n rootLeftLeft.left = rootLeftLeftLeft;\n rootLeftLeftLeft.left = rootLeftLeftLeftLeft;\n root.right = rootRight;\n\n // Return root\n return root;\n }", "@Test\n public void whenAddNodesOnDifferentLevelsThenResultThreeNodeFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 2, 1]\"));\n }", "public static void main(String args[]) \r\n {\n BinaryTree tree = new BinaryTree();\r\n tree.root = new Node(20);\r\n tree.root.left = new Node(8);\r\n tree.root.right = new Node(22);\r\n tree.root.left.left = new Node(4);\r\n tree.root.left.right = new Node(12);\r\n tree.root.left.right.left = new Node(10);\r\n tree.root.left.right.right = new Node(14);\r\n \r\n System.out.println(\"No. of nodes in the tree is : \"+ nodeCount(tree.root));\r\n \r\n }", "public void deleteNode(BinaryTreeNode node) // Only leaf nodes and nodes with degree 1 can be deleted. If a degree 1 node is deleted, it is replaced by its subtree.\r\n {\n if(!node.hasRightChild() && !node.hasLeftChild()){\r\n if(node.mActualNode.mParent.mRightChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mRightChild = null;\r\n }\r\n else if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n node.mActualNode.mParent.mLeftChild = null;\r\n }\r\n //node.mActualNode = null;\r\n\r\n }\r\n //if deleted node has degree 1 and has only left child\r\n else if(node.hasLeftChild() && !node.hasRightChild()){\r\n node.mActualNode.mLeftChild.mParent = node.mActualNode.mParent;\r\n //if deleted node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode)\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mLeftChild;\r\n //if deleted node is right child of his father\r\n else {\r\n\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mLeftChild;\r\n }\r\n }\r\n // if deleted node has degree 1 and has only right child\r\n else if(node.hasRightChild() && !node.hasLeftChild()){\r\n node.mActualNode.mRightChild.mParent = node.mActualNode.mParent;\r\n\r\n //if node is left child of his father\r\n if(node.mActualNode.mParent.mLeftChild == node.mActualNode) {\r\n\r\n\r\n node.mActualNode.mParent.mLeftChild = node.mActualNode.mRightChild;\r\n\r\n }\r\n //if node is right child of his father\r\n else\r\n node.mActualNode.mParent.mRightChild = node.mActualNode.mRightChild;\r\n\r\n\r\n }\r\n else\r\n System.out.println(\"Error : node has two child\");\r\n\r\n }", "public static void main(String[] args) {\n\n\n\t\tArrayList<Node> N = new ArrayList<Node>();\n\t\t\n\t\t/*\n\t\t * ##### Encoding Model 2 ###### \n\t\t */\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the privilege nodes\n\t\t */\n\t\tfor(int i=1; i<7; i++)\n\t\t{\n\t\t\tN.add(new Node(\"p\"+i, 1));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the exploit nodes\t\t \n\t\t */\n\t\tfor(int i=1; i<8; i++)\n\t\t{\n\t\t\tN.add(new Node(\"e\"+i, 2));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the child nodes\n\t\t */\n\t\tfor(int i=1; i<12; i++)\n\t\t{\n\t\t\tN.add(new Node(\"c\"+i, 0));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Assigning the children and parent(s) for each node according to model 2\n\t\t */\n\t\t\n\t\tArrayList<Node> nil = new ArrayList<Node>();\n\t\t\n\t\tN.get(0).setParents(nil);\n\t\tN.get(0).addChild(N.get(6));\n\t\t\n\t\tN.get(6).addParent(N.get(0));\n\t\tN.get(6).addChild(N.get(1));\n\t\tN.get(6).addChild(N.get(13));\n\t\tN.get(6).addChild(N.get(14));\n\t\t\n\t\tN.get(1).addParent(N.get(6));\n\t\tN.get(1).addChild(N.get(7));\n\t\tN.get(1).addChild(N.get(8));\n\t\t\n\t\tN.get(7).addParent(N.get(1));\n\t\tN.get(7).addChild(N.get(15));\n\t\tN.get(7).addChild(N.get(2));\n\t\t\n\t\tN.get(2).addParent(N.get(7));\n\t\tN.get(2).addChild(N.get(10));\t\t\n\t\t\n\t\tN.get(8).addParent(N.get(1));\n\t\tN.get(8).addChild(N.get(16));\n\t\tN.get(8).addChild(N.get(3));\n\t\t\n\t\tN.get(3).addParent(N.get(8));\n\t\tN.get(3).addChild(N.get(9));\n\t\t\n\t\tN.get(10).addParent(N.get(2));\n\t\tN.get(10).addChild(N.get(5));\n\t\tN.get(10).addChild(N.get(19));\n\t\tN.get(10).addChild(N.get(20));\n\t\t\n\t\tN.get(9).addParent(N.get(3));\n\t\tN.get(9).addChild(N.get(4));\n\t\tN.get(9).addChild(N.get(17));\n\t\tN.get(9).addChild(N.get(18));\n\t\t\n\t\tN.get(4).addParent(N.get(9));\n\t\tN.get(4).addChild(N.get(12));\n\t\t\n\t\tN.get(5).addParent(N.get(10));\n\t\tN.get(5).addChild(N.get(11));\n\t\t\n\t\tN.get(12).addParent(N.get(4));\n\t\tN.get(12).addChild(N.get(22));\n\t\tN.get(12).addChild(N.get(23));\n\t\t\n\t\tN.get(11).addParent(N.get(5));\n\t\tN.get(11).addChild(N.get(21));\n\t\tN.get(11).addChild(N.get(23));\n\t\t\n\t\tN.get(13).addParent(N.get(6));\n\t\tN.get(14).addParent(N.get(6));\n\t\tN.get(15).addParent(N.get(7));\n\t\tN.get(16).addParent(N.get(8));\n\t\tN.get(17).addParent(N.get(9));\n\t\tN.get(18).addParent(N.get(9));\n\t\tN.get(19).addParent(N.get(10));\n\t\tN.get(20).addParent(N.get(10));\n\t\tN.get(21).addParent(N.get(11));\n\t\tN.get(22).addParent(N.get(12));\n\t\tN.get(23).addParent(N.get(11));\n\t\tN.get(23).addParent(N.get(12));\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the C,I,A values for each node\n\t\t */\n\t\t\n\t\tN.get(0).setImpacts(4, 4, 4);\n\t\tN.get(1).setImpacts(1, 2, 3);\n\t\tN.get(2).setImpacts(2, 2, 1);\n\t\tN.get(3).setImpacts(1, 2, 1);\n\t\tN.get(4).setImpacts(1, 1, 1);\n\t\tN.get(5).setImpacts(3, 2, 3);\n\t\tN.get(13).setImpacts(3,3,3);\n\t\tN.get(14).setImpacts(3,3,3);\n\t\tN.get(15).setImpacts(3,3,3);\n\t\tN.get(16).setImpacts(3,3,3);\n\t\tN.get(17).setImpacts(3,3,3);\n\t\tN.get(18).setImpacts(3,3,3);\n\t\tN.get(19).setImpacts(3,3,3);\n\t\tN.get(20).setImpacts(3,3,3);\n\t\tN.get(21).setImpacts(3,3,3);\n\t\tN.get(22).setImpacts(3,3,3);\n\t\tN.get(23).setImpacts(2,2,1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * This block helps see the setup of the whole tree. \n\t\t * Comment out if not required to see the parent children relationship of each node.\n\t\t */\n\t\t\n\t\tfor(int i=0; i<24; i++)\n\t\t{\n\t\t\tSystem.out.println(\"\\n\\n\" + N.get(i).getName() + \" < C=\" + N.get(i).getImpactC() + \", I=\" + N.get(i).getImpactI() + \", A=\" + N.get(i).getImpactA() + \" >\" );\n\t\t\tSystem.out.println(\"Parents: \");\n\t\t\tfor(int j=0; j<N.get(i).getParents().size(); j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getParents().get(j).getName() + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nChildren: \");\n\t\t\tfor(int k=0; k<N.get(i).getChildren().size(); k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getChildren().get(k).getName() + \" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * Calling the method which will perform the C,I,A impact analysis \n\t\t */\n\t\t\n\t\t//Node n = new Node(); //Commented out as extended Main to Node and declared impactAnalysis() as static \n\t\t\n\t\tImpactAnalyzer ia = new ImpactAnalyzer();\n\t\tia.analyze(2, 2, 1, N);\n\t\t\n\t\t\n\t\t\n\t}", "public BinaryTreeByLinkedList() {\n\t\tthis.root = null;\n\t}", "public static void main(String[] args) {\n TreeNode root = new TreeNode(50);\n root.left = new TreeNode(30);\n root.right = new TreeNode(70);\n root.left.left = new TreeNode(20);\n root.left.right = new TreeNode(40);\n root.right.left = new TreeNode(60);\n root.right.right = new TreeNode(80);\n StringBuilder result = serialiseBT(root, new StringBuilder());\n System.out.println(result.toString());\n String[] strings = result.toString().split(\",\");\n TreeNode head = deserialize(strings, new int[]{0});\n System.out.println(serialiseBT(head, new StringBuilder()));\n }", "public BinaryTree() {\r\n\t\troot = null;\r\n\t\tcount = 0;\r\n\t}", "public TreeNode encode(Node root) {\n if (root == null) {\n return null;\n }\n TreeNode head = new TreeNode(root.val);\n head.left = en(root.children);\n return head;\n }", "static TreeNode newNode(int item) \n\t{ \n\t\tTreeNode temp = new TreeNode(); \n\t temp.key = item; \n\t temp.left = null; \n\t temp.right = null; \n\t return temp; \n\t}", "private static TreeNode<Character> buildTree () {\n // build left half\n TreeNode<Character> s = new TreeNode<Character>('S', \n new TreeNode<Character>('H'),\n new TreeNode<Character>('V'));\n\n TreeNode<Character> u = new TreeNode<Character>('U', \n new TreeNode<Character>('F'),\n null);\n \n TreeNode<Character> i = new TreeNode<Character>('I', s, u);\n\n TreeNode<Character> r = new TreeNode<Character>('R', \n new TreeNode<Character>('L'), \n null);\n\n TreeNode<Character> w = new TreeNode<Character>('W', \n new TreeNode<Character>('P'),\n new TreeNode<Character>('J'));\n\n TreeNode<Character> a = new TreeNode<Character>('A', r, w);\n\n TreeNode<Character> e = new TreeNode<Character>('E', i, a);\n\n // build right half\n TreeNode<Character> d = new TreeNode<Character>('D', \n new TreeNode<Character>('B'),\n new TreeNode<Character>('X'));\n\n TreeNode<Character> k = new TreeNode<Character>('K', \n new TreeNode<Character>('C'),\n new TreeNode<Character>('Y'));\n\n TreeNode<Character> n = new TreeNode<Character>('N', d, k);\n\n\n TreeNode<Character> g = new TreeNode<Character>('G', \n new TreeNode<Character>('Z'),\n new TreeNode<Character>('Q'));\n\n TreeNode<Character> o = new TreeNode<Character>('O');\n\n TreeNode<Character> m = new TreeNode<Character>('M', g, o);\n\n TreeNode<Character> t = new TreeNode<Character>('T', n, m);\n\n // build the root\n TreeNode<Character> root = new TreeNode<Character>(null, e, t);\n return root;\n }", "public interface Tree {\n\n //查找节点\n Node find(int val);\n\n //插入新节点\n boolean insert(int val);\n\n //中序遍历\n void infixOrder(Node current);\n\n //前序遍历\n void preOrder(Node current);\n\n //后序遍历\n void postOrder(Node current);\n\n //找到最大值\n Node findMax();\n\n //找到最小值\n Node findMin();\n\n //删除节点\n boolean delete(int val);\n\n}", "public int insert(int newKey){\n int i=n-1;\n int x =0;\n if (isLeaf){\n while ((i>=0)&& (newKey<=key[i])) {\n if(newKey==key[i]) \n return -1;//duplicate return withoiut doinganything\n key[i+1] = key[i];\n i--;\n \n }\n if(x>=0){\n n++;\n key[i+1]=newKey;\n }\n }\n else{\n while ((i>=0)&& (newKey<=key[i])) {\n if(newKey==key[i])\n return -1;// find duplictte return without doing anithing \n \n else\n i--;\n }\n if(x>=0){\n \n int insertChild = i+1; // Subtree where new key must be inserted\n if (c[insertChild].isFull()){\n x++;// one more node.\n // The root of the subtree where new key will be inserted has to be split\n // We promote the mediand of that root to the current node and\n // update keys and references accordingly\n \n //System.out.println(\"This is the full node we're going to break \");// Debugging code\n //c[insertChild].printNodes();\n //System.out.println(\"going to promote \" + c[insertChild].key[T-1]);\n n++;\n c[n]=c[n-1];\n for(int j = n-1;j>insertChild;j--){\n c[j] =c[j-1];\n key[j] = key[j-1];\n }\n key[insertChild]= c[insertChild].key[T-1];\n c[insertChild].n = T-1;\n \n BTreeNode newNode = new BTreeNode(T);\n for(int k=0;k<T-1;k++){\n newNode.c[k] = c[insertChild].c[k+T];\n newNode.key[k] = c[insertChild].key[k+T];\n }\n \n newNode.c[T-1] = c[insertChild].c[2*T-1];\n newNode.n=T-1;\n newNode.isLeaf = c[insertChild].isLeaf;\n c[insertChild+1]=newNode;\n \n //System.out.println(\"This is the left side \");\n //c[insertChild].printNodes(); \n //System.out.println(\"This is the right side \");\n //c[insertChild+1].printNodes();\n //c[insertChild+1].printNodes();\n \n if (newKey <key[insertChild]){\n c[insertChild].insert(newKey); }\n else{\n c[insertChild+1].insert(newKey); }\n }\n else\n c[insertChild].insert(newKey);\n }\n \n \n }\n return x ;\n }", "public myBinaryTree<T> my_mirror();", "public BinNode<T> getLeft();", "public BinaryTree() {\n root = null;\n }", "public BinaryTree() {\n root = null;\n }", "private BinaryNode<AnyType> copy1(BinaryNode<AnyType> t)\r\n\t{\r\n\t\tBinaryNode<AnyType> newNode=null;\r\n\t\tif(t!=null)\r\n\t\t{\r\n\t\t\tnewNode = new BinaryNode<>(t.element,t.left,t.right);\r\n\t\t\tcopy1(t.left);\r\n\t\t\tcopy1(t.right);\r\n\t\t}\r\n\t\treturn newNode;\r\n\t}", "public interface Node {\n\n\tLong getClsId();\n\n\tNode getParent();\n\n\tvoid setParent(Node p);\n\n\tNode[] getChildrenArray();\n\n\tList<Node> getChildrenList();\n\n\tvoid resetChildren(Node[] children);\n\n\tObject getValue(int attr);\n\n\tObject setValue(int attr, Object value);\n\n\tlong getLongValue(int attr);\n\n\tInteger getId();\n}", "public TreeNode(){ this(null, null, 0);}", "BTNode<T> getRoot();", "public static void main(String[] args) {\n\n /**\n * 1\n * 2 3\n * 4 5 6 7\n * 8\n */\n final BinaryTree binaryTree = new BinaryTree(1);\n\n binaryTree.insertAsLeftChild(2, 1);\n binaryTree.insertAsRightChild(3, 1);\n\n binaryTree.insertAsLeftChild(4,2);\n binaryTree.insertAsRightChild(5,2);\n\n binaryTree.insertAsLeftChild(6,3);\n binaryTree.insertAsRightChild(7, 3);\n\n binaryTree.insertAsLeftChild(8,6);\n\n binaryTree.inOrderTraversal();\n binaryTree.inOrderTraversalRec();\n\n binaryTree.preOrderTraversal();\n binaryTree.preOrderTraversalRec();\n\n binaryTree.postOrderTraversalRec();\n binaryTree.postOrderTraversal();\n\n binaryTree.levelOrderTraversal();\n binaryTree.levelOrderTraversalBruteForce();\n\n binaryTree.printAllPaths();\n binaryTree.printLevel(3);\n binaryTree.printLeaves();\n binaryTree.leftSideView();\n binaryTree.rightSideView();\n\n System.out.println(\"binaryTree.heightBalanceFactor(3): \" + binaryTree.heightBalanceFactor(binaryTree.searchRec(3)));\n System.out.println(\"binaryTree.heightBalanceFactor(1): \" + binaryTree.heightBalanceFactor(binaryTree.searchRec(1)));\n\n binaryTree.toMirrorImage();\n\n System.out.println(\"After Converting the tree to mirror image\");\n binaryTree.leftSideView();\n binaryTree.rightSideView();\n\n System.out.println(\"binaryTree.numberOfNodes(): \" + binaryTree.numberOfNodes());\n System.out.println(\"binaryTree.isSimilar(binaryTree): \" + binaryTree.isSimilar(binaryTree));\n System.out.println(\"binaryTree.isSimilar(binaryTree): \" + binaryTree.isCopy(binaryTree));\n System.out.println(\"binaryTree.height(): \" + binaryTree.height());\n System.out.println(\"binaryTree.searchRec(4) \" + binaryTree.searchRec(4));\n System.out.println(\"binaryTree.searchRec(9) \" + binaryTree.searchRec(9));\n }", "public BinaryTreeNode(int data) {\n\t\tleft = null;\n\t\tright = null;\n\t\tthis.data = data;\n\t}", "TreeNode(){\n this.elem = null;\n this.left = null;\n this.right = null;\n }", "public BinaryTree(){\r\n root = null;\r\n }", "private RegressionTreeNode traverseNominalNode(Serializable value) {\n\t\tif(value.equals(this.value)){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}", "public Node readTree() {\n boolean totuusarvo = b.readBoolean();\n if (totuusarvo == true) {\n return new Node(b.readShort(), -1, null, null);\n } else {\n return new Node(\"9000\", -1, readTree(), readTree());\n }\n }", "static Node newNode(int key) \n{ \n\tNode node = new Node(); \n\tnode.left = node.right = null; \n\tnode.data = key; \n\treturn node; \n}", "private void printTree( BinaryNode<AnyType> t )\r\n\t{\r\n\t\tif( t != null )\r\n\t\t{\t\t\t\r\n\t\t\tprintTree( t.left );\r\n\t\t\tSystem.out.print( t.element+\" \");\r\n\t\t\tprintTree( t.right );\r\n\t\t}\r\n\t}", "private Node makeTree(Node currentNode, DataNode dataNode,\r\n\t\t\tint featureSubsetSize, int height) {\n\r\n\t\tif (dataNode.labels.size() < this.traineeDataSize / 25 || height > 7) {\r\n\t\t\treturn new Node(majority(dataNode));\r\n\t\t}\r\n\t\telse{\r\n\r\n\t\t\tEntropyCalculation e1 = new EntropyCalculation();\r\n\r\n\t\t\tNode n = e1.maxGainedElement(dataNode.features, dataNode.labels, featureSubsetSize); //new\r\n\r\n\r\n\t\t\tif(e1.zeroEntropy){\r\n\r\n\t\t\t\tcurrentNode = new Node(dataNode.labels.get(0));\r\n\r\n\t\t\t\t/*currentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.labels.get(0);*/\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\tcurrentNode = new Node();\r\n\r\n\t\t\t\tcurrentNode.featureIndexColumn = n.featureIndexColumn;\r\n\t\t\t\tcurrentNode.featureIndexRow = n.featureIndexRow;\r\n\r\n\t\t\t\tcurrentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.features.get(currentNode.featureIndexRow).get(currentNode.featureIndexColumn);\r\n\r\n\t\t\t\tcurrentNode.leftChild = new Node();\r\n\t\t\t\tcurrentNode.rightChild = new Node();\r\n\r\n\t\t\t\tDataNode leftNode = new DataNode();\r\n\t\t\t\tDataNode rightNode = new DataNode();\r\n\r\n\t\t\t\tfor (int i = 0; i < dataNode.features.size(); i++) {\r\n\r\n\t\t\t\t\tif(currentNode.nodeValue >= dataNode.features.get(i).get(currentNode.featureIndexColumn)) {\r\n\r\n\t\t\t\t\t\tleftNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\tleftNode.labels.add(dataNode.labels.get(i));\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\trightNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\trightNode.labels.add(dataNode.labels.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif((leftNode.labels.isEmpty() || rightNode.labels.isEmpty()) && height == 0){\r\n\t\t\t\t\tSystem.out.println(\"Ghapla\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentNode.leftChild = makeTree(currentNode.leftChild, leftNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\tcurrentNode.rightChild = makeTree(currentNode.rightChild, rightNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n\tpublic void test1() {\n\t\tConvertGraphToBinaryTree tester=new ConvertGraphToBinaryTree();\n\t\tGraphNode n1=tester.new GraphNode(1);GraphNode n2=tester.new GraphNode(2);\n\t\tGraphNode n3=tester.new GraphNode(3);GraphNode n4=tester.new GraphNode(4);\n\t\tGraphNode n5=tester.new GraphNode(5);GraphNode n6=tester.new GraphNode(6);\n\t\tGraphNode n7=tester.new GraphNode(7);GraphNode n8=tester.new GraphNode(8);\n\t\tGraphNode n9=tester.new GraphNode(9);\n\t\tn1.neighbor.add(n2);n1.neighbor.add(n5);n1.neighbor.add(n6);n1.neighbor.add(n9);\n\t\tn2.neighbor.add(n1);n2.neighbor.add(n3);n2.neighbor.add(n7);\n\t\tn3.neighbor.add(n2);n3.neighbor.add(n4);n3.neighbor.add(n8);\n\t\tn4.neighbor.add(n3);n5.neighbor.add(n1);n6.neighbor.add(n1);\n\t\tn7.neighbor.add(n2);n8.neighbor.add(n3);n9.neighbor.add(n1);\n\t\tassertTrue(!tester.isBinaryTree(n1));\n\t\tGraphNode root=tester.convertToBinaryTree(n1);\n\t\tGraphNode last=null;\n\t\tGraphNode curr=root;\n\t\twhile(curr!=null){\n\t\t\tSystem.out.print(curr.val+\"->\");\n\t\t\tif(curr.neighbor.size()<=1&&root!=curr){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i=0;i<curr.neighbor.size();i++){\n\t\t\t\tGraphNode next=curr.neighbor.get(i);\n\t\t\t\tif(next!=last){\n\t\t\t\t\tlast=curr;\n\t\t\t\t\tcurr=next;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println();\n\t}", "private BinaryTree() {\n root = new Node(0);\n }", "public void testInsert01() {\r\n\t\tBTree<String, Integer> bt = new BTree<String, Integer>(4);\r\n\r\n\t\t// Growing the leaf\r\n\t\tbt.set(\"010\", 1);\r\n\t\tbt.set(\"020\", 2);\r\n\t\tbt.set(\"030\", 3);\r\n\t\tbt.set(\"040\", 4);\r\n\t\tassertEquals(bt.root.dump(), \"[010=1, 020=2, 030=3, 040=4]\");\r\n\r\n\t\t// Leaf split (middle) and new root created\r\n\t\tbt.set(\"025\", 5);\r\n\t\tassertEquals(bt.root.dump(), \"[[010=1, 020=2], [025=5, 030=3, 040=4]]\");\r\n\r\n\t\t// Growing the right of the right side of the tree\r\n\t\t// Leaf split (last) and new child added to root\r\n\t\tbt.set(\"050\", 6);\r\n\t\tbt.set(\"060\", 7);\r\n\t\tassertEquals(bt.root.dump(), \"[[010=1, 020=2], [025=5, 030=3], [040=4, 050=6, 060=7]]\");\r\n\r\n\t\t// Growing the left of the right side of the tree\r\n\t\t// Leaf split (first) and new child added to root\r\n\t\tbt.set(\"035\", 8);\r\n\t\tbt.set(\"034\", 9);\r\n\t\tassertEquals(bt.root.dump(),\r\n\t\t\t\t\"[[010=1, 020=2], [025=5, 030=3], [034=9, 035=8, 040=4], [050=6, 060=7]]\");\r\n\r\n\t\t// Growing the right of the right side of the tree\r\n\t\t// Node split (last) and new root created\r\n\t\tbt.set(\"070\", 10);\r\n\t\tassertEquals(bt.root.dump(),\r\n\t\t\t\t\"[[[010=1, 020=2], [025=5, 030=3]], [[034=9, 035=8, 040=4], [050=6, 060=7, 070=10]]]\");\r\n\r\n\t\t// Testing key update\r\n\t\tbt.set(\"010\", -1);\r\n\r\n\t\tassertEquals(bt.get(\"010\"), Integer.valueOf(-1));\r\n\t\tassertEquals(bt.get(\"020\"), Integer.valueOf(2));\r\n\t\tassertEquals(bt.get(\"030\"), Integer.valueOf(3));\r\n\t\tassertEquals(bt.get(\"040\"), Integer.valueOf(4));\r\n\t\tassertEquals(bt.get(\"025\"), Integer.valueOf(5));\r\n\t\tassertEquals(bt.get(\"050\"), Integer.valueOf(6));\r\n\t\tassertEquals(bt.get(\"060\"), Integer.valueOf(7));\r\n\t\tassertEquals(bt.get(\"035\"), Integer.valueOf(8));\r\n\t\tassertEquals(bt.get(\"034\"), Integer.valueOf(9));\r\n\t\tassertEquals(bt.get(\"070\"), Integer.valueOf(10));\r\n\t\tassertEquals(bt.get(\"xyz\"), null);\r\n\t}", "public BTNode(int value){ \r\n node = value; \r\n leftleaf = null;\r\n rightleaf = null;\r\n }", "private void rebalanceLeft(TreeNodeDataType n) {\n left(n);\r\n \r\n \r\n }", "private static BTNode<Tweet> loadSubTree(Tweet[] ts, int low, int high) {\n \tif (low == high) return new BTNode<Tweet>(ts[low]);\n \tint mid = low + 1;\n \ttry { while (ts[mid].compareTo(ts[low]) < 0) mid++; }\n \tcatch (ArrayIndexOutOfBoundsException e) {\n \t\t//what, I'm lazy\n \t\t//the index going out of bounds is part of the functionality\n \t}\n \t// first node (of some block) is always the root (of that same subtree); this handles different cases\n \t// 1. nothing below the root\n \tif (mid == low + 1) return new BTNode<Tweet>(ts[low], null, loadSubTree(ts, mid, high));\n \t// 2. nothing above the root\n \tif (mid > high) return new BTNode<Tweet>(ts[low], loadSubTree(ts, low + 1, high), null);\n \t// 3. things above and below\n \treturn new BTNode<Tweet>(ts[low], loadSubTree(ts, low + 1, mid - 1), loadSubTree(ts, mid, high));\n \t\n }", "public static TreeNode generateBinaryTree3() {\n // Nodes\n TreeNode root = new TreeNode(1);\n TreeNode rootLeft = new TreeNode(2);\n TreeNode rootLeftLeft = new TreeNode(3);\n TreeNode rootLeftLeftLeft = new TreeNode(4);\n TreeNode rootRight = new TreeNode(5);\n TreeNode rootRightRight = new TreeNode(6);\n TreeNode rootRightRightRight = new TreeNode(7);\n // Edges\n root.left = rootLeft;\n rootLeft.left = rootLeftLeft;\n rootLeftLeft.left = rootLeftLeftLeft;\n root.right = rootRight;\n rootRight.right = rootRightRight;\n rootRightRight.right = rootRightRightRight;\n\n // Return root\n return root;\n }", "public static TreeNode generateBinaryTree1() {\n // Nodes\n TreeNode root = new TreeNode(5);\n TreeNode rootLeft = new TreeNode(2);\n TreeNode rootRight = new TreeNode(4);\n TreeNode rootLeftLeft = new TreeNode(20);\n TreeNode rootLeftRight = new TreeNode(1);\n // Edges\n root.left = rootLeft;\n root.right = rootRight;\n rootLeft.left = rootLeftLeft;\n rootLeft.right = rootLeftRight;\n\n // Return root\n return root;\n }", "public static void main(String a[]) {\n TreeNode root = new TreeNode(1,\n new TreeNode(2,\n null,\n new TreeNode(4, null, null)),\n new TreeNode(3, null, null));\n StringBuffer sb = new StringBuffer();\n tree2str(root, sb);\n System.out.println(sb.toString());\n }", "private static Node getTree()\r\n {\r\n Node node1 = new Node( 1 );\r\n Node node2 = new Node( 2 );\r\n Node node3 = new Node( 3 );\r\n Node node4 = new Node( 4 );\r\n Node node5 = new Node( 5 );\r\n Node node6 = new Node( 6 );\r\n Node node7 = new Node( 7 );\r\n\r\n node1.left = node2;\r\n node1.right = node3;\r\n\r\n node2.left = node4;\r\n node2.right = node5;\r\n\r\n node3.left = node6;\r\n node3.right = node7;\r\n return node1;\r\n }", "@Test\n public void levelOrder() throws Exception {\n Node node = new Node(150);\n node.setLeft(new Node(120));\n node.setRight(new Node(40));\n Node root = new Node(110);\n root.setLeft(new Node(80));\n root.setRight(node);\n\n Queue<Integer> expected = new LinkedList<Integer>();\n expected.add(110);\n expected.add(80);\n expected.add(150);\n expected.add(120);\n expected.add(40);\n BinarySearchTree.levelOrder(root);\n assertEquals(expected, BinarySearchTree.printQ);\n }", "TreeNode getTreeNode();", "public BinaryTree() {\n\t}", "public abstract int getNodeType();", "public TreeNode encode(Node root) {\n\t\t\tif (root == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tTreeNode head = new TreeNode(root.val);\n\t\t\thead.left = en(root.children);\n\t\t\treturn head;\n\t\t}", "public interface BinaryTreeADT<T> extends Iterable<T>\n{\n//Returns the element stored in the root of the tree.\npublic T getRootElement();\n\n//Returns the left subtree of the root.\npublic BinaryTreeADT<T> getLeft();\n\n//Returns the right subtree of the root.\npublic BinaryTreeADT<T> getRight();\n\n//Returns true if the binary tree contains an element that\n//matches the specified element and false otherwise.\npublic boolean contains (T target);\n\n//Returns a reference to the element in the tree matching\n//the specified target.\npublic T find (T target);\n\n//Returns true if the binary tree contains no elements, and\n//false otherwise.\npublic boolean isEmpty();\n\n//Returns the number of elements in this binary tree.\npublic int size();\n\n//Returns the string representation of the binary tree.\npublic String toString();\n\n\n}", "public TreeNode build(LinkedList<String> l){\n String s = l.removeFirst();\n //Strings use equals() to compare value, \n //the \"==\" compares the adress that variable points to\n if(s.equals(\"null\")){\n return null;\n }\n else{\n //Integer.parseInt(String s) returns int, \n //Integer.valueOf(String s) returns Integer\n TreeNode node = new TreeNode(Integer.parseInt(s));\n node.left = build(l);\n node.right = build(l);\n return node;\n }\n }", "public TreeNode getLeft(){ return leftChild;}", "public static void main(String[] args) {\n BinaryTreeNode<Integer> tree = new BinaryTreeNode<>(3);\n tree.setLeft(new BinaryTreeNode<>(2));\n tree.getLeft().setLeft(new BinaryTreeNode<>(1));\n tree.getLeft().getLeft().setLeft(new BinaryTreeNode<>(10));\n tree.getLeft().getLeft().getLeft().setRight(new BinaryTreeNode<>(13));\n tree.setRight(new BinaryTreeNode<>(5));\n tree.getRight().setLeft(new BinaryTreeNode<>(4));\n tree.getRight().setRight(new BinaryTreeNode<>(6));\n List<List<Integer>> result = btDepthOrder(tree);\n List<List<Integer>> goldenRes = new ArrayList<>();\n goldenRes.add(Arrays.asList(3));\n goldenRes.add(Arrays.asList(2, 5));\n goldenRes.add(Arrays.asList(1, 4, 6));\n goldenRes.add(Arrays.asList(10));\n goldenRes.add(Arrays.asList(13));\n goldenRes.add(new ArrayList());\n System.out.println(goldenRes.equals(result));\n System.out.println(result);\n }" ]
[ "0.6980424", "0.6410923", "0.63617605", "0.6345599", "0.6334511", "0.630837", "0.62633437", "0.6244097", "0.6236636", "0.6220931", "0.62169236", "0.6205824", "0.6165826", "0.6155733", "0.61545765", "0.61454743", "0.6117475", "0.6100615", "0.6069951", "0.60527045", "0.6038518", "0.6025953", "0.60228735", "0.6022492", "0.6014539", "0.6013701", "0.60076046", "0.60065657", "0.60043335", "0.60017663", "0.6000474", "0.5978575", "0.5969944", "0.59547555", "0.5948838", "0.5946846", "0.59466016", "0.5943452", "0.5932887", "0.5931726", "0.5922944", "0.59177625", "0.5915116", "0.5914698", "0.59140587", "0.59125394", "0.59113234", "0.5909783", "0.590562", "0.5898353", "0.589776", "0.5895948", "0.58893126", "0.5877142", "0.5852622", "0.5848118", "0.58375454", "0.5834964", "0.5833309", "0.5822056", "0.5821549", "0.5814742", "0.5814444", "0.58118284", "0.58104485", "0.58048517", "0.5801151", "0.5800178", "0.5800178", "0.57929206", "0.5792432", "0.5788056", "0.57857066", "0.57829195", "0.5779254", "0.5778459", "0.5774806", "0.57724285", "0.5764585", "0.5763722", "0.5757843", "0.57565916", "0.57563233", "0.5750669", "0.57423335", "0.5738813", "0.5738184", "0.57380706", "0.57361865", "0.5733544", "0.5723905", "0.57179797", "0.5708107", "0.5707935", "0.5700743", "0.5699048", "0.5697454", "0.5694035", "0.56927204", "0.56883824", "0.56839025" ]
0.0
-1
Constructor Public methods add a new record to MarketData array from market change message or update an existing record if market already in some mcs have market definition, some market definitions have runners if market definition is in blacklist, return some mcs have rcs if mc has rc only then no way to know if it is match_odds so add a new market data record anyway if mc has market definition and it is not match_odds then remove it again and add id to blacklist
public void putMarketData(RawData rawData) { //raw data can have multiple market change messages (must have at least one) if (rawData.getMc().size() < 1) { System.out.println("ERROR: no mc in " + rawData.getOp() + ", pt = " + rawData.getPt() + ", clk = " + rawData.getClk()); Runtime.getRuntime().halt(0); } //not all have marketDefinition but all have id, check it against blacklist for (Mc mc : rawData.getMc()) { if (!nonMarketData.containsKey(mc.getId())) { //copy non-null fields to attributes MarketData newMarketData = copyFrom(marketData.get(mc.getId()), mc, rawData.getPt()); if (mc.getId().contains(Test.FORENSIC)) { Utils.prettilyPrint(newMarketData, null); } //if not a market in which we are not interested in if (newMarketData != null) { marketData.put(mc.getId(), newMarketData); } else { marketData.remove(mc.getId()); nonMarketData.put(mc.getId(), mc.getMarketDefinition().getMarketType()); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private MarketData copyFrom(MarketData marketData, Mc mc, long timeStamp) {\n\n\t\t//convert from rawdata to data format\n\t\tMarketData mcData = new MarketData(mc, timeStamp);\n\n\t\tif (mc.getId().contains(Test.FORENSIC)) {\n//\t\t\tUtils.prettilyPrint(mcData, null);\n\t\t}\n\n\t\t//get given null if market data is to be created\n\t\tif (marketData == null) {\n\t\t\tmarketData = new MarketData();\n\t\t}\n\n\t\t//if there is market definition, copy market definition\n\t\tif (mc.getMarketDefinition() != null &&\n\t\t\t\tmc.getMarketDefinition().getMarketType() != null) {\n\t\t\t\n\t\t\t//one track mind and singles\n\t\t\tif (!mc.getMarketDefinition().getMarketType().equals(\"MATCH_ODDS\") ||\n\t\t\t\t\tmc.getMarketDefinition().getRunners().get(0).getName().contains(\"/\")) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//check if going in play\n\t\t\t\tmarketData.setId(mc.getId());\n/*\t\t\t\tSystem.out.println(\"timestatus: \" + \n\t\t\t\t\t\tUtils.millisToDateTime(timeStamp) + \": \" + mcData.getStatus() + \"/\" + \n\t\t\t\t\t\tmc.getMarketDefinition().isInPlay());\n*/\n\t\t\t\tif (marketData.getTime().equals(\"\")) {\n\t\t\t\t\tif (mc.getMarketDefinition().isInPlay()) {\n\t\t\t\t\t\tmarketData.setTime(Utils.millisToDateTime(timeStamp));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (mcData.getName() != null) {\n\t\t\t\t\tmarketData.setName(mcData.getName());\n\t\t\t\t}\n\t\t\t\tif (mcData.getMarketType() != null) {\n\t\t\t\t\tmarketData.setMarketType(mcData.getMarketType());\n\t\t\t\t}\n\t\t\t\tif (mcData.getEventName() != null) {\n\t\t\t\t\tmarketData.setEventName(mcData.getEventName());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//if there is runners, update or create players\n\t\t\t\tif (mc.getMarketDefinition().getRunners() != null &&\n\t\t\t\t\t\tmc.getMarketDefinition().getRunners().size() > 0) {\n\t\t\t\t\tfor (Runners runner : mc.getMarketDefinition().getRunners()) {\n\t\t\t\t\t\tPlayer existingPlayer = marketData.getPlayers().get(runner.getId());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update existing player\n\t\t\t\t\t\tif (existingPlayer != null) {\n\t\t\t\t\t\t\tif (runner.getName() != null) {\n\t\t\t\t\t\t\t\texistingPlayer.setName(runner.getName());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (runner.getStatus() != null) {\n\t\t\t\t\t\t\t\texistingPlayer.setStatus(runner.getStatus());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//create new player\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\texistingPlayer = new Player(runner);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//overwrite/create\n\t\t\t\t\t\tmarketData.getPlayers().put(runner.getId(), existingPlayer);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//if there is runner change (can occur with or without market definition) update players\n\t\tif (mc.getRc() != null &&\n\t\t\t\tmc.getRc().size() > 0) {\n\t\t\tfor (Rc rc : mc.getRc()) {\n\t\t\t\t\n\t\t\t\t//update player from runner\n\t\t\t\tPlayer existingPlayer = marketData.getPlayers().get(rc.getId());\n\t\t\t\tif (existingPlayer != null) {\n\t\t\t\t\texistingPlayer.addNewTransaction(rc, timeStamp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//create new player\n\t\t\t\telse {\n\t\t\t\t\tmarketData.addNewPlayer(rc, timeStamp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//a transaction for only one player is present so the other player needs a counter point\n\t\t\t\tif (mc.getRc().size() < 2 && marketData.getPlayers().size() > 1) { //check if other player exists yet\n\t\t\t\t\tfor (Player otherPlayer : marketData.getPlayers().values()) {\n\t\t\t\t\t\tif (otherPlayer != null && existingPlayer != null) {\n\t\t\t\t\t\t\tif (!(otherPlayer.getId() == existingPlayer.getId())) {\n\t\t\t\t\t\t\t\tTransaction counterTransaction = new Transaction(\n\t\t\t\t\t\t\t\t\t\totherPlayer.getId(), timeStamp, Utils.counterPoint(rc.getLtp()), true);\n\t\t\t\t\t\t\t\tmarketData.getPlayers().get(otherPlayer.getId()).getTransactions().add(counterTransaction);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//TODO:\n\t\t// - probably should store and check timestamps to only overwrite older updates.\n\t\t// - don't just add runner change, check if a previous update with same timestamp is already there and overwrite it\n\t\t\t\n\t\treturn marketData;\n\t\t\n\t}", "public void setMarket(RedMarket market) {\n this.market = market;\n }", "public void matchBets(MarketRunners marketRunners);", "protected synchronized boolean processNewRscDataListWithBinning() {\n preProcessFrameUpdate();\n\n boolean frameMatched = false;\n IRscDataObject lastDataObj = null;\n IRscDataObject rscDataObj = null;\n int closestMatch = 0;\n\n for (AbstractFrameData frameData : frameDataMap.values()) {\n if (frameData != null) {\n\n frameMatched = false;\n\n while (!newRscDataObjsQueue.isEmpty()) {\n rscDataObj = newRscDataObjsQueue.poll();\n\n if (frameData.isRscDataObjInFrame(rscDataObj)) {\n\n // Which is a closer match to the frame, the current\n // IRscDataObject or the one before?\n closestMatch = frameData.closestToFrame(rscDataObj,\n lastDataObj);\n\n // If current IRscDataObject rscDataObj is closer match\n if (closestMatch == 1) {\n addRscDataToFrame(frameData, rscDataObj);\n lastDataObj = rscDataObj;\n }\n // Else last IRscDataObject lastDataObj, closer (2)\n // OR last & current IRscDataObject are equal (0)\n // AND BOTH are not null (-1)\n else if (closestMatch != -1) {\n addRscDataToFrame(frameData, lastDataObj);\n }\n\n frameMatched = true;\n break;\n }\n\n lastDataObj = rscDataObj;\n\n } // end while\n\n if (!frameMatched) {\n\n // Which IRscDataObject is a closer time match ?\n // the last one processed or the current one?\n closestMatch = frameData.closestToFrame(rscDataObj,\n lastDataObj);\n\n // Latest IRscDataObject rscDataObj is the closest match\n if (closestMatch == 1) {\n addRscDataToFrame(frameData, rscDataObj);\n lastDataObj = rscDataObj;\n }\n // IF the previous IRscDataObject lastDataObj was the\n // closest match (2)\n // OR\n // IF the latest & previous were equally good matches(0)\n // and the two objects were equal without being both null\n // (-1)\n else if (closestMatch != -1) {\n addRscDataToFrame(frameData, lastDataObj);\n }\n\n }\n\n }\n } // end for\n\n // allow resources to post-process the data after it is added to the\n // frames\n postProcessFrameUpdate();\n autoUpdateReady = false;\n return true;\n }", "public Market() {\n // the size of the row determines the number of columns and vice versa\n marbleMatrix = new Marble[COL_SIZE][ROW_SIZE];\n\n LinkedList<Marble> marbleLinkedList = new LinkedList<>();\n\n marbleLinkedList.add(new WhiteMarble());\n marbleLinkedList.add(new YellowMarble());\n marbleLinkedList.add(new GreyMarble());\n marbleLinkedList.add(new BlueMarble());\n marbleLinkedList.add(new BlueMarble());\n marbleLinkedList.add(new PurpleMarble());\n marbleLinkedList.add(new PurpleMarble());\n marbleLinkedList.add(new WhiteMarble());\n marbleLinkedList.add(new GreyMarble());\n marbleLinkedList.add(new YellowMarble());\n marbleLinkedList.add(new WhiteMarble());\n marbleLinkedList.add(new RedMarble());\n marbleLinkedList.add(new WhiteMarble());\n\n Collections.shuffle(marbleLinkedList);\n\n for (int i = 0; i < COL_SIZE; i++)\n for (int j = 0; j < ROW_SIZE; j++) {\n marbleMatrix[i][j] = marbleLinkedList.pop();\n }\n marbleLeft = marbleLinkedList.pop();\n\n }", "public void setMarketId(String marketId) {\n this.marketId = marketId;\n }", "void updateMarketBoard(LightMarketBoard market);", "public ObsCommon getDecodedData(ObsCommon receiver) {\n if (receiver != null) {\n // Set to null here. If any data needs to be added, then the\n // object will be created.\n AncCloud layer = null;\n\n if (cloudAmount != null) {\n if (layer == null) {\n layer = new AncCloud(4);\n receiver.addCloud(layer);\n }\n layer.setCloudAmount(cloudAmount);\n }\n if (cloudGenus != null) {\n if (layer == null) {\n layer = new AncCloud(4);\n receiver.addCloud(layer);\n }\n layer.setCloudgenus(cloudGenus);\n }\n if (cloudAltitude != null) {\n if (layer == null) {\n layer = new AncCloud(4);\n receiver.addCloud(layer);\n }\n layer.setCloudHeight(cloudAltitude);\n }\n if (cloudDescription != null) {\n if (layer == null) {\n layer = new AncCloud(4);\n receiver.addCloud(layer);\n }\n layer.setCloudObsType(cloudDescription);\n }\n }\n return receiver;\n }", "public Market() {\n }", "public void setMarketId(String marketId) {\n this.marketId = marketId;\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 }", "public OrderInventedRecord(Integer id, String orderSn, Integer sellerId, Integer memberId, String memberName, Byte orderState, Timestamp payTime, Byte paymentStatus, Byte invoiceStatus, String invoiceTitle, Byte invioceState, String invoiceType, BigDecimal moneyProduct, BigDecimal moneyOrder, BigDecimal moneyPaidBalance, BigDecimal moneyPaidReality, BigDecimal moneyGiftcardAmount, BigDecimal moneyCouponcode, BigDecimal moneyLowerAmount, BigDecimal moneyBack, Integer moneyIntegral, Integer lowerId, Integer giftcardId, Integer couponcodeId, String ip, String paymentName, String paymentCode, String mobile, String codeExchange, Byte isSuccess, String email, String zipCode, String remark, Timestamp finishTime, String tradeSn, String source, Byte isGiftCardOrder, Integer productCommentsId, Timestamp createTime, Timestamp updateTime) {\n super(OrderInvented.ORDER_INVENTED);\n\n set(0, id);\n set(1, orderSn);\n set(2, sellerId);\n set(3, memberId);\n set(4, memberName);\n set(5, orderState);\n set(6, payTime);\n set(7, paymentStatus);\n set(8, invoiceStatus);\n set(9, invoiceTitle);\n set(10, invioceState);\n set(11, invoiceType);\n set(12, moneyProduct);\n set(13, moneyOrder);\n set(14, moneyPaidBalance);\n set(15, moneyPaidReality);\n set(16, moneyGiftcardAmount);\n set(17, moneyCouponcode);\n set(18, moneyLowerAmount);\n set(19, moneyBack);\n set(20, moneyIntegral);\n set(21, lowerId);\n set(22, giftcardId);\n set(23, couponcodeId);\n set(24, ip);\n set(25, paymentName);\n set(26, paymentCode);\n set(27, mobile);\n set(28, codeExchange);\n set(29, isSuccess);\n set(30, email);\n set(31, zipCode);\n set(32, remark);\n set(33, finishTime);\n set(34, tradeSn);\n set(35, source);\n set(36, isGiftCardOrder);\n set(37, productCommentsId);\n set(38, createTime);\n set(39, updateTime);\n }", "public ArrayList<LCSRevisableEntity> prepareToCreateEntries(String strActivity) \n\t{\n\t\tLCSLog.debug(CLASSNAME+\"prepareToCreateEntries(),:\"+\"ACTIVITY:\" +strActivity);\n ArrayList<LCSRevisableEntity> listOfRev=new ArrayList<LCSRevisableEntity>();\n LCSRevisableEntity entries=null;\n\t\t\n String selectedcolors = this.requesttable.get(\"selectedcolors\");\n\tLCSLog.debug(CLASSNAME+\"prepareToCreateEntries *************1**************\");\n\t\ttry {\n\t\t\tif (FormatHelper.hasContent(selectedcolors)) {\n\t\t\tLCSLog.debug(\"prepareToCreateEntries *************2**************\");\n\t\t\t\tCollection stagingItems = MOAHelper\n\t\t\t\t\t\t.getMOACollection(selectedcolors);\n\t\t\tLCSLog.debug(CLASSNAME+\"prepareToCreateEntries *************3**************\");\n\t\t\t\tLCSLog.debug(CLASSNAME+\"stagingItems.size() -- \" + stagingItems.size());\n\t\t\t\tIterator checkboxListIter = stagingItems.iterator();\n\t\t\t\twhile (checkboxListIter.hasNext()) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tString id = (String) checkboxListIter.next();\n\t\t\t\t\tLCSLog.debug(CLASSNAME+\"prepareToCreateEntries\"+\"Calling createEntries()\");\n\t\t\t\t\tentries=createEntries(id);\n\t\t\t\t\t\n\t\t\t\t\tLCSLog.debug(CLASSNAME+\"ENTRIES::--->\" +entries);\n\t\t\t\t\tlistOfRev.add(entries);\n\t\t\t\t LCSLog.debug(CLASSNAME+\"It is sucesess of the creat revesiable entity\" +listOfRev.size());\t\n\t\t\t\t}\n\t\t\t\tLCSLog.debug(\"prepareToCreateEntries *************4**************\");\n\t\t\t\tLCSRevisableEntityClientModel masterModel = new LCSRevisableEntityClientModel();\n\t\t\t\tLCSLog.debug(\"prepareToCreateEntries *************5**************\");\n\t\t\t\tmasterModel.load(FormatHelper.getObjectId(this.masterRevEntity));\n\t\t\t\t\t\tLCSLog.debug(\"prepareToCreateEntries *************6**************\");\n\t\t\t\tmasterModel.setValue(LFIBTConstants.IBTMASTERUPDATECHECK,\n\t\t\t\t\t\tBoolean.TRUE);\n\t\t\t//Added for 7.6//\n\t\t\t\tif(strActivity.equalsIgnoreCase(\"COSTSHEET\")){\n\t\t\t\t\tmasterModel.setValue(LFIBTConstants.IBTACTIVITYSTATUS,\n\t\t\t\t\t\t\"COSTSHEET\");\n\t\t\t\t}else{\n\t\t\t\t\tmasterModel.setValue(LFIBTConstants.IBTACTIVITYSTATUS,\n\t\t\t\t\t\t\"PERSIST\");\n\t\t\t\t}\t\t\t\t\n\t\t\t\t//Added for 7.6//\n\t\t\t\t\t\tLCSLog.debug(CLASSNAME+\"prepareToCreateEntries *************7**************\");\n\t\t\t\tmasterModel.save();\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (WTException exp) \n\t\t{\n\t\t\tLCSLog.error(\"WTException occurred!! \" + exp.getMessage());\n\n\t\t}\n\t\tcatch (WTPropertyVetoException exp) {\n\t\t\tLCSLog.error(\"WTPropertyVetoException occurred!!\");\n\n\t\t}\n\t\treturn listOfRev;\n\n\t}", "private static void ceSync(Connection con, InputStreamReader isr, String club) {\n\n PreparedStatement pstmt2 = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n int ext = 1;\n\n // Values from CE records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String webid = \"\";\n String mNum = \"\";\n String u_hndcp = \"\";\n String c_hndcp = \"\";\n String mship = \"\";\n String mtype = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String mobile = \"\";\n String primary = \"\";\n String active = \"\";\n String webid_new = \"\";\n String memid_new = \"\";\n String lnamePart2;\n\n String mship2 = \"\"; // used to tell if match was found\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n int inact = 0;\n\n // Values from ForeTees records\n //\n String memid_old = \"\";\n String fname_old = \"\";\n String lname_old = \"\";\n String mi_old = \"\";\n String mship_old = \"\";\n String mtype_old = \"\";\n String email_old = \"\";\n String mNum_old = \"\";\n String ghin_old = \"\";\n String bag_old = \"\";\n String posid_old = \"\";\n String email2_old = \"\";\n String phone_old = \"\";\n String phone2_old = \"\";\n String suffix_old = \"\";\n\n float u_hcap_old = 0;\n float c_hcap_old = 0;\n int birth_old = 0;\n int inact_old = 0;\n\n // Values for New ForeTees records\n //\n String fname_new = \"\";\n String lname_new = \"\";\n String mi_new = \"\";\n String mship_new = \"\";\n String mtype_new = \"\";\n String email_new = \"\";\n String mNum_new = \"\";\n String ghin_new = \"\";\n String bag_new = \"\";\n String posid_new = \"\";\n String email2_new = \"\";\n String phone_new = \"\";\n String phone2_new = \"\";\n String suffix_new = \"\";\n String last_mship = \"\";\n String last_mnum = \"\";\n String openParen = \"(\";\n String closeParen = \")\";\n String asterik = \"*\";\n String slash = \"/\";\n String backslash = \"\\\\\";\n\n float u_hcap_new = 0;\n float c_hcap_new = 0;\n int birth_new = 0;\n int inact_new = 0;\n int rcount = 0;\n int pcount = 0;\n int ncount = 0;\n int ucount = 0;\n int errCount = 0;\n int warnCount = 0;\n int totalErrCount = 0;\n int totalWarnCount = 0;\n int email_bounce1 = 0;\n int email_bounce2 = 0;\n\n String errorMsg = \"\";\n String errMsg = \"\";\n String warnMsg = \"\";\n String errMemInfo = \"\";\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean headerFound = false;\n boolean found = false;\n boolean useWebid = false;\n boolean genderMissing = false;\n\n ArrayList<String> errList = new ArrayList<String>();\n ArrayList<String> warnList = new ArrayList<String>();\n\n\n // Overwrite log file with fresh one for today's logs\n SystemUtils.logErrorToFile(\"Clubessential: Error log for \" + club + \"\\nStart time: \" + new java.util.Date().toString() + \"\\n\", club, false);\n\n try {\n\n Calendar caly = new GregorianCalendar(); // get todays date\n int thisYear = caly.get(Calendar.YEAR); // get this year value\n\n thisYear = thisYear - 2000; // 2 digit value\n\n\n BufferedReader br = new BufferedReader(isr);\n\n // format of each line in the file:\n //\n // memid, mNum, fname, mi, lname, suffix, mship, mtype, gender, email, email2,\n // phone, phone2, bag, hndcp#, uhndcp, chndcp, birth, posid, mobile, primary, act/inact\n //\n //\n while (true) {\n\n line = br.readLine();\n\n if (line == null) {\n break;\n }\n\n // Skip the 1st row (header row)\n\n if (headerFound == false) {\n\n headerFound = true;\n\n } else {\n\n // Remove the dbl quotes and check for embedded commas\n\n line = cleanRecord( line );\n\n rcount++; // count the records\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() > 20 ) { // enough data ?\n\n memid = tok.nextToken(); // a\n mNum = tok.nextToken(); // b\n fname = tok.nextToken(); // c\n mi = tok.nextToken(); // d\n lname = tok.nextToken(); // e\n suffix = tok.nextToken(); // f\n mship = tok.nextToken(); // g\n mtype = tok.nextToken(); // h\n gender = tok.nextToken(); // i\n email = tok.nextToken(); // j\n email2 = tok.nextToken(); // k\n phone = tok.nextToken(); // l\n phone2 = tok.nextToken(); // m\n bag = tok.nextToken(); // n\n ghin = tok.nextToken(); // o\n u_hndcp = tok.nextToken(); // p\n c_hndcp = tok.nextToken(); // q\n temp = tok.nextToken(); // r\n posid = tok.nextToken(); // s\n mobile = tok.nextToken(); // t\n primary = tok.nextToken(); // u\n active = tok.nextToken(); // v\n\n //\n // Check for ? (not provided)\n //\n if (memid.equals( \"?\" )) {\n\n memid = \"\";\n }\n if (mNum.equals( \"?\" )) {\n\n mNum = \"\";\n }\n if (fname.equals( \"?\" )) {\n\n fname = \"\";\n }\n if (mi.equals( \"?\" )) {\n\n mi = \"\";\n }\n if (lname.equals( \"?\" )) {\n\n lname = \"\";\n }\n if (suffix.equals( \"?\" )) {\n\n suffix = \"\";\n }\n if (mship.equals( \"?\" )) {\n\n mship = \"\";\n }\n if (mtype.equals( \"?\" )) {\n\n mtype = \"\";\n }\n if (gender.equals( \"?\" ) || (!gender.equalsIgnoreCase(\"M\") && !gender.equalsIgnoreCase(\"F\"))) {\n\n if (gender.equals( \"?\" )) {\n genderMissing = true;\n } else {\n genderMissing = false;\n }\n gender = \"\";\n }\n if (email.equals( \"?\" )) {\n\n email = \"\";\n }\n if (email2.equals( \"?\" )) {\n\n email2 = \"\";\n }\n if (phone.equals( \"?\" )) {\n\n phone = \"\";\n }\n if (phone2.equals( \"?\" )) {\n\n phone2 = \"\";\n }\n if (bag.equals( \"?\" )) {\n\n bag = \"\";\n }\n if (ghin.equals( \"?\" )) {\n\n ghin = \"\";\n }\n if (u_hndcp.equals( \"?\" )) {\n\n u_hndcp = \"\";\n }\n if (c_hndcp.equals( \"?\" )) {\n\n c_hndcp = \"\";\n }\n if (temp.equals( \"?\" ) || temp.equals( \"0\" )) {\n\n temp = \"\";\n }\n if (posid.equals( \"?\" )) {\n\n posid = \"\";\n }\n if (mobile.equals( \"?\" )) {\n\n mobile = \"\";\n }\n if (primary.equals( \"?\" )) {\n\n primary = \"\";\n }\n if (active.equals( \"?\" )) {\n\n active = \"\";\n }\n\n\n //\n // Westchester memids will be empty for dependents\n //\n if (club.equals( \"westchester\" ) && memid.equals( \"\" )) {\n\n memid = mNum; // use mNum\n }\n\n\n if (club.equals( \"virginiacc\" )) {\n\n //\n // Make sure name is titled\n //\n fname = toTitleCase(fname);\n lname = toTitleCase(lname);\n }\n\n\n //\n // Ignore mi if not alpha\n //\n if (mi.endsWith( \"0\" ) || mi.endsWith( \"1\" ) || mi.endsWith( \"2\" ) || mi.endsWith( \"3\" ) ||\n mi.endsWith( \"4\" ) || mi.endsWith( \"5\" ) || mi.endsWith( \"6\" ) || mi.endsWith( \"7\" ) ||\n mi.endsWith( \"8\" ) || mi.endsWith( \"9\" )) {\n\n mi = \"\";\n }\n\n\n tok = new StringTokenizer( lname, openParen ); // check for open paren '('\n\n if ( tok.countTokens() > 1 ) {\n\n lname = tok.nextToken(); // skip open paren and anything following it\n }\n\n tok = new StringTokenizer( lname, slash ); // check for slash\n\n if ( tok.countTokens() > 1 ) {\n\n lname = tok.nextToken(); // skip them and anything following it\n }\n\n tok = new StringTokenizer( lname, backslash ); // check for backslash\n\n if ( tok.countTokens() > 1 ) {\n\n lname = tok.nextToken(); // skip them and anything following it\n }\n\n tok = new StringTokenizer( fname, openParen ); // check for open paren '('\n\n if ( tok.countTokens() > 1 ) {\n\n fname = tok.nextToken(); // skip open paren and anything following it\n }\n\n tok = new StringTokenizer( fname, \"/\\\\\" ); // check for slash and backslash\n\n if ( tok.countTokens() > 1 ) {\n\n fname = tok.nextToken(); // skip them and anything following it\n }\n\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!memid.equals( \"\" ) && !mNum.equals( \"\" ) && !lname.equals( \"\" ) && !fname.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 ) {\n\n mi = tok.nextToken(); // over-write mi if already there\n\n if (mi.startsWith(\"&\")) {\n mi = \"\";\n }\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n\n if ( tok.countTokens() > 0 ) { // more than just lname?\n\n lname = tok.nextToken(); // remove suffix and spaces\n }\n\n if (suffix.equals( \"\" )) { // if suffix not provided\n\n if ( tok.countTokens() > 1 ) { // check for suffix and 2 part lname (i.e. Van Buren)\n\n lnamePart2 = tok.nextToken();\n\n if (!lnamePart2.startsWith(\"&\") && !lnamePart2.startsWith(openParen)) { // if ok to add\n\n lname = lname + lnamePart2; // combine (i.e. VanBuren)\n }\n }\n\n if ( tok.countTokens() > 0 ) { // suffix?\n\n suffix = tok.nextToken();\n\n if (suffix.startsWith(\"&\")) {\n suffix = \"\";\n }\n }\n\n } else { // suffix provided in suffix field - check for 2 part lname (i.e. Van Buren)\n\n if ( tok.countTokens() > 0 ) {\n\n lnamePart2 = tok.nextToken();\n\n if (!lnamePart2.startsWith(\"&\") && !lnamePart2.startsWith(\"(\") && !lnamePart2.equals(suffix)) { // if ok to add\n\n lname = lname + lnamePart2; // combine (i.e. VanBuren)\n }\n }\n }\n\n if (suffix.startsWith(openParen)) { // if not really a suffix\n\n suffix = \"\";\n }\n\n\n //\n // Isolate the last name in case extra info attached (i.e. lname..yyyy/nnn)\n //\n if (!lname.equals( \"\" )) {\n\n tok = new StringTokenizer( lname, asterik ); // delimiters are slashes, asterics (backslash needs 2)\n\n if ( tok.countTokens() > 0 ) {\n\n lname = tok.nextToken(); // isolate lname\n }\n\n tok = new StringTokenizer( lname, slash );\n\n if ( tok.countTokens() > 0 ) {\n\n lname = tok.nextToken();\n }\n\n tok = new StringTokenizer( lname, backslash );\n\n if ( tok.countTokens() > 0 ) {\n\n lname = tok.nextToken();\n }\n }\n\n //\n // Append the suffix to last name if it exists and isn't already appended\n //\n if (!suffix.equals(\"\")) {\n\n if (!lname.endsWith(suffix)) {\n\n lname = lname + \"_\" + suffix; // append it\n }\n\n suffix = \"\"; // done with it now\n }\n\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n if (!u_hndcp.equals( \"\" ) && !u_hndcp.equalsIgnoreCase(\"NH\") && !u_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n u_hndcp = u_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n u_hndcp = u_hndcp.replace('H', ' '); // or 'H' if present\n u_hndcp = u_hndcp.replace('N', ' '); // or 'N' if present\n u_hndcp = u_hndcp.replace('J', ' '); // or 'J' if present\n u_hndcp = u_hndcp.replace('R', ' '); // or 'R' if present\n u_hndcp = u_hndcp.trim();\n\n u_hcap = Float.parseFloat(u_hndcp); // usga handicap\n\n if ((!u_hndcp.startsWith(\"+\")) && (!u_hndcp.startsWith(\"-\"))) {\n\n u_hcap = 0 - u_hcap; // make it a negative hndcp (normal)\n }\n }\n\n if (!c_hndcp.equals( \"\" ) && !c_hndcp.equalsIgnoreCase(\"NH\") && !c_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n c_hndcp = c_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n c_hndcp = c_hndcp.replace('H', ' '); // or 'H' if present\n c_hndcp = c_hndcp.replace('N', ' '); // or 'N' if present\n c_hndcp = c_hndcp.replace('J', ' '); // or 'J' if present\n c_hndcp = c_hndcp.replace('R', ' '); // or 'R' if present\n c_hndcp = c_hndcp.trim();\n\n c_hcap = Float.parseFloat(c_hndcp); // usga handicap\n\n if ((!c_hndcp.startsWith(\"+\")) && (!c_hndcp.startsWith(\"-\"))) {\n\n c_hcap = 0 - c_hcap; // make it a negative hndcp (normal)\n }\n }\n\n //\n // convert birth date (mm/dd/yyyy to yyyymmdd)\n //\n if (!temp.equals( \"\" )) {\n\n int mm = 0;\n int dd = 0;\n int yy = 0;\n\n tok = new StringTokenizer( temp, \"/-\" ); // delimiters are / & -\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n mm = Integer.parseInt(b1);\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else { // try 'Jan 20, 1951' format\n\n tok = new StringTokenizer( temp, \", \" ); // delimiters are comma and space\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n if (b1.startsWith( \"Jan\" )) {\n mm = 1;\n } else {\n if (b1.startsWith( \"Feb\" )) {\n mm = 2;\n } else {\n if (b1.startsWith( \"Mar\" )) {\n mm = 3;\n } else {\n if (b1.startsWith( \"Apr\" )) {\n mm = 4;\n } else {\n if (b1.startsWith( \"May\" )) {\n mm = 5;\n } else {\n if (b1.startsWith( \"Jun\" )) {\n mm = 6;\n } else {\n if (b1.startsWith( \"Jul\" )) {\n mm = 7;\n } else {\n if (b1.startsWith( \"Aug\" )) {\n mm = 8;\n } else {\n if (b1.startsWith( \"Sep\" )) {\n mm = 9;\n } else {\n if (b1.startsWith( \"Oct\" )) {\n mm = 10;\n } else {\n if (b1.startsWith( \"Nov\" )) {\n mm = 11;\n } else {\n if (b1.startsWith( \"Dec\" )) {\n mm = 12;\n } else {\n mm = Integer.parseInt(b1);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else {\n\n birth = 0;\n }\n }\n\n if (mm > 0) { // if birth provided\n\n if (mm == 1 && dd == 1 && yy == 1) { // skip if 1/1/0001\n\n birth = 0;\n\n } else {\n\n if (yy < 100) { // if 2 digit year\n\n if (yy <= thisYear) {\n\n yy += 2000; // 20xx\n\n } else {\n\n yy += 1900; // 19xx\n }\n }\n\n birth = (yy * 10000) + (mm * 100) + dd; // yyyymmdd\n\n if (yy < 1900) { // check for invalid date\n\n birth = 0;\n }\n }\n\n } else {\n\n birth = 0;\n }\n\n } else {\n\n birth = 0;\n }\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n\n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n\n skip = false;\n errCount = 0; // reset the error counter\n warnCount = 0; // reset warning counter\n errMsg = \"\"; // reset error message\n warnMsg = \"\"; // reset warning message\n errMemInfo = \"\"; // reset the error member info\n found = false; // default to club NOT found\n\n\n //\n // Set the active/inactive flag in case it is used\n //\n inact = 0; // default = active\nif (!club.equals(\"tpcwakefieldplantation\")) {\n if (active.equalsIgnoreCase( \"I\" )) {\n\n inact = 1; // set inactive\n }\n}\n\n //\n // Weed out any non-members\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\") ||\n fname.equalsIgnoreCase(\"test\") || lname.equalsIgnoreCase(\"test\")) {\n\n inact = 1; // skip this record\n }\n\n //\n // Format member info for use in error logging before club-specific manipulation\n //\n errMemInfo = \"Member Details:\\n\" +\n \" name: \" + lname + \", \" + fname + \" \" + mi + \"\\n\" +\n \" mtype: \" + mtype + \" mship: \" + mship + \"\\n\" +\n \" memid: \" + memid + \" mNum: \" + mNum + \" gender: \" + gender;\n\n\n // if gender is incorrect or missing, flag a warning in the error log\n if (gender.equals(\"\")) {\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'M')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'M')\";\n }\n gender = \"M\";\n }\n\n //\n // Skip entries with no membership type\n //\n if (mship.equals(\"\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n }\n\n //\n // Skip entries with first/last names of 'admin'\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -INVALID NAME! 'Admin' or 'admin' not allowed for first or last name\";\n }\n\n //\n // Make sure the member is not inactive - skip it it is\n //\n if (inact == 0 || club.equals( \"congressional\" )) { // if active or Congressional\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n if (club.equals( \"weeburn\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (mship.equalsIgnoreCase( \"house\" ) ||\n mship.equalsIgnoreCase( \"non-golf\" ) || mship.equalsIgnoreCase( \"non-resident house\" ) ||\n mship.equalsIgnoreCase( \"non-resident non-golf\" ) || mship.equalsIgnoreCase( \"senior house\" ) ||\n mship.equalsIgnoreCase( \"senior non-golf\" ) || mship.equalsIgnoreCase( \"senior non golf\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: MEMBERSHIP TYPE NOT FOUND!\";\n \n } else {\n\n if (mship.startsWith( \"WFG\" )) {\n\n mship = \"WAITING FOR GOLF\"; // convert mship\n }\n\n if (mship.equalsIgnoreCase( \"golf\" )) {\n\n mship = \"Golf\"; // convert mship\n }\n\n //\n // set defaults\n //\n if (gender.equalsIgnoreCase( \"f\" )) {\n\n gender = \"F\"; // Female\n\n } else {\n\n gender = \"M\"; // default to Male\n }\n\n //\n // Set the Member Type\n //\n if (primary.equalsIgnoreCase( \"p\" )) {\n\n mtype = \"Primary Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Primary Female\";\n }\n\n posid = mNum;\n\n } else if (primary.equalsIgnoreCase( \"s\" )) {\n\n mtype = \"Spouse Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Spouse Female\";\n }\n\n posid = mNum + \"S\";\n\n } else {\n\n mtype = \"Junior\";\n }\n\n if (mship.equalsIgnoreCase( \"DEPENDENT CHILD\" )) {\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 18 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 18 yrs old\n\n mtype = \"Junior\";\n\n } else {\n\n year = year - 5; // back up 5 more years (23 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 18 - 22 yrs old (< 23)\n\n mtype = \"Adult Child\";\n\n } else {\n\n year = year - 6; // back up 6 more years (29 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 23 - 28 yrs old (< 29)\n\n mtype = \"Extended Family\";\n\n } else {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT CHILD OVER 29\";\n }\n }\n }\n }\n\n //\n // Try to set the correct mship type (spouses must be changed)\n //\n if (primary.equalsIgnoreCase( \"s\" ) || mship.equalsIgnoreCase( \"Dependent Spouse\" ) ||\n mship.equalsIgnoreCase(\"DEPENDENT CHILD\")) {\n\n if (mNum.equals( last_mnum )) { // if spouse of last member processed\n\n mship = last_mship; // get primary's mship value\n\n } else {\n\n //\n // Check the db for the primary's mship type\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE memNum = ? AND m_type like 'Primary%'\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\");\n\n } else {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n pstmt2.close();\n }\n\n } else { // must be primary\n\n last_mnum = mNum; // save these for spouse\n last_mship = mship;\n }\n\n }\n\n } // end of IF club = ???\n\n\n if (club.equals( \"westchester\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (mship.equalsIgnoreCase( \"courtesy\" ) || mship.equalsIgnoreCase( \"houseres\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // Set the Member & Membership Types\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n mship = \"Members\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Member Female\";\n\n } else {\n\n mtype = \"Member Male\";\n }\n\n } else { // all others (spouse and dependents)\n\n mship = \"Family Members\";\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n\n //\n // Set memid for dependents\n //\n ext++; // bump common extension value (1 - nnnnn)\n memid = memid + ext;\n }\n }\n } else {\n\n skip = true;\n }\n } // end of IF club = westchester\n\n\n //\n // CC of Virginia\n //\n if (club.equals( \"virginiacc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // Set the Member Types (based on age and gender)\n //\n if (birth == 0) { // if age unknown\n\n mtype = \"Adult Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 16; // backup 16 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 16 yrs old\n\n mtype = \"Junior Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Junior Female\";\n }\n\n } else {\n\n year = year - 7; // backup 7 more years (23 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 16 - 22 yrs old (< 23)\n\n mtype = \"Student Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Student Female\";\n }\n\n } else {\n\n year = year - 7; // backup 7 more years (30 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 23 - 29 yrs old (< 30)\n\n mtype = \"Young Adult Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Young Adult Female\";\n }\n\n } else {\n\n year = year - 30; // backup 30 more years (60 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 30 - 59 yrs old (< 60)\n\n mtype = \"Adult Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n mtype = \"Senior Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Senior Female\";\n }\n }\n }\n }\n }\n }\n\n if (mship.equalsIgnoreCase(\"HONORARY-MALE\")) {\n mtype = \"Honorary Male\";\n } else if (mship.equalsIgnoreCase(\"HONORARY-FEMALE\")) {\n mtype = \"Honorary Female\";\n } else if (mship.equalsIgnoreCase(\"HONORARY RETIREES\")) {\n mtype = \"Honorary Retirees\";\n }\n\n mship = \"Active\"; // convert all to Active\n\n } else {\n\n skip = true;\n }\n } // end of IF club =\n\n\n //\n // The Point Lake CLub\n //\n/*\n if (club.equals( \"pointlake\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" ) || mship.equalsIgnoreCase(\"CSH\")) {\n\n //\n // Set the Member Types\n //\n if (gender.equals( \"\" )) {\n\n gender = \"M\";\n }\n\n if (mship.equalsIgnoreCase( \"SPS\" ) || mship.equalsIgnoreCase( \"SPG\" )) { // TEMP until they fix their genders\n\n gender = \"F\";\n }\n\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else { // spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n\n } else { // no mship\n\n skip = true; // skip this record\n }\n\n } // end of IF club =\n*/\n\n //\n // Wichita - uses mapping (webid) !!!\n //\n if (club.equals( \"wichita\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n //\n // Set the Member Types\n //\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n mtype = \"Adult Male\";\n }\n\n if (mship.equalsIgnoreCase( \"child\" )) {\n\n //\n // if Child, set member type according to age\n //\n mtype = \"Juniors\"; // default\n\n if (birth > 0) { // if age provided\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 18 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 18 yrs old\n\n mtype = \"Juniors\";\n\n } else {\n\n mtype = \"18-24\";\n }\n }\n }\n\n mship = \"Golf\"; // everyone is Golf\n\n } else { // no mship\n\n skip = true; // skip this record\n }\n\n } // end of IF club =\n\n\n //\n // Brantford\n //\n if (club.equals( \"brantford\" )) {\n\n found = true; // club found\n\n // if there is no posid, then use the mNum\n if (posid.equals(\"\")) posid = mNum;\n\n mship = mtype; // use member type for mship\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"1 day curl\" ) || mship.equalsIgnoreCase( \"asc crl ld\" ) ||\n mship.startsWith( \"ASSC CUR\" ) || mship.startsWith( \"RESIGN\" )) {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) { // mship ok\n\n //\n // Set the Membership Types\n //\n if (mship.startsWith( \"EXT\" )) {\n\n mship = \"Extended Junior\";\n }\n\n if (mship.startsWith( \"CURL\" ) || mship.equalsIgnoreCase( \"lds curl\" )) {\n\n mship = \"Curler\";\n }\n\n if (mship.startsWith( \"FULL\" ) || mship.startsWith( \"HONO\" ) || mship.startsWith( \"INT\" ) ||\n mship.startsWith( \"LDYFULL\" ) || mship.startsWith( \"MST FL\" ) || mship.startsWith( \"MSTR FU\" ) ||\n mship.startsWith( \"PLAYER\" ) || mship.startsWith( \"SEN\" ) || mship.startsWith( \"SR FULL\" )) {\n\n mship = \"Full\";\n }\n\n if (mship.startsWith( \"JR\" ) || mship.startsWith( \"JUNIO\" )) {\n\n mship = \"Junior\";\n }\n\n if (mship.startsWith( \"NOVIC\" )) {\n\n mship = \"Novice\";\n }\n\n if (mship.startsWith( \"OV65\" ) || mship.startsWith( \"OVR 65\" )) {\n\n mship = \"Over 65 Restricted\";\n }\n\n if (mship.startsWith( \"MST RST\" ) || mship.startsWith( \"MSTR/RE\" )) {\n\n mship = \"Restricted\";\n }\n\n if (mship.startsWith( \"SOCGLF\" )) {\n\n mship = \"Social Golf Waitlist\";\n }\n\n if (mship.startsWith( \"SOCIAL\" ) || mship.startsWith( \"MAIN\" )) {\n\n mship = \"Social\";\n }\n\n //\n // Now check the birth date and set anyone age 19 - 25 to 'Extended Junior'\n //\n if (birth > 0) { // if birth date provided\n\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 19; // backup 19 years\n\n int oldDate1 = (year * 10000) + (month * 100) + day; // get date\n\n year = year - 7; // backup another 7 years (26 total)\n\n int oldDate2 = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate2 && birth < oldDate1) { // if member is 19 to 25 yrs old\n\n mship = \"Extended Junior\";\n }\n }\n\n\n //\n // Set the Member Types\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase( \"S\" )) { // spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n } else {\n mtype = \"Dependent\";\n }\n\n } else {\n\n skip = true;\n }\n\n } // end of IF club =\n\n\n //\n // Congressional\n //\n if (club.equals( \"congressional\" )) {\n\n found = true; // club found\n\n // if there is no posid, then use the mNum\n if (posid.equals(\"\")) posid = mNum;\n\n if (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"SG\" ) || mship.equalsIgnoreCase( \"BI\" )) {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) { // mship ok\n\n if (mship.equals( \"SP\" )) { // if Spouse\n\n mship = \"\";\n\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum); // primary's username is the mNum\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\"); // spouse = use primary's mship type\n }\n pstmt2.close();\n \n if (mship.equals(\"\")) { \n \n skip = true; // skip if mship or primary not found\n }\n }\n\n } else {\n\n skip = true;\n }\n\n if (skip == false) {\n\n //\n // Set the Membership Types\n //\n if (mship.equals( \"AG\" )) {\n\n mship = \"Annual Guest\";\n }\n if (mship.equals( \"BA\" )) {\n\n mship = \"Beneficiary Active\";\n }\n if (mship.equals( \"BS\" )) {\n\n mship = \"Beneficiary Special\";\n }\n if (mship.equals( \"BT\" )) {\n\n mship = \"Beneficiary Twenty\";\n }\n if (mship.equals( \"HL\" )) {\n\n mship = \"Honorary Life\";\n }\n if (mship.equals( \"HO\" )) {\n\n mship = \"Honorary\";\n }\n if (mship.equals( \"JA\" )) {\n\n mship = \"Junior A\";\n }\n if (mship.equals( \"JB\" )) {\n\n mship = \"Junior B\";\n }\n if (mship.equals( \"JC\" )) {\n\n mship = \"Junior C\";\n }\n if (mship.equals( \"JM\" )) {\n\n mship = \"Junior Military\";\n }\n if (mship.equals( \"JX\" )) {\n\n mship = \"Junior Absent\";\n }\n if (mship.equals( \"NR\" )) {\n\n mship = \"Non Resident\";\n }\n if (mship.equals( \"NS\" )) {\n\n mship = \"Non Resident Special\";\n }\n if (mship.equals( \"RA\" )) {\n\n mship = \"Resident Active\";\n }\n if (mship.equals( \"RI\" )) {\n\n mship = \"Resident Inactive\";\n }\n if (mship.equals( \"RT\" )) {\n\n mship = \"Resident Twenty\";\n }\n if (mship.equals( \"RX\" )) {\n\n mship = \"Resident Absent\";\n }\n\n\n //\n // Now check the birth date and set anyone age 19 - 25 to 'Extended Junior'\n //\n if (birth == 19000101) { // if birth date mot good\n\n birth = 0;\n }\n\n\n //\n // Set the Member Types\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else { // spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n\n //\n // Set the Username\n //\n if (mtype.startsWith( \"Primary\" )) { // if primary member\n\n memid = mNum; // use mNum\n\n } else {\n\n memid = mNum + \"A\"; // use mNum + A\n }\n\n //\n // Set the password for Monagus\n //\n password = \"jjjj\";\n\n }\n\n } // end of IF club =\n\n\n //\n // Cherry Creek\n //\n/*\n if (club.equals( \"cherrycreek\" )) {\n\n found = true; // club found\n\n if (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n mship = toTitleCase(mship);\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"professional member honorary\" ) ||\n mship.startsWith( \"Reciprocal\" ) || mship.startsWith( \"Social\" )) {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) { // mship ok\n\n if (mship.startsWith( \"Corp Full Golf Founders Individ\" )) {\n\n mship = \"Corp Full Golf Founders Indiv\";\n\n } else {\n\n\n /* 3-13-08 ALLOW CORP FULL GOLF FOUNDERS FAMILY TO COME ACROSS AS IS - PER LARRY\n if (mship.startsWith( \"Corp Full Golf Founders\" )) {\n\n mship = \"Corp Full Golf Founders\";\n }\n */\n /*\n }\n\n\n //\n // Set the Member Types\n //\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n if (gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Adult Male\";\n\n } else { // unknown gender - check pri/spouse\n\n if (primary.equalsIgnoreCase( \"S\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n mtype = \"Adult Male\";\n }\n }\n }\n\n\n //\n // Set the Username\n //\n if (mtype.equals( \"Adult Male\" )) { // if primary member\n\n memid = mNum + \"-000\";\n\n } else {\n\n memid = mNum + \"-001\";\n }\n\n // if there is no posid, then use the memid\n if (posid.equals(\"\")) posid = memid;\n\n } else {\n\n skip = true;\n }\n\n } // end of IF club =\n*/\n\n //\n // Baltimore CC\n //\n if (club.equals( \"baltimore\" )) {\n\n found = true; // club found\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n // if there is no posid, then use the mNum\n if (posid.equals(\"\")) posid = mNum;\n\n\n mship2 = mship;\n mship = \"\";\n\n //\n // convert mship\n //\n\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF NON ACTIV DISC\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF NON ACTIV DISC\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF NON ACTIV\" )) { // supposed to be non?\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF HONORARY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF FULL SEAS\")) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Male Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF HONORARY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR GENT\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Dependent\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR LADIES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Dependent\";\n }\n\n // end non online members\n\n\n // start on members\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF PART SEAS DISC\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non-Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF FULL SEAS DISC\" )) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Male Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF PART SEAS DISC\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non-Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF FULL SEAS DISC\" )) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Female Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"JM Gent Season\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Junior Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Junior Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"JW Ladies Season\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Junior Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF PART SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Junior Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"LW Ladies Golf\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n //\n // New mship types (6/12/07)\n //\n if (mship2.equalsIgnoreCase( \"J GENT GOLF COLL STUD\" )) {\n\n mship = \"College Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF COLL STUD\" )) {\n\n mship = \"College Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Female Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR GENT GOLF ENT\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR LADIES GOLF ENT\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF EXT LEGASY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF EXT LEGASY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"J JUNIOR GENT NON GOLF GE\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n //\n // Skip this record if a valid mship type was not specified\n //\n if (mship.equals(\"\")) {\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n } // end if club == baltimore\n\n\n //\n // Providence\n //\n if (club.equals( \"providence\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" ) && (mship.equalsIgnoreCase( \"A\" ) || mship.equalsIgnoreCase( \"E\" ) ||\n mship.equalsIgnoreCase( \"Z\" ) || mship.equalsIgnoreCase( \"H\" ) || mship.equalsIgnoreCase( \"I\" ) ||\n mship.equalsIgnoreCase( \"L\" ) || mship.equalsIgnoreCase( \"S\" ) || mship.equalsIgnoreCase( \"ZA\" ))) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n //\n // Set the Member Type\n //\n mtype = \"Primary Male\"; // default\n\n// if (mNum.endsWith( \"B\" ) ||mNum.endsWith( \"C\" ) ||\n// mNum.endsWith( \"D\" ) || mNum.endsWith( \"E\" ) ||mNum.endsWith( \"F\" ) ||\n// mNum.endsWith( \"G\" ) || mNum.endsWith( \"H\" ) ||mNum.endsWith( \"I\" )) {\n//\n// mtype = \"Dependent\";\n//\n// } else {\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else { // primary\n\n if (primary.equalsIgnoreCase( \"P\" )) { // if Primary\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Primary Male\";\n\n } else {\n\n mtype = \"Primary Female\";\n }\n\n } else {\n\n mtype = \"Dependent\"; // all others = juniors\n }\n }\n\n //\n // Set the Mship Type\n //\n if (mship.equalsIgnoreCase( \"A\" )) {\n\n mship = \"Active\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"E\" )) {\n\n mship = \"Employee\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"H\" )) {\n\n mship = \"Honorary\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"I\" )) {\n\n mship = \"Inactive\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"L\" )) {\n\n mship = \"Member Resigning\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"S\" )) {\n\n mship = \"Suspended\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"Z\" ) || mship.equalsIgnoreCase( \"ZA\" )) {\n\n mship = \"Family Active\";\n\n } else {\n\n skip = true; // skip all others\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n }\n }\n }\n }\n }\n\n } else {\n\n skip = true; // skip this record\n\n if (!mship.equals( \"\" )) {\n\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n\n } // end of IF club\n\n //\n // Algonquin\n //\n if (club.equals( \"algonquin\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // Set the Membership and Member Types - both dependent on the mship received\n //\n mtype = \"Primary Male\"; // default\n\n mship2 = \"\"; // init as none\n\n if (mship.equalsIgnoreCase( \"Active\" )) {\n\n mship2 = \"Active\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Associate\" )) {\n\n mship2 = \"Associate\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Senior\" )) {\n\n mship2 = \"Senior\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"non-res\" )) {\n\n mship2 = \"Non-Res\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"nonresgolf\" )) {\n\n mship2 = \"Nonresgolf\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Social\" )) {\n\n mship2 = \"Social\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Clerical M\" )) {\n\n mship2 = \"Clerical M\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Junior Class A\" ) || mship.equalsIgnoreCase( \"Jr Class A\" )) {\n\n mship2 = \"Jr Class A\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Junior Class B\" ) || mship.equalsIgnoreCase( \"Jr Class B\" )) {\n\n mship2 = \"Jr Class B\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Junior Class C\" ) || mship.equalsIgnoreCase( \"Jr Class C\" )) {\n\n mship2 = \"Jr Class C\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Spouse\" ) || mship.equalsIgnoreCase( \"Child\" )) { // if Spouse or Dependent\n\n if (mship.equalsIgnoreCase( \"Child\" )) { // if Dependent\n\n mtype = \"Dependent\";\n\n } else {\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n\n\n //\n // Get the mship type from the primary\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username != ? AND memNum = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n pstmt2.setString(2, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship2 = rs.getString(\"m_ship\"); // spouse = use primary's mship type\n }\n pstmt2.close();\n\n } // end of IF spouse or child\n\n if (mship2.equals( \"\" )) { // if matching mship NOT found\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else {\n\n mship = mship2; // set new mship\n }\n\n } else { // mship not provided\n\n skip = true; // skip this record\n }\n\n } // end of IF Algonquin\n\n\n //\n // Bent Tree\n //\n if (club.equals( \"benttreecc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equalsIgnoreCase( \"Active\" ) && !mship.startsWith( \"D\" )) { // if NOT Active or Dxx\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MSHIP invalid!\";\n\n } else {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n\n //\n // Set the Member Type\n //\n mtype = \"Member Male\"; // default\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else { // primary\n\n if (primary.equalsIgnoreCase( \"P\" )) { // if Primary\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Member Male\";\n\n } else {\n\n mtype = \"Member Female\";\n }\n\n } else {\n\n mtype = \"Junior\"; // all others = juniors\n }\n }\n\n //\n // Convert the mship from Dxx to real value\n //\n if (!mship.equalsIgnoreCase( \"Active\" )) { // accept Active as is\n\n if (mship.equalsIgnoreCase( \"D01\" )) {\n\n mship = \"Resident\";\n\n } else if (mship.equalsIgnoreCase( \"D02\" )) {\n\n mship = \"Young Executive\";\n\n } else if (mship.equalsIgnoreCase( \"D03\" ) || mship.equalsIgnoreCase( \"D05\" )) {\n\n mship = \"Tennis\";\n\n } else if (mship.equalsIgnoreCase( \"D04\" ) || mship.equalsIgnoreCase( \"D11\" )) {\n\n mship = \"Junior\";\n\n } else if (mship.equalsIgnoreCase( \"D06\" )) {\n\n mship = \"Temp Non-Resident\";\n\n } else if (mship.equalsIgnoreCase( \"D08\" )) {\n\n mship = \"Non-Resident\";\n\n } else if (mship.equalsIgnoreCase( \"D09\" )) {\n\n mship = \"Senior\";\n\n } else if (mship.equalsIgnoreCase( \"D12\" )) {\n\n mship = \"Employee\";\n\n } else {\n\n skip = true;\n }\n }\n } // end of IF mship ok\n\n } // end of IF club\n\n\n //\n // Orchid Island\n //\n if (club.equals( \"orchidisland\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // Primary = 1234\n\n if (mship.equalsIgnoreCase(\"Depend\") ||\n (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\"))) {\n\n memid = memid + \"-\" + primary; // 1234-2\n\n mtype = \"Dependents\";\n\n } else if (mship.equalsIgnoreCase( \"Spouse\" ) || primary.equalsIgnoreCase( \"S\" )) {\n\n memid = memid + \"-1\"; // 1234-1\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n } else {\n \n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n\n\n\n\n //\n // Set mship\n //\n if (mship.endsWith( \"TEN\" )) {\n\n mship = \"Beach & Tennis\";\n\n } else if (mship.endsWith( \"GOLF\" ) || mship.equalsIgnoreCase(\"Employee\")) {\n\n if (mship.equalsIgnoreCase(\"I GOLF\")) {\n mship = \"Invitational Golf\";\n } else {\n mship = \"EQ Golf\";\n }\n\n } else {\n\n //\n // Spouse or Dependent - look for Primary mship type and use that\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username != ? AND (m_ship = 'EQ Golf' OR m_ship = 'Beach & Tennis' OR m_ship = 'Invitational Golf') AND memNum = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n pstmt2.setString(2, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\"); // use primary mship type\n } else {\n skip = true;\n }\n pstmt2.close();\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n\n //\n // Colleton River\n //\n if (club.equals( \"colletonriverclub\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // Primary = 1234\n\n mtype = \"Adult Male\"; // default\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n memid = memid + \"-\" + primary; // 1234-2\n\n mtype = \"Dependents\";\n\n } else {\n\n if (primary.equalsIgnoreCase( \"S\" )) {\n\n memid = memid + \"-1\"; // 1234-1\n }\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n }\n\n // Convert 'FULL3' mship to 'FULL'\n if (mship.equalsIgnoreCase(\"FULL3\")) {\n mship = \"FULL\";\n }\n\n\n //\n // Set mship\n //\n if (mship.equalsIgnoreCase( \"Member\" )) {\n\n //mship = \"Resident\"; // do not change others\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n\n //\n // Claremont CC\n //\n if (club.equals( \"claremontcc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n\n mtype = \"Adult Male\"; // default\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Juniors\";\n\n } else {\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n }\n\n //\n // Set mship - TEMP until CE fixes them !!!!!!!!!!!!!!!!!!!!!!!\n //\n if (mship.equalsIgnoreCase( \"Member\" )) {\n\n mship = \"Employee\";\n\n } else if (mship.equalsIgnoreCase(\"Exempt\")) {\n\n mship = \"REG\";\n\n } else if (mship.equalsIgnoreCase(\"active\") || mship.equalsIgnoreCase(\"Oak Tree\") || mship.equalsIgnoreCase(\"Standards\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n /*\n //\n // Meridian GC\n //\n if (club.equals( \"meridiangc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n\n mtype = \"Primary Male\"; // default\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Dependent\";\n\n } else if (primary.equalsIgnoreCase(\"P\") && gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Primary Male\";\n\n } else if (primary.equalsIgnoreCase(\"P\") && gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else if (primary.equalsIgnoreCase(\"S\") && gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Non-Primary Female\";\n\n } else if (primary.equalsIgnoreCase(\"S\") && gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Non-Primary Male\";\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n\n\n*/\n if (club.equals(\"berkeleyhall\")) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n posid = mNum; // they use their member numbers as their posid\n webid = memid; // they use their member id (our username) as their webid\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Dependent\";\n\n } else if (gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Adult Male\";\n\n } else if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end if berkeleyhall\n\n\n if (club.equals(\"indianhillscc\")) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Social\" ) || mship.equalsIgnoreCase( \"Social SS\" ) || mship.equalsIgnoreCase( \"Spouse\" ) ||\n mship.equalsIgnoreCase( \"Spouse S\" ) || mship.equalsIgnoreCase( \"Child\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n\n posid = mNum; // they use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum;\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"-1\"; // spouse\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (2 and up)\n }\n }\n\n mship = toTitleCase(mship);\n\n //\n // Set the member types\n //\n if (mship.startsWith(\"Spouse\")) {\n\n if (gender.equalsIgnoreCase(\"M\")) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else {\n\n if (mship.startsWith(\"Child\")) {\n\n if (gender.equalsIgnoreCase(\"M\")) {\n\n mtype = \"Junior Male\";\n\n } else {\n\n mtype = \"Junior Female\";\n }\n\n } else { // all others\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n }\n }\n\n //\n // Convert some mship types\n //\n if (mship.equals(\"Found\") || mship.equals(\"Spouse F\") || mship.equals(\"Child F\") ||\n mship.equalsIgnoreCase(\"G/F SS\") || mship.equalsIgnoreCase(\"Golf SS\")) {\n\n mship = \"Foundation\";\n\n } else {\n\n if (mship.equals(\"Interm\") || mship.equals(\"Spouse I\") || mship.equals(\"Child I\")) {\n\n mship = \"Intermediate\";\n }\n }\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if indianhillscc\n\n /*\n if (club.equals(\"rtjgc\")) { // Robert Trent Jones GC\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\") || gender.equalsIgnoreCase(\"F\")) {\n\n memid = mNum + \"A\"; // spouse or female\n\n } else {\n\n memid = mNum; // primary males\n }\n\n\n //\n // Set the member type\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n\n //\n // Set the membership type\n //\n if (mship.equalsIgnoreCase(\"HON\")) {\n\n mship = \"Honorary\";\n\n } else {\n\n if (mship.endsWith(\"IR\")) {\n\n mship = \"Individual Resident\";\n\n } else {\n\n if (mship.endsWith(\"SNR\")) {\n\n mship = \"Senior Non Resident\";\n\n } else {\n\n if (mship.endsWith(\"SR\")) {\n\n mship = \"Senior\";\n\n } else {\n\n if (mship.endsWith(\"CR\")) {\n\n mship = \"Corporate Resident\";\n\n } else {\n\n if (mship.endsWith(\"CNR\")) {\n\n mship = \"Corporate Non Resident\";\n\n } else {\n\n if (mship.endsWith(\"INR\")) {\n\n mship = \"Individual Non Resident\";\n\n } else {\n\n if (mship.endsWith(\"P\")) {\n\n mship = \"Playing Member\";\n\n } else {\n\n mship = \"Junior\";\n }\n }\n }\n }\n }\n }\n }\n }\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if Robert Trent Jones GC\n */\n\n if (club.equals(\"oakhillcc\")) { // Oak Hill CC\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"A\"; // spouse\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum; // Primary\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (nnn-p)\n }\n }\n\n\n //\n // Set the member type\n //\n if (primary.equalsIgnoreCase(\"P\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n }\n\n //\n // Set the membership type\n //\n mship = \"G\"; // all are Golf\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if Oak Hill CC\n\n\n if (club.equals(\"internationalcc\")) { // International CC\n\n found = true; // club found\n\n mship = toTitleCase(mship);\n\n //\n // Determine if we should process this record\n //\n if (mship.equalsIgnoreCase( \"Corp-Social\" ) || mship.equalsIgnoreCase( \"Employees\" ) ||\n mship.equalsIgnoreCase( \"Leave Of Absence\" ) || mship.equalsIgnoreCase( \"Member\" ) ||\n mship.equalsIgnoreCase( \"Social\" ) || mship.equalsIgnoreCase( \"Social-Wci\" ) ||\n mship.equalsIgnoreCase( \"Bad Addresses\" ) || mship.equalsIgnoreCase( \"Expelled\" ) ||\n mship.equalsIgnoreCase( \"Resigned\" ) || mship.equalsIgnoreCase( \"Parties\" ) ||\n mship.equalsIgnoreCase( \"Clubhouse\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n \n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n/*\n // Custom to handle memNum 1217 differently, as they have to have the primary and spouse flip-flopped\n if (mNum.equals(\"1217\")) {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n primary = \"S\";\n } else if (primary.equalsIgnoreCase(\"S\")) {\n primary = \"P\";\n }\n }\n*/\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"A\"; // spouse\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum; // Primary\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (nnn-p)\n }\n }\n\n\n //\n // Set the member type\n //\n if (primary.equalsIgnoreCase(\"P\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n // If Spouse/Dependent, hit the database and use the Primary's membership type (if exists)\n try {\n PreparedStatement pstmtTemp = null;\n ResultSet rsTemp = null;\n\n pstmtTemp = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n pstmtTemp.clearParameters();\n pstmtTemp.setString(1, mNum);\n\n rsTemp = pstmtTemp.executeQuery();\n\n if (rsTemp.next()) {\n \n mship = rsTemp.getString(\"m_ship\"); // get primary's mship type\n \n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NO PRIMARY FOUND!\";\n }\n\n pstmtTemp.close();\n \n } catch (Exception ignore) { }\n }\n\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if International CC\n\n\n if (club.equals(\"greenwich\")) { // Greenwich CC\n\n found = true; // club found\n\n mship = toTitleCase(mship);\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n //\n // mship - ALL = Golf !!!!!!\n //\n mship = \"Golf\";\n\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"A\"; // spouse\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum; // Primary\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (nnn-p)\n }\n }\n\n\n //\n // Set the member type\n //\n if (primary.equalsIgnoreCase(\"P\") || primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if Greenwich CC\n\n\n\n //******************************************************************\n // TPC Southwind\n //******************************************************************\n //\n if (club.equals(\"tpcsouthwind\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n }\n\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcsouthwind\n\n\n //******************************************************************\n // TPC Sugarloaf\n //******************************************************************\n //\n if (club.equals(\"tpcsugarloaf\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" ) || mship.equalsIgnoreCase(\"Charter Social\") || mship.equalsIgnoreCase(\"Charter Swim/Tennis\")) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n } else if (primary.equals(\"7\")) {\n memid += \"G\";\n }\n\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcsugarloaf\n\n\n //******************************************************************\n // TPC Wakefield Plantation\n //******************************************************************\n //\n if (club.equals(\"tpcwakefieldplantation\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" ) || mship.equalsIgnoreCase(\"Sports Club\") || mship.equalsIgnoreCase(\"Sports Club Non-Resident\")) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcwakefieldplantation\n\n\n //******************************************************************\n // TPC River Highlands\n //******************************************************************\n //\n if (club.equals(\"tpcriverhighlands\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcriverhighlands\n\n\n //******************************************************************\n // TPC River's Bend\n //******************************************************************\n //\n if (club.equals(\"tpcriversbend\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcriversbend\n\n //******************************************************************\n // TPC Jasna Polana\n //******************************************************************\n //\n if (club.equals(\"tpcjasnapolana\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcjasnapolana\n\n\n //******************************************************************\n // TPC Boston\n //******************************************************************\n //\n if (club.equals(\"tpcboston\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n\n if (mship.equalsIgnoreCase(\"CHARTER NON-REFUNDABLE\")) {\n mship = \"CHARTER\";\n }\n }\n\n } // end if tpcboston\n\n //******************************************************************\n // TPC Craig Ranch\n //******************************************************************\n //\n if (club.equals(\"tpccraigranch\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpccraigranch\n\n\n //******************************************************************\n // TPC Potomac\n //******************************************************************\n //\n if (club.equals(\"tpcpotomac\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n // memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n //memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n/*\n if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n } else if (primary.equals(\"7\")) {\n memid += \"G\";\n }\n */\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n/*\n if (primary.equals(\"8\")) {\n memid += \"H\";\n } else if (primary.equals(\"9\")) {\n memid += \"I\";\n } else if (primary.equals(\"10\")) {\n memid += \"J\";\n } else if (primary.equals(\"11\")) {\n memid += \"K\";\n }\n */\n primary = \"AC\";\n }\n }\n\n } // end if tpcpotomac\n\n\n //******************************************************************\n // TPC Summerlin\n //******************************************************************\n //\n if (club.equals(\"tpcsummerlin\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\") ||\n primary.equals(\"8\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcsummerlin\n\n\n //******************************************************************\n // TPC Twin Cities\n //******************************************************************\n //\n if (club.equals(\"tpctc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n /*\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else if ((primary.equals(\"1\") || primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\") || primary.equals(\"8\")) &&\n birth == 0) {\n skip = true;\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -BIRTH DATE missing for DEPENDENT!\";\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n\n mship = toTitleCase(mship); // make sure mship is titlecased\n\n\n if (mship.equalsIgnoreCase(\"Social\") || mship.equalsIgnoreCase(\"Member\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n if (primary.equals(\"1\") || primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\") || primary.equals(\"8\")) {\n\n //\n // Determine the age in years\n //\n\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 16 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 18 yrs old\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Certified Dependent Female\";\n } else {\n mtype = \"Certified Dependent Male\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n if (primary.equals(\"1\")) {\n memid = memid + \"B\";\n } else if (primary.equals(\"2\")) {\n memid = memid + \"C\";\n } else if (primary.equals(\"3\")) {\n memid = memid + \"D\";\n } else if (primary.equals(\"4\")) {\n memid = memid + \"E\";\n } else if (primary.equals(\"5\")) {\n memid = memid + \"F\";\n } else if (primary.equals(\"6\")) {\n memid = memid + \"G\";\n } else if (primary.equals(\"7\")) {\n memid = memid + \"H\";\n } else if (primary.equals(\"8\")) {\n memid = memid + \"I\";\n }\n\n primary = \"D\";\n\n } else if (primary.equals(\"9\") || primary.equals(\"10\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n\n if (primary.equals(\"9\")) {\n memid = memid + \"J\";\n } else if (primary.equals(\"10\")) {\n memid = memid + \"K\";\n }\n\n } else if (primary.equalsIgnoreCase(\"P\")) { // Primary\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else {\n skip = true;\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -UNKNOWN RELATIONSHIP TYPE!\";\n }\n }\n */\n } // end if tpctc\n\n/*\n //******************************************************************\n // Royal Oaks CC - Houston\n //******************************************************************\n //\n if (club.equals(\"royaloakscc\")) {\n\n int mshipInt = 0;\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid = memid + \"A\";\n } else if (primary.equals(\"2\")) {\n mtype = \"Dependent\";\n memid = memid + \"B\";\n } else if (primary.equals(\"3\")) {\n mtype = \"Dependent\";\n memid = memid + \"C\";\n } else if (primary.equals(\"4\")) {\n mtype = \"Dependent\";\n memid = memid + \"D\";\n } else if (primary.equals(\"5\")) {\n mtype = \"Dependent\";\n memid = memid + \"E\";\n } else if (primary.equals(\"6\")) {\n mtype = \"Dependent\";\n memid = memid + \"F\";\n } else if (primary.equals(\"7\")) {\n mtype = \"Dependent\";\n memid = memid + \"G\";\n }\n\n if (gender.equalsIgnoreCase(\"F\") && !mtype.equals(\"Dependent\")) {\n mtype = \"Adult Female\";\n } else if (!mtype.equals(\"Dependent\")) {\n mtype = \"Adult Male\";\n }\n\n try {\n mshipInt = Integer.parseInt(mNum);\n } catch (Exception exc) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Invalid Member Number!\";\n }\n\n if (!skip) {\n if (mshipInt >= 0 && mshipInt < 200) {\n mship = \"Honorary\";\n } else if (mshipInt >= 500 && mshipInt < 600) {\n mship = \"Executive Honorary\";\n } else if (mshipInt >= 1000 && mshipInt < 2000) {\n mship = \"Golf\";\n } else if (mshipInt >= 2000 && mshipInt < 3000) {\n mship = \"Executive\";\n } else if (mshipInt >= 3000 && mshipInt < 3400) {\n mship = \"Sports Club w/Golf\";\n } else if (mshipInt >= 5000 && mshipInt < 5400) {\n mship = \"Preview Golf\";\n } else if (mshipInt >= 5400 && mshipInt < 5700) {\n mship = \"Preview Executive\";\n } else if (mshipInt >= 7000 && mshipInt < 7500) {\n mship = \"Sampler Golf\";\n } else if (mshipInt >= 7500 && mshipInt < 8000) {\n mship = \"Sampler Executive\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n }\n } // end if royaloakscc\n*/\n\n //******************************************************************\n // TPC San Francisco Bay\n //******************************************************************\n //\n if (club.equals(\"tpcsfbay\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (mship.equalsIgnoreCase(\"Social\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else { // Dependent\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n memid = memid + primary;\n primary = \"D\";\n }\n }\n } // end if tpcsfbay\n\n/*\n //******************************************************************\n // Mission Viejo - missionviejo\n //******************************************************************\n //\n if (club.equals(\"missionviejo\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n memid += \"B\";\n mtype = \"Green\";\n } else {\n gender = \"M\";\n memid += \"A\";\n mtype = \"Gold\";\n }\n\n if (mship.equalsIgnoreCase(\"Employee\")) {\n mship = \"Staff\";\n } else if (mship.equalsIgnoreCase(\"Equity\") || mship.equalsIgnoreCase(\"Honorary\") || mship.equalsIgnoreCase(\"Member\")) {\n mship = \"Equity\";\n } else if (mship.equalsIgnoreCase(\"Non-Res\") || mship.equalsIgnoreCase(\"Non-Resident\")) {\n mship = \"Non-Res\";\n } else if (mship.equalsIgnoreCase(\"Senior\")) {\n mship = \"Senior\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if missionviejo\n\n*/\n\n //******************************************************************\n // Cherry Hills CC - cherryhills\n //******************************************************************\n //\n if (club.equals(\"cherryhills\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum + \"-000\"; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n mtype = \"Spouse\";\n } else {\n mtype = \"Member\";\n }\n \n if (mship.equalsIgnoreCase(\"CLG\")) {\n mship = \"Clergy\";\n } else if (mship.equalsIgnoreCase(\"RES\")) {\n mship = \"Resident\";\n } else if (mship.equalsIgnoreCase(\"SRA\")) {\n mship = \"Special Resident A\";\n } else if (mship.equalsIgnoreCase(\"SRB\")) {\n mship = \"Special Resident B\";\n } else if (mship.equalsIgnoreCase(\"SRC\")) {\n mship = \"Special Resident C\";\n } else if (mship.equalsIgnoreCase(\"NRE\")) {\n mship = \"Non-Resident\";\n } else if (mship.equalsIgnoreCase(\"SSP\")) {\n mship = \"Surviving Spouse\";\n } else if (mship.equalsIgnoreCase(\"FSP\")) {\n mship = \"Former Spouse\";\n } else if (mship.equalsIgnoreCase(\"LFE\")) {\n mship = \"Life Member\";\n } else if (mship.equalsIgnoreCase(\"HLF\")) {\n mship = \"Honorary Life\";\n } else if (mship.equalsIgnoreCase(\"SEN\")) {\n mship = \"Senior\";\n } else if (mship.equalsIgnoreCase(\"RE\")) {\n mship = \"Resident Emeritus\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if cherryhills\n\n //\n // Mission Viejo CC\n //\n /*\n if (club.equals( \"missionviejo\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Social\" ) || mship.equalsIgnoreCase( \"Social SS\" ) || mship.equalsIgnoreCase( \"Spouse\" ) ||\n mship.equalsIgnoreCase( \"Spouse S\" ) || mship.equalsIgnoreCase( \"Child\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n\n }\n\n } // end of IF missionviejo club\n*/\n\n //******************************************************************\n // Philadelphia Cricket Club\n //******************************************************************\n //\n if (club.equals( \"philcricket\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is not an admin record or missing mship/mtype\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (lname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' MEMBERSHIP TYPE!\";\n } else {\n\n if (mship.equalsIgnoreCase(\"Leave of Absence\") || mship.equalsIgnoreCase(\"Loa\") || mship.equalsIgnoreCase(\"Member\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n } else if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n } else if (primary.equals(\"7\")) {\n memid += \"G\";\n } else if (primary.equals(\"8\")) {\n memid += \"H\";\n } else if (primary.equals(\"9\")) {\n memid += \"I\";\n }\n\n //\n // determine member type\n //\n if (mship.equalsIgnoreCase( \"golf stm family\" ) || mship.equalsIgnoreCase( \"golf stm ind.\" )) {\n\n lname = lname + \"*\"; // add an astericks\n }\n\n // if mtype = no golf, add ^ to their last name\n if (mship.equalsIgnoreCase( \"no golf\" )) {\n\n lname += \"^\";\n }\n\n mship = toTitleCase(mship); // mship = mtype\n\n }\n } // end of IF club = philcricket\n \n/*\n //******************************************************************\n // Sea Pines CC - seapines\n //******************************************************************\n //\n if (club.equals(\"seapines\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n if (mship.equalsIgnoreCase(\"EQUITY-NP\") || mship.equalsIgnoreCase(\"RESIGN A\") || mship.equalsIgnoreCase(\"ASSOC\") || mship.equalsIgnoreCase(\"NON-EQ-NP\")) {\n mship = \"Social\";\n } else if (mship.equalsIgnoreCase(\"SELECT\") || mship.equalsIgnoreCase(\"TENNIS\")) {\n mship = \"Tennis\";\n } else if (mship.equalsIgnoreCase(\"GOLF\") || mship.equalsIgnoreCase(\"GOLF-CART\")) {\n mship = \"Golf\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if seapines\n*/\n\n //\n //******************************************************************\n // Common processing - add or update the member record\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\") && !memid.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n memid_old = \"\";\n fname_old = \"\";\n lname_old = \"\";\n mi_old = \"\";\n mship_old = \"\";\n mtype_old = \"\";\n email_old = \"\";\n mNum_old = \"\";\n ghin_old = \"\";\n bag_old = \"\";\n posid_old = \"\";\n email2_old = \"\";\n phone_old = \"\";\n phone2_old = \"\";\n suffix_old = \"\";\n u_hcap_old = 0;\n c_hcap_old = 0;\n birth_old = 0;\n email_bounce1 = 0;\n email_bounce2 = 0;\n\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!phone2.equals( \"\" )) {\n\n phone2 = truncate(phone2, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n if (!webid.equals( \"\" )) {\n\n webid = truncate(webid, 15);\n }\n\n //\n // Use try/catch here so processing will continue on rest of file if it fails\n //\n try {\n\n if (useWebid == false) { // use webid to locate member?\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n\n } else { // use webid\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE webid = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, webid);\n }\n\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if(rs.next()) {\n\n memid_old = rs.getString(\"username\"); // get username in case we used webid\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n inact_old = rs.getInt(\"inact\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n\n }\n pstmt2.close(); // close the stmt\n\n\n boolean memFound = false;\n boolean dup = false;\n boolean userChanged = false;\n boolean nameChanged = false;\n String dupuser = \"\";\n String dupmnum = \"\";\n String dupwebid = \"\";\n\n webid_new = webid; // default\n\n if ((club.equals(\"tpcsouthwind\") || club.equals(\"tpcpotomac\") || club.equals(\"tpcsugarloaf\")) && !memid.equals(memid_old)) { // Look into making this change for ALL tpc clubs!\n\n // memid has changed! Update the username\n memid_new = memid;\n userChanged = true;\n\n } else {\n memid_new = memid_old; // Don't change for old clubs\n }\n\n //\n // If member NOT found, then check if new member OR id has changed\n //\n if (fname_old.equals( \"\" )) { // if member NOT found\n\n //\n // New member - first check if name already exists\n //\n pstmt2 = con.prepareStatement (\n \"SELECT username, memNum, webid FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n dupuser = rs.getString(\"username\"); // get this username\n dupmnum = rs.getString(\"memNum\");\n dupwebid = rs.getString(\"webid\"); // get this webid\n\n if (club.equals( \"virginiacc\" ) || club.equals( \"algonquin\" ) || club.equals( \"congressional\" )) {\n\n dup = true; // do not change members for these clubs\n\n } else {\n\n //\n // name already exists - see if this is the same member\n //\n if (!dupmnum.equals( \"\" ) && dupmnum.equals( mNum )) { // if name and mNum match, then memid or webid must have changed\n\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // set new ids\n memid_new = dupuser;\n memid_old = dupuser; // update this record\n\n } else {\n\n webid_new = dupwebid; // set new ids\n memid_new = memid;\n memid_old = dupuser; // update this record\n userChanged = true; // indicate the username has changed\n }\n\n memFound = true; // update the member\n\n } else {\n\n dup = true; // dup member - do not add\n }\n }\n\n }\n pstmt2.close(); // close the stmt\n\n } else { // member found\n\n memFound = true;\n }\n\n //\n // Now, update the member record if existing member\n //\n if (memFound == true) { // if member exists\n\n changed = false; // init change indicator\n\n lname_new = lname_old;\n\n if (!lname.equals( \"\" ) && !lname_old.equals( lname )) {\n\n lname_new = lname; // set value from CE record\n changed = true;\n nameChanged = true;\n }\n\n fname_new = fname_old;\n\n if (club.equals( \"virginiacc\" ) || club.equals( \"algonquin\" ) || club.equals( \"congressional\" )) {\n\n fname = fname_old; // DO NOT change first names\n }\n\n if (!fname.equals( \"\" ) && !fname_old.equals( fname )) {\n\n fname_new = fname; // set value from CE record\n changed = true;\n nameChanged = true;\n }\n\n mi_new = mi_old;\n\n if (!mi.equals( \"\" ) && !mi_old.equals( mi )) {\n\n mi_new = mi; // set value from CE record\n changed = true;\n nameChanged = true;\n }\n\n mship_new = mship_old;\n\n if (!mship.equals( \"\" ) && !mship_old.equals( mship )) {\n\n mship_new = mship; // set value from CE record\n changed = true;\n }\n\n mtype_new = mtype_old;\n birth_new = birth_old;\n\n if (club.equals( \"meridiangc\" )) { // TEMP until they fix gender !!!!!!!!!!!!!!!!!!!!!\n\n mtype = mtype_old; // DO NOT change mtype\n }\n\n if (!mtype.equals( \"\" ) && (club.equalsIgnoreCase(\"brantford\") || club.equalsIgnoreCase(\"oakhillcc\") || !mtype.equals( \"Dependent\" )) && !mtype_old.equals( mtype )) {\n\n mtype_new = mtype; // set value from CE record\n changed = true;\n }\n\n if (birth > 0 && birth != birth_old) {\n\n birth_new = birth; // set value from CE record\n changed = true;\n }\n\n ghin_new = ghin_old;\n\n if (!ghin.equals( \"\" ) && !ghin_old.equals( ghin )) {\n\n ghin_new = ghin; // set value from CE record\n changed = true;\n }\n\n bag_new = bag_old;\n\n if (!bag.equals( \"\" ) && !bag_old.equals( bag )) {\n\n bag_new = bag; // set value from CE record\n changed = true;\n }\n\n posid_new = posid_old;\n\n if (!posid.equals( \"\" ) && !posid_old.equals( posid )) {\n\n posid_new = posid; // set value from CE record\n changed = true;\n }\n\n phone_new = phone_old;\n\n if (!phone.equals( \"\" ) && !phone_old.equals( phone )) {\n\n phone_new = phone; // set value from CE record\n changed = true;\n }\n\n phone2_new = phone2_old;\n\n if (!phone2.equals( \"\" ) && !phone2_old.equals( phone2 )) {\n\n phone2_new = phone2; // set value from CE record\n changed = true;\n }\n\n suffix_new = suffix_old;\n\n if (!suffix.equals( \"\" ) && !suffix_old.equals( suffix )) {\n\n suffix_new = suffix; // set value from CE record\n changed = true;\n }\n\n email_new = email_old; // start with old emails\n email2_new = email2_old;\n\n //\n // Update email addresses if specified and different than current\n //\n if ((!email.equals( \"\" ) || club.startsWith(\"tpc\")) && !email_old.equals( email )) {\n\n email_new = email; // set value from CE record\n changed = true;\n email_bounce1 = 0; // reset bounce flag\n }\n\n if (club.equals(\"colletonriverclub\")) { // don't update email2 for these clubs\n email2 = email2_old;\n }\n\n if ((!email2.equals( \"\" ) || club.startsWith(\"tpc\")) && !email2_old.equals( email2 )) {\n\n email2_new = email2; // set value from CE record\n changed = true;\n email_bounce2 = 0; // reset bounce flag\n }\n\n // don't allow both emails to be the same\n if (email_new.equalsIgnoreCase(email2_new)) email2_new = \"\";\n\n\n mNum_new = mNum_old; // do not change mNums (?? not sure why we do this for CE clubs ??)\n\n if (club.equals( \"weeburn\" ) || club.equals( \"benttreecc\" ) || club.equals( \"algonquin\" ) ||\n club.equals( \"berkeleyhall\" ) || club.equals( \"cherrycreek\" ) || club.equals(\"internationalcc\") ||\n club.startsWith( \"tpc\" ) || club.equals( \"missionviejo\" ) || club.equals(\"virginiacc\") ||\n club.equals(\"oakhillcc\") || club.equals( \"orchidisland\" )) { // change mNums for some clubs\n\n if (!mNum.equals( \"\" ) && !mNum_old.equals( mNum )) {\n\n mNum_new = mNum; // set value from CE record\n changed = true;\n }\n }\n\n inact_new = 0; // do not change inact status for most clubs\n\n if (club.equals( \"congressional\" )) { // change status for Congressional\n\n if (inact_new != inact) { // if status has changed\n\n inact_new = inact; // set value from CE record\n changed = true;\n }\n }\n\n\n if (club.equals( \"benttreecc\" )) { // special processing for Bent Tree\n\n String tempM = remZeroS(mNum_old); // strip alpha from our old mNum\n\n if ((tempM.startsWith(\"5\") || tempM.startsWith(\"7\")) && inact_old == 1) {\n\n // If our mNum contains an old inactive value and the member is inactive\n // then set him active and let mNum change (above).\n\n inact_new = inact; // set value from CE record (must be active to get this far)\n }\n }\n\n\n //\n // Update our record if something has changed\n //\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET username = ?, name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, ghin = ?, bag = ?, birth = ?, posid = ?, email2 = ?, phone1 = ?, \" +\n \"phone2 = ?, name_suf = ?, webid = ?, inact = ?, last_sync_date = now(), gender = ?, \" +\n \"email_bounced = ?, email2_bounced = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid_new);\n pstmt2.setString(2, lname_new);\n pstmt2.setString(3, fname_new);\n pstmt2.setString(4, mi_new);\n pstmt2.setString(5, mship_new);\n pstmt2.setString(6, mtype_new);\n pstmt2.setString(7, email_new);\n pstmt2.setString(8, mNum_new);\n pstmt2.setString(9, ghin_new);\n pstmt2.setString(10, bag_new);\n pstmt2.setInt(11, birth_new);\n pstmt2.setString(12, posid_new);\n pstmt2.setString(13, email2_new);\n pstmt2.setString(14, phone_new);\n pstmt2.setString(15, phone2_new);\n pstmt2.setString(16, suffix_new);\n pstmt2.setString(17, webid_new);\n pstmt2.setInt(18, inact_new);\n pstmt2.setString(19, gender);\n pstmt2.setInt(20, email_bounce1);\n pstmt2.setInt(21, email_bounce2);\n\n pstmt2.setString(22, memid_old);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n ucount++; // count records updated\n\n //\n // Member updated - now see if the username or name changed\n //\n if (userChanged == true || nameChanged == true) { // if username or name changed\n\n //\n // username or name changed - we must update other tables now\n //\n StringBuffer mem_name = new StringBuffer( fname_new ); // get the new first name\n\n if (!mi_new.equals( \"\" )) {\n mem_name.append(\" \" +mi_new); // new mi\n }\n mem_name.append(\" \" +lname_new); // new last name\n\n String newName = mem_name.toString(); // convert to one string\n\n Admin_editmem.updTeecurr(newName, memid_new, memid_old, con); // update teecurr with new values\n\n Admin_editmem.updTeepast(newName, memid_new, memid_old, con); // update teepast with new values\n\n Admin_editmem.updLreqs(newName, memid_new, memid_old, con); // update lreqs with new values\n\n Admin_editmem.updPartner(memid_new, memid_old, con); // update partner with new values\n\n Admin_editmem.updEvents(newName, memid_new, memid_old, con); // update evntSignUp with new values\n\n Admin_editmem.updLessons(newName, memid_new, memid_old, con); // update the lesson books with new values\n }\n\n\n } else { // member NOT found\n\n\n if (dup == false && !fname.equals(\"\") && !lname.equals(\"\")) { // if name does not already exist\n\n //\n // New member - add it\n //\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, \" +\n \"webid, last_sync_date, gender) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,'',?,?,?,'',?,?,now(),?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, email2);\n pstmt2.setString(17, phone);\n pstmt2.setString(18, phone2);\n pstmt2.setString(19, suffix);\n pstmt2.setString(20, webid);\n pstmt2.setString(21, gender);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n\n ncount++; // count records added (new)\n\n } else if (dup) {\n errCount++;\n errMsg = errMsg + \"\\n -Dup user found:\\n\" +\n \" new: memid = \" + memid + \" : cur: \" + dupuser + \"\\n\" +\n \" webid = \" + webid + \" : \" + dupwebid + \"\\n\" +\n \" mNum = \" + mNum + \" : \" + dupmnum;\n }\n }\n\n pcount++; // count records processed (not skipped)\n\n\n }\n catch (Exception e3b) {\n errCount++;\n errMsg = errMsg + \"\\n -Error2 processing roster (record #\" +rcount+ \") for \" +club+ \"\\n\" +\n \" line = \" +line+ \": \" + e3b.getMessage(); // build msg\n }\n\n } else {\n\n // Only report errors that AREN'T due to skip == true, since those were handled earlier!\n if (!found) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBER NOT FOUND!\";\n }\n if (fname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n }\n if (lname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -LAST NAME missing!\";\n }\n if (memid.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -USERNAME missing!\";\n }\n\n } // end of IF skip\n\n } // end of IF inactive\n\n } // end of IF minimum requirements\n\n } // end of IF tokens\n\n } // end of IF header row\n\n // log any errors and warnings that occurred\n if (errCount > 0) {\n totalErrCount += errCount;\n errList.add(errMemInfo + \"\\n *\" + errCount + \" error(s) found*\" + errMsg + \"\\n\");\n }\n if (warnCount > 0) {\n totalWarnCount += warnCount;\n warnList.add(errMemInfo + \"\\n *\" + warnCount + \" warning(s) found*\" + warnMsg + \"\\n\");\n }\n } // end of while\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n \n \n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n\n }\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster (record #\" +rcount+ \") for \" +club+ \", line = \" +line+ \": \" + e3.getMessage() + \"\\n\"; // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.ceSync: \"; // reset msg\n }\n\n // Print error and warning count totals to error log\n SystemUtils.logErrorToFile(\"\" +\n \"Total Errors Found: \" + totalErrCount + \"\\n\" +\n \"Total Warnings Found: \" + totalWarnCount + \"\\n\", club, true);\n\n // Print errors and warnings to error log\n if (totalErrCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****ERRORS FOR \" + club + \" (Member WAS NOT synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (errList.size() > 0) {\n SystemUtils.logErrorToFile(errList.remove(0), club, true);\n }\n }\n if (totalWarnCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****WARNINGS FOR \" + club + \" (Member MAY NOT have synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (warnList.size() > 0) {\n SystemUtils.logErrorToFile(warnList.remove(0), club, true);\n }\n }\n\n // TEMP!!!!\n if (club.equals(\"berkeleyhall\")) {\n\n errorMsg = \" CE sync complete. Records = \" +rcount+ \" for \" +club+ \", records processed = \" +pcount+ \", records added = \" +ncount+ \", records updated = \" +ucount + \"\\n\"; // build msg\n SystemUtils.logErrorToFile(errorMsg, club, true); // log it\n }\n\n // Print end time to error log\n SystemUtils.logErrorToFile(\"End time: \" + new java.util.Date().toString() + \"\\n\", club, true);\n }", "public IRecordBuilder getBuilderFromLine(String line){\n boolean marketPriceLine = false;\n String[] columns = line.split(\",\");\n\n // short circuit any garbage rows\n if(columns.length <= 1){\n return null;\n }\n\n // Get the main.record action from our enum, or null if it is potentiall a market price row\n RecordAction recordAction = RecordAction.parseAction(columns[0]);\n\n // Check if this is the market price line, by seeing if the first column is a date\n if(recordAction == null && DateParser.isValidDate(columns[0]) && columns.length == 2){\n marketPriceLine = true;\n }\n\n IRecordBuilder builder;\n if(!marketPriceLine) {\n builder = RecordAction.getBuilder(recordAction);\n }else{\n builder = new MarketPriceRecord();\n }\n\n // Build out our new main.record for later use\n if (builder != null) {\n builder.build(columns);\n }\n\n return builder;\n }", "public BrokersStatus(List<BrokerStatus> inBrokers)\r\n {\r\n brokers = inBrokers;\r\n }", "public void splitCurrency(Collection FTC_receivables, String currencyCd, double exchangeRate, double amountToChange) throws FacadeException {\n FTC_ReceivablesController recCtrl = new FTC_ReceivablesController();\n Integer newRecId = null;\n\n try {\n int count = FTC_receivables.size();\n double tabSourceAmount = 0, tabDestAmount = 0, exchAmount = 0;\n double centValue = 0;\n\n FTC_CourierCashRecapTableVO courierRec = null;\n FTC_ReceivablesVO recNew = null;\n FTC_ReceivablesVO recOld = null;\n\n Iterator recIt = FTC_receivables.iterator();\n if (count == 1) {\n //If number of rec is 1 then use exchange rate value passed as parameter\n //Compute is different for count greater than 1\n while (recIt.hasNext()) {\n courierRec = (FTC_CourierCashRecapTableVO) recIt.next();\n recOld = recCtrl.getFTC_Receivables(new Integer(courierRec.getRecId()));\n recNew = recCtrl.getFTC_Receivables(new Integer(courierRec.getRecId()));\n tabSourceAmount = recOld.getCashPaymentAmt() + recOld.getOtherPaymentAmt();\n tabSourceAmount = tabSourceAmount - amountToChange;\n if (currencyCd.equals(\"USD\")) {\n tabDestAmount = amountToChange / exchangeRate;\n } else {\n tabDestAmount = amountToChange * exchangeRate;\n }\n\n if (recOld.getCashPaymentAmt() > 0) {\n recOld.setCashPaymentAmt(tabSourceAmount);\n recNew.setCashPaymentAmt(tabDestAmount);\n } else {\n recOld.setOtherPaymentAmt(tabSourceAmount);\n recNew.setOtherPaymentAmt(tabDestAmount);\n }\n\n //Set the receivables id in the object to produce the duality.\n recNew.setDualRecIdNbr(recOld.getRecId());\n //Insert the receivable new\n recNew.setRecId(null);\n recNew.setPaymentCurrency(currencyCd);\n recNew.setChkinAgentComment(\"Exchange rate\");\n recNew.setOtherComment(\"SPLT;\");\n recNew.setStatusId(1);\n newRecId = this.setFTC_Receivables(recNew);\n recNew.setRecId(newRecId);\n\n //Update receivable old\n recOld.setOtherComment((recOld.getOtherComment() == null ? \"\" : recOld.getOtherComment()) + \"SPLT;\");\n recOld.setChkinAgentComment(recOld.getChkinAgentComment() == null ? \"Exchange rate\" : recOld.getOtherComment() + \",Exchange rate\");\n recOld.setStatusId(1);\n recOld.setDualRecIdNbr(newRecId);\n recCtrl.updateFTC_Receivables(recOld);\n }//Close while\n } else if (count > 1) {\n //If number of rec greater than 1\n while (recIt.hasNext()) {\n courierRec = (FTC_CourierCashRecapTableVO) recIt.next();\n recOld = recCtrl.getFTC_Receivables(new Integer(courierRec.getRecId()));\n recNew = recCtrl.getFTC_Receivables(new Integer(courierRec.getRecId()));\n tabSourceAmount = recOld.getCashPaymentAmt() + recOld.getOtherPaymentAmt();\n centValue = 0;\n\n /*\n String totalAmt = new Double(tabSourceAmount).toString();\n String iPart = perl.substitute(\"s/\\\\..*$//\",totalAmt);\n String dPart = perl.substitute(\"s/^.*?\\\\.//\",totalAmt);\n\n if(dPart.trim().length() > 0)\n { centValue = Double.parseDouble(dPart);\n centValue /= 100;\n }\n if(iPart.trim().length() > 0)\n tabSourceAmount = Double.parseDouble(iPart);\n */\n\n int tabSourceAmountInt = new Double(tabSourceAmount).intValue();\n centValue = tabSourceAmount - tabSourceAmountInt;\n tabSourceAmount = tabSourceAmountInt;\n\n if (currencyCd.equals(\"USD\")) {\n if (centValue > 0) {\n tabDestAmount = centValue / exchangeRate;\n }\n } else\n tabDestAmount = centValue * exchangeRate;\n\n if (recOld.getCashPaymentAmt() > 0) {\n recOld.setCashPaymentAmt(tabSourceAmount);\n recNew.setCashPaymentAmt(tabDestAmount);\n } else {\n recOld.setOtherPaymentAmt(tabSourceAmount);\n recNew.setOtherPaymentAmt(tabDestAmount);\n }\n\n //Set the receivables id in the object to produce the duality.\n recNew.setDualRecIdNbr(recOld.getRecId());\n //Insert the receivable new\n recNew.setRecId(null);\n recNew.setPaymentCurrency(currencyCd);\n recNew.setChkinAgentComment(\"Exchange rate\");\n recNew.setOtherComment(\"SPLT;\");\n recNew.setStatusId(1);\n newRecId = this.setFTC_Receivables(recNew);\n recNew.setRecId(newRecId);\n\n //Update receivable old\n recOld.setOtherComment((recOld.getOtherComment() == null ? \"\" : recOld.getOtherComment()) + \"SPLT;\");\n recOld.setChkinAgentComment(recOld.getChkinAgentComment() == null ? \"Exchange rate\" : recOld.getOtherComment() + \",Exchange rate\");\n recOld.setStatusId(1);\n recOld.setDualRecIdNbr(newRecId);\n recCtrl.updateFTC_Receivables(recOld);\n\n }//close while\n\n }//Close if\n } catch (Exception e) {\n String errorMsg = \"Error occurred in splitCurrency(Collection receivables, String tabType, double exchangeRate, double amountToChange) method of FTCFacadeBean class\";\n throw new EJBException(errorMsg, e);\n }\n }", "UpdateRecord(String provider, long minTime, float minDistance,\n Receiver receiver, int uid, String[] packages) {\n mProvider = provider;\n mReceiver = receiver;\n mMinTime = minTime;\n mMinDistance = minDistance;\n mUid = uid;\n mPackages = packages;\n\n ArrayList<UpdateRecord> records = mRecordsByProvider.get(provider);\n if (records == null) {\n records = new ArrayList<UpdateRecord>();\n mRecordsByProvider.put(provider, records);\n }\n if (!records.contains(this)) {\n records.add(this);\n }\n }", "public boolean addOrUpdateCapitalMarkets(CapitalMarketsModel companyDetails) {\n //Use the Cached Connection\n SQLiteDatabase db = getWritableDatabase();\n Boolean transactionSuccessful = false;\n\n //As usual Wrap it in a transaction\n db.beginTransaction();\n try {\n ContentValues values = new ContentValues();\n values.put(KEY_COMPANY_OBJECT_ID, companyDetails.getCompanyObjectId());\n values.put(KEY_COMPANY_NAME, companyDetails.getCompanyName());\n values.put(KEY_COMPANY_IMAGE, companyDetails.getCompanyImage());\n values.put(KEY_COMPANY_ADDRESS, companyDetails.getCompanyAddress());\n values.put(KEY_COMPANY_STOCK_CODE, companyDetails.getCompanyStockCode());\n values.put(KEY_COMPANY_DESCRIPTION, companyDetails.getCompanyDescription());\n values.put(KEY_COMPANY_ESTABLISHED, companyDetails.getCompanyEstablished());\n values.put(KEY_COMPANY_CONTACTS, companyDetails.getCompanyContacts());\n values.put(KEY_COMPANY_INDUSTRY, companyDetails.getCompanyType());\n values.put(KEY_COMPANY_WEBSITE, companyDetails.getCompanyWebsite());\n values.put(KEY_COMPANY_STATUS, companyDetails.getCompanyStatus());\n values.put(KEY_COMPANY_SUMMARY, companyDetails.getCompanySummary());\n //Let's try to update the Saved Product if it exists.\n int rows = db.update(TABLE_BANKS, values, KEY_COMPANY_OBJECT_ID + \"= ?\", new String[]{companyDetails.getCompanyObjectId()});\n\n //Let's check if the update worked\n if (rows == 1) {\n //Ok, we have updated a Saved COMPANY, we could probably get the COMPANY updated at this point if we needed to\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n\n } else {\n //No Such Bank Here, insert it\n db.insertOrThrow(TABLE_CAPITAL_MARKETS, null, values);\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error trying to Update company table\");\n transactionSuccessful = false;\n } finally {\n db.endTransaction();\n }\n return transactionSuccessful;\n\n }", "public TradeHistoryReq market(String market) {\n this.market = market;\n return this;\n }", "int insert(Blacklist record);", "public Chain()\n\t{\n\t\tcars = new HashSet<RollingStock>(); \n\t}", "int insertSelective(Blacklist record);", "private ServiceAction createMoveEnrichmentToCommonRecordAction() throws UpdateException {\n return LOGGER.callChecked(log -> {\n final MarcRecord newEnrichmentRecord = new MarcRecord(marcRecord);\n final MarcRecordWriter writer = new MarcRecordWriter(newEnrichmentRecord);\n writer.addOrReplaceSubField(\"001\", 'a', targetRecordId);\n\n final MarcRecordReader reader = new MarcRecordReader(marcRecord);\n final String recordId = reader.getRecordId();\n final String agencyId = reader.getAgencyId();\n log.info(\"Create action to let new enrichment record {{}:{}} point to common record {}\", recordId, agencyId, targetRecordId);\n\n if (state.getLibraryRecordsHandler().hasClassificationData(newEnrichmentRecord)) {\n log.info(\"Enrichment record has classifications. Creating sub action to update it.\");\n return createUpdateRecordAction(newEnrichmentRecord);\n }\n final MarcRecord currentCommonRecord = UpdateRecordContentTransformer.decodeRecord(rawRepo.fetchRecord(recordId, RawRepo.COMMON_AGENCY).getContent());\n\n log.debug(\"ClassificationChangedInCommonRecs {} \", isClassificationChangedInCommonRecs);\n log.debug(\"isLinkRecInProduction {} \", isLinkRecInProduction);\n\n if (isClassificationChangedInCommonRecs) {\n if (isLinkRecInProduction) {\n log.info(\"Creating enrichment record without classifications, because the linkRecord is in production.\");\n return createUpdateRecordAction(newEnrichmentRecord);\n } else {\n log.info(\"Creating enrichment record with classifications, because the linkRecord is published.\");\n return createUpdateRecordAndClassificationsAction(newEnrichmentRecord, currentCommonRecord);\n }\n } else {\n log.info(\"Creating enrichment record without classifications, because there are no change in die/live records.\");\n return createUpdateRecordAction(newEnrichmentRecord);\n }\n });\n }", "private static MarketDataSet createTestMarketData() {\n final MarketDataSet dataSet = MarketDataSet.empty();\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"AUDUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 1.8);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"NZDUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 2.2);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"GBPUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 1.5);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"GBP1Y\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)),\n ImmutableLocalDateDoubleTimeSeries.builder()\n .putAll(new LocalDate[] {LocalDate.of(2016, 1, 1), LocalDate.of(2016, 1, 2)}, new double[] {0.01, 0.02}).build());\n return dataSet;\n }", "private void addSellCashTrade( final Trade trade )\n throws CloneNotSupportedException {\n\n // Check if the number of active units is greater than or equal to\n // the number of units that have been sold. If not, it is an error\n // condition. We are not handling short sell scenarios.\n if( getNumActiveCashUnits() < trade.getUnits() ) {\n logger.error( \"Selling more than active untis. Error condition\" ) ;\n logger.error( \" SYMBOL = \" + trade.getSymbol() ) ;\n logger.error( \" active units = \" + getNumActiveCashUnits() ) ;\n logger.error( \" sell units = \" + trade.getUnits() ) ;\n throw new IllegalArgumentException( \"Trying to sell more than \" +\n \"what we have. Bad bad..\" ) ;\n }\n\n // Selling happens in FIFO order.\n int qtyMatched = 0 ;\n Trade buyTrade = null ;\n int buyActUnits = 0 ;\n int sellUnitsLeft = trade.getUnits() ;\n Trade sellTrade= null ;\n\n // While we have not quenched all the units of the sell trade, we\n // continue matching it against our buy orders. Assumption is that if\n // we receive a sell order, we must have enough buy orders already\n // registered to quench the sell order. Else we have an error condition\n while( qtyMatched != trade.getUnits() ) {\n\n // Clone the sell order. In case one sell order matches multiple\n // buy orders, we need to attach a clone of the sell order with\n // appropriate quantity matched to each buy order.\n sellTrade = ( Trade )trade.clone() ;\n\n // Get the first buy order which has still some active units left.\n buyTrade = this.posHldCashTrades.get( 0 ) ;\n\n // Determine how many active units we are dealing with.\n buyActUnits = buyTrade.getNumActiveUnits() ;\n\n // If the buy active units are greater than the sell units left,\n // it implies that the complete sell order will be used up here.\n if( buyActUnits >= sellUnitsLeft ) {\n\n // Increase the total quantity matched by the sell units left.\n qtyMatched += sellUnitsLeft ;\n buyTrade.setMatchedUnits( buyTrade.getMatchedUnits() + sellUnitsLeft ) ;\n sellTrade.setMatchedUnits( sellUnitsLeft ) ;\n sellUnitsLeft = 0 ;\n }\n else {\n // If the sell units are more than the current buy units, it\n // implies that this sell order spans multiple buy orders.\n qtyMatched += buyActUnits ;\n\n // The buy order is completely matched. Hence the matched units\n // is equal to the number of buy units.\n buyTrade.setMatchedUnits( buyTrade.getUnits() ) ;\n\n // Set the number of units matched for this sell trade.\n sellTrade.setMatchedUnits( buyActUnits ) ;\n sellUnitsLeft -= buyActUnits ;\n }\n\n buyTrade.addSellTrade( sellTrade ) ;\n\n // If the buy order is completely matched, remove it from the list\n // of positive holdings and move it to the zero holdings list.\n if( buyTrade.getNumActiveUnits() == 0 ) {\n this.posHldCashTrades.remove( 0 ) ;\n }\n }\n }", "@ClassVersion(\"$Id$\")\npublic interface MarketDataServiceAdapter\n{\n /**\n * Requests the given market data.\n *\n * @param inRequest a <code>MarketDataRequest</code> value\n * @param inStreamEvents a <code>boolean</code> value\n * @return a <code>long</code> value\n */\n long request(MarketDataRequest inRequest,\n boolean inStreamEvents);\n /**\n * Gets the timestamp of the most recent update for the given request.\n *\n * @param inId a <code>long</code> value\n * @return a <code>long</code> value\n */\n long getLastUpdate(long inId);\n /**\n * Cancels the given market data request.\n *\n * @param inId a <code>long</code> value\n */\n void cancel(long inId);\n /**\n * Gets the queued events, if any, for the given request id.\n *\n * @param inId a <code>long</code> value\n * @return a <code>Deque&lt;Eventgt;</code> value\n */\n Deque<Event> getEvents(long inId);\n /**\n * Gets the queued events, if any, for each of the given request ids.\n *\n * @param inRequestIds a <code>List&lt;Long&gt;</code> value\n * @return a <code>Map&lt;Long,LinkedList&lt;Event&gt;&gt;</code> value\n */\n Map<Long,LinkedList<Event>> getAllEvents(List<Long> inRequestIds);\n /**\n * Gets the most recent snapshot for the given attributes.\n *\n * @param inInstrument an <code>Instrument</code> value\n * @param inContent a <code>Content</code> value\n * @param inProvider a <code>String</code> value or <code>null</code>\n * @return a <code>Deque&lt;Event&gt;</code> value\n */\n Deque<Event> getSnapshot(Instrument inInstrument,\n Content inContent,\n String inProvider);\n /**\n * Gets the most recent snapshot page for the given attributes.\n *\n * @param inInstrument an <code>Instrument</code> value\n * @param inContent a <code>Content</code> value\n * @param inProvider a <code>String</code> value or <code>null</code>\n * @param inPageRequest a <code>PageRequest</code> value\n * @return a <code>Deque&lt;Event&gt;</code> value\n */\n Deque<Event> getSnapshotPage(Instrument inInstrument,\n Content inContent,\n String inProvider,\n PageRequest inPageRequest);\n /**\n * Gets the available capabilities.\n *\n * @return a <code>Set&lt;Capability&gt;</code> value\n */\n Set<Capability> getAvailableCapability();\n}", "public void updateReactionsMarketAndTreasures() {\r\n\t\t((TextChannel) gameChannel).clearReactionsById(marketAndTsID).queue();\r\n\t\tif (currentPlayer.getGold() >= 7) {\r\n\t\t\tif (marketItemCount[0] > 0) {\r\n\t\t\t\tgameChannel.addReactionById(marketAndTsID, GlobalVars.emojis.get(\"key\")).queue();\r\n\t\t\t}\r\n\t\t\tif (marketItemCount[1] > 0) {\r\n\t\t\t\tgameChannel.addReactionById(marketAndTsID, GlobalVars.emojis.get(\"briefcase\")).queue();\r\n\t\t\t}\r\n\t\t\tif (marketItemCount[2] > 0) {\r\n\t\t\t\tgameChannel.addReactionById(marketAndTsID, GlobalVars.emojis.get(\"crown\")).queue();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addRecord() {\n int numOverflowRecords = Integer.parseInt(getNumberOfRecords(\"overflow\"));\n\n int rankForNewRecord = Integer.parseInt(getHighestRank()) + 1;\n\n byte [] companyNameBytes = new byte[Constants.NUM_BYTES_COMPANY_NAME];\n byte [] companyCityBytes = new byte[Constants.NUM_BYTES_COMPANY_CITY];\n byte [] companyStateBytes = new byte[Constants.NUM_BYTES_COMPANY_STATE];\n byte [] companyZipCodeBytes = new byte[Constants.NUM_BYTES_COMPANY_ZIP];\n byte [] companyEmployeesBytes = new byte[Constants.NUM_BYTES_COMPANY_EMPLOYEES];\n\n // User input for each of the fields ******************\n byte [] companyRankBytes = HelperFunctions.addWhitespacesToEnd(Integer.toString(rankForNewRecord), Constants.NUM_BYTES_RANK).getBytes();\n\n // Input for name of company\n System.out.println(\"Please enter the name of the company (truncated at \" + Constants.NUM_BYTES_COMPANY_NAME + \" characters): \");\n companyNameBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_NAME);\n\n // Input for city the company is located in\n System.out.println(\"Please enter the city the company is located in (truncated at \" + Constants.NUM_BYTES_COMPANY_CITY + \" characters): \");\n companyCityBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_CITY);\n\n // Input for state the company is located in\n System.out.println(\"Please enter the state the company is located in (truncated at \" + Constants.NUM_BYTES_COMPANY_STATE + \" characters): \");\n companyStateBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_STATE);\n\n // Input for zip code of company\n System.out.println(\"Please enter the zip code of the company (truncated at \" + Constants.NUM_BYTES_COMPANY_ZIP + \" characters): \");\n companyZipCodeBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_ZIP);\n\n // Input for number of employees of company\n System.out.println(\"Please enter the company's number of employees (truncated at \" + Constants.NUM_BYTES_COMPANY_EMPLOYEES + \" charactes): \");\n companyEmployeesBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_EMPLOYEES);\n\n byte [] newLineBytes = System.getProperty(\"line.separator\").getBytes();\n\n // End user input ************************************\n\n // Add bytes to overflow file\n addRecordToOverflow(companyRankBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD);\n addRecordToOverflow(companyNameBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 5);\n addRecordToOverflow(companyCityBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 45);\n addRecordToOverflow(companyStateBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 65);\n addRecordToOverflow(companyZipCodeBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 68);\n addRecordToOverflow(companyEmployeesBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 74);\n addRecordToOverflow(newLineBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 84);\n\n numOverflowRecords++;\n\n if (numOverflowRecords > 4) {\n mergeSortRecords(numOverflowRecords);\n updateNumRecords(\"overflow\", 0);\n\n try {\n PrintWriter clearOverflow = new PrintWriter(this.databaseName + \".overflow\");\n clearOverflow.write(\"\");\n clearOverflow.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n } else {\n updateNumRecords(\"overflow\", numOverflowRecords);\n }\n\n String currentHighestRank = getHighestRank().trim();\n updateHighestRank(Integer.parseInt(currentHighestRank) + 1);\n\n System.out.println(\"Record Added...\");\n }", "public void setMarketId(String marketId) {\n\t\tthis.marketId = marketId;\n\t}", "public MarketOrderBookImpl(\n String marketId, List<MarketOrder> sellOrders, List<MarketOrder> buyOrders) {\n this.marketId = marketId;\n this.sellOrders = sellOrders;\n this.buyOrders = buyOrders;\n }", "public void initMarket() {\n marketInfo = Constant.marketInfo.get(market.toLowerCase());\n try {\n getData();\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private void initializeAggTradesCache(String symbol) {\r\n\r\n\t\tBinanceApiClientFactory factory = BinanceApiClientFactory.newInstance();\r\n\t\tBinanceApiRestClient client = factory.newRestClient();\r\n\t\tList<AggTrade> aggTrades = client.getAggTrades(symbol.toUpperCase());\r\n\t\tthis.aggTradesCache = new HashMap<>();\r\n\r\n\t\t/*\r\n\t\t * List<Tick> ticks = null; Long tickIndex = 0L; List<AggTrade> listAggTrade =\r\n\t\t * new CopyOnWriteArrayList<AggTrade>(); this.aggTradeTicksCashe = new\r\n\t\t * HashMap<Long, List<AggTrade>>();\r\n\t\t * \r\n\t\t *\r\n\t\t * ZonedDateTime tickStartTime = ZonedDateTime.now(ZoneId.systemDefault());\r\n\t\t * ZonedDateTime tickEndTime = ZonedDateTime.now(ZoneId.systemDefault());\r\n\t\t */\r\n\r\n\t\t// Check server time\r\n\t\ttradeSessionStartTime = client.getServerTime();\r\n\r\n\t\tList<Integer> xData = new CopyOnWriteArrayList<Integer>();\r\n\t\tList<Double> yData = new CopyOnWriteArrayList<Double>();\r\n\t\tList<Double> errorBars = new CopyOnWriteArrayList<Double>();\r\n\r\n\t\tlong startTimestamp = tradeSessionStartTime;\r\n\t\tlong endTimestamp = tradeSessionStartTime;\r\n\t\tfor (AggTrade aggTrade : aggTrades) {\r\n\t\t\tLong currentTimestamp = aggTrade.getTradeTime();\r\n\t\t\tif (currentTimestamp < startTimestamp)\r\n\t\t\t\tstartTimestamp = currentTimestamp;\r\n\t\t\tif (currentTimestamp > endTimestamp)\r\n\t\t\t\tendTimestamp = currentTimestamp;\r\n\t\t}\r\n\r\n\t\tfor (AggTrade aggTrade : aggTrades) {\r\n\r\n\t\t\t/*\r\n\t\t\t * ZonedDateTime tradeTimestamp =\r\n\t\t\t * ZonedDateTime.ofInstant(Instant.ofEpochMilli(aggTrade.getTradeTime()),\r\n\t\t\t * ZoneId.systemDefault()); if ( tradeTimestamp.isBefore(tickStartTime))\r\n\t\t\t * tickStartTime = tradeTimestamp; if (!tradeTimestamp.isBefore(tickEndTime))\r\n\t\t\t * tickEndTime = tradeTimestamp;\r\n\t\t\t * \r\n\t\t\t * if (!tradeTimestamp.isBefore(tickEndTime)) { // new tick if ( (tickIndex >0)\r\n\t\t\t * && (listAggTrade.size() > 0)) aggTradeTicksCashe.put( tickIndex, listAggTrade\r\n\t\t\t * ); tickEndTime = tradeTimestamp.plus(tickDuration); listAggTrade = new\r\n\t\t\t * CopyOnWriteArrayList<AggTrade>(); tickIndex++; } listAggTrade.add(aggTrade);\r\n\t\t\t */\r\n\r\n\t\t\tLong currentTimestamp = aggTrade.getTradeTime();\r\n\t\t\tDouble price = new Double(aggTrade.getPrice());\r\n\t\t\tDouble quantity = new Double(aggTrade.getQuantity());\r\n\t\t\tDouble amount = price * quantity;\r\n\t\t\txData.add((int) (50 * (currentTimestamp - startTimestamp) / (endTimestamp - startTimestamp)));\r\n\t\t\tyData.add(amount);\r\n\t\t\terrorBars.add(0.0);\r\n\t\t\taggTradesCache.put(aggTrade.getAggregatedTradeId(), aggTrade);\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * realTimeChart = new MercuryRealTimeChart(xData,yData, errorBars, response ->\r\n\t\t * {\r\n\t\t * \r\n\t\t * } );\r\n\t\t */\r\n\t}", "@Test\n public void testMarketTransaction ()\n {\n initializeService();\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(2), 0.5, -45.0);\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(3), 0.7, -43.0);\n assertEquals(0, accountingService.getPendingTariffTransactions().size(), \"no tariff tx\");\n List<BrokerTransaction> pending = accountingService.getPendingTransactions();\n assertEquals(2, pending.size(), \"correct number in list\");\n MarketTransaction mtx = (MarketTransaction)pending.get(0);\n assertNotNull(mtx, \"first mtx not null\");\n assertEquals(2, mtx.getTimeslot().getSerialNumber(), \"correct timeslot id 0\");\n assertEquals(-45.0, mtx.getPrice(), 1e-6, \"correct price id 0\");\n Broker b1 = mtx.getBroker();\n Broker b2 = brokerRepo.findById(bob.getId());\n assertEquals(b1, b2, \"same broker\");\n mtx = (MarketTransaction)pending.get(1);\n assertNotNull(mtx, \"second mtx not null\");\n assertEquals(0.7, mtx.getMWh(), 1e-6, \"correct quantity id 1\");\n // broker market positions should have been updated already\n MarketPosition mp2 = bob.findMarketPositionByTimeslot(2);\n assertNotNull(mp2, \"should be a market position in slot 2\");\n assertEquals(0.5, mp2.getOverallBalance(), 1e-6, \".5 mwh in ts2\");\n MarketPosition mp3 = bob.findMarketPositionByTimeslot(3);\n assertNotNull(mp3, \"should be a market position in slot 3\");\n assertEquals(0.7, mp3.getOverallBalance(), 1e-6, \".7 mwh in ts3\");\n }", "public void setRouteCapacaties(ArrayList theCommodities, int aCapacity){ \n //construct sql query\n String theCapacityEnquiery = \"select commodity from route_capacity where route = \"+id+\";\";\n ResultSet theExistingCapcacaties = NRFTW_Trade.dBQuery(theCapacityEnquiery);\n ArrayList theExisitingCapacityStrings = new ArrayList(); \n try{\n //unpack results\n while(theExistingCapcacaties.next()){\n \n theExisitingCapacityStrings.add(theExistingCapcacaties.getString(1));\n }\n }catch(SQLException ex){\n System.out.println(ex);\n }\n //make sure existing capacaties use set rather than insert queries \n //itterate through the existing capacaties\n //for each, write a \"Set\" query\n //delete relevent comodity from the Commodities\n String theCapacityUpdateQuery = \"update route_capacity set rate = \"+aCapacity+\" where route = \"+id+\" and commodity in('\";\n String theCapacityInsertQuery = \"insert into route_capacity(route, commodity, rate) values \";\n int insertCount = 0;\n int updateCount = 0;\n // for each commodity\n for(Iterator<Commodity> commodityItterator = theCommodities.iterator(); commodityItterator.hasNext();){\n Commodity aCommodity = commodityItterator.next();\n if(theExisitingCapacityStrings.contains(aCommodity.theName)){\n if(updateCount > 0){\n theCapacityUpdateQuery += \",'\";\n }\n theCapacityUpdateQuery += aCommodity.theName+\"'\";\n updateCount = updateCount+1;\n }else{\n if(insertCount > 0){\n theCapacityInsertQuery += \",\";\n }\n theCapacityInsertQuery += \"(\"+id+\",'\"+aCommodity.theName+\"',\"+aCapacity+\")\";\n insertCount = insertCount+1; \n }\n }\n theCapacityInsertQuery += \";\";\n theCapacityUpdateQuery += \");\";\n if(insertCount >0){\n NRFTW_Trade.dBUpdate(theCapacityInsertQuery);\n }\n if(updateCount >0){\n NRFTW_Trade.dBUpdate(theCapacityUpdateQuery);\n }\n // insert line in route_capacaties\n //update db\n }", "public void setMarket(WebMarket market) {\r\n this.market = market;\r\n }", "public Matchdata(Match match, long _matchID, String _summonerName, long _playerID)\n {\n matchID = _matchID;\n summonerName = _summonerName;\n playerID = _playerID;\n\n \n participantID = getIdentityFromSummonerID(match);\n totalGoldEachMinute = goldEachMinute(match, participantID);\n minutes = totalGoldEachMinute.length;\n \n individualGEM = new int[totalGoldEachMinute.length];\n for(int i = totalGoldEachMinute.length-1; i>0; i--)\n {\n individualGEM[i] = totalGoldEachMinute[i]-totalGoldEachMinute[i-1];\n }\n individualGEM[0] = totalGoldEachMinute[0];\n \n \n totalCreepsEachMinute = creepsEachMinute(match, participantID);\n \n individualCEM = new int[totalCreepsEachMinute.length];\n for(int i = totalCreepsEachMinute.length-1; i>0; i--)\n {\n individualCEM[i] = totalCreepsEachMinute[i]-totalCreepsEachMinute[i-1];\n }\n individualCEM[0] = totalCreepsEachMinute[0];\n \n \n \n gpm = totalGoldEachMinute[totalGoldEachMinute.length-1]/totalGoldEachMinute.length;\n cpm = totalCreepsEachMinute[totalCreepsEachMinute.length-1]/totalCreepsEachMinute.length;\n \n //get(participantID-1) might seem weird, but it's how getParticipants is stored.\n victory = match.getParticipants().get(participantID-1).getStats().getWinner();\n champion = match.getParticipants().get(participantID-1).getChampionID();\n time = match.getCreation().getTime();\n \n lane = match.getParticipants().get(participantID-1).getTimeline().getLane();\n role = match.getParticipants().get(participantID-1).getTimeline().getRole();\n \n roleSanity = sanityCheck(match);\n \n map = match.getMap();\n \n }", "private LCSRevisableEntity updateRevisableEntry(String reventityVR, String sourceVersion,\n\t\t\tString costsheetVersion,String specVersion, String nrfCode,\n\t\t\tString materialDescription, String source, String costsheet,\n\t\t\tString specName, String IBTINSTOREMONTH, String styleNumber,Collection bomMOAStringColl) throws WTException ,\n\t\t\tWTPropertyVetoException \n\t\t\t{\n\t\t\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry(), this is a Existing entry\");\n\t\n\t\tLCSRevisableEntity existingIBTMaterialRevObj = null;\n\t\tLCSRevisableEntityLogic revisableEntityLogic = new LCSRevisableEntityLogic();\n\n\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry -- >existing Revisable entity Id is found\");\n\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry(),,reventityVR -- \" + reventityVR);\n\n\t\t// get the existing revisable entity object\n\t\texistingIBTMaterialRevObj = (LCSRevisableEntity) LCSQuery\n\t\t\t\t.findObjectById(\"VR:com.lcs.wc.foundation.LCSRevisableEntity:\"\n\t\t\t\t\t\t+ reventityVR);\n\t\t// create a new client model object and load the revisable entity\n\t\t//LCSRevisableEntityClientModel existingentryModel = new LCSRevisableEntityClientModel();\n\t\t// load\n\t\t//existingentryModel.load(FormatHelper.getObjectId(existingentry));\n\t\t//LCSLog.debug(\"existingentry : --\" + existingentry.getValue(\"name\"));\n\t\t// set the value of sourcing config version ID\n\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSOURCINGCONFIG,\n\t\t\t\tsourceVersion);\n\t\t// set the value of costsheet version\n\t\tif (FormatHelper.hasContent(costsheetVersion)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTCOSTSHEET,\n\t\t\t\tcostsheetVersion);\n\t\t}\n\t\t//added for 7.6\n\t\t\n\t\t/*if(strActivity.equalsIgnoreCase(\"PERSIST\")){\n\t\texistingentryModel.setValue(\"lfIBTComments\",\n\t\t\t\t\"PERSIST\");\t\n\t\t}else{\n\t\texistingentryModel.setValue(\"lfIBTComments\",\n\t\t\t\t\"COSTSHEET\");\t*/\n\t\t//if (FormatHelper.hasContent(LFIBTConstants.IBTMATERIALSTATUS)) {\n\t\t//existingentryModel.setValue(LFIBTConstants.IBTMATERIALSTATUS,\n\t\t//\t\t\"Update\");\n\t\t//}\n\t\t//}\n\t\t//added for 7.6\n\t \t//Create BOM MOA Rows..\n\t\t//LFIBTUtil.setBOMMOARows(existingentryModel, \"lfIBTBOMDetails\", bomMOAStringColl, \"update\");\n\t\t\n\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSPECIFICATION, specVersion);\n\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.STAGINSPECNAME, specName);\t\t\n\t\t// set the value of nrf code att\n\t\tif (FormatHelper.hasContent(nrfCode)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTNRFCODE, nrfCode);\n\t\t}\n\n\t\t// update the material description\n\t\tif (FormatHelper.hasContent(materialDescription)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALDESC,\n\t\t\t\t\tmaterialDescription);\n\t\t}\n\t\t// update the source name\n\t\tif (FormatHelper.hasContent(source)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGSOURCENAME,\n\t\t\t\t\tsource);\n\t\t}\n\t\t// update the costsheet name\n\t\tif (FormatHelper.hasContent(costsheet)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGCOSTSHEETNAME,\n\t\t\t\t\tcostsheet);\n\t\t}\n\t\t// Update the In store Month\n\t\tif (FormatHelper.hasContent(IBTINSTOREMONTH)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTINSTOREMONTH,\n\t\t\t\t\tIBTINSTOREMONTH);\n\t\t}\n\n\t\t// Update Style Number\n\t\tif (FormatHelper.hasContent(styleNumber)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSTYLENUMBER,\n\t\t\t\t\tstyleNumber);\n\t\t}\n\n\t\t// update the check box\n\t\t//existingentryModel\n\t\t//\t\t.setValue(LFIBTConstants.IBTUPDATECHECK, Boolean.TRUE);\n\t\t\n\t\tLCSRevisableEntity ibtMaterialRev = (LCSRevisableEntity)revisableEntityLogic.saveRevisableEntity(existingIBTMaterialRevObj);\n\t\t\n\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry(), Calling setBOMMOARows()\");\n\t\t\n\t\n\t\tLFIBTUtil.setBOMMOARows(ibtMaterialRev, \"lfIBTBOMDetails\", bomMOAStringColl, \"update\");\n return ibtMaterialRev;\n\t}", "private static CustomerMasterBO getConsumerMaster(String rRNo, String location, String ConnType) {\n\t\t\n\t\t\n\t\tConnection con = null;\n\t\tPreparedStatement pr = null;\n\t\tResultSet rs = null; \n\t\tCustomerMasterBO consumerBO = null;\n\t\t\n\t\ttry {\n\t\t\tif(ConnType.equals(\"LT\") || ConnType == \"LT\"){\n\t\t\t\tcon = DatabaseImpl.GetLTSQLConnection();\n\t\t\t}else if(ConnType.equals(\"HT\") || ConnType == \"HT\"){\n\t\t\t\tcon = DatabaseImpl.GetHTSQLConnection();\n\t\t\t}\n\t\t\t\n\t\t\tString qry = \"SELECT * FROM CUST_MASTER where CM_RR_NO= ? AND CM_RR_NO LIKE '\"+location+\"%' \";\n\t\t\tpr = con.prepareStatement(qry);\n\t\t\tpr.setString(1, rRNo);\n\n\t\t\trs = pr.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tconsumerBO = new CustomerMasterBO();\n\t\t\t\t\n\t\t\t\tif (rs.getString(\"CM_RR_NO\") != null && rs.getString(\"CM_RR_NO\").length()>10) {\n\t\t\t\t\tconsumerBO.setCmRrNo(rs.getString(\"CM_RR_NO\").substring(7));\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tconsumerBO.setCmServiceDt(ReferenceUtil.reverseConvert(rs.getString(\"CM_SERVICE_DT\")));\n\t\t\t\t\n\t\t\t\tif (rs.getString(\"CM_OLD_RR_NO\") != null && rs.getString(\"CM_OLD_RR_NO\").length()>10) {\n\t\t\t\t\tconsumerBO.setCmOldRrNo(rs.getString(\"CM_OLD_RR_NO\").substring(7));\n\t\t\t\t} \n\t\t\t\tconsumerBO.setCmKebOfficeFlg(rs.getString(\"CM_KEB_OFFICE_FLG\"));\n\t\t\t\tconsumerBO.setCmPinCd(rs.getString(\"CM_PIN_CD\"));\n\t\t\t\tconsumerBO.setCmTelephoneNo(rs.getString(\"CM_TELEPHONE_NO\"));\n\t\t\t\tconsumerBO.setCmTalukCd(rs.getString(\"CM_TALUK_CD\"));\n\t\t\t\tconsumerBO.setCmTalukDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_TALUK_CD\"), \"TALUK\",ConnType));\n\t\t\t\tif(rs.getString(\"CM_SERVICE_DT\")!=null && rs.getString(\"CM_TMP_DURN\")!=null ){\n\t\t\t\t\tconsumerBO.setCmRenewdate(ReferenceUtil.getRenewDate(ReferenceUtil.reverseConvert(rs.getString(\"CM_SERVICE_DT\")), rs.getString(\"CM_TMP_DURN\"))); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconsumerBO.setCmDistrictCd(rs.getString(\"CM_DISTRICT_CD\"));\n\t\t\t\tconsumerBO.setCmDistrictDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_DISTRICT_CD\"), \"DISTRICT\",ConnType));\n\t\t\t\tconsumerBO.setCmStateConstituencyCd(rs.getString(\"CM_STATE_CONSTITUENCY_CD\"));\n\t\t\t\tconsumerBO.setCmStateConstituencyDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_STATE_CONSTITUENCY_CD\"), \"S_CONSTCY\",ConnType));\n\t\t\t\tconsumerBO.setCmCentralConstituencyCd(rs.getString(\"CM_CENTRAL_CONSTITUENCY_CD\"));\n\t\t\t\tconsumerBO.setCmCentralConstituencyDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_CENTRAL_CONSTITUENCY_CD\"),\"C_CONSTCY\",ConnType));\n\t\t\t\tconsumerBO.setCmRegionCd(rs.getString(\"CM_REGION_CD\"));\n\t\t\t\tconsumerBO.setCmRegionDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_REGION_CD\"), \"REG_TYP\",ConnType));\n\t\t\t\tconsumerBO.setCmPwrPurpose(ReferenceUtil.getPowerPurposeCodeTOName(rs.getString(\"CM_PWR_PURPOSE\"),ConnType));\n\t\t\t\tconsumerBO.setCmIndustryCd(ReferenceUtil.getIndustrialCodeTOName(rs.getString(\"CM_INDUSTRY_CD\"),ConnType));\n\t\t\t\tconsumerBO.setCmIndustryDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_INDUSTRY_CD\"), \"IND_PWR_CD\",ConnType));\n\t\t\t\tconsumerBO.setCmApplntTyp(rs.getString(\"CM_APPLNT_TYP\"));\n\t\t\t\tconsumerBO.setCmApplntTypDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_APPLNT_TYP\"), \"APLNT_TYP\",ConnType));\n\t\t\t\tconsumerBO.setCmPowerSanctNo(rs.getString(\"CM_POWER_SANCT_NO\"));\n\t\t\t\tconsumerBO.setCmPowerSanctDt(ReferenceUtil.reverseConvert(rs.getString(\"CM_POWER_SANCT_DT\")));\n\t\t\t\tconsumerBO.setCmPowerSanctAuth(ReferenceUtil.getPwrSanctionedCodeTOName(rs.getString(\"CM_POWER_SANCT_AUTH\"),ConnType));\n\t\t\t\t\n\t\t\t\tif (rs.getString(\"CM_NXT_RR_NO\") != null && rs.getString(\"CM_NXT_RR_NO\").length()>10) {\n\t\t\t\t\tconsumerBO.setCmNxtRrNo(rs.getString(\"CM_NXT_RR_NO\").substring(7));\n\t\t\t\t} \n\t\t\t\tconsumerBO.setCmLdgrNo(rs.getString(\"CM_LDGR_NO\"));\n\t\t\t\tconsumerBO.setCmLdgrOpenedDt(ReferenceUtil.reverseConvert(rs.getString(\"CM_LDGR_OPENED_DT\")));\n\t\t\t\tconsumerBO.setCmFolioNo(rs.getString(\"CM_FOLIO_NO\"));\n\t\t\t\tconsumerBO.setCmMtrRdgCycle(rs.getString(\"CM_MTR_RDG_CYCLE\"));\n\t\t\t\tconsumerBO.setCmMtrRdgDay(rs.getString(\"CM_MTR_RDG_DAY\"));\n\t\t\t\tconsumerBO.setCmMtrRdrCd(rs.getString(\"CM_MTR_RDR_CD\"));\n\t\t\t\tconsumerBO.setCmMtrRdrDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_MTR_RDR_CD\"), \"IND_PWR_CD\",ConnType));\n\t\t\t\tconsumerBO.setCmTariffcatogory(ReferenceUtil.getTariffDescByTariffCode(rs.getString(\"CM_TRF_CATG\"),ConnType));\n\t\t\t\tconsumerBO.setCmStationNo(rs.getString(\"CM_STATION_NO\"));\n\t\t\t\tconsumerBO.setCmStationName(ReferenceUtil.getStationName(rs.getString(\"CM_STATION_NO\"),ConnType));\n\t\t\t\tconsumerBO.setCmFdrNo(rs.getString(\"CM_FDR_NO\"));\n\t\t\t\tconsumerBO.setCmFdrName(ReferenceUtil.getFeederName(rs.getString(\"CM_FDR_NO\"),rs.getString(\"CM_STATION_NO\"),ConnType));\n\t\t\t\tconsumerBO.setCmLineMin(rs.getString(\"CM_LINE_MIN\"));\n\t\t\t\tconsumerBO.setCmOmUnitCd(ReferenceUtil.getOMUnitCodeName(rs.getString(\"CM_OM_UNIT_CD\"),ConnType));\n\t\t\t\tconsumerBO.setCmOmUnitCdName(rs.getString(\"CM_OM_UNIT_CD\"));\n\t\t\t\tconsumerBO.setCmTrsfmrNo(rs.getString(\"CM_TRSFMR_NO\"));\n\t\t\t\tconsumerBO.setCmTrsfmrName(ReferenceUtil.getTransformerName(rs.getString(\"CM_TRSFMR_NO\"),rs.getString(\"CM_FDR_NO\"),rs.getString(\"CM_STATION_NO\"),ConnType));\n\t\t\t\tconsumerBO.setCmAvgConsmp(rs.getString(\"CM_AVG_CONSMP\"));\n\t\t\t\tconsumerBO.setCmFlConsumer(rs.getString(\"CM_FL_CONSUMER\"));\n\t\t\t\tconsumerBO.setCmPwrCutExemptFlg(rs.getString(\"CM_PWR_CUT_EXEMPT_FLG\"));\n\t\t\t\tconsumerBO.setCmConsmrSts(rs.getString(\"CM_CONSMR_STS\"));\n\t\t\t\tconsumerBO.setCmConsmrStsDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_CONSMR_STS\"), \"CONN_STS\",ConnType));\n\t\t\t\tconsumerBO.setCmChqBounceFlg(rs.getString(\"CM_CHQ_BOUNCE_FLG\"));\n\t\t\t\tconsumerBO.setCmDlCount(rs.getString(\"CM_DL_COUNT\"));\n\t\t\t\tconsumerBO.setCmDlSent(rs.getString(\"CM_DL_SENT\"));\n\t\t\t\tconsumerBO.setCmTotMmd(rs.getString(\"CM_TOT_MMD\"));\n\t\t\t\tconsumerBO.setCmLastMmdDt(rs.getString(\"CM_LAST_MMD_DT\"));\n\t\t\t\tconsumerBO.setCm100DmdEntlmnt(rs.getString(\"CM_100_ENERGY_ENTLMNT\"));\n\t\t\t\tconsumerBO.setCmTmpFolioNo(rs.getString(\"CM_TMP_FOLIO_NO\"));\n\t\t\t\tconsumerBO.setCm100DmdEntlmnt(rs.getString(\"CM_100_DMD_ENTLMNT\"));\n\t\t\t\tconsumerBO.setCmTrfCatg(rs.getString(\"CM_TRF_CATG\"));\n\t\t\t\tconsumerBO.setCmTrfCatgDescription(ReferenceUtil.getTariffDescByTariffCode(rs.getString(\"CM_TRF_CATG\"),ConnType));\n\t\t\t\tconsumerBO.setCmTrfEffectFrmDt(ReferenceUtil.reverseConvert(rs.getString(\"CM_TRF_EFFECT_FRM_DT\")));\n\t\t\t\tconsumerBO.setCmLdEffectFrmDt(ReferenceUtil.reverseConvert(rs.getString(\"CM_LD_EFFECT_FRM_DT\")));\n\t\t\t\tconsumerBO.setCmLdSanctHp(rs.getString(\"CM_LD_SANCT_HP\"));\n\t\t\t\tconsumerBO.setCmLdSanctKva(rs.getString(\"CM_LD_SANCT_KVA\"));\n\t\t\t\tconsumerBO.setCmLdSanctKw(rs.getString(\"CM_LD_SANCT_KW\"));\n\t\t\t\tconsumerBO.setCmLightLoad(rs.getString(\"CM_LIGHT_LOAD\"));\n\t\t\t\tconsumerBO.setCmHeatLoad(rs.getString(\"CM_HEAT_LOAD\"));\n\t\t\t\tconsumerBO.setCmMotivePower(rs.getString(\"CM_MOTIVE_POWER\"));\n\t\t\t\tconsumerBO.setCmSupplyVolt(rs.getString(\"CM_SUPPLY_VOLT\"));\n\t\t\t\tconsumerBO.setCmPurgeFlg(rs.getString(\"CM_PURGE_FLG\"));\n\t\t\t\tconsumerBO.setCmInstallTyp(rs.getString(\"CM_INSTALL_TYP\"));\n\n\t\t\t\tconsumerBO.setCmInstallTypDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_INSTALL_TYP\"), \"INSTL_TYP\",ConnType));\n\t\t\t\tconsumerBO.setCmMeteredFlg(rs.getString(\"CM_METERED_FLG\"));\n\t\t\t\tconsumerBO.setCmTlNo(rs.getString(\"CM_TL_NO\"));\n\t\t\t\tconsumerBO.setCmCapacitorCap(rs.getString(\"CM_CAPACITOR_CAP\"));\n\t\t\t\tconsumerBO.setCmStarterTyp(ReferenceUtil.getStarterTypeCodeTOName(rs.getString(\"CM_STARTER_TYP\"),ConnType));\n\t\t\t\tconsumerBO.setCmPremisJuris(ReferenceUtil.getJurisdictionTypeCodeTOName(rs.getString(\"CM_PREMIS_JURIS\"),ConnType));\n\t\t\t\tconsumerBO.setCmWellTyp(ReferenceUtil.getWellTypeCodeTOName(rs.getString(\"CM_WELL_TYP\"),ConnType));\n\t\t\t\tconsumerBO.setCmLightingTyp(ReferenceUtil.getLightingCodeTOName(rs.getString(\"CM_LIGHTING_TYP\"),ConnType));\n\t\t\t\tconsumerBO.setCmConnLdHp(rs.getString(\"CM_CONN_LD_HP\"));\n\t\t\t\tconsumerBO.setCmConnLdKw(rs.getString(\"CM_CONN_LD_KW\"));\n\t\t\t\tconsumerBO.setCmSupplyEffFrmDt(ReferenceUtil.reverseConvert(rs.getString(\"CM_SUPPLY_EFF_FRM_DT\")));\n\t\t\t\tconsumerBO.setCmPhaseOfInstln(rs.getString(\"CM_PHASE_OF_INSTLN\"));\n\t\t\t\tconsumerBO.setCmTaxExemptFlg(rs.getString(\"CM_TAX_EXEMPT_FLG\"));\n\t\t\t\tconsumerBO.setCmUnauthFlg(rs.getString(\"CM_UNAUTH_FLG\"));\n\t\t\t\tconsumerBO.setCmPwrPurEffFrmDt(ReferenceUtil.reverseConvert(rs.getString(\"CM_PWR_PUR_EFF_FRM_DT\")));\n\t\t\t\tconsumerBO.setCmIndEffFrmDt(ReferenceUtil.reverseConvert(rs.getString(\"CM_IND_EFF_FRM_DT\")));\n\t\t\t\tconsumerBO.setCmConnTyp(ReferenceUtil.getConnectionTypeCodeTOName(rs.getString(\"CM_CONN_TYP\"),ConnType));\n\t\t\t\tconsumerBO.setCmNtrLocCd(rs.getString(\"CM_NTR_LOC_CD\"));\n\t\t\t\tconsumerBO.setCmBjkjOutlet(rs.getString(\"CM_BJKJ_OUTLET\"));\n\t\t\t\tconsumerBO.setCmMinDemandEntl(rs.getString(\"CM_MIN_DEMAND_ENTL\"));\n\t\t\t\tconsumerBO.setCmBulkNoOfHouses(rs.getString(\"CM_BULK_NO_OF_HOUSES\"));\n\t\t\t\tconsumerBO.setCmIvrsId(rs.getString(\"CM_IVRS_ID\"));\n\t\t\t\tconsumerBO.setCmUser(rs.getString(\"CM_USER\"));\n\t\t\t\tconsumerBO.setCmTmpstp(ReferenceUtil.getTimestampe(rRNo,ConnType)); \n\t\t\t\tconsumerBO.setCmPoleNo(rs.getString(\"CM_POLE_NO\"));\n\t\t\t\tconsumerBO.setCmBegMnth(rs.getString(\"CM_BEG_MNTH\"));\n\t\t\t\tconsumerBO.setCmTmpDurn(rs.getString(\"CM_TMP_DURN\"));\n\t\t\t\tconsumerBO.setCmFirstBillDcFlg(rs.getString(\"CM_FIRST_BILL_DC_FLG\"));\n\t\t\t\tconsumerBO.setCmRmks(rs.getString(\"CM_RMKS\"));\n\t\t\t\tconsumerBO.setCmSubmeterFlg(rs.getString(\"CM_SUBMETER_FLG\"));\n\t\t\t\tconsumerBO.setCmDblMtrFlg(rs.getString(\"CM_DBL_MTR_FLG\"));\n\t\t\t\tconsumerBO.setCmSlumFlg(rs.getString(\"CM_SLUM_FLG\"));\n\t\t\t\tconsumerBO.setCmEmailId(rs.getString(\"CM_EMAIL_ID\"));\n\t\t\t\tconsumerBO.setCmCstNo(rs.getString(\"CM_CST_NO\"));\n\t\t\t\tconsumerBO.setCmKstNo(rs.getString(\"CM_KST_NO\"));\n\t\t\t\tconsumerBO.setCmTinNo(rs.getString(\"CM_TIN_NO\"));\n\t\t\t\tconsumerBO.setCmTodMeterFlag(rs.getString(\"CM_TOD_METER\"));\n\t\t\t\tconsumerBO.setCmTalukDescription(ReferenceUtil.getCodeDesc(rs.getString(\"CM_TALUK_CD\"), \"TALUK\",ConnType));\n\t\t\t\tconsumerBO.setCmRenewdateExtends(ReferenceUtil.getRenewDateExtends());\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Exception thrown \" + e);\n\t\t} finally {\n\t\t\t//DatabaseImpl.CleanUp(con, pr, rs);\n\t\t\tDBManagerResourceRelease.close(rs, pr);\n\t\t}\n\t\treturn consumerBO;\n\t}", "public Message newCancelMarketStreamRequest(String reqID , List<Instrument> symbols) {\n log.info(\"newCxlMarketStreamRequest called\");\n MarketDataRequest request = new MarketDataRequest();\n request.setField(new MDReqID(reqID));\n request.setField(new SubscriptionRequestType(SubscriptionRequestType.DISABLE_PREVIOUS_SNAPSHOT_PLUS_UPDATE_REQUEST));\n request.setField(new MDUpdateType(MDUpdateType.FULL_REFRESH));\n request.setInt(NoMDEntryTypes.FIELD, 2);\n\n MarketDataRequest.NoMDEntryTypes entryTypeGroup = new MarketDataRequest.NoMDEntryTypes();\n\n entryTypeGroup.setField(new MDEntryType(MDEntryType.BID));\n request.addGroup(entryTypeGroup);\n entryTypeGroup.setField(new MDEntryType(MDEntryType.OFFER));\n request.addGroup(entryTypeGroup);\n\n request.setField(new NoRelatedSym( symbols.size() ));\n\n for( Instrument oneSymbol : symbols ) {\n MarketDataRequest.NoRelatedSym symbolGroup = new MarketDataRequest.NoRelatedSym();\n symbolGroup.setField( oneSymbol.getSymbol() );\n symbolGroup.setField(oneSymbol.getSecurityExchange() );\n symbolGroup.setField(oneSymbol.getSecurityID() );\n\n request.addGroup(symbolGroup);\n }\n\n\n return request;\n }", "private static void dreamworldSync(Connection con, InputStreamReader isr, String club) {\n\n PreparedStatement pstmt2 = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n\n // Values from Flexscape records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String webid = \"\";\n String mNum = \"\";\n String mship = \"\";\n String mtype = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String primary = \"\";\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n\n // Values from ForeTees records\n //\n String memid_old = \"\";\n String email_old = \"\";\n\n int birth_old = 0;\n\n // Values for New ForeTees records\n //\n String memid_new = \"\";\n String skipField = \"\";\n\n int birth_new = 0;\n int rcount = 0;\n int newCount = 0;\n int modCount = 0;\n int work = 0;\n int pri_indicator = 0;\n int email_bounce1 = 0;\n int email_bounce2 = 0;\n\n String errorMsg = \"Error in Common_sync.dreamworldSync: \";\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean headerFound = false;\n boolean found = false;\n boolean memidChanged = false;\n\n\n\n try {\n\n BufferedReader br = new BufferedReader(isr);\n\n while (true) {\n\n line = br.readLine();\n\n if (line == null) {\n break;\n }\n\n // Skip the 1st row (header row)\n\n if (headerFound == false) {\n\n headerFound = true;\n\n } else {\n\n skip = false;\n found = false; // default to club NOT found\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n if (club.equals( \"bracketts\" )) { // Bracketts Crossing\n\n found = true; // club found\n\n // Remove the dbl quotes and check for embedded commas\n\n line = cleanRecord2( line );\n // line = cleanRecord3( line );\n\n rcount++; // count the records\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() > 7 ) { // enough data ?\n\n webid = tok.nextToken();\n memid = tok.nextToken();\n primary = tok.nextToken();\n fname = tok.nextToken();\n mi = tok.nextToken();\n lname = tok.nextToken();\n suffix = tok.nextToken();\n mship = tok.nextToken();\n\n gender = \"\";\n email = \"\";\n phone = \"\";\n mNum = \"\";\n mtype = \"\";\n email2 = \"\";\n bag = \"\";\n ghin = \"\";\n posid = \"\";\n phone2 = \"\";\n temp = \"\";\n\n if ( tok.countTokens() > 0 ) {\n\n gender = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n skipField = tok.nextToken(); // skip address fields\n }\n if ( tok.countTokens() > 0 ) {\n\n skipField = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n skipField = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n skipField = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n skipField = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n email = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n phone = tok.nextToken();\n }\n\n\n //\n // Check for ? (not provided)\n //\n if (webid.equals( \"?\" )) {\n\n webid = \"\";\n }\n if (memid.equals( \"?\" )) {\n\n memid = \"\";\n }\n if (primary.equals( \"?\" )) {\n\n primary = \"\";\n }\n if (fname.equals( \"?\" )) {\n\n fname = \"\";\n }\n if (mi.equals( \"?\" )) {\n\n mi = \"\";\n }\n if (lname.equals( \"?\" )) {\n\n lname = \"\";\n }\n if (suffix.equals( \"?\" )) {\n\n suffix = \"\";\n }\n if (mship.equals( \"?\" )) {\n\n mship = \"\";\n }\n if (gender.equals( \"?\" )) {\n\n gender = \"\";\n }\n if (email.equals( \"?\" )) {\n\n email = \"\";\n }\n if (phone.equals( \"?\" )) {\n\n phone = \"\";\n }\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!webid.equals( \"\" ) && !memid.equals( \"\" ) && !lname.equals( \"\" ) && !fname.equals( \"\" ) && !mship.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 ) {\n\n mi = tok.nextToken(); // over-write mi if already there\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n\n lname = tok.nextToken(); // remove suffix and spaces\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n lname = lname + \"_\" + suffix; // append suffix to last name\n\n } else { // sufix after last name ?\n\n if ( tok.countTokens() > 0 ) {\n\n suffix = tok.nextToken();\n lname = lname + \"_\" + suffix; // append suffix to last name\n }\n }\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n birth = 0;\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n\n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n //\n // Determine if we should process this record\n //\n if (!webid.equals( \"\" )) { // must have a webid\n\n mNum = memid;\n\n posid = mNum + \"-000\";\n\n memid = mNum; // use mNum for primary and add alpha for others\n\n if (gender.equals( \"\" )) {\n\n gender = \"1\";\n }\n if (primary.equals( \"\" )) {\n\n primary = \"0\";\n }\n\n if (primary.endsWith( \"0\" )) { // convert from 000 format to 0\n\n primary = \"0\";\n }\n if (primary.endsWith( \"1\" )) {\n\n primary = \"1\";\n memid = memid + \"a\";\n }\n if (primary.endsWith( \"2\" )) {\n\n primary = \"2\";\n memid = memid + \"b\";\n }\n if (primary.endsWith( \"3\" )) {\n\n primary = \"3\";\n memid = memid + \"c\";\n }\n if (primary.endsWith( \"4\" )) {\n\n primary = \"4\";\n memid = memid + \"d\";\n }\n if (primary.endsWith( \"5\" )) {\n\n primary = \"5\";\n memid = memid + \"e\";\n }\n if (primary.endsWith( \"6\" )) {\n\n primary = \"6\";\n memid = memid + \"f\";\n }\n if (primary.endsWith( \"7\" )) {\n\n primary = \"7\";\n memid = memid + \"g\";\n }\n if (primary.endsWith( \"8\" )) {\n\n primary = \"8\";\n memid = memid + \"h\";\n }\n if (primary.endsWith( \"9\" )) {\n\n primary = \"9\";\n memid = memid + \"i\";\n }\n\n //\n // Determine mtype value\n //\n if (primary.equalsIgnoreCase( \"0\" )) {\n\n pri_indicator = 0;\n\n if (gender.equalsIgnoreCase( \"1\" )) {\n\n gender = \"M\";\n mtype = \"Member Male\";\n\n } else {\n\n gender = \"F\";\n mtype = \"Member Female\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase( \"1\" )) {\n\n pri_indicator = 1;\n\n if (gender.equalsIgnoreCase( \"1\" )) {\n\n gender = \"M\";\n mtype = \"Spouse Male\";\n\n } else {\n\n gender = \"F\";\n mtype = \"Spouse Female\";\n }\n\n } else { // Dependents\n\n pri_indicator = 2;\n\n if (gender.equalsIgnoreCase( \"1\" )) {\n\n gender = \"M\";\n mtype = \"Dependent Male\";\n\n } else {\n\n gender = \"F\";\n mtype = \"Dependent Female\";\n }\n }\n }\n\n } else {\n\n skip = true; // skip record if webid not provided\n }\n\n } else {\n\n skip = true; // skip record if memid or name not provided\n\n errorMsg = errorMsg + \" Required Field Missing, name = \" +fname+ \" \" +lname+ \", webid\" +webid+ \", record #\" +rcount+ \" for \" +club+ \", line = \" +line; // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.dreamworldSync: \";\n\n } // end of IF minimum requirements met (memid, etc)\n\n\n\n //\n //******************************************************************\n // Common processing - add or update the member record\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n memid_old = \"\";\n\n memidChanged = false;\n changed = false;\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n\n\n pstmt2 = con.prepareStatement (\n \"SELECT username, email, email_bounced FROM member2b WHERE webid = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, webid); // put the parm in stmt\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if(rs.next()) {\n\n memid_old = rs.getString(\"username\");\n email_old = rs.getString(\"email\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n }\n pstmt2.close(); // close the stmt\n\n\n if (!memid_old.equals( \"\" )) { // if member found\n\n memid_new = memid_old;\n\n if (!memid.equals( memid_old )) { // if username has changed\n\n memid_new = memid; // use new memid\n memidChanged = true;\n }\n\n if (email.equals( \"\" ) && !email_old.equals( \"\" )) {\n\n email = email_old; // do not destroy existing email\n }\n\n if (!email.equals( \"\" ) && !email.equals( email_old )) { // if email has changed\n\n email_bounce1 = 0; // clear bounce flag\n }\n\n \n try {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET username = ?, name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, posid = ?, phone1 = ?, \" +\n \"inact = 0, last_sync_date = now(), gender = ?, email_bounced = ? \" +\n \"WHERE webid = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid_new);\n pstmt2.setString(2, lname);\n pstmt2.setString(3, fname);\n pstmt2.setString(4, mi);\n pstmt2.setString(5, mship);\n pstmt2.setString(6, mtype);\n pstmt2.setString(7, email);\n pstmt2.setString(8, mNum);\n pstmt2.setString(9, posid);\n pstmt2.setString(10, phone);\n pstmt2.setString(11, gender);\n pstmt2.setInt(12, email_bounce1);\n \n pstmt2.setString(13, webid);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n }\n catch (Exception e9) {\n\n errorMsg = errorMsg + \" Error updating record (#\" +rcount+ \") for \" +club+ \", line = \" +line+ \": \" + e9.getMessage(); // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.dreamworldSync: \";\n }\n\n\n //\n // Now, update other tables if the username has changed\n //\n if (memidChanged == true) {\n\n StringBuffer mem_name = new StringBuffer( fname ); // get the new first name\n\n if (!mi.equals( \"\" )) {\n mem_name.append(\" \" +mi); // new mi\n }\n mem_name.append(\" \" +lname); // new last name\n\n String newName = mem_name.toString(); // convert to one string\n\n Admin_editmem.updTeecurr(newName, memid_new, memid_old, con); // update teecurr with new values\n\n Admin_editmem.updTeepast(newName, memid_new, memid_old, con); // update teepast with new values\n\n Admin_editmem.updLreqs(newName, memid_new, memid_old, con); // update lreqs with new values\n\n Admin_editmem.updPartner(memid_new, memid_old, con); // update partner with new values\n\n Admin_editmem.updEvents(newName, memid_new, memid_old, con); // update evntSignUp with new values\n\n Admin_editmem.updLessons(newName, memid_new, memid_old, con); // update the lesson books with new values\n }\n\n\n } else {\n\n //\n // New member - first check if name already exists\n //\n boolean dup = false;\n\n pstmt2 = con.prepareStatement (\n \"SELECT username FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n dup = true;\n }\n pstmt2.close(); // close the stmt\n\n if (dup == false) {\n\n //\n // New member - add it\n //\n newCount++; // count records added\n\n try {\n\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, \" +\n \"webid, last_sync_date, gender) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,'',?,?,?,'',?,?,now(),?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, email2);\n pstmt2.setString(17, phone);\n pstmt2.setString(18, phone2);\n pstmt2.setString(19, suffix);\n pstmt2.setString(20, webid);\n pstmt2.setString(21, gender);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n\n }\n catch (Exception e8) {\n\n errorMsg = errorMsg + \" Error adding record (#\" +rcount+ \") for \" +club+ \", line = \" +line+ \": \" + e8.getMessage(); // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.dreamworldSync: \";\n }\n\n } else { // Dup name\n\n errorMsg = errorMsg + \" Duplicate Name found, name = \" +fname+ \" \" +lname+ \", record #\" +rcount+ \" for \" +club+ \", line = \" +line; // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.dreamworldSync: \";\n }\n }\n\n } // end of IF skip\n\n } // end of IF record valid (enough tokens)\n\n } // end of IF club = ????\n\n } // end of IF header row\n\n } // end of while\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n \n \n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n }\n\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster (record #\" +rcount+ \") for \" +club+ \", line = \" +line+ \": \" + e3.getMessage(); // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.dreamworldSync: \";\n }\n\n }", "private LCSRevisableEntity createEntries(String selectedId) {\n\t\t\n\t\tLCSRevisableEntity revEntity=null;\n\n\t\tLCSProduct product = null;\n\t\tLCSSKU lcsSku = null;\n\t\tString sizedefVR = \"\";\n\t\tString prodVR = \"\";\n\t\tString colorwayVR = \"\";\n\t\tString reventityVR = \"\";\n\t\t\n\t\tLCSLog.debug(\"****************Inside createEntries ***********************\");\n\t\t/*\n\t\t * is found in the request object.\n\t\t */\n\t\t// get division code from request.\n\t\tString divcode = this.requesttable.get(selectedId + \"_DIVISION_CODE\");\n\t\t// get material number from request\n\t\tString materialNumber = divcode\n\t\t\t\t+ this.requesttable.get(selectedId + \"_MATERIALNUMBER\");\n\t\t// get nrf code from request\n\t\tString nrfCode = \"\";\n\t\t// this.requesttable.get(selectedId + \"_NRF_CODE\");\n\t\t// get sourceVersion from request\n\t\tString sourceVersion = this.requesttable.get(selectedId + \"_SOURCE\");\n\t\t// get costsheetVersion from request\n\t\tString costsheetVersion = this.requesttable.get(selectedId + \"_COST\");\n\t\t\n\t\tString specVersion = this.requesttable.get(selectedId + \"_SPEC\");\n\t\t\n\t\tString bomRequestParam = this.requesttable.get(\"BOM\"+selectedId + \"_BOM\");\n\t\tLCSLog.debug(\"bomRequestParam = \"+bomRequestParam);\n\n\t\tString sourceName = \"\";\n\t\tString costName = \"\";\n\t\tString specName = \"\";\n\t\tString IBTINSTOREMONTH = \"\";\n\n\t\ttry {\n\t\t\t// get all the information from sourceVersion and costsheetVersion\n\t\t\tMap<String, String> map = LFIBTUtil.formatSourceOrCostsheetData(\n\t\t\t\t\tsourceVersion, costsheetVersion, specVersion);\n\t\t\t\n\t\t\t// source name\n\t\t\tsourceName = map.get(\"sourceNameKey\");\n\t\t\t// versionId\n\t\t\tsourceVersion = map.get(\"sourceVersionKey\"); \n\t\t\tLCSLog.debug(\"sourceName --- \" + sourceName);\n\t\t\t// costsheet name\n\t\t\tcostName = map.get(\"costNameKey\");\n\n\t\t\t// costsheetId\n\t\t\tcostsheetVersion = map.get(\"costsheetVersionKey\");\n\t\t\tLCSLog.debug(\"costName --- \" + costName);\n\t\t\t\n\t\t\tspecName = map.get(\"specNameKey\");\n\n\t\t\t// costsheetId\n\t\t\tspecVersion = map.get(\"specVersionKey\");\n\t\t\tLCSLog.debug(\"costName --- \" + costName);\t\t\t\n\n\t\t\tCollection<String> bomMOAStringColl = new ArrayList<String>();\n\t\t\tbomMOAStringColl = LFIBTUtil.formatBOMMultiChoiceValues(bomRequestParam);\n\t\t\t\n\t\t\tList<String> idList = LFIBTUtil.getObjects(selectedId);\n\n\t\t\t// parse and get all data\n\t\t\tMap<String, String> idMap = LFIBTUtil\n\t\t\t\t\t.createCustomMapFromList(idList);\n\t\t\t// get product ID\n\t\t\tprodVR = idMap.get(\"prodVR\");\n\n\t\t\tLCSLog.debug(\"prodVR : --\" + prodVR);\n\t\t\t// get the product object from productVR\n\t\t\tproduct = (LCSProduct) LCSProductQuery\n\t\t\t\t\t.findObjectById(\"VR:com.lcs.wc.product.LCSProduct:\"\n\t\t\t\t\t\t\t+ prodVR);\n\n\t\t\tLCSLog.debug(\"product : --\" + product);\n\n\t\t\t// size definition VR\n\t\t\tsizedefVR = idMap.get(\"sizedefVR\");\n\t\t\tLCSLog.debug(\"sizedefVR -- \" + sizedefVR);\n\n\t\t\t// colorway VR\n\t\t\tcolorwayVR = idMap.get(\"colorwayVR\");\n\t\t\tLCSLog.debug(\"colorwayVR : --\" + colorwayVR);\n\t\t\tlcsSku = (LCSSKU) LCSProductQuery\n\t\t\t\t\t.findObjectById(\"VR:com.lcs.wc.product.LCSSKU:\"\n\t\t\t\t\t\t\t+ colorwayVR);\n\n\t\t\t// NRF Code -- Build 5.16\n\t\t\tDouble d = 0.00;\n\t\t\td = (Double) lcsSku.getValue(\"lfNrfColorCode\");\n\t\t\tnrfCode = StringUtils.substringBeforeLast(Double.toString(d), \".\");\n\n\t\t\t/**\n\t\t\t * Build 5.16_3 -> START\n\t\t\t * Formatting NRF code to 3 digits before sending it to SAP\n\t\t\t */\n\t\t\t// getting length of code value\n\t\t\tint nrfCodeValueLength = nrfCode.length();\n\t\t\t// TRUE - if length is 1 or 2 digit\n\t\t\tif (nrfCodeValueLength == 2 || nrfCodeValueLength == 1) {\n\t\t\t\t// converting the value from double to integer\n\t\t\t\tint y = d.intValue();\n\t\t\t\t// formatting the value to be 3 digit always.\n\t\t\t\t// if not, append 0 to left\n\t\t\t\tnrfCode = (String.format(\"%03d\", y)).toString();\n\t\t\t}\n\t\t\t/**\n\t\t\t * Build 5.16_3 -> END\n\t\t\t */\n\n\t\t\t// get the revisable entity VR if applicable\n\t\t\treventityVR = idMap.get(\"reventityVR\");\n\n\t\t\t// Added for Build 6.14\n\t\t\t// ITC-START\n\t\t\tString materialDescription = this.requesttable.get(selectedId\n\t\t\t\t\t+ \"_MATERIALDESC\");\n\t\t\tIBTINSTOREMONTH = this.requesttable.get(selectedId + \"_INSTOREMONTH\");\n\t\t\tString styleNumber = this.requesttable.get(selectedId + \"_STYLE\");\n\t\t\t// ITC-END\n\t\t\t\n\t\t\t//MM : changes : Start ----\n\t\t\tif(!FormatHelper.hasContent(reventityVR))\n\t\t\t\treventityVR = LFIBTMaterialNumberValidator.getExistingMaterialRecords(materialNumber,false);\n\t\t\t//MM : changes : End ----\n\t\t\t/*\n\t\t\t * If the revisable entity VR exists then update the revisable\n\t\t\t * entity else create a new one.\n\t\t\t */\n\t\t\tif (reventityVR != null) \n\t\t\t{\n\t\t\t\tLCSLog.debug(\"sourceVersion -- \" + sourceVersion\n\t\t\t\t\t\t+ \" costsheetVersion - \" + costsheetVersion\n\t\t\t\t\t\t+ \" nrfCode -- \" + nrfCode\n\t\t\t\t\t\t+ \" materialDescription --\" + materialDescription\n\t\t\t\t\t\t+ \" IBTINSTOREMONTH--\" + IBTINSTOREMONTH\n\t\t\t\t\t\t+ \" style Number----\" + styleNumber);\n\n\t\t\t\t// API call to update the revisable entitity with new\n\t\t\t\t// source and cost details.\n\n\t\t\t\t// Updated for Build 6.14\n\t\t\t\tLCSLog.debug(CLASSNAME+\"createEntries()\"+\"calling updateRevisableEntry()\");\n\t\t\t\trevEntity=updateRevisableEntry(reventityVR, sourceVersion,\n\t\t\t\t\t\tcostsheetVersion,specVersion, nrfCode, materialDescription,\n\t\t\t\t\t\tsourceName, costName,specName, IBTINSTOREMONTH, styleNumber,bomMOAStringColl);\n\t\t\t\t\n\t\t\t\tLCSLog.debug(CLASSNAME+\"update revEntity---->\" +revEntity);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// API call to create fresh revisable entities.\n\n\t\t\t\t// Updated for Build 6.14\n\t\t\t\t\n\t\t\t\tLCSLog.debug(CLASSNAME+\"createEntries()\"+\"calling createRevisableEntry()\");\n\t\t\t\trevEntity=createRevisableEntry(product, lcsSku, materialNumber,\n\t\t\t\t\t\tsizedefVR, sourceVersion, costsheetVersion, specVersion, sourceName,\n\t\t\t\t\t\tcostName, specName, nrfCode, styleNumber, materialDescription,\n\t\t\t\t\t\tIBTINSTOREMONTH,bomMOAStringColl);\n\t\t\t\t\n\t\t\t\tLCSLog.debug(CLASSNAME+\"create revEntity---->\" +revEntity);\n\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\tcatch (WTException e) {\n\t\t\tLCSLog.error(\"WTException occurred!! \" + e.getMessage());\n\t\t}\n\t\tcatch (WTPropertyVetoException e) {\n\t\t\tLCSLog.error(\"WTPropertyVetoException occurred!! \" + e.getMessage());\n\t\t}\n\t\t\t\t\n\t\treturn revEntity;\n\n\t}", "public ClearMoneyLogRecord(Integer id, String code, Integer status, Timestamp createdAt, Timestamp updatedAt, String message, String bankCardNumber, BigDecimal money, String name, String bankCardName, String bankCode, String openingBankName, String openingBankCode, String userPhone, Integer clearMoneyNewId) {\n super(ClearMoneyLog.CLEAR_MONEY_LOG);\n\n set(0, id);\n set(1, code);\n set(2, status);\n set(3, createdAt);\n set(4, updatedAt);\n set(5, message);\n set(6, bankCardNumber);\n set(7, money);\n set(8, name);\n set(9, bankCardName);\n set(10, bankCode);\n set(11, openingBankName);\n set(12, openingBankCode);\n set(13, userPhone);\n set(14, clearMoneyNewId);\n }", "@Override\n public void run() {\n int queueSize = dataQueue.size();\n List<IData> allDataList = new ArrayList<>(queueSize);\n dataQueue.drainTo(allDataList, queueSize);\n\n // each data list\n List<MarketData> marketDatas = new ArrayList<>(queueSize);\n List<Order> orders = new ArrayList<>();\n List<Position> positions = new ArrayList<>();\n List<IndicatorInformation> indicatorInformations = new ArrayList<>();\n List<ModelInformation> modelInformations = new ArrayList<>();\n List<PLInformation> plInformations = new ArrayList<>();\n List<OptimizedExecution> executionInformations = new ArrayList<>();\n List<SystemInformation> systemInformations = new ArrayList<>();\n List<TimerInformation> timerInformations = new ArrayList<>();\n\n try {\n // Create List\n for (IData data : allDataList) {\n if (data instanceof MarketData) {\n marketDatas.add((MarketData) data);\n\n } else if (data instanceof Order) {\n orders.add((Order) data);\n\n } else if (data instanceof Position) {\n positions.add((Position) data);\n\n } else if (data instanceof IndicatorInformation) {\n indicatorInformations.add((IndicatorInformation) data);\n\n } else if (data instanceof ModelInformation) {\n modelInformations.add((ModelInformation) data);\n\n } else if (data instanceof PLInformation) {\n plInformations.add((PLInformation) data);\n\n } else if (data instanceof OptimizedExecution) {\n executionInformations.add((OptimizedExecution) data);\n\n } else if (data instanceof SystemInformation) {\n systemInformations.add((SystemInformation) data);\n\n } else if (data instanceof TimerInformation) {\n timerInformations.add((TimerInformation) data);\n\n } else {\n throw new UnExpectedDataException(data.getClass());\n }\n }\n\n // insert\n if (!marketDatas.isEmpty()) {\n // logger.debug(\"Insert List : MarketData - size = \" + marketDatas.size());\n eventDao.insert(MarketData.class, marketDatas);\n }\n if (!orders.isEmpty()) {\n // logger.debug(\"Insert List : Order - size = \" + orders.size());\n eventDao.insert(Order.class, orders);\n }\n if (!positions.isEmpty()) {\n // logger.debug(\"Insert List : Position - size = \" + positions.size());\n eventDao.insert(Position.class, positions);\n }\n if (!indicatorInformations.isEmpty()) {\n // logger.debug(\"Insert List : IndicatorInformation - size = \" + indicatorInformations.size());\n eventDao.insert(IndicatorInformation.class, indicatorInformations);\n }\n if (!modelInformations.isEmpty()) {\n // logger.debug(\"Insert List : ModelInformation - size = \" + modelInformations.size());\n eventDao.insert(ModelInformation.class, modelInformations);\n }\n if (!plInformations.isEmpty()) {\n // logger.debug(\"Insert List : PLInformation - size = \" + plInformations.size());\n eventDao.insert(PLInformation.class, plInformations);\n }\n if (!executionInformations.isEmpty()) {\n // logger.debug(\"Insert List : OptimizedExecution - size = \" + executionInformations.size());\n eventDao.insert(OptimizedExecution.class, executionInformations);\n }\n if (!systemInformations.isEmpty()) {\n // logger.debug(\"Insert List : SystemInformation - size = \" + systemInformations.size());\n eventDao.insert(SystemInformation.class, systemInformations);\n }\n if (!timerInformations.isEmpty()) {\n // logger.debug(\"Insert List : TimerInformation - size = \" + timerInformations.size());\n eventDao.insert(TimerInformation.class, timerInformations);\n }\n\n } catch (Exception e) {\n logger.error(\"Error in inserting data.\", e);\n }\n }", "public void addBlacklistSeller(EbaySeller seller, Search search, String reason) {\r\n\t\tSearchSellerBlacklist ssb = new SearchSellerBlacklist();\r\n\t\tssb.setSeller(seller);\r\n\t\tssb.setSearch(search);\r\n\t\tssb.setReason(reason);\r\n\t\tif (!search.getBlacklistSellers().contains(ssb)) {\r\n\t\t\tsearch.getBlacklistSellers().add(ssb);\r\n\t\t\tsellerBanRepository.save(ssb);\r\n\t\t\tsearchRepository.save(search);\r\n\t\t}\r\n\t}", "private static void clubTecSync(Connection con, InputStreamReader isr, String club) {\n\n PreparedStatement pstmt2 = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n int inact = 0;\n int pri_indicator = 0;\n\n // Values from MFirst records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String mNum = \"\";\n String u_hndcp = \"\";\n String c_hndcp = \"\";\n String mship = \"\";\n String mtype = \"\";\n String msub_type = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String phone3 = \"\";\n String mobile = \"\";\n String primary = \"\";\n String webid = \"\";\n String custom1 = \"\";\n String custom2 = \"\";\n String custom3 = \"\";\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n\n // Values from ForeTees records\n //\n String fname_old = \"\";\n String lname_old = \"\";\n String mi_old = \"\";\n String mship_old = \"\";\n String mtype_old = \"\";\n String email_old = \"\";\n String mNum_old = \"\";\n String ghin_old = \"\";\n String bag_old = \"\";\n String posid_old = \"\";\n String email2_old = \"\";\n String phone_old = \"\";\n String phone2_old = \"\";\n String suffix_old = \"\";\n String msub_type_old = \"\";\n\n float u_hcap_old = 0;\n float c_hcap_old = 0;\n int birth_old = 0;\n\n // Values for New ForeTees records\n //\n String memid_new = \"\";\n String webid_new = \"\";\n String fname_new = \"\";\n String lname_new = \"\";\n String mi_new = \"\";\n String mship_new = \"\";\n String mtype_new = \"\";\n String email_new = \"\";\n String mNum_new = \"\";\n String ghin_new = \"\";\n String bag_new = \"\";\n String posid_new = \"\";\n String email2_new = \"\";\n String phone_new = \"\";\n String phone2_new = \"\";\n String suffix_new = \"\";\n String msub_type_new = \"\";\n String dupuser = \"\";\n String dupwebid = \"\";\n String dupmnum = \"\";\n\n float u_hcap_new = 0;\n float c_hcap_new = 0;\n int birth_new = 0;\n int errCount = 0;\n int warnCount = 0;\n int totalErrCount = 0;\n int totalWarnCount = 0;\n int email_bounce1 = 0;\n int email_bounce2 = 0;\n\n String errorMsg = \"\";\n String errMemInfo = \"\";\n String errMsg = \"\";\n String warnMsg = \"\";\n\n ArrayList<String> errList = new ArrayList<String>();\n ArrayList<String> warnList = new ArrayList<String>();\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean found = false;\n boolean genderMissing = false;\n boolean useWebid = false;\n boolean useWebidQuery = false;\n boolean headerFound = false;\n\n\n // Overwrite log file with fresh one for today's logs\n SystemUtils.logErrorToFile(\"ClubTec: Error log for \" + club + \"\\nStart time: \" + new java.util.Date().toString() + \"\\n\", club, false);\n\n try {\n\n Calendar caly = new GregorianCalendar(); // get todays date\n int thisYear = caly.get(Calendar.YEAR); // get this year value\n\n thisYear = thisYear - 2000;\n\n BufferedReader bfrin = new BufferedReader(isr);\n line = new String();\n\n // format of each line in the file:\n //\n // memid, mNum, fname, mi, lname, suffix, mship, mtype, gender, email, email2,\n // phone, phone2, bag, hndcp#, uhndcp, chndcp, birth, posid, mobile, primary\n //\n //\n while ((line = bfrin.readLine()) != null) { // get one line of text\n\n\n // Skip the 1st row (header row)\n\n if (headerFound == false) {\n\n headerFound = true;\n\n } else {\n\n // Remove the dbl quotes and check for embedded commas\n line = cleanRecord4( line );\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() >= 32 ) { // enough data ?\n\n // Gather data from input (* indicates field is used)\n mNum = tok.nextToken(); // Col A*\n fname = tok.nextToken(); // Col B*\n lname = tok.nextToken(); // Col C*\n suffix = tok.nextToken(); // Col D*\n primary = tok.nextToken(); // Col E*\n tok.nextToken(); // Col F\n mship = tok.nextToken(); // Col G*\n tok.nextToken(); // Col H\n tok.nextToken(); // Col I\n tok.nextToken(); // Col J\n tok.nextToken(); // Col K\n tok.nextToken(); // Col L\n tok.nextToken(); // Col M\n tok.nextToken(); // Col N\n phone = tok.nextToken(); // Col O*\n email = tok.nextToken(); // Col P*\n tok.nextToken(); // Col Q\n tok.nextToken(); // Col R\n tok.nextToken(); // Col S\n tok.nextToken(); // Col T\n tok.nextToken(); // Col U\n tok.nextToken(); // Col V\n tok.nextToken(); // Col W\n phone2 = tok.nextToken(); // Col X*\n email2 = tok.nextToken(); // Col Y*\n phone3 = tok.nextToken(); // Col Z*\n tok.nextToken(); // Col AA\n mi = tok.nextToken(); // Col AB*\n gender = tok.nextToken(); // Col AC*\n temp = tok.nextToken(); // Col AD*\n // AE and AF are skipped\n\n\n //\n // Check for ? (not provided)\n //\n if (webid.equals(\"?\")) webid = \"\";\n if (memid.equals(\"?\")) memid = \"\";\n if (mNum.equals(\"?\")) mNum = \"\";\n if (primary.equals(\"?\")) primary = \"\";\n if (fname.equals(\"?\")) fname = \"\";\n if (mi.equals(\"?\")) mi = \"\";\n if (lname.equals(\"?\")) lname = \"\";\n if (suffix.equals(\"?\")) suffix = \"\";\n if (mship.equals(\"?\")) mship = \"\";\n if (email.equals(\"?\")) email = \"\";\n if (email2.equals(\"?\")) email2 = \"\";\n if (phone.equals(\"?\")) phone = \"\";\n if (phone2.equals(\"?\")) phone2 = \"\";\n if (phone3.equals(\"?\")) phone3 = \"\";\n if (temp.equals(\"?\")) temp = \"\";\n\n if (gender.equals( \"?\" ) || (!gender.equalsIgnoreCase(\"M\") && !gender.equalsIgnoreCase(\"F\"))) {\n\n if (gender.equals( \"?\" )) {\n genderMissing = true;\n } else {\n genderMissing = false;\n }\n gender = \"\";\n }\n\n // trim gender in case followed be spaces\n gender = gender.trim();\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!mNum.equals( \"\" ) && !lname.equals( \"\" ) && !fname.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 && mi.equals( \"\" )) {\n\n mi = tok.nextToken();\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n lname = tok.nextToken(); // remove suffix and spaces\n\n if (!suffix.equals( \"\" ) && tok.countTokens() > 0 && club.equals(\"pradera\")) { // Pradera - if suffix AND 2-part lname, use both\n\n String lpart2 = tok.nextToken();\n\n lname = lname + \"_\" + lpart2; // combine them (i.e. Van Ess = Van_Ess)\n\n } else {\n\n if (suffix.equals( \"\" ) && tok.countTokens() > 0) { // if suffix not provided\n\n suffix = tok.nextToken();\n }\n }\n\n //\n // Make sure name is titled (most are already)\n //\n /*\n fname = toTitleCase(fname);\n lname = toTitleCase(lname);\n */\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n lname = lname + \"_\" + suffix; // append suffix to last name\n }\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n if (!u_hndcp.equals( \"\" ) && !u_hndcp.equalsIgnoreCase(\"NH\") && !u_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n u_hndcp = u_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n u_hndcp = u_hndcp.replace('H', ' '); // or 'H' if present\n u_hndcp = u_hndcp.replace('N', ' '); // or 'N' if present\n u_hndcp = u_hndcp.replace('J', ' '); // or 'J' if present\n u_hndcp = u_hndcp.replace('R', ' '); // or 'R' if present\n u_hndcp = u_hndcp.trim();\n\n u_hcap = Float.parseFloat(u_hndcp); // usga handicap\n\n if ((!u_hndcp.startsWith(\"+\")) && (!u_hndcp.startsWith(\"-\"))) {\n\n u_hcap = 0 - u_hcap; // make it a negative hndcp (normal)\n }\n }\n\n if (!c_hndcp.equals( \"\" ) && !c_hndcp.equalsIgnoreCase(\"NH\") && !c_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n c_hndcp = c_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n c_hndcp = c_hndcp.replace('H', ' '); // or 'H' if present\n c_hndcp = c_hndcp.replace('N', ' '); // or 'N' if present\n c_hndcp = c_hndcp.replace('J', ' '); // or 'J' if present\n c_hndcp = c_hndcp.replace('R', ' '); // or 'R' if present\n c_hndcp = c_hndcp.trim();\n\n c_hcap = Float.parseFloat(c_hndcp); // usga handicap\n\n if ((!c_hndcp.startsWith(\"+\")) && (!c_hndcp.startsWith(\"-\"))) {\n\n c_hcap = 0 - c_hcap; // make it a negative hndcp (normal)\n }\n }\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n // if phone #2 is empty then assign phone #3 to it\n if (phone2.equals(\"\")) phone2 = phone3;\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n\n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n //\n // convert birth date (mm/dd/yyyy to yyyymmdd)\n //\n if (!temp.equals( \"\" )) {\n\n int mm = 0;\n int dd = 0;\n int yy = 0;\n\n tok = new StringTokenizer( temp, \"/-\" ); // delimiters are / & -\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n mm = Integer.parseInt(b1);\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else { // try 'Jan 20, 1951' format\n\n tok = new StringTokenizer( temp, \", \" ); // delimiters are comma and space\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n if (b1.startsWith( \"Jan\" )) {\n mm = 1;\n } else {\n if (b1.startsWith( \"Feb\" )) {\n mm = 2;\n } else {\n if (b1.startsWith( \"Mar\" )) {\n mm = 3;\n } else {\n if (b1.startsWith( \"Apr\" )) {\n mm = 4;\n } else {\n if (b1.startsWith( \"May\" )) {\n mm = 5;\n } else {\n if (b1.startsWith( \"Jun\" )) {\n mm = 6;\n } else {\n if (b1.startsWith( \"Jul\" )) {\n mm = 7;\n } else {\n if (b1.startsWith( \"Aug\" )) {\n mm = 8;\n } else {\n if (b1.startsWith( \"Sep\" )) {\n mm = 9;\n } else {\n if (b1.startsWith( \"Oct\" )) {\n mm = 10;\n } else {\n if (b1.startsWith( \"Nov\" )) {\n mm = 11;\n } else {\n if (b1.startsWith( \"Dec\" )) {\n mm = 12;\n } else {\n mm = Integer.parseInt(b1);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else {\n\n birth = 0;\n }\n }\n\n if (mm > 0) { // if birth provided\n\n if (mm == 1 && dd == 1 && yy == 1) { // skip if 1/1/0001\n\n birth = 0;\n\n } else {\n\n if (yy < 100) { // if 2 digit year\n\n if (yy <= thisYear) {\n\n yy += 2000; // 20xx\n\n } else {\n\n yy += 1900; // 19xx\n }\n }\n\n birth = (yy * 10000) + (mm * 100) + dd; // yyyymmdd\n\n if (yy < 1900) { // check for invalid date\n\n birth = 0;\n }\n }\n\n } else {\n\n birth = 0;\n }\n\n } else {\n\n birth = 0;\n }\n\n\n skip = false;\n errCount = 0; // reset error count\n warnCount = 0; // reset warning count\n errMsg = \"\"; // reset error message\n warnMsg = \"\"; // reset warning message\n errMemInfo = \"\"; // reset error member info\n found = false; // init club found\n\n\n //\n // Format member info for use in error logging before club-specific manipulation\n //\n errMemInfo = \"Member Details:\\n\" +\n \" name: \" + lname + \", \" + fname + \" \" + mi + \"\\n\" +\n \" mtype: \" + mtype + \" mship: \" + mship + \"\\n\" +\n \" memid: \" + memid + \" mNum: \" + mNum + \" gender: \" + gender;\n\n // if gender is incorrect or missing, flag a warning in the error log\n if (gender.equals(\"\")) {\n\n // report only if not a club that uses blank gender fields (set to true for now, change if club's want other options down the line)\n if (true) {\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'M')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'M')\";\n }\n\n gender = \"M\";\n\n } else if (false) { // default to female instead (left in for future clubs)\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'F')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'F)\";\n }\n\n gender = \"F\";\n\n } else if (false) { // skip anyone missing gender (left in for future clubs)\n\n errCount++;\n skip = true;\n if (genderMissing) {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER missing!\";\n } else {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER incorrect!\";\n }\n }\n }\n\n //\n // Skip entries with first/last names of 'admin'\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -INVALID NAME! 'Admin' or 'admin' not allowed for first or last name\";\n }\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n\n //******************************************************************\n // Rolling Hills CC - CO - rhillscc\n //******************************************************************\n //\n if (club.equals(\"rhillscc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n StringTokenizer temptok = new StringTokenizer(mNum, \"-\");\n\n if (temptok.countTokens() > 1) {\n mNum = temptok.nextToken();\n }\n\n if (mship.contains(\"social\") || mship.contains(\"Social\")) {\n mship = \"Social\";\n } else if (mship.contains(\"absentee\") || mship.contains(\"Absentee\")) {\n mship = \"Absentee\";\n } else {\n mship = \"Golf\";\n }\n\n if (memid.endsWith(\"-000\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (memid.endsWith(\"-001\")) {\n\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Secondary Male\";\n } else {\n mtype = \"Secondary Female\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n }\n } // end if rhillscc\n\n\n //******************************************************************\n // All clubs\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\") && !memid.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n fname_old = \"\";\n lname_old = \"\";\n mi_old = \"\";\n mship_old = \"\";\n mtype_old = \"\";\n email_old = \"\";\n mNum_old = \"\";\n ghin_old = \"\";\n bag_old = \"\";\n posid_old = \"\";\n email2_old = \"\";\n phone_old = \"\";\n phone2_old = \"\";\n suffix_old = \"\";\n u_hcap_old = 0;\n c_hcap_old = 0;\n birth_old = 0;\n msub_type_old = \"\";\n email_bounce1 = 0;\n email_bounce2 = 0;\n\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!phone2.equals( \"\" )) {\n\n phone2 = truncate(phone2, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n if (!webid.equals( \"\" )) {\n\n webid = truncate(webid, 15);\n }\n if (!msub_type.equals( \"\" )) {\n\n msub_type = truncate(msub_type, 30);\n }\n\n //\n // Set Gender and Primary values\n //\n if (!gender.equalsIgnoreCase( \"M\" ) && !gender.equalsIgnoreCase( \"F\" )) {\n\n gender = \"\";\n }\n\n pri_indicator = 0; // default = Primary\n\n if (primary.equalsIgnoreCase( \"S\" )) { // Spouse\n\n pri_indicator = 1;\n }\n if (primary.equalsIgnoreCase( \"D\" )) { // Dependent\n\n pri_indicator = 2;\n }\n\n\n //\n // See if a member already exists with this id (username or webid)\n //\n // **** NOTE: memid and webid MUST be set to their proper values before we get here!!!!!!!!!!!!!!!\n //\n //\n // 4/07/2010\n // We now use 2 booleans to indicate what to do with the webid field.\n // useWebid is the original boolean that was used to indicate that we should use the webid to identify the member.\n // We lost track of when this flag was used and why. It was no longer used to indicate the webid should be\n // used in the query, so we don't know what its real purpose is. We don't want to disrupt any clubs that are\n // using it, so we created a new boolean for the query.\n // useWebidQuery is the new flag to indicate that we should use the webid when searching for the member. You should use\n // both flags if you want to use this one.\n //\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // yes, set new ids\n memid_new = \"\";\n\n } else { // DO NOT use webid\n\n webid_new = \"\"; // set new ids\n memid_new = memid;\n }\n\n if (useWebidQuery == false) {\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n\n } else { // use the webid field\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE webid = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, webid); // put the parm in stmt\n }\n\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n memid = rs.getString(\"username\"); // get username in case we used webid (use this for existing members)\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n\n if (useWebid == true) { // use webid to locate member?\n memid_new = memid; // yes, get this username\n } else {\n webid_new = rs.getString(\"webid\"); // no, get current webid\n }\n }\n pstmt2.close(); // close the stmt\n\n\n //\n // If member NOT found, then check if new member OR id has changed\n //\n boolean memFound = false;\n boolean dup = false;\n boolean userChanged = false;\n boolean nameChanged = false;\n String dupmship = \"\";\n\n if (fname_old.equals( \"\" )) { // if member NOT found\n\n //\n // New member - first check if name already exists\n //\n pstmt2 = con.prepareStatement (\n \"SELECT username, m_ship, memNum, webid FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) { // Allow duplicate names for Long Cove for members owning two properties at once\n\n dupuser = rs.getString(\"username\"); // get this username\n dupmship = rs.getString(\"m_ship\");\n dupmnum = rs.getString(\"memNum\");\n dupwebid = rs.getString(\"webid\"); // get this webid\n\n //\n // name already exists - see if this is the same member\n //\n if ((!dupmnum.equals( \"\" ) && dupmnum.equals( mNum )) || club.equals(\"imperialgc\")) { // if name and mNum match, then memid or webid must have changed\n\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // set new ids\n memid_new = dupuser;\n memid = dupuser; // update this record\n\n } else {\n\n webid_new = dupwebid; // set new ids\n memid_new = memid;\n memid = dupuser; // update this record\n userChanged = true; // indicate the username has changed\n }\n\n memFound = true; // update the member\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n }\n\n } else {\n dup = true; // dup member - do not add\n }\n\n }\n pstmt2.close(); // close the stmt\n\n } else { // member found\n memFound = true;\n }\n\n //\n // Now, update the member record if existing member\n //\n if (memFound == true) { // if member exists\n\n changed = false; // init change indicator\n\n lname_new = lname_old;\n\n // do not change lname for Saucon Valley if lname_old ends with '_*'\n if (!lname.equals( \"\" ) && !lname_old.equals( lname )) {\n\n lname_new = lname; // set value from ClubTec record\n changed = true;\n nameChanged = true;\n }\n\n fname_new = fname_old;\n\n if (!fname.equals( \"\" ) && !fname_old.equals( fname )) {\n\n fname_new = fname; // set value from ClubTec record\n changed = true;\n nameChanged = true;\n }\n\n mi_new = mi_old;\n\n if (!mi_old.equals( mi )) {\n\n mi_new = mi; // set value from ClubTec record\n changed = true;\n nameChanged = true;\n }\n\n mship_new = mship_old;\n\n if (!mship.equals( \"\" ) && !mship_old.equals( mship )) {\n\n mship_new = mship; // set value from ClubTec record\n changed = true;\n }\n\n mtype_new = mtype_old;\n\n if (!mtype.equals( \"\" ) && !mtype_old.equals( mtype )) {\n\n mtype_new = mtype; // set value from ClubTec record\n changed = true;\n }\n\n mNum_new = mNum_old;\n\n if (!mNum.equals( \"\" ) && !mNum_old.equals( mNum )) {\n\n mNum_new = mNum; // set value from ClubTec record\n changed = true;\n }\n\n ghin_new = ghin_old;\n\n if (!ghin.equals( \"\" ) && !ghin_old.equals( ghin )) {\n\n ghin_new = ghin; // set value from ClubTec record\n changed = true;\n }\n\n bag_new = bag_old;\n\n if (!bag.equals( \"\" ) && !bag_old.equals( bag )) {\n\n bag_new = bag; // set value from ClubTec record\n changed = true;\n }\n\n posid_new = posid_old;\n\n if (!posid.equals( \"\" ) && !posid_old.equals( posid )) {\n\n posid_new = posid; // set value from ClubTec record\n changed = true;\n }\n\n email_new = email_old;\n\n if (!email_old.equals( email )) { // if MF's email changed or was removed\n\n email_new = email; // set value from ClubTec record\n changed = true;\n email_bounce1 = 0; // reset bounced flag\n }\n\n email2_new = email2_old;\n\n if (!email2_old.equals( email2 )) { // if MF's email changed or was removed\n\n email2_new = email2; // set value from ClubTec record\n changed = true;\n email_bounce2 = 0; // reset bounced flag\n }\n\n phone_new = phone_old;\n\n if (!phone.equals( \"\" ) && !phone_old.equals( phone )) {\n\n phone_new = phone; // set value from ClubTec record\n changed = true;\n }\n\n phone2_new = phone2_old;\n\n if (!phone2.equals( \"\" ) && !phone2_old.equals( phone2 )) {\n\n phone2_new = phone2; // set value from ClubTec record\n changed = true;\n }\n\n suffix_new = suffix_old;\n\n if (!suffix.equals( \"\" ) && !suffix_old.equals( suffix )) {\n\n suffix_new = suffix; // set value from ClubTec record\n changed = true;\n }\n\n birth_new = birth_old;\n\n if (birth > 0 && birth != birth_old) {\n\n birth_new = birth; // set value from ClubTec record\n changed = true;\n }\n\n if (!mobile.equals( \"\" )) { // if mobile phone provided\n\n if (phone_new.equals( \"\" )) { // if phone1 is empty\n\n phone_new = mobile; // use mobile number\n changed = true;\n\n } else {\n\n if (phone2_new.equals( \"\" )) { // if phone2 is empty\n\n phone2_new = mobile; // use mobile number\n changed = true;\n }\n }\n }\n\n msub_type_new = msub_type_old;\n\n if (!msub_type.equals( \"\" ) && !msub_type_old.equals( msub_type )) {\n\n msub_type_new = msub_type; // set value from ClubTec record\n changed = true;\n }\n\n // don't allow both emails to be the same\n if (email_new.equalsIgnoreCase(email2_new)) email2_new = \"\";\n\n //\n // Update our record (always now to set the last_sync_date)\n //\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET username = ?, name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, ghin = ?, bag = ?, birth = ?, posid = ?, msub_type = ?, email2 = ?, phone1 = ?, \" +\n \"phone2 = ?, name_suf = ?, webid = ?, inact = 0, last_sync_date = now(), gender = ?, pri_indicator = ?, \" +\n \"email_bounced = ?, email2_bounced = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid_new);\n pstmt2.setString(2, lname_new);\n pstmt2.setString(3, fname_new);\n pstmt2.setString(4, mi_new);\n pstmt2.setString(5, mship_new);\n pstmt2.setString(6, mtype_new);\n pstmt2.setString(7, email_new);\n pstmt2.setString(8, mNum_new);\n pstmt2.setString(9, ghin_new);\n pstmt2.setString(10, bag_new);\n pstmt2.setInt(11, birth_new);\n pstmt2.setString(12, posid_new);\n pstmt2.setString(13, msub_type_new);\n pstmt2.setString(14, email2_new);\n pstmt2.setString(15, phone_new);\n pstmt2.setString(16, phone2_new);\n pstmt2.setString(17, suffix_new);\n pstmt2.setString(18, webid_new);\n pstmt2.setString(19, gender);\n pstmt2.setInt(20, pri_indicator);\n pstmt2.setInt(21, email_bounce1);\n pstmt2.setInt(22, email_bounce2);\n\n pstmt2.setString(23, memid);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n\n } else { // member NOT found - add it if we can\n\n if (dup == false) { // if not duplicate member\n\n //\n // New member is ok - add it\n //\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, webid, \" +\n \"last_sync_date, gender, pri_indicator) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,?,?,?,?,'',?,?, now(),?,?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, msub_type);\n pstmt2.setString(17, email2);\n pstmt2.setString(18, phone);\n pstmt2.setString(19, phone2);\n pstmt2.setString(20, suffix);\n pstmt2.setString(21, webid);\n pstmt2.setString(22, gender);\n pstmt2.setInt(23, pri_indicator);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n\n } else { // this member not found, but name already exists\n\n if (dup) {\n errCount++;\n errMsg = errMsg + \"\\n -Dup user found:\\n\" +\n \" new: memid = \" + memid + \" : cur: \" + dupuser + \"\\n\" +\n \" webid = \" + webid + \" : \" + dupwebid + \"\\n\" +\n \" mNum = \" + mNum + \" : \" + dupmnum;\n }\n }\n } // end of IF Member Found\n\n //\n // Member updated - now see if the username or name changed\n //\n if (userChanged == true || nameChanged == true) { // if username or name changed\n\n //\n // username or name changed - we must update other tables now\n //\n StringBuffer mem_name = new StringBuffer( fname_new ); // get the new first name\n\n if (!mi_new.equals( \"\" )) {\n mem_name.append(\" \" +mi_new); // new mi\n }\n mem_name.append(\" \" +lname_new); // new last name\n\n String newName = mem_name.toString(); // convert to one string\n\n Admin_editmem.updTeecurr(newName, memid_new, memid, con); // update teecurr with new values\n\n Admin_editmem.updTeepast(newName, memid_new, memid, con); // update teepast with new values\n\n Admin_editmem.updLreqs(newName, memid_new, memid, con); // update lreqs with new values\n\n Admin_editmem.updPartner(memid_new, memid, con); // update partner with new values\n\n Admin_editmem.updEvents(newName, memid_new, memid, con); // update evntSignUp with new values\n\n Admin_editmem.updLessons(newName, memid_new, memid, con); // update the lesson books with new values\n }\n\n } else {\n\n // Only report errors that AREN'T due to skip == true, since those were handled earlier!\n if (!found) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBER NOT FOUND!\";\n }\n if (fname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n }\n if (lname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -LAST NAME missing!\";\n }\n if (memid.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -USERNAME missing!\";\n }\n } // end of IF skip\n\n } // end of IF minimum requirements\n\n } // end of IF tokens\n\n } // end of IF header row\n\n // log any errors and warnings that occurred\n if (errCount > 0) {\n totalErrCount += errCount;\n errList.add(errMemInfo + \"\\n *\" + errCount + \" error(s) found*\" + errMsg + \"\\n\");\n }\n if (warnCount > 0) {\n totalWarnCount += warnCount;\n warnList.add(errMemInfo + \"\\n *\" + warnCount + \" warning(s) found*\" + warnMsg + \"\\n\");\n }\n } // end of while (for each record in club's file)\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n\n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n }\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster for \" +club+ \": \" + e3.getMessage() + \"\\n\"; // build msg\n SystemUtils.logError(errorMsg); // log it\n }\n\n // Print error and warning count totals to error log\n SystemUtils.logErrorToFile(\"\" +\n \"Total Errors Found: \" + totalErrCount + \"\\n\" +\n \"Total Warnings Found: \" + totalWarnCount + \"\\n\", club, true);\n\n // Print errors and warnings to error log\n if (totalErrCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****ERRORS FOR \" + club + \" (Member WAS NOT synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (errList.size() > 0) {\n SystemUtils.logErrorToFile(errList.remove(0), club, true);\n }\n }\n if (totalWarnCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****WARNINGS FOR \" + club + \" (Member MAY NOT have synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (warnList.size() > 0) {\n SystemUtils.logErrorToFile(warnList.remove(0), club, true);\n }\n }\n\n // Print end tiem to error log\n SystemUtils.logErrorToFile(\"End time: \" + new java.util.Date().toString() + \"\\n\", club, true);\n\n }", "public ServiceOrderRecord(Integer orderId, Integer storeId, String orderSn, Integer userId, Byte orderStatus, String orderStatusName, String subscriber, String mobile, Integer serviceId, Integer technicianId, String technicianName, String serviceDate, String servicePeriod, String addMessage, String adminMessage, String verifyCode, String verifyAdmin, String payCode, String payName, String paySn, BigDecimal moneyPaid, BigDecimal discount, Integer couponId, BigDecimal orderAmount, Timestamp payTime, Timestamp cancelledTime, Timestamp finishedTime, String prepayId, Byte delFlag, Byte verifyType, String cancelReason, Byte type, Byte verifyPay, String aliTradeNo, Timestamp createTime, Timestamp updateTime, String memberCardNo, BigDecimal memberCardBalance, BigDecimal useAccount) {\n super(ServiceOrder.SERVICE_ORDER);\n\n set(0, orderId);\n set(1, storeId);\n set(2, orderSn);\n set(3, userId);\n set(4, orderStatus);\n set(5, orderStatusName);\n set(6, subscriber);\n set(7, mobile);\n set(8, serviceId);\n set(9, technicianId);\n set(10, technicianName);\n set(11, serviceDate);\n set(12, servicePeriod);\n set(13, addMessage);\n set(14, adminMessage);\n set(15, verifyCode);\n set(16, verifyAdmin);\n set(17, payCode);\n set(18, payName);\n set(19, paySn);\n set(20, moneyPaid);\n set(21, discount);\n set(22, couponId);\n set(23, orderAmount);\n set(24, payTime);\n set(25, cancelledTime);\n set(26, finishedTime);\n set(27, prepayId);\n set(28, delFlag);\n set(29, verifyType);\n set(30, cancelReason);\n set(31, type);\n set(32, verifyPay);\n set(33, aliTradeNo);\n set(34, createTime);\n set(35, updateTime);\n set(36, memberCardNo);\n set(37, memberCardBalance);\n set(38, useAccount);\n }", "public List<Market> getMarketHistoryByNonUniqueId(int marketId) throws MarketNotFoundException {\n List<Market> marketHistoryList = marketRepository.findMarketsById(marketId);\n\n if(marketHistoryList == null || marketHistoryList.isEmpty()){\n throw new MarketNotFoundException(marketId);\n }\n return marketHistoryList;\n }", "private ServiceAction createUpdateRecordAndClassificationsAction(MarcRecord updateRecord, MarcRecord commonRecord) {\n final MarcRecordReader reader = new MarcRecordReader(updateRecord);\n final UpdateClassificationsInEnrichmentRecordAction updateClassificationsInEnrichmentRecordAction =\n new UpdateClassificationsInEnrichmentRecordAction(state, settings, reader.getAgencyId());\n updateClassificationsInEnrichmentRecordAction.setCurrentCommonRecord(commonRecord);\n updateClassificationsInEnrichmentRecordAction.setUpdatingCommonRecord(commonRecord);\n updateClassificationsInEnrichmentRecordAction.setEnrichmentRecord(updateRecord);\n return updateClassificationsInEnrichmentRecordAction;\n }", "protected void createControlRecords() throws NbaBaseException {\n int count = getCarrierCodesList().size();\n for (int i = 0; i < count; i++) {\n String carrierCode = (String) getCarrierCodesList().get(i);\n boolean found = false;\n int ctlCount = getControlRecords().size();\n for (int j = 0; j < ctlCount; j++) {\n NbaMibPlanFControl nbaMibPlanFControl = (NbaMibPlanFControl) getControlRecords().get(j);\n if (nbaMibPlanFControl.getOrganizationCode().equalsIgnoreCase(carrierCode)) {\n found = true;\n break;\n }\n }\n if (!found) {\n getControlRecords().add(initializeControlRecord(carrierCode));\n }\n }\n }", "private void fillData()\n\t{\n\t\tNightliesAdapter na = new NightliesAdapter( context );\n\t\ttry\n\t\t{\n\t\t\tna.read();\n\n\t\t\t// get Downloads\n\t\t\tCursor cur_dl = na.getDownloadsCursor();\n\t\t\tcur_dl.moveToFirst();\n\n\t\t\t// we will start db records from 1: 0 reserved for our custom record\n\t\t\tint count_dl = cur_dl.getCount() + 1;\n\t\t\tif ( count_dl > 1 )\n\t\t\t{\n\t\t\t\tdownloads = new DownloadsRecord[count_dl];\n\t\t\t\tchangelogs = new ChangeLogRecord[count_dl][];\n\n\t\t\t\tDownloadsRecord dr;\n\t\t\t\tlong dateTo = ( new Date() ).getTime();\n\t\t\t\tlong dateFrom = cur_dl.getLong( cur_dl.getColumnIndex( NightliesAdapter.CM_DATE ) );\n\n\t\t\t\t// empty first record\n\t\t\t\tdr = new DownloadsRecord();\n\t\t\t\tdr.filename = \"next nightly\";\n\t\t\t\tdr.type = \"nightly\";\n\t\t\t\tdr.size = \"\";\n\t\t\t\tdr.md5sum = \"\";\n\t\t\t\tdr.date_added = new Date();\n\t\t\t\tdownloads[0] = dr;\n\n\t\t\t\t// get change log data\n\t\t\t\tchangelogs[0] = fillChangeLogData( na, dateFrom, dateTo );\n\n\t\t\t\tfor ( int i = 1; i < count_dl && !cur_dl.isAfterLast(); i++ )\n\t\t\t\t{\n\t\t\t\t\tdr = new DownloadsRecord();\n\t\t\t\t\tdr.filename = cur_dl.getString( cur_dl\n\t\t\t\t\t\t\t.getColumnIndex( NightliesAdapter.CM_FILENAME ) );\n\t\t\t\t\tdr.type = cur_dl.getString( cur_dl.getColumnIndex( NightliesAdapter.CM_TYPE ) );\n\t\t\t\t\tdr.md5sum = cur_dl.getString( cur_dl\n\t\t\t\t\t\t\t.getColumnIndex( NightliesAdapter.CM_MD5SUM ) );\n\t\t\t\t\tdr.size = cur_dl.getString( cur_dl.getColumnIndex( NightliesAdapter.CM_SIZE ) );\n\t\t\t\t\tdateFrom = cur_dl.getLong( cur_dl.getColumnIndex( NightliesAdapter.CM_DATE ) );\n\t\t\t\t\tdr.date_added = new Date( dateFrom );\n\t\t\t\t\tdownloads[i] = dr;\n\n\t\t\t\t\t// get change log data\n\t\t\t\t\tchangelogs[i] = fillChangeLogData( na, dateFrom, dateTo );\n\n\t\t\t\t\tdateTo = dateFrom;\n\t\t\t\t\tcur_dl.moveToNext();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t\t// no records found\n\t\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\t\tdr.filename = \"No Records found, please refresh\";\n\t\t\t\tdr.type = \"nightly\";\n\t\t\t\tdr.size = \"\";\n\t\t\t\tdr.md5sum = \"\";\n\t\t\t\tdr.date_added = null;\n\t\t\t\tdownloads[0] = dr;\n\t\t\t}\n\t\t}\n\t\tcatch ( SQLException e )\n\t\t{\n\t\t\t// data base does not exist or cannot be opened for read\n\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t// no records found\n\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\tdr.filename = \"Problem with DB, please refresh\";\n\t\t\tdr.type = \"nightly\";\n\t\t\tdr.size = \"\";\n\t\t\tdr.md5sum = \"\";\n\t\t\tdr.date_added = null;\n\t\t\tdownloads[0] = dr;\n\n\t\t\tLog.e( TAG, \"DB Fail\", e );\n\t\t}\n\t\tcatch ( CursorIndexOutOfBoundsException e )\n\t\t{\n\t\t\tdownloads = new DownloadsRecord[1];\n\t\t\tchangelogs = new ChangeLogRecord[1][0];\n\n\t\t\t// no records found\n\t\t\tDownloadsRecord dr = new DownloadsRecord();\n\t\t\tdr.filename = \"Problem with DB, please refresh\";\n\t\t\tdr.type = \"nightly\";\n\t\t\tdr.size = \"\";\n\t\t\tdr.md5sum = \"\";\n\t\t\tdr.date_added = null;\n\t\t\tdownloads[0] = dr;\n\n\t\t\tLog.e( TAG, \"DB Fail\", e );\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif ( na != null )\n\t\t\t{\n\t\t\t\tna.close();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public int hashCode() {\n return ticker.hashCode();\n }", "private static void mFirstSync(Connection con, FileReader fr, String club, boolean clubcorp) {\n\n PreparedStatement pstmt2 = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n int inact = 0;\n int pri_indicator = 0;\n\n // Values from MFirst records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String mNum = \"\";\n String u_hndcp = \"\";\n String c_hndcp = \"\";\n String mship = \"\";\n String mtype = \"\";\n String msub_type = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String mobile = \"\";\n String primary = \"\";\n String webid = \"\";\n String custom1 = \"\";\n String custom2 = \"\";\n String custom3 = \"\";\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n\n // Values from ForeTees records\n //\n String fname_old = \"\";\n String lname_old = \"\";\n String mi_old = \"\";\n String mship_old = \"\";\n String mtype_old = \"\";\n String email_old = \"\";\n String mNum_old = \"\";\n String ghin_old = \"\";\n String bag_old = \"\";\n String posid_old = \"\";\n String email2_old = \"\";\n String phone_old = \"\";\n String phone2_old = \"\";\n String suffix_old = \"\";\n String msub_type_old = \"\";\n\n float u_hcap_old = 0;\n float c_hcap_old = 0;\n int birth_old = 0;\n\n // Values for New ForeTees records\n //\n String memid_new = \"\";\n String webid_new = \"\";\n String fname_new = \"\";\n String lname_new = \"\";\n String mi_new = \"\";\n String mship_new = \"\";\n String mtype_new = \"\";\n String email_new = \"\";\n String mNum_new = \"\";\n String ghin_new = \"\";\n String bag_new = \"\";\n String posid_new = \"\";\n String email2_new = \"\";\n String phone_new = \"\";\n String phone2_new = \"\";\n String suffix_new = \"\";\n String msub_type_new = \"\";\n String dupuser = \"\";\n String dupwebid = \"\";\n String dupmnum = \"\";\n String emailMF = \"[email protected]\";\n String subject = \"Roster Sync Warning from ForeTees for \" +club;\n\n float u_hcap_new = 0;\n float c_hcap_new = 0;\n int birth_new = 0;\n int errCount = 0;\n int warnCount = 0;\n int totalErrCount = 0;\n int totalWarnCount = 0;\n int email_bounce1 = 0;\n int email_bounce2 = 0;\n\n String errorMsg = \"\";\n String errMemInfo = \"\";\n String errMsg = \"\";\n String warnMsg = \"\";\n String emailMsg1 = \"Duplicate names found in MembersFirst file during ForeTees Roster Sync processing for club: \" +club+ \".\\n\\n\";\n String emailMsg2 = \"\\nThis indicates that either 2 members have the exact same names (not allowed), or MF's member id has changed.\\n\\n\";\n\n ArrayList<String> errList = new ArrayList<String>();\n ArrayList<String> warnList = new ArrayList<String>();\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean found = false;\n boolean sendemail = false;\n boolean genderMissing = false;\n boolean useWebid = false;\n boolean useWebidQuery = false;\n\n\n // Overwrite log file with fresh one for today's logs\n SystemUtils.logErrorToFile(\"Members First: Error log for \" + club + \"\\nStart time: \" + new java.util.Date().toString() + \"\\n\", club, false);\n\n try {\n\n BufferedReader bfrin = new BufferedReader(fr);\n line = new String();\n\n // format of each line in the file:\n //\n // memid, mNum, fname, mi, lname, suffix, mship, mtype, gender, email, email2,\n // phone, phone2, bag, hndcp#, uhndcp, chndcp, birth, posid, mobile, primary\n //\n //\n while ((line = bfrin.readLine()) != null) { // get one line of text\n\n // Remove the dbl quotes and check for embedded commas\n\n line = cleanRecord( line );\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() > 20 ) { // enough data ?\n\n memid = tok.nextToken();\n mNum = tok.nextToken();\n fname = tok.nextToken();\n mi = tok.nextToken();\n lname = tok.nextToken();\n suffix = tok.nextToken();\n mship = tok.nextToken(); // col G\n mtype = tok.nextToken(); // col H\n gender = tok.nextToken();\n email = tok.nextToken();\n email2 = tok.nextToken();\n phone = tok.nextToken();\n phone2 = tok.nextToken();\n bag = tok.nextToken();\n ghin = tok.nextToken();\n u_hndcp = tok.nextToken();\n c_hndcp = tok.nextToken();\n temp = tok.nextToken();\n posid = tok.nextToken();\n mobile = tok.nextToken();\n primary = tok.nextToken(); // col U\n\n if ( tok.countTokens() > 0 ) {\n\n custom1 = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n custom2 = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n custom3 = tok.nextToken();\n }\n\n\n // trim gender in case followed be spaces\n gender = gender.trim();\n\n //\n // Check for ? (not provided)\n //\n if (memid.equals( \"?\" )) {\n\n memid = \"\";\n }\n if (mNum.equals( \"?\" )) {\n\n mNum = \"\";\n }\n if (fname.equals( \"?\" )) {\n\n fname = \"\";\n }\n if (mi.equals( \"?\" )) {\n\n mi = \"\";\n }\n if (lname.equals( \"?\" )) {\n\n lname = \"\";\n }\n if (suffix.equals( \"?\" )) {\n\n suffix = \"\";\n }\n if (mship.equals( \"?\" )) {\n\n mship = \"\";\n }\n if (mtype.equals( \"?\" )) {\n\n mtype = \"\";\n }\n if (gender.equals( \"?\" ) || (!gender.equalsIgnoreCase(\"M\") && !gender.equalsIgnoreCase(\"F\"))) {\n\n if (gender.equals( \"?\" )) {\n genderMissing = true;\n } else {\n genderMissing = false;\n }\n gender = \"\";\n }\n if (email.equals( \"?\" )) {\n\n email = \"\";\n }\n if (email2.equals( \"?\" )) {\n\n email2 = \"\";\n }\n if (phone.equals( \"?\" )) {\n\n phone = \"\";\n }\n if (phone2.equals( \"?\" )) {\n\n phone2 = \"\";\n }\n if (bag.equals( \"?\" )) {\n\n bag = \"\";\n }\n if (ghin.equals( \"?\" )) {\n\n ghin = \"\";\n }\n if (u_hndcp.equals( \"?\" )) {\n\n u_hndcp = \"\";\n }\n if (c_hndcp.equals( \"?\" )) {\n\n c_hndcp = \"\";\n }\n if (temp.equals( \"?\" )) {\n\n birth = 0;\n\n } else {\n\n birth = Integer.parseInt(temp);\n }\n if (posid.equals( \"?\" )) {\n\n posid = \"\";\n }\n if (mobile.equals( \"?\" )) {\n\n mobile = \"\";\n }\n if (primary.equals( \"?\" )) {\n\n primary = \"\";\n }\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!memid.equals( \"\" ) && !mNum.equals( \"\" ) &&\n !lname.equals( \"\" ) && !fname.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 && mi.equals( \"\" )) {\n\n mi = tok.nextToken();\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n lname = tok.nextToken(); // remove suffix and spaces\n\n if (!suffix.equals( \"\" ) && tok.countTokens() > 0 && club.equals(\"pradera\")) { // Pradera - if suffix AND 2-part lname, use both\n\n String lpart2 = tok.nextToken();\n\n lname = lname + \"_\" + lpart2; // combine them (i.e. Van Ess = Van_Ess)\n\n } else {\n\n if (suffix.equals( \"\" ) && tok.countTokens() > 0) { // if suffix not provided\n\n suffix = tok.nextToken();\n }\n }\n\n //\n // Make sure name is titled (most are already)\n //\n if (!club.equals(\"thereserveclub\")) {\n fname = toTitleCase(fname);\n }\n\n if (!club.equals(\"lakewoodranch\") && !club.equals(\"ballantyne\") && !club.equals(\"pattersonclub\") && !club.equals(\"baldpeak\") && !club.equals(\"pradera\") &&\n !club.equals(\"wellesley\") && !club.equals(\"portlandgc\") && !club.equals(\"trooncc\") && !club.equals(\"pmarshgc\") && !club.equals(\"paloaltohills\") &&\n !club.equals(\"thereserveclub\") && !club.equals(\"castlepines\")) {\n\n lname = toTitleCase(lname);\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n lname = lname + \"_\" + suffix; // append suffix to last name\n }\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n if (!u_hndcp.equals( \"\" ) && !u_hndcp.equalsIgnoreCase(\"NH\") && !u_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n u_hndcp = u_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n u_hndcp = u_hndcp.replace('H', ' '); // or 'H' if present\n u_hndcp = u_hndcp.replace('N', ' '); // or 'N' if present\n u_hndcp = u_hndcp.replace('J', ' '); // or 'J' if present\n u_hndcp = u_hndcp.replace('R', ' '); // or 'R' if present\n u_hndcp = u_hndcp.trim();\n\n u_hcap = Float.parseFloat(u_hndcp); // usga handicap\n\n if ((!u_hndcp.startsWith(\"+\")) && (!u_hndcp.startsWith(\"-\"))) {\n\n u_hcap = 0 - u_hcap; // make it a negative hndcp (normal)\n }\n }\n\n if (!c_hndcp.equals( \"\" ) && !c_hndcp.equalsIgnoreCase(\"NH\") && !c_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n c_hndcp = c_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n c_hndcp = c_hndcp.replace('H', ' '); // or 'H' if present\n c_hndcp = c_hndcp.replace('N', ' '); // or 'N' if present\n c_hndcp = c_hndcp.replace('J', ' '); // or 'J' if present\n c_hndcp = c_hndcp.replace('R', ' '); // or 'R' if present\n c_hndcp = c_hndcp.trim();\n\n c_hcap = Float.parseFloat(c_hndcp); // usga handicap\n\n if ((!c_hndcp.startsWith(\"+\")) && (!c_hndcp.startsWith(\"-\"))) {\n\n c_hcap = 0 - c_hcap; // make it a negative hndcp (normal)\n }\n }\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n \n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n skip = false;\n errCount = 0; // reset error count\n warnCount = 0; // reset warning count\n errMsg = \"\"; // reset error message\n warnMsg = \"\"; // reset warning message\n errMemInfo = \"\"; // reset error member info\n found = false; // init club found\n\n\n //\n // Format member info for use in error logging before club-specific manipulation\n //\n errMemInfo = \"Member Details:\\n\" +\n \" name: \" + lname + \", \" + fname + \" \" + mi + \"\\n\" +\n \" mtype: \" + mtype + \" mship: \" + mship + \"\\n\" +\n \" memid: \" + memid + \" mNum: \" + mNum + \" gender: \" + gender;\n\n // if gender is incorrect or missing, flag a warning in the error log\n if (gender.equals(\"\")) {\n\n // report only if not a club that uses blank gender fields\n if (!club.equals(\"roccdallas\") && !club.equals(\"charlottecc\") && !club.equals(\"sawgrass\") && !clubcorp) {\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'M')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'M')\";\n }\n\n gender = \"M\";\n\n } else if (club.equals(\"charlottecc\") || club.equals(\"sawgrass\")) { // default to female instead\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'F')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'F)\";\n }\n\n gender = \"F\";\n\n } else if (clubcorp) {\n\n errCount++;\n skip = true;\n if (genderMissing) {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER missing!\";\n } else {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER incorrect!\";\n }\n }\n }\n\n //\n // Skip entries with first/last names of 'admin'\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -INVALID NAME! 'Admin' or 'admin' not allowed for first or last name\";\n }\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n\n //******************************************************************\n // Saucon Valley Country Club\n //******************************************************************\n //\n if (club.equals( \"sauconvalleycc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equalsIgnoreCase( \"No Privileges\" ) && !mtype.equalsIgnoreCase( \"Social\" ) &&\n !mtype.equalsIgnoreCase( \"Recreational\" )) {\n\n //\n // determine member type\n //\n if (mtype.equals( \"\" )) { // if not specified\n mtype = \"Staff\"; // they are staff\n }\n if (mship.equals( \"\" )) { // if not specified\n mship = \"Staff\"; // they are staff\n }\n\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n //\n // The Member Types and Mship Types for this club are backwards.\n // We must set our fields accordingly.\n //\n String memType = mship; // set actual mtype value\n mship = mtype; // set actual mship value\n\n if (memType.equals( \"Full Golf Privileges\" )) {\n\n mtype = \"Full Golf Privileges Men\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Full Golf Privileges Women\";\n }\n }\n\n if (memType.equals( \"Limited Golf Privileges\" )) {\n\n mtype = \"Limited Golf Privileges Men\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Limited Golf Privileges Women\";\n }\n }\n\n if (memType.equals( \"Senior Limited Golf Privileges\" )) {\n\n mtype = \"Senior Limited Golf Privileges\";\n }\n\n //\n // set posid according to mNum\n //\n if (mNum.endsWith( \"-1\" )) { // if spouse\n\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n posid = tok.nextToken(); // get mNum without extension\n posid = stripA(posid); // remove the ending '0' (i.e. was 2740-1)\n posid = posid + \"1\"; // add a '1' (now 2741)\n\n } else {\n\n if (mNum.endsWith( \"-2\" )) { // if spouse or other\n\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n posid = tok.nextToken(); // get mNum without extension\n posid = stripA(posid); // remove the ending '0' (i.e. was 2740-2)\n posid = posid + \"2\"; // add a '2' (now 2742)\n\n } else {\n\n if (mNum.endsWith( \"-3\" )) { // if spouse or other\n\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n posid = tok.nextToken(); // get mNum without extension\n posid = stripA(posid); // remove the ending '0' (i.e. was 2740-3)\n posid = posid + \"3\"; // add a '3' (now 2743)\n\n } else {\n\n if (mNum.endsWith( \"-4\" )) { // if spouse or other\n\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n posid = tok.nextToken(); // get mNum without extension\n posid = stripA(posid); // remove the ending '0' (i.e. was 2740-4)\n posid = posid + \"4\"; // add a '4' (now 2744)\n\n } else {\n\n posid = mNum; // primary posid = mNum\n }\n }\n }\n }\n\n suffix = \"\"; // done with suffix for now\n\n //\n // Check if member is over 70 yrs old - if so, add '_*' to the end of the last name\n // so proshop will know\n //\n if (birth > 0 && birth < 19500000) { // if worth checking\n\n //\n // Get today's date and then go back 70 years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 70; // go back 70 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth <= oldDate) { // if member is 70+ yrs old\n\n lname = lname + \"_*\"; // inidicate such\n }\n }\n\n } else {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n } // end of IF club = sauconvalleycc\n\n //******************************************************************\n // Crestmont CC\n //******************************************************************\n //\n if (club.equals( \"crestmontcc\" )) {\n\n found = true; // club found\n\n //\n // determine member type\n //\n\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n mtype = \"T Designated Male\";\n\n if (gender.equals( \"F\" )) {\n mtype = \"T Designated Female\";\n }\n\n } // end of IF club = crestmontcc\n\n //******************************************************************\n // Black Rock CC\n //******************************************************************\n //\n /*\n if (club.equals( \"blackrock\" )) {\n\n found = true; // club found\n\n //\n // remove the 'A' from spouses mNum\n //\n if (mNum.endsWith( \"A\" ) || mNum.endsWith( \"B\" ) || mNum.endsWith( \"C\" ) ||\n mNum.endsWith( \"D\" ) || mNum.endsWith( \"E\" ) || mNum.endsWith( \"F\" )) {\n\n mNum = stripA(mNum); // remove the ending 'A'\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n if (!mtype.equals( \"Dependents\" )) { // if not a junior\n\n if (gender.equals( \"F\" )) {\n\n if (mtype.equals( \"Primary\" )) {\n\n mtype = \"Member Female\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else { // Male\n\n if (mtype.equals( \"Primary\" )) {\n\n mtype = \"Member Male\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n }\n\n } // end of IF club = blackrock\n */\n\n //******************************************************************\n // John's Island CC\n //******************************************************************\n //\n if (club.equals( \"johnsisland\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is not a blank or admin record\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (lname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine membership type\n //\n if (mship.equals( \"Golf Member\" )) {\n mship = \"Golf\";\n } else if (mship.startsWith( \"Golf Swap\" )) {\n mship = \"Golf Swap\";\n lname = lname + \"*\"; // mark these members\n } else if (mship.equals( \"Sport/Social Member\" )) {\n mship = \"Sport Social\";\n lname = lname + \"*\"; // mark these members\n } else if (mship.startsWith( \"Sport/Social Swap\" )) {\n mship = \"Sport Social Swap\";\n } else {\n mship = \"Golf\";\n }\n\n //\n // determine member type\n //\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n if (gender.equals( \"M\" ) && primary.equals( \"P\" )) {\n mtype = \"Primary Male\";\n } else if (gender.equals( \"F\" ) && primary.equals( \"P\" )) {\n mtype = \"Primary Female\";\n } else if (gender.equals( \"M\" ) && primary.equals( \"S\" )) {\n mtype = \"Spouse Male\";\n } else if (gender.equals( \"F\" ) && primary.equals( \"S\" )) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n } // end of IF club = johnsisland\n\n/*\n //******************************************************************\n // Philadelphia Cricket Club\n //******************************************************************\n //\n if (club.equals( \"philcricket\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is not an admin record or missing mship/mtype\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*Note* mship located in mtype field)\";\n\n } else if (lname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' MEMBERSHIP TYPE!\";\n } else {\n\n if (mtype.equalsIgnoreCase(\"Leave of Absence\")) {\n \n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (mtype.equalsIgnoreCase( \"golf stm family\" ) || mtype.equalsIgnoreCase( \"golf stm ind.\" )) {\n\n lname = lname + \"*\"; // add an astericks\n }\n\n // if mtype = no golf, add ^ to their last name\n if (mtype.equalsIgnoreCase( \"no golf\" )) {\n\n lname += \"^\";\n }\n\n mship = toTitleCase(mtype); // mship = mtype\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n\n /*\n //\n // determine member type\n //\n if (mtype.equalsIgnoreCase( \"2 junior ft golfers\" ) || mtype.equalsIgnoreCase( \"add'l jr. ft golfers\" ) ||\n mtype.equalsIgnoreCase( \"ft golf full 18-20\" ) || mtype.equalsIgnoreCase( \"ft jr. 17 & under\" ) ||\n mtype.equalsIgnoreCase( \"jr 17 & under w/golf\" ) || mtype.equalsIgnoreCase( \"jr 18-20 w/golf\" ) ||\n mtype.equalsIgnoreCase( \"jr. activity/no chg\" )) {\n\n mtype = \"Certified Juniors\";\n\n } else {\n\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n if (mtype.equalsIgnoreCase( \"ft assoc golf 21-30\" ) || mtype.equalsIgnoreCase( \"ft assoc ind golf\" ) ||\n mtype.equalsIgnoreCase( \"ft assoc ind/stm fm\" )) {\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Associate Male\";\n\n } else {\n\n mtype = \"Associate Female\";\n }\n\n } else {\n\n if (mtype.equalsIgnoreCase( \"ft full fm/ind 21-30\" ) || mtype.equalsIgnoreCase( \"ft full ind/sm fm\" ) ||\n mtype.equalsIgnoreCase( \"ft golf full fam.\" ) || mtype.equalsIgnoreCase( \"ft golf full ind.\" ) ||\n mtype.equalsIgnoreCase( \"ft golf honorary\" )) {\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Full Male\";\n\n } else {\n\n mtype = \"Full Female\";\n }\n\n } else {\n\n if (mtype.equalsIgnoreCase( \"golf stm family\" ) || mtype.equalsIgnoreCase( \"golf stm ind.\" )) {\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"STM Male\";\n\n } else {\n\n mtype = \"STM Female\";\n }\n\n } else {\n\n if (mtype.equalsIgnoreCase( \"golf stm (17-20)\" ) || mtype.equalsIgnoreCase( \"golf stm 16 & under\" )) {\n\n mtype = \"STM Junior\";\n\n } else {\n\n mtype = \"Non-Golfing\";\n }\n }\n }\n }\n }\n }\n\n } // end of IF club = philcricket\n\n */\n /*\n //******************************************************************\n // Edgewood CC\n //******************************************************************\n //\n if (club.equals( \"edgewood\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Sport\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Sport' MEMBERSHIP TYPE!\";\n } else if (mship.equalsIgnoreCase( \"Dining\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Dining' MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // May have to strip -1 off end of mnum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get mNum without extension\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Strip any leading zeros from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (primary.equals( \"P\" )) {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Primary Female\";\n }\n\n } else {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = edgewood\n */\n /*\n //******************************************************************\n // Out Door CC\n //******************************************************************\n //\n if (club.equals( \"outdoor\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Translate the mship value - remove the '00x-' prefix\n //\n tok = new StringTokenizer( mship, \"-\" ); // delimiter is '-'\n\n if ( tok.countTokens() > 1 ) {\n\n mship = tok.nextToken(); // get prefix\n mship = tok.nextToken(); // get mship without prefix\n }\n\n\n //\n // May have to strip -1 off end of mnum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get mNum without extension\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (primary.equals( \"P\" )) {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Member Male\";\n } else {\n mtype = \"Member Female\";\n }\n\n } else {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = outdoor\n */\n\n\n //******************************************************************\n // Rhode Island CC\n //******************************************************************\n //\n if (club.equals( \"rhodeisland\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // May have to strip -1 off end of mnum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get mNum without extension\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (primary.equals( \"P\" )) {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Primary Female\";\n }\n\n } else {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = rhodeisland\n\n //******************************************************************\n // Wellesley CC\n //******************************************************************\n //\n if (club.equals( \"wellesley\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type (mship value plus 'Male' or 'Female' - i.e. 'Golf Male')\n //\n if (gender.equals( \"F\" )) { // if Female\n mtype = mship + \" Female\";\n } else {\n mtype = mship + \" Male\";\n }\n }\n } // end of IF club = wellesley\n\n //******************************************************************\n // Lakewood Ranch CC\n //******************************************************************\n //\n if (club.equals( \"lakewoodranch\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (mship.equalsIgnoreCase(\"SMR Members and Staff\")) {\n mship = \"SMR Members\";\n }\n\n if (primary.equals( \"P\" )) {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Primary Female\";\n }\n\n } else {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = lakewoodranch\n\n //******************************************************************\n // Long Cove CC\n //******************************************************************\n //\n if (club.equals( \"longcove\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member sub-type (MGA or LGA)\n //\n msub_type = \"\";\n\n if (!mtype.equals( \"\" )) { // if mtype specified (actually is sub-type)\n\n msub_type = mtype; // set it in case they ever need it\n }\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (gender.equals( \"M\" )) {\n mtype = \"Adult Male\";\n } else {\n mtype = \"Adult Female\";\n }\n }\n } // end of IF club = longcove\n\n //******************************************************************\n // Bellerive CC\n //******************************************************************\n //\n /*\n if (club.equals( \"bellerive\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) { // mship exist ?\n\n skip = true; // no - skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n if (primary.equalsIgnoreCase( \"P\" )) {\n\n gender = \"M\"; // default to Male\n\n } else {\n\n gender = \"F\"; // default to Female\n }\n }\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Adult Male\";\n\n } else {\n\n mtype = \"Adult Female\";\n }\n\n //\n // Strip any extra chars from mNum\n //\n if (mNum.endsWith( \"A\" ) || mNum.endsWith( \"B\" ) || mNum.endsWith( \"C\" ) ||\n mNum.endsWith( \"D\" ) || mNum.endsWith( \"E\" ) || mNum.endsWith( \"F\" )) {\n\n mNum = stripA(mNum); // remove the ending 'A'\n }\n\n if (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n // *** see oahucc and common MF processing below if we use this again *****************\n\n webid = memid; // use id from MF\n\n //\n // Set the proper mship type\n //\n if (mship.equalsIgnoreCase( \"Active\" ) || mship.equalsIgnoreCase( \"Associate\" ) ||\n mship.equalsIgnoreCase( \"Junior\" ) || mship.equalsIgnoreCase( \"Life\" )) {\n\n mship = \"Golf\";\n }\n\n if (mship.equalsIgnoreCase( \"Non-Golf\" )) {\n\n mship = \"Non-Golf Senior\";\n }\n\n if (mship.equalsIgnoreCase( \"Non-Res\" )) {\n\n mship = \"Non-Resident\";\n }\n\n if (mship.equalsIgnoreCase( \"Spouse\" )) {\n\n //\n // See if we can locate the primary and use his/her mship (else leave as is, it will change next time)\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE memNum = ? AND webid != ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum);\n pstmt2.setString(2, webid);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\");\n }\n pstmt2.close(); // close the stmt\n }\n }\n } // end of IF club = bellerive\n */\n\n //******************************************************************\n // Peninsula Club\n //******************************************************************\n //\n if (club.equals( \"peninsula\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals(\"\")) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (!mship.equalsIgnoreCase( \"Full\" ) && !mship.equalsIgnoreCase( \"Sports\" ) && !mship.equalsIgnoreCase( \"Corp Full\" ) &&\n !mship.equalsIgnoreCase( \"Tennis\" )) { // mship ok ?\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if Primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else { // Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = peninsula\n\n\n //******************************************************************\n // Wilmington CC\n //******************************************************************\n //\n if (club.equals( \"wilmington\" )) {\n\n found = true; // club found\n\n // Make sure this is ok\n if (mship.equals( \"\" )) { // mship missing ?\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else {\n\n // Set POS Id in case they ever need it\n posid = mNum;\n\n // determine membership type and member type\n if (mship.equalsIgnoreCase( \"Child\" )) { // if child\n\n mship = \"Associate\";\n\n // Check if member is 13 or over\n if (birth > 0) {\n\n // Get today's date and then go back 13 years\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 13; // go back 13 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth <= oldDate) { // if member is 13+ yrs old\n mtype = \"Dependent\";\n } else {\n mtype = \"Dependent - U13\";\n }\n }\n\n } else {\n\n if (mship.equalsIgnoreCase( \"Senior\" ) || mship.equalsIgnoreCase( \"Associate\" ) || mship.equalsIgnoreCase(\"Clerical\")) { // if Senior or spouse\n skip = false; // ok\n } else if (mship.endsWith( \"Social\" )) { // if any Social\n mship = \"Social\"; // convert all to Social\n } else if (mship.equalsIgnoreCase( \"Senior Special\" )) { // if Senior Special\n mship = \"Associate\"; // convert to Associate\n } else if (mship.equalsIgnoreCase( \"Senior Transfer\" )) { // if Senior Special\n mship = \"Senior\"; // convert to Senior\n } else {\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n if (gender.equalsIgnoreCase( \"M\" )) {\n mtype = \"Adult Male\";\n } else {\n mtype = \"Adult Female\";\n }\n }\n\n // Check if member has range privileges\n msub_type = \"\"; // init\n\n if (custom1.equalsIgnoreCase( \"range\" )) {\n msub_type = \"R\"; // yes, indicate this so it can be displayed on Pro's tee sheet\n }\n\n }\n } // end of IF club = wilmington\n\n\n //******************************************************************\n // Awbrey Glen CC\n //******************************************************************\n //\n if (club.equals( \"awbreyglen\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) { // mship missing ?\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (mship.equalsIgnoreCase(\"Employee\")) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (gender.equals( \"\" )) { // if gender not specified\n\n gender = \"M\"; // default to Male\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n gender = \"F\"; // assume Female\n }\n }\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n } // end of IF club = awbreyglen\n\n\n //******************************************************************\n // The Pinery CC\n //******************************************************************\n //\n if (club.equals( \"pinery\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Tennis Dues\" ) || mship.equalsIgnoreCase( \"Social Dues\" ) ||\n mship.equalsIgnoreCase( \"Premier Tennis Dues\" ) || mship.equalsIgnoreCase( \"Premier Social Prepaid\" ) ||\n mship.equalsIgnoreCase( \"Premier Social Dues\" ) || mship.equalsIgnoreCase( \"Premier Dining Dues\" ) ||\n mship.equalsIgnoreCase( \"Dining Dues\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // Set mtype\n //\n if (primary.equals( \"\" )) { // if primary not specified\n\n primary = \"P\"; // default to Primary\n }\n\n if (gender.equals( \"\" )) { // if gender not specified\n\n gender = \"M\"; // default to Male\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n gender = \"F\"; // assume Female\n }\n }\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\"; // default Spouse\n }\n\n } else { // Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n }\n } // end of IF club = pinery\n\n\n\n //******************************************************************\n // The Country Club\n //******************************************************************\n //\n if (club.equals( \"tcclub\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n if (mship.startsWith( \"65 & above \" )) {\n\n mship = \"65 & Above Exempt\"; // remove garbage character\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (primary.equals( \"\" )) { // if primary not specified\n\n primary = \"P\"; // default to Primary\n }\n\n if (gender.equals( \"\" )) { // if gender not specified\n\n gender = \"M\"; // default to Male\n }\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\"; // default Spouse\n }\n\n } else { // Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n //\n // Check for dependents\n //\n if (mNum.endsWith(\"-2\") || mNum.endsWith(\"-3\") || mNum.endsWith(\"-4\") || mNum.endsWith(\"-5\") ||\n mNum.endsWith(\"-6\") || mNum.endsWith(\"-7\") || mNum.endsWith(\"-8\") || mNum.endsWith(\"-9\")) {\n if (gender.equalsIgnoreCase( \"F \")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n }\n } // end of IF club = tcclub\n\n //******************************************************************\n // Navesink Country Club\n //******************************************************************\n //\n if (club.equals( \"navesinkcc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok - mship is in the mtype field for this club!!!!!!!!\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else {\n\n useWebid = true;\n webid = memid;\n memid = mNum; // use mNum for username, they are unique!\n\n\n if (mtype.startsWith( \"Member Type\" )) {\n\n mship = mtype.substring(12); // remove garbage character\n\n } else {\n mship = mtype;\n }\n\n if (mship.equalsIgnoreCase(\"SS\") || mship.equalsIgnoreCase(\"SSQ\") || mship.equalsIgnoreCase(\"WMF\") ||\n mship.equalsIgnoreCase(\"WMS\") || mship.equalsIgnoreCase(\"HQ\") || mship.equalsIgnoreCase(\"HM\") ||\n mship.equalsIgnoreCase(\"H\") || mship.equalsIgnoreCase(\"HL\") || mship.equalsIgnoreCase(\"HR\") ||\n mship.equalsIgnoreCase(\"JSQ\") || mship.equalsIgnoreCase(\"SHL\") || mship.equalsIgnoreCase(\"SP\") ||\n mship.equalsIgnoreCase(\"SPJ\") || mship.equalsIgnoreCase(\"SPQ\")) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n StringTokenizer navTok = null;\n\n // check Primary/Spouse\n if (mNum.endsWith(\"-1\")) {\n primary = \"S\";\n mNum = mNum.substring(0, mNum.length() - 2);\n\n } else if (mNum.endsWith(\"-2\") || mNum.endsWith(\"-3\") || mNum.endsWith(\"-4\") ||\n mNum.endsWith(\"-5\") || mNum.endsWith(\"-6\") || mNum.endsWith(\"-7\") ||\n mNum.endsWith(\"-8\") || mNum.endsWith(\"-9\")) {\n primary = \"D\";\n mNum = mNum.substring(0, mNum.length() - 2);\n } else {\n primary = \"P\";\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\"; // default Spouse\n }\n\n } else if (primary.equalsIgnoreCase( \"D\" )) {\n\n //\n // Dependent mtype based on age\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 18 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate || birth == 0) { // dependent is under 18 or no bday provided\n\n mtype = \"Dependent Under 18\";\n } else {\n mtype = \"Dependent 18-24\";\n }\n\n } else { // Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n if (mship.equalsIgnoreCase(\"SR\") || mship.equalsIgnoreCase(\"SRQ\")) {\n mship = \"SR\";\n } else if (mship.equalsIgnoreCase(\"JR\") || mship.equalsIgnoreCase(\"JRQ\")) {\n mship = \"JR\";\n } else if (mship.equalsIgnoreCase(\"NR\") || mship.equalsIgnoreCase(\"NRQ\")) {\n mship = \"NR\";\n } else if (mship.equalsIgnoreCase(\"R\") || mship.equalsIgnoreCase(\"RQ\")) {\n mship = \"R\";\n }\n }\n }\n } // end of IF club = navesinkcc\n\n\n //******************************************************************\n // The International\n //******************************************************************\n //\n if (club.equals( \"international\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n mship = \"Unknown\"; // allow for missing mships for now\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n\n //\n // Set mship\n //\n if (mship.equals( \"Other\" ) || mship.equals( \"Social\" ) || mship.startsWith( \"Spouse of\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else {\n\n if (mship.startsWith( \"Corporate\" ) || mship.startsWith( \"ITT\" )) {\n mship = \"Corporate\";\n } else if (mship.equals( \"Individual\" ) || mship.endsWith( \"Individual\" ) || mship.startsWith( \"Honorary\" ) ||\n mship.startsWith( \"Owner\" ) || mship.equals( \"Trade\" )) {\n mship = \"Individual\";\n } else if (mship.startsWith( \"Family\" ) || mship.startsWith( \"Senior Family\" )) {\n mship = \"Family\";\n } else if (mship.startsWith( \"Out of Region\" )) {\n mship = \"Out of Region\";\n } else if (mship.startsWith( \"Associat\" )) {\n mship = \"Associate\";\n } else if (mship.startsWith( \"Staff\" )) {\n mship = \"Staff\";\n }\n\n }\n } // end of IF club = international\n\n\n //******************************************************************\n // Blue Hill\n //******************************************************************\n //\n if (club.equals( \"bluehill\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok - mship is in the mtype field for this club!!!!!!!!\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n } else {\n\n mship = mtype; // move over\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n\n } else { // must be Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n //\n // Set mship\n //\n if (mship.startsWith( \"Social\" )) {\n mship = \"Social Golf\";\n } else if (mship.startsWith( \"Associat\" )) {\n mship = \"Associate\";\n } else if (mship.startsWith( \"Corporate\" )) {\n mship = \"Corporate\";\n } else if (!mship.equals( \"Junior\" )) {\n mship = \"Regular Golf\"; // all others (Junior remains as Junior)\n }\n }\n } // end of IF club = bluehill\n\n\n //******************************************************************\n // Oak Lane\n //******************************************************************\n //\n if (club.equals( \"oaklane\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok - mship is in the mtype field for this club!!!!!!!!!!!!!!!!!\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing or not allowed! (*NOTE* mship located in mtype field)\";\n } else {\n\n mship = mtype; // move over\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Remove '-n' from mNum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiters are space\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get main mNum\n }\n\n //\n // Set mtype\n //\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n\n } else { // must be Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n //\n // Set mship\n //\n if (mship.startsWith( \"Senior Social\" ) || mship.startsWith( \"Social\" )) {\n mship = \"Social\";\n } else if (mship.startsWith( \"Senior Tennis\" ) || mship.startsWith( \"Summer Tennis\" ) || mship.startsWith( \"Tennis\" )) {\n mship = \"Tennis\";\n }\n }\n } // end of IF club = oaklane\n\n\n //******************************************************************\n // Green Hills\n //******************************************************************\n //\n if (club.equals( \"greenhills\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok - mship is in the mtype field for this club!!!!!!!!!!!!!!!!!\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n } else {\n\n mship = mtype; // move over\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n mtype = \"Primary Male\"; // default Primary\n\n if (mNum.endsWith( \"-1\" )) { // if Spouse\n mtype = \"Spouse Female\";\n }\n\n //\n // Remove '-n' from mNum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiters are space\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get main mNum\n }\n }\n } // end of IF club = greenhills\n\n\n //******************************************************************\n // Oahu CC\n //******************************************************************\n //\n if (club.equals( \"oahucc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n // mNum can change so we can't count on this being the username for existing members!!\n\n // This family has a last name consisting of 3 words. If them, just plug in the correct name\n if (memid.equals(\"4081\") || memid.equals(\"4081-1\")) {\n lname = \"de_los_Reyes\";\n }\n\n //\n // Convert some mships\n //\n if (mship.equalsIgnoreCase( \"Surviving Spouse 50 Year Honorary\" )) {\n mship = \"Surv Sp 50 Year Honorary\";\n } else if (mship.equalsIgnoreCase( \"Surviving Spouse - Non-Resident\" )) {\n mship = \"Surviving Spouse Non-Resident\";\n } else if (mship.equalsIgnoreCase( \"Surviving Spouse Non-Resident - Golf\" )) {\n mship = \"Surv Sp Non-Resident - Golf\";\n } else if (mship.equalsIgnoreCase( \"Surviving Spouse Super Senior - Golf\" )) {\n mship = \"Surv Sp Super Senior - Golf\";\n } else if (mship.equalsIgnoreCase( \"Surviving Spouse Super Senior - Social\" )) {\n mship = \"Surv Sp Super Senior - Social\";\n }\n\n //\n // Set mtype\n //\n if (mship.startsWith(\"Surv\") || mship.equalsIgnoreCase(\"SS50\")) { // if Surviving Spouse\n\n mtype = \"Spouse\"; // always Spouse\n\n } else {\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if spouse\n mtype = \"Spouse\";\n } else {\n mtype = \"Primary\"; // default to Primary\n }\n }\n\n //\n // Check for Junior Legacy members last\n //\n if (mship.startsWith( \"Jr\" )) {\n\n mship = \"Junior Legacy\";\n mtype = \"Spouse\";\n }\n }\n } // end of IF club = oahucc\n\n\n\n //******************************************************************\n // Ballantyne CC\n //******************************************************************\n //\n if (club.equals( \"ballantyne\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n // mNum can change so we can't count on this being the username for existing members!!\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken();\n }\n\n //\n // Convert some mships ************** finish this!!!!!!!!! ************\n //\n if (mtype.equalsIgnoreCase( \"Full Golf\" ) || mship.equalsIgnoreCase(\"Trial Member - Golf\")) {\n\n mship = \"Golf\";\n skip = false;\n\n } else if (mtype.equalsIgnoreCase( \"Limited Golf\" ) || mship.equalsIgnoreCase( \"Master Member\" ) || mship.equalsIgnoreCase(\"Trial Sports Membership\")) {\n\n mship = \"Sports\";\n skip = false;\n\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n //\n // Set mtype ?????????? **************** and this !!!! **************\n //\n if (primary.equalsIgnoreCase( \"S\" )) { // if spouse\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\"; // default to Primary\n }\n }\n } // end of IF club is ballantyne\n\n\n //******************************************************************\n // Troon CC\n //******************************************************************\n //\n if (club.equals( \"trooncc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n // mNum can change so we can't count on this being the username for existing members!!\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken();\n }\n\n if (mship.equalsIgnoreCase(\"Golf\") || mship.equalsIgnoreCase(\"Intermediate Golf\") ||\n mship.equalsIgnoreCase(\"Social to Golf Upgrade\") || mship.equalsIgnoreCase(\"Founding\")) {\n mship = \"Golf\";\n } else if (mship.equalsIgnoreCase(\"Social\") || mship.equalsIgnoreCase(\"Social from Golf\")) {\n mship = \"Social\";\n } else if (!mship.equalsIgnoreCase(\"Senior\") && !mship.equalsIgnoreCase(\"Dependent\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n try {\n if (mship.equalsIgnoreCase(\"Dependent\") && (mNum.endsWith(\"A\") || mNum.endsWith(\"a\") || mNum.endsWith(\"B\") || mNum.endsWith(\"b\"))) {\n String mNumTemp = mNum.substring(0, mNum.length() - 1);\n PreparedStatement pstmtTemp = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n\n pstmtTemp.clearParameters();\n pstmtTemp.setString(1, mNumTemp);\n\n ResultSet rsTemp = pstmtTemp.executeQuery();\n\n if (rsTemp.next()) {\n mship = rsTemp.getString(\"m_ship\");\n }\n\n pstmtTemp.close();\n }\n } catch (Exception exc) {\n mship = \"Unknown\";\n }\n\n //\n // Set mtype\n //\n if (gender.equalsIgnoreCase( \"F\" )) { // if spouse\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\"; // default to Primary\n }\n }\n } // end of IF club = trooncc\n\n\n //******************************************************************\n // Imperial GC\n //******************************************************************\n //\n if (club.equals( \"imperialgc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mship.startsWith( \"Account\" ) || mship.equals( \"Dining Full\" ) ||\n mship.equals( \"Dining Honorary\" ) || mship.equals( \"Dining Single\" ) ||\n mship.equals( \"Resigned\" ) || mship.equals( \"Suspended\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n //useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n // mNum can change so we can't count on this being the username for existing members!!\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n\n mNum = tok.nextToken();\n }\n\n\n //\n // Convert some mships\n //\n if (mship.startsWith( \"Associate\" )) {\n mship = \"Associate\";\n } else if (mship.startsWith( \"Dining Summer\" )) {\n mship = \"Dining Summer Golf\";\n } else if (mship.startsWith( \"Golf Royal\" )) {\n mship = \"Golf Royal\";\n } else if (mship.startsWith( \"Golf Single\" ) || mship.equalsIgnoreCase(\"RISINGLE\")) {\n mship = \"Golf Single\";\n } else if (mship.equalsIgnoreCase(\"RIMEMBER\")) {\n mship = \"Golf Full\";\n } else if (mship.startsWith( \"Limited Convert\" )) {\n mship = \"Limited Convertible\";\n } else if (mship.startsWith( \"Resigned\" )) {\n mship = \"Resigned PCD\";\n }\n\n //\n // Set mtype\n //\n if (gender.equals( \"\" )) {\n\n gender = \"M\";\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if spouse\n\n gender = \"F\";\n }\n }\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\"; // default to Primary\n }\n }\n } // end of IF club = imperialgc\n\n\n\n /* Disable - Pro wants to maintain roster himself !!!\n *\n //******************************************************************\n // Hop Meadow GC\n //******************************************************************\n //\n if (club.equals( \"hopmeadowcc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n\n mNum = tok.nextToken(); // keep mnum same for all family members\n }\n\n\n //\n // Convert some mships\n //\n if (mship.startsWith( \"Sporting\" )) {\n\n mship = \"Sporting Member\";\n\n } else {\n\n if (mship.startsWith( \"Dependent\" )) {\n\n mship = \"Dependents\";\n\n } else {\n\n if (mship.startsWith( \"Non-Resid\" )) {\n\n mship = \"Non Resident\";\n\n } else {\n\n if (mship.equals( \"Clergy\" ) || mship.startsWith( \"Full Privilege\" ) ||\n mship.equals( \"Honorary\" ) || mship.startsWith( \"Retired Golf\" )) {\n\n mship = \"Full Privilege Golf\";\n\n } else if (mship.equals(\"Senior\")) {\n\n // let Senior come through as-is\n\n } else {\n\n skip = true; // skip all others\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n }\n }\n\n //\n // Set mtype\n //\n if (gender.equals( \"\" )) {\n\n gender = \"M\";\n }\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if spouse\n\n mtype = \"Spouse Female\";\n\n if (!gender.equalsIgnoreCase( \"F\")) {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Primary Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n }\n }\n }\n } // end of IF club = hopmeadowcc\n */\n\n\n\n //******************************************************************\n // Bentwater Yacht & CC\n //******************************************************************\n //\n if (club.equals( \"bentwaterclub\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n\n //\n // Convert the mships (\"Member Type:xxx\" - just take the xxx)\n //\n tok = new StringTokenizer( mship, \":\" );\n\n if ( tok.countTokens() > 1 ) {\n\n mship = tok.nextToken(); // skip 1st part\n mship = tok.nextToken(); // get actual mship\n }\n\n\n //\n // Set mtype\n //\n mtype = \"Member\"; // same for all\n }\n } // end of IF club = bentwaterclub\n\n\n //******************************************************************\n // Sharon Heights\n //******************************************************************\n //\n if (club.equals( \"sharonheights\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else {\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n\n //\n // Set POS Id - leave leading zeros, but strip trailing alpha!!\n //\n if (!mNum.endsWith( \"0\" ) && !mNum.endsWith( \"1\" ) && !mNum.endsWith( \"2\" ) && !mNum.endsWith( \"3\" ) &&\n !mNum.endsWith( \"4\" ) && !mNum.endsWith( \"5\" ) && !mNum.endsWith( \"6\" ) && !mNum.endsWith( \"7\" ) &&\n !mNum.endsWith( \"8\" ) && !mNum.endsWith( \"9\" )) {\n\n posid = stripA(mNum); // remove trailing alpha for POSID\n }\n\n\n //\n // Strip any leading zeros and from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum w/o zeros for username (each is unique - MUST include the trailing alpha!!)\n\n //\n // Set mtype\n //\n mtype = \"Adult Male\"; // default\n\n if (!gender.equals(\"\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n if (mNum.endsWith(\"B\") || mNum.endsWith(\"b\")) {\n\n mtype = \"Adult Female\";\n }\n }\n\n //\n // Now remove the trainling alpha from mNum\n //\n if (!mNum.endsWith( \"0\" ) && !mNum.endsWith( \"1\" ) && !mNum.endsWith( \"2\" ) && !mNum.endsWith( \"3\" ) &&\n !mNum.endsWith( \"4\" ) && !mNum.endsWith( \"5\" ) && !mNum.endsWith( \"6\" ) && !mNum.endsWith( \"7\" ) &&\n !mNum.endsWith( \"8\" ) && !mNum.endsWith( \"9\" )) {\n\n mNum = stripA(mNum); // remove trailing alpha\n }\n }\n } // end of IF club = sharonheights\n\n\n/*\n //******************************************************************\n // Bald Peak\n //******************************************************************\n //\n if (club.equals( \"baldpeak\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else {\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use MF's memid\n memid = mNum; // use mNum for username (each is unique)\n\n\n if (!mNum.endsWith( \"0\" ) && !mNum.endsWith( \"1\" ) && !mNum.endsWith( \"2\" ) && !mNum.endsWith( \"3\" ) &&\n !mNum.endsWith( \"4\" ) && !mNum.endsWith( \"5\" ) && !mNum.endsWith( \"6\" ) && !mNum.endsWith( \"7\" ) &&\n !mNum.endsWith( \"8\" ) && !mNum.endsWith( \"9\" )) {\n\n mNum = stripA(mNum); // remove trailing alpha\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n\n //\n // Set mtype\n //\n mtype = \"Adult Male\"; // default\n\n if (!gender.equals(\"\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Adult Female\";\n gender = \"F\";\n }\n }\n }\n } // end of IF club = baldpeak\n*/\n\n //******************************************************************\n // Mesa Verde CC\n //******************************************************************\n //\n if (club.equals( \"mesaverdecc\" )) {\n\n found = true; // club found\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (mship.startsWith( \"Social\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n //\n // Set mtype\n //\n mtype = \"Member\"; // default\n\n if (!gender.equals(\"\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Auxiliary\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Auxiliary\";\n gender = \"F\";\n }\n }\n }\n } // end of IF club = mesaverdecc\n\n\n //******************************************************************\n // Portland CC\n //******************************************************************\n //\n if (club.equals( \"portlandcc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n //\n // Set mtype\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Spouse Female\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Spouse Male\";\n }\n }\n\n //\n // Set mship\n //\n if (mship.endsWith(\"10\") || mship.endsWith(\"11\") || mship.endsWith(\"12\") || mship.endsWith(\"14\") ||\n mship.endsWith(\"15\") || mship.endsWith(\"16\") || mship.endsWith(\"17\")) {\n\n mship = \"Active\";\n\n } else if (mship.endsWith(\"20\") || mship.endsWith(\"21\")) {\n mship = \"Social\";\n } else if (mship.endsWith(\"30\") || mship.endsWith(\"31\")) {\n mship = \"Senior Active\";\n } else if (mship.endsWith(\"40\") || mship.endsWith(\"41\")) {\n mship = \"Junior Active\";\n } else if (mship.endsWith(\"18\") || mship.endsWith(\"19\")) {\n mship = \"Junior Social\";\n } else if (mship.endsWith(\"50\") || mship.endsWith(\"51\") || mship.endsWith(\"60\")) {\n mship = \"Unattached\";\n } else if (mship.endsWith(\"78\") || mship.endsWith(\"79\")) {\n mship = \"Social Non-Resident\";\n } else if (mship.endsWith(\"80\") || mship.endsWith(\"81\")) {\n mship = \"Active Non-Resident\";\n } else if (mship.endsWith(\"70\") || mship.endsWith(\"71\") || mship.endsWith(\"72\")) {\n mship = \"Spousal\";\n } else {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club = portlandcc\n\n\n /*\n //******************************************************************\n // Dorset FC - The Pro does not want to use RS - he will maintain the roster\n //******************************************************************\n //\n if (club.equals( \"dorsetfc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else {\n\n if (!mship.endsWith( \":5\" ) && !mship.endsWith( \":9\" ) && !mship.endsWith( \":17\" ) && !mship.endsWith( \":21\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n\n //\n // Set mtype\n //\n mtype = \"Adult Male\"; // default\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Adult Female\";\n }\n\n //\n // Set mship\n //\n mship = \"Family Full\";\n }\n }\n } // end of IF club = dorsetfc\n */\n\n\n //******************************************************************\n // Baltusrol GC\n //******************************************************************\n //\n if (club.equals( \"baltusrolgc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n\n //\n // Set mtype\n //\n if (memid.endsWith(\"-1\")) { // if Spouse\n\n if (gender.equalsIgnoreCase(\"M\")) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n\n fname = \"Mrs_\" + fname; // change to Mrs....\n }\n\n } else { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n }\n\n //\n // Set the mship type\n //\n if (mship.startsWith(\"Junior\")) { // Funnel anything starting with 'Junior' to be simply \"Junior\"\n\n mship = \"Junior\";\n\n } else if (mship.equalsIgnoreCase(\"Staff\") || mship.startsWith(\"Type\")) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club = baultusrolcc\n\n\n\n\n //******************************************************************\n // The Club at Pradera\n //******************************************************************\n //\n if (club.equals( \"pradera\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n //\n // Set mtype\n //\n if (mNum.endsWith(\"-1\")) { // if Spouse\n mNum = mNum.substring(0, mNum.length()-2);\n if (!genderMissing && gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n gender = \"F\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Spouse\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set the mship type\n //\n mship = \"Golf\"; // default\n\n if (mNum.startsWith(\"I\")) {\n mship = \"Invitational\";\n } else if (mNum.startsWith(\"P\")) {\n mship = \"Prestige\";\n } else if (mNum.startsWith(\"F\")) {\n mship = \"Founding\";\n } else if (mNum.startsWith(\"J\")) {\n mship = \"Junior Executive\";\n } else if (mNum.startsWith(\"C\")) {\n mship = \"Corporate\";\n } else if (mNum.startsWith(\"H\")) {\n mship = \"Honorary\";\n } else if (mNum.startsWith(\"Z\")) {\n mship = \"Employee\";\n } else if (mNum.startsWith(\"S\")) {\n mship = \"Sports\";\n } else if (mNum.startsWith(\"L\") || mNum.startsWith(\"l\")) {\n mship = \"Lifetime\";\n } else if (mNum.startsWith(\"X\")) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club = pradera\n\n\n\n //******************************************************************\n // Scarsdale GC\n //******************************************************************\n //\n if (club.equals( \"scarsdalegolfclub\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else if (fname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' FIRST NAME!\";\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n if (!mNum.endsWith(\"-1\")) {\n\n memid = mNum; // use mNum for username\n\n } else {\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // isolate mnum\n }\n\n memid = mNum + \"A\";\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n //\n // Set mship\n //\n if (mship.endsWith(\"egular\")) { // catch all Regulars\n mship = \"Regular\";\n } else if (mship.endsWith(\"ssociate\")) { // catch all Associates\n mship = \"Associate\";\n } else if (mship.endsWith(\"Social\")) { // catch all Socials\n mship = \"House Social\";\n } else if (mship.endsWith(\"Sports\")) { // catch all Sports\n mship = \"House Sports\";\n } else if (mship.equals(\"P\") || mship.equals(\"Privilege\")) {\n mship = \"Privilege\";\n } else if (!mship.equals(\"Special Visitors\") && !mship.equals(\"Non-Resident\") && !mship.equals(\"Honorary\")) {\n\n skip = true; // skip if not one of the above\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club is Scarsdale\n\n\n\n //******************************************************************\n // Patterson Club\n //******************************************************************\n //\n if (club.equals( \"pattersonclub\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else if (fname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' FIRST NAME!\";\n } else if (mship.startsWith( \"DS\" ) || mship.startsWith( \"Employee\" ) || mship.equals( \"LOA\" ) ||\n mship.equals( \"Resigned\" ) || mship.equals( \"Honorary\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n\n memid = mNum; // use mNum for username\n\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n /*\n if ( tok.countTokens() > 1 ) {\n\n mNum = tok.nextToken(); // isolate mnum\n\n if (memid.endsWith(\"-1\")) {\n\n memid = mNum + \"A\"; // use nnnA\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else {\n mtype = \"Dependent\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n */\n\n if (mNum.endsWith(\"A\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n\n //\n // Set mship - these do not exist any longer, but leave just in case\n //\n if (mship.equalsIgnoreCase(\"FP-Intermediate\")) {\n mship = \"FP\";\n } else {\n if (mship.equalsIgnoreCase(\"HTP Intermediate\")) {\n mship = \"HTP\";\n }\n } // Accept others as is\n }\n } // end of IF club = pattersonclub\n\n\n //******************************************************************\n // Tamarack\n //******************************************************************\n //\n if (club.equals( \"tamarack\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else if (fname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' FIRST NAME!\";\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // Set username to mNum (it is unique)\n //\n memid = mNum;\n\n //\n // Remove extension from mNum if not primary\n //\n StringTokenizer tok9 = new StringTokenizer( mNum, \"-\" ); // look for a dash (i.e. 1234-1)\n\n if ( tok9.countTokens() > 1 ) { \n\n mNum = tok9.nextToken(); // get just the mNum if it contains an extension\n }\n\n /*\n if (!primary.equalsIgnoreCase(\"P\")) {\n mNum = stripA(mNum);\n }\n */\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (mship.startsWith(\"SP-\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n mship = mship.substring(3);\n\n } else if (mship.startsWith(\"DEP-\")) {\n\n mtype = \"Dependent\";\n\n mship = mship.substring(4);\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n if (memid.contains(\"-\")) {\n memid = memid.substring(0, memid.length() - 2) + memid.substring(memid.length() - 1);\n }\n \n\n //\n // Set mship\n //\n if (mship.equalsIgnoreCase(\"Associate\") || mship.equalsIgnoreCase(\"Corporate\") || mship.equalsIgnoreCase(\"Dependent\") ||\n mship.equalsIgnoreCase(\"Junior\") || mship.equalsIgnoreCase(\"Non-Resident\") || mship.equalsIgnoreCase(\"Senior\") ||\n mship.equalsIgnoreCase(\"Regular\") || mship.equalsIgnoreCase(\"Sr Cert\") || mship.equalsIgnoreCase(\"Intermed/C\") ||\n mship.equalsIgnoreCase(\"Widow\")) {\n\n // Do nothing\n\n } else if (mship.equalsIgnoreCase(\"Certificate\")) {\n mship = \"Certificat\";\n } else if (mship.equalsIgnoreCase(\"Intermediate\")) {\n mship = \"Intermedia\";\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club = tamarack\n\n //******************************************************************\n // St. Clair Country Club\n //******************************************************************\n //\n if (club.equals( \"stclaircc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n\n // strip \"Member Type:\" from mship if present\n if (mtype.startsWith(\"Member Type:\")) {\n mtype = mtype.substring(12);\n }\n\n // set mship\n if (mtype.equalsIgnoreCase(\"ACTIVE\") || mtype.equalsIgnoreCase(\"VOTING\")) {\n mship = \"Voting\";\n } else if (mtype.equalsIgnoreCase(\"ACTIVESR\") || mtype.equalsIgnoreCase(\"SENIOR\")) {\n mship = \"Senior\";\n } else if (mtype.startsWith(\"INT\")) {\n mship = \"Intermediate\";\n } else if (mtype.equalsIgnoreCase(\"ASSOC20\")) {\n mship = \"Assoc20\";\n } else if (mtype.equalsIgnoreCase(\"ASSOCIATE\")) {\n mship = \"Associate Golf\";\n } else if (mtype.equalsIgnoreCase(\"LTD GOLF\")) {\n mship = \"Limited Golf\";\n } else if (mtype.equalsIgnoreCase(\"SOCGLF\")) {\n mship = \"Social Golf\";\n } else if (mtype.equalsIgnoreCase(\"NRGP\")) {\n mship = \"NR Golf\";\n } else if (mtype.equalsIgnoreCase(\"FAMILY GP\") || mtype.equalsIgnoreCase(\"SPOUSE GP\")) {\n mship = \"Spouse Golf\";\n } else if (mtype.equalsIgnoreCase(\"FAMILYSPGP\") || mtype.equalsIgnoreCase(\"SPOUSESPGP\")) {\n mship = \"Spouse Golf 9\";\n } else if (mtype.equalsIgnoreCase(\"ASSP20GP\")) {\n mship = \"Assoc Spouse20\";\n } else if (mtype.equalsIgnoreCase(\"ASGP\")) {\n mship = \"Assoc/Ltd Spouse\";\n } else if (mtype.equalsIgnoreCase(\"LTDSP GP\") || mtype.equalsIgnoreCase(\"ASGP\")) {\n mship = \"Limited Spouse\";\n } else if (mtype.equalsIgnoreCase(\"ASSSPGP\")) {\n mship = \"Associate Spouse\";\n } else if (mtype.equalsIgnoreCase(\"SOCSP GP\") || mtype.equalsIgnoreCase(\"ASRGP\")) {\n mship = \"Soc Golf Spouse\";\n } else if (mtype.equalsIgnoreCase(\"JR 12-17\") || mtype.equalsIgnoreCase(\"JR 18-24\")) {\n mship = \"Junior Golf\";\n } else if (mtype.equalsIgnoreCase(\"ASSOC20J\") || mtype.equalsIgnoreCase(\"ASSOC20J18\")) {\n mship = \"Assoc Jr20\";\n } else if (mtype.equalsIgnoreCase(\"ASSOCJR\") || mtype.equalsIgnoreCase(\"ASSOCJR18\")) {\n mship = \"Associate Jr\";\n } else if (mtype.startsWith(\"LTD JR\")) {\n mship = \"Limited Jr\";\n } else if (mtype.equalsIgnoreCase(\"SOCJR<18\") || mtype.equalsIgnoreCase(\"SOCJR>18\")) {\n mship = \"Soc Jr Golf\";\n } else if (mtype.equalsIgnoreCase(\"EMERITUS\")) {\n mship = \"Emeritus\";\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n // set other values\n posid = mNum; // set posid in case we ever need it\n while (mNum.startsWith(\"0\")){\n mNum = remZeroS(mNum);\n }\n\n useWebid = true; // use these webids\n webid = memid;\n memid = mNum;\n\n // set mtype\n if (mNum.endsWith(\"S\")) {\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n mNum = mNum.substring(0,mNum.length()-1); // remove extension char\n } else if (mNum.endsWith(\"J\") || mNum.endsWith(\"K\") || mNum.endsWith(\"L\") || mNum.endsWith(\"M\") || mNum.endsWith(\"N\") || mNum.endsWith(\"O\") || mNum.endsWith(\"P\")) {\n mtype = \"Dependent\";\n mNum = mNum.substring(0,mNum.length()-1); // remove extension char\n } else {\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Primary Female\";\n }\n }\n }\n\n } // end of IF club = stclaircc\n\n\n //******************************************************************\n // The Trophy Club Country Club\n //******************************************************************\n //\n if (club.equals( \"trophyclubcc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n\n } else {\n\n useWebid = true;\n webid = memid;\n posid = mNum;\n\n mship = \"Golf\";\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n }\n } // end of IF club = trophyclubcc\n\n\n\n //******************************************************************\n // Pelican Marsh Golf Club\n //******************************************************************\n //\n if (club.equals( \"pmarshgc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true;\n webid = memid;\n memid = mNum;\n\n mNum = stripDash(mNum); // remove the -00 etc from end of mNums\n\n posid = mNum;\n\n // check for proper membership types\n if (mtype.equalsIgnoreCase(\"Equity Golf\") || mtype.equalsIgnoreCase(\"Non-Equity Golf\") ||\n mtype.equalsIgnoreCase(\"Trial Golf\")) {\n mship = \"Golf\";\n } else if (mtype.equalsIgnoreCase(\"Equity Social\")) {\n mship = \"Social\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n }\n } // end of IF club is pmarshgc\n\n\n //******************************************************************\n // Silver Lake Country Club\n //******************************************************************\n //\n if (club.equals( \"silverlakecc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum;\n mNum = remZeroS(mNum);\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n if (mtype.startsWith(\"Social\")) {\n mship = \"Social Elite\";\n } else {\n mship = \"Full Golf\";\n }\n\n //Will need to add \"Social Elite\" eventually!\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n memid = mNum + \"A\";\n } else {\n mtype = \"Adult Male\";\n memid = mNum;\n }\n\n }\n } // end of IF club is silverlakecc\n\n\n //******************************************************************\n // Edina Country Club\n //******************************************************************\n //\n if (club.equals(\"edina\") || club.equals(\"edina2010\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n StringTokenizer tempTok = new StringTokenizer(mNum, \"-\");\n String suf = \"0\";\n\n if (tempTok.countTokens() > 1){ // if mNum contains a - then it is a spouse\n mNum = stripDash(mNum);\n suf = \"1\";\n }\n\n posid = mNum; // set posid before zeros are removed\n\n while (mNum.startsWith(\"0\")) {\n mNum = remZeroS(mNum);\n }\n\n memid = mNum + suf; // set memid\n\n // ignore specific membership types\n if (mship.equalsIgnoreCase(\"Other Clubs\") || mship.equalsIgnoreCase(\"Party Account\") ||\n mship.equalsIgnoreCase(\"Resigned with Balance Due\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (mship.equalsIgnoreCase(\"Social\") || mship.equalsIgnoreCase(\"Honorary Social\") || mship.equalsIgnoreCase(\"Clergy\") || mship.equalsIgnoreCase(\"Social Widow\")) {\n\n mship = \"Social\";\n\n } else if (mship.equalsIgnoreCase(\"Pool/Tennis\")) {\n\n mship = \"Pool/Tennis\";\n\n } else { // leave these two as they are, everything else = golf\n \n mship = \"Golf\";\n }\n\n // set member type based on gender\n if (primary.equalsIgnoreCase(\"P\") || primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n } else {\n mtype = \"Dependent\";\n }\n \n \n //\n // Custom to filter out a member's 2nd email address - she doesn't want ForeTees emails on this one, but wants it in MF\n //\n if (webid.equals(\"2720159\")) {\n \n email2 = \"\";\n }\n \n }\n\n } // end if edina\n\n //******************************************************************\n // Seville Golf & Country Club\n //******************************************************************\n //\n if (club.equals(\"sevillegcc\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid before zeros are removed\n\n while (mNum.startsWith(\"0\")) {\n mNum = remZeroS(mNum);\n }\n\n // ignore specific membership types\n if (mtype.startsWith(\"Sports\")) {\n mship = \"Sports Golf\";\n } else {\n mship = \"Full Golf\";\n }\n\n // set member type and memid based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n memid = mNum + \"A\";\n } else {\n mtype = \"Adult Male\";\n memid = mNum;\n }\n }\n\n } // end if sevillegcc\n\n\n //******************************************************************\n // Royal Oaks CC - Dallas\n //******************************************************************\n //\n if (club.equals(\"roccdallas\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mship.equalsIgnoreCase(\"Tennis Member\") || mship.equalsIgnoreCase(\"Tennis Special Member\") ||\n mship.equalsIgnoreCase(\"Junior Tennis Member\") || mship.equalsIgnoreCase(\"Social Member\") ||\n mship.equalsIgnoreCase(\"Dining Member\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid before zeros are removed\n // memid = mNum; // user mNum as memid, mNums ARE UNIQUE! - USE MF's ID !!!!\n\n if (!mNum.endsWith( \"0\" ) && !mNum.endsWith( \"1\" ) && !mNum.endsWith( \"2\" ) && !mNum.endsWith( \"3\" ) &&\n !mNum.endsWith( \"4\" ) && !mNum.endsWith( \"5\" ) && !mNum.endsWith( \"6\" ) && !mNum.endsWith( \"7\" ) &&\n !mNum.endsWith( \"8\" ) && !mNum.endsWith( \"9\" )) {\n\n mNum = stripA(mNum); // remove trailing alpha\n }\n\n\n // handle 'Spouse of member' membership type\n if (mship.equalsIgnoreCase(\"Spouse of member\")) {\n\n primary = \"S\"; // they are a Spouse\n\n // if Spouse: determine mship from 2nd character of mNum\n if (!mNum.equals(\"\")) {\n\n if (mNum.charAt(1) == 'P') {\n mship = \"Golf Associate Member\";\n } else if (mNum.charAt(1) == 'E') {\n mship = \"Special Member\";\n } else if (mNum.charAt(1) == 'G') {\n mship = \"Senior Member\";\n } else if (mNum.charAt(1) == 'J') {\n mship = \"Junior Member\";\n } else if (mNum.charAt(1) == 'N') {\n mship = \"Non Resident Member\";\n } else if (mNum.charAt(1) == 'F') {\n mship = \"Temp Non Certificate\";\n } else if (mNum.charAt(1) == 'L') {\n mship = \"Ladies Member\";\n } else if (mNum.charAt(1) == 'K') {\n mship = \"Associate Resident Member\";\n } else if (mNum.charAt(1) == 'H') {\n mship = \"Honorary\";\n } else if (mNum.charAt(1) == 'B') {\n mship = \"Tennis with Golf\";\n } else if (mNum.charAt(1) == 'D' || mNum.charAt(1) == 'T' || mNum.charAt(1) == 'R' || mNum.charAt(1) == 'S') {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else { // no letter for 2nd char of mNum\n mship = \"Resident Member\";\n }\n } else {\n\n skip = true;\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE could not be determined! (mNum missing)\";\n }\n }\n\n // set member type based on gender\n // blank gender and mNum ending with 'A' = female, otherwise male\n if (gender.equalsIgnoreCase(\"F\") || (gender.equalsIgnoreCase(\"\") && mNum.toLowerCase().endsWith(\"a\"))) {\n\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n }\n } // end if roccdallas\n\n\n //******************************************************************\n // Hackberry Creek CC - hackberrycreekcc\n //******************************************************************\n //\n if (club.equals(\"hackberrycreekcc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid in case we need it in the future\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n mship = \"Golf\"; // everyone changed to \"Golf\"\n\n // set member type and memid based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n memid = mNum + \"A\";\n } else {\n mtype = \"Adult Male\";\n memid = mNum;\n }\n }\n } // end if hackberrycreekcc\n\n //******************************************************************\n // Brookhaven CC - brookhavenclub\n //******************************************************************\n //\n if (club.equals(\"brookhavenclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid in case we need it in the future\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n\n if (mtype.startsWith(\"DFW\")) {\n mship = \"DFWY\";\n } else {\n mship = \"Golf\"; // everyone changed to \"Golf\"\n }\n\n // set member type and memid based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n memid = mNum + \"A\";\n } else {\n mtype = \"Adult Male\";\n memid = mNum;\n }\n }\n } // end if brookhavenclub\n\n //******************************************************************\n // Stonebridge Ranch CC - stonebridgeranchcc\n //******************************************************************\n //\n if (club.equals(\"stonebridgeranchcc\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid in case we need it in the future\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n if (mtype.equalsIgnoreCase(\"Dual Club\") || mtype.equalsIgnoreCase(\"Dual Club Distant\") || mtype.equalsIgnoreCase(\"Dual Club Society\") ||\n mtype.equalsIgnoreCase(\"Honorary\") || mtype.equalsIgnoreCase(\"Honorary Society\") || mtype.equalsIgnoreCase(\"Prem Charter Select\") ||\n mtype.equalsIgnoreCase(\"Prem Chrtr Sel Scty\") || mtype.equalsIgnoreCase(\"Prem Club Corp Scty\") || mtype.equalsIgnoreCase(\"Prem Mbr Sel Society\") ||\n mtype.equalsIgnoreCase(\"Prem Member Charter\") || mtype.equalsIgnoreCase(\"Prem Member Select\") || mtype.equalsIgnoreCase(\"Prem Mbrshp Society\") ||\n mtype.equalsIgnoreCase(\"Premier Club Corp D\") || mtype.equalsIgnoreCase(\"Premier Club Jr\") || mtype.equalsIgnoreCase(\"Premier Corporate\") ||\n mtype.equalsIgnoreCase(\"Premier Membership\") || mtype.equalsIgnoreCase(\"Premier Nr\") || mtype.equalsIgnoreCase(\"Prem Mbr Chrtr Scty\") ||\n mtype.equalsIgnoreCase(\"Premier Club Jr Scty\") || mtype.equalsIgnoreCase(\"Westerra\") || mtype.equalsIgnoreCase(\"Premier Club C Ppd\") ||\n mtype.equalsIgnoreCase(\"Premier Club Corp Ds\") || mtype.equalsIgnoreCase(\"Preview\")) {\n\n mship = \"Dual\";\n\n } else if (mtype.equalsIgnoreCase(\"Pr SB Sel Scty\") || mtype.equalsIgnoreCase(\"Prem Stnbrdge Select\") || mtype.equalsIgnoreCase(\"Prem Stonbrdg Scty \") ||\n mtype.equalsIgnoreCase(\"Premier Stonebridge\") || mtype.equalsIgnoreCase(\"Stonebridge Assoc.\") || mtype.equalsIgnoreCase(\"Stonebridge Charter\") ||\n mtype.equalsIgnoreCase(\"Stonebridge Golf\") || mtype.equalsIgnoreCase(\"Stonebridge Golf Soc\") || mtype.equalsIgnoreCase(\"Options II\") ||\n mtype.equalsIgnoreCase(\"Options II Society\") || mtype.equalsIgnoreCase(\"Options I \") || mtype.equalsIgnoreCase(\"Options I Society\") ||\n mtype.equalsIgnoreCase(\"Stonebridge Distn Gf\") || mtype.equalsIgnoreCase(\"Sb Premier Nr\") || mtype.equalsIgnoreCase(\"Prem Stonbrdg Scty\") ||\n mtype.equalsIgnoreCase(\"Stonebridge Soc Scty\") || mtype.equalsIgnoreCase(\"Stnbrdge Assoc Scty\") || mtype.equalsIgnoreCase(\"Sb Golf Legacy Soc.\")) {\n\n mship = \"Dye\";\n\n } else if (mtype.equalsIgnoreCase(\"Pr Rcc Pr 6/96 Scty\") || mtype.equalsIgnoreCase(\"Pr Rnch Aft 6/96 Sct\") || mtype.equalsIgnoreCase(\"Prem Rcc Jr Select\") ||\n mtype.equalsIgnoreCase(\"Prem Rcc Prior 6/96\") || mtype.equalsIgnoreCase(\"Prem Rnch After 6/96\") || mtype.equalsIgnoreCase(\"Prem Rnch Select Sty\") ||\n mtype.equalsIgnoreCase(\"Premier Ranch Select\") || mtype.equalsIgnoreCase(\"Prm Rcc Sel Aft\") || mtype.equalsIgnoreCase(\"Prm Rcc Sel Aft 96st\") ||\n mtype.equalsIgnoreCase(\"Ranch Charter\") || mtype.equalsIgnoreCase(\"Ranch Golf\") || mtype.equalsIgnoreCase(\"Ranch Golf Legacy\") ||\n mtype.equalsIgnoreCase(\"Ranch Golf Non-Res\") || mtype.equalsIgnoreCase(\"Ranch Golf Society\") || mtype.equalsIgnoreCase(\"Special Golf\") ||\n mtype.equalsIgnoreCase(\"Prem Rcc Pr Nr\") || mtype.equalsIgnoreCase(\"Prem Rnch Sports Sty\") || mtype.equalsIgnoreCase(\"Ranch Nr Society\") ||\n mtype.equalsIgnoreCase(\"Pr Rcc Aft799 Society\") || mtype.equalsIgnoreCase(\"Ranch Non Resident\") || mtype.equalsIgnoreCase(\"Ranch Ppd Rcc Golf\")) {\n\n mship = \"Hills\";\n\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n // set member type and memid based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n\n } // end if stonebridgeranchcc\n\n\n //******************************************************************\n // Charlotte CC - charlottecc\n //******************************************************************\n //\n if (club.equals(\"charlottecc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum.toUpperCase(); // use mNum for memid, they are unique\n\n // Set primary/spouse value\n if (mNum.toUpperCase().endsWith(\"S\")) {\n primary = \"S\";\n mNum = stripA(mNum);\n } else {\n primary = \"P\";\n }\n\n posid = mNum; // set posid in case it's ever needed\n\n // set mtype based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n // if mship starts with 'Spousal-surviving' or 'Spousal', remove the prefix\n if (mship.equalsIgnoreCase(\"Spousal-surviving Resident\")) {\n mship = \"Dependent Spouse\";\n } else {\n if (mship.startsWith(\"Spousal-surviving\")) {\n mship = mship.substring(18, mship.length() - 1);\n }\n if (mship.startsWith(\"Spousal\") && !mship.equalsIgnoreCase(\"Spousal Member\")) {\n mship = mship.substring(8, mship.length() - 1);\n }\n\n // set mship\n if (mship.startsWith(\"Resident\") || mship.equalsIgnoreCase(\"Ministerial-NM\")) {\n mship = \"Resident\";\n } else if (mship.startsWith(\"Non-Resident\")) {\n mship = \"Non Resident\";\n } else if (mship.startsWith(\"Dependant\")) {\n mship = \"Dependent Spouse\";\n } else if (mship.startsWith(\"Honorary\")) {\n mship = \"Honorary\";\n } else if (mship.startsWith(\"Lady\") || mship.equalsIgnoreCase(\"Spousal Member\")) {\n mship = \"Lady\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n }\n } // end if charlottecc\n\n\n //******************************************************************\n // Gleneagles CC - gleneaglesclub\n //******************************************************************\n //\n if (club.equals(\"gleneaglesclub\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid in case we need it in the future\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n mship = \"Golf\"; // everyone changed to \"Golf\"\n\n // set member type and memid based on gender\n if (primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n memid = mNum + \"A\";\n\n } else if (primary.equalsIgnoreCase(\"P\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Member Female\";\n } else {\n mtype = \"Member Male\";\n }\n memid = mNum;\n } else { // Dependent\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n // use provided memid\n }\n }\n\n } // end if gleneaglesclub\n\n\n\n\n //******************************************************************\n // Portland CC - portlandgc\n //******************************************************************\n //\n if (club.equals(\"portlandgc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n if (mNum.length() == 6) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Female Spouse\";\n } else {\n mtype = \"Male Spouse\";\n }\n\n mNum = mNum.substring(0, mNum.length() - 1); // get rid of extra number on end of spouse mNums\n primary = \"S\";\n\n memid = mNum;\n\n while (memid.startsWith(\"0\")) { // strip leading zeros\n memid = remZeroS(memid);\n }\n memid = memid + \"A\";\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Female Member\";\n } else {\n mtype = \"Male Member\";\n }\n\n primary = \"P\";\n\n memid = mNum;\n\n while (memid.startsWith(\"0\")) { // strip leading zeros\n memid = remZeroS(memid);\n }\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n if (mship.equalsIgnoreCase(\"AAR-FG\") || mship.equalsIgnoreCase(\"NON-RES\") ||\n mship.equalsIgnoreCase(\"REGULAR\") || mship.equalsIgnoreCase(\"TEMPORARY\")) { mship = \"Regular\"; }\n else if (mship.equalsIgnoreCase(\"30YEARS\")) { mship = \"30 Year Social\"; }\n else if (mship.equalsIgnoreCase(\"EMPLOYEE\")) { mship = \"Employee\"; }\n else if (mship.equalsIgnoreCase(\"HONORARY\")) { mship = \"Honorary\"; }\n else if (mship.equalsIgnoreCase(\"JUNIOR\")) { mship = \"Junior Associate\"; }\n else if (mship.equalsIgnoreCase(\"SOCIAL\")) { mship = \"Social\"; }\n else if (mship.startsWith(\"L\")) { mship = \"Leave of Absence\"; }\n else if (mship.equalsIgnoreCase(\"SPOUSE\")) { mship = \"Spouse Associate\"; }\n else if (mship.equalsIgnoreCase(\"Member Status:SENIOR\")) { mship = \"Senior\"; }\n else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if portlandgc\n\n\n //******************************************************************\n // Quechee Club\n //******************************************************************\n //\n if (club.equals(\"quecheeclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum;\n\n\n mNum = mNum.substring(0, mNum.length() - 1); // get rid of trailing primary indicator # on mNum\n\n if (memid.endsWith(\"0\")) { // Primary\n primary = \"P\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (memid.endsWith(\"1\")) { // Spouse\n primary = \"S\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else { // Dependent\n primary = \"D\";\n mtype = \"Dependent\";\n }\n\n // Set the posid\n if (primary.equals(\"S\")) {\n posid = mNum + \"1\"; // set posid in case we need it in the future\n } else {\n posid = mNum + \"0\";\n }\n\n if (mship.equalsIgnoreCase(\"ALL-F\")) {\n mship = \"ALL Family\";\n } else if (mship.equalsIgnoreCase(\"ALL-S\")) {\n mship = \"ALL Single\";\n } else if (mship.equalsIgnoreCase(\"GAP-F\")) {\n mship = \"GAP Family\";\n } else if (mship.equalsIgnoreCase(\"GAP-S\")) {\n mship = \"GAP Single\";\n } else if (mship.equalsIgnoreCase(\"GAPM-F\")) {\n mship = \"GAPM Family\";\n } else if (mship.equalsIgnoreCase(\"GAPM-S\")) {\n mship = \"GAPM Single\";\n } else if (mship.equalsIgnoreCase(\"NON-GAP\")) {\n mship = \"NON-GAP\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if quecheeclub\n\n\n\n //******************************************************************\n // Quechee Club - Tennis\n //******************************************************************\n //\n if (club.equals(\"quecheeclubtennis\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum;\n\n\n mNum = mNum.substring(0, mNum.length() - 1); // get rid of trailing primary indicator # on mNum\n\n if (memid.endsWith(\"0\")) { // Primary\n primary = \"P\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (memid.endsWith(\"1\")) { // Spouse\n primary = \"S\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else { // Dependent\n primary = \"D\";\n mtype = \"Dependent\";\n }\n\n // Set the posid\n if (primary.equals(\"S\")) {\n posid = mNum + \"1\"; // set posid in case we need it in the future\n } else {\n posid = mNum + \"0\";\n }\n\n if (mship.equalsIgnoreCase(\"ALL-F\")) {\n mship = \"ALL Family\";\n } else if (mship.equalsIgnoreCase(\"ALL-S\")) {\n mship = \"ALL Single\";\n } else if (custom1.equalsIgnoreCase(\"Tennis-F\")) {\n mship = \"TAP Family\";\n } else if (custom1.equalsIgnoreCase(\"Tennis-S\")) {\n mship = \"TAP Single\";\n } else if (custom1.equals(\"?\") || custom1.equals(\"\")) {\n mship = \"NON-TAP\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if quecheeclubtennis\n\n //******************************************************************\n // The Oaks Club\n //******************************************************************\n //\n if (club.equals(\"theoaksclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum;\n\n if (mNum.endsWith(\"-1\")) {\n\n primary = \"S\";\n gender = \"F\";\n mtype = \"Spouse Female\";\n\n mNum = mNum.substring(0, mNum.length() - 2);\n\n if (mship.startsWith(\"Dependent\")) { // Use the primary's mship\n try {\n ResultSet oaksRS = null;\n PreparedStatement oaksStmt = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n oaksStmt.clearParameters();\n oaksStmt.setString(1, mNum);\n oaksRS = oaksStmt.executeQuery();\n\n if (oaksRS.next()) {\n mship = oaksRS.getString(\"m_ship\");\n } else {\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SPOUSE with DEPENDENT membership type - NO PRIMARY FOUND!\";\n }\n\n oaksStmt.close();\n\n } catch (Exception exc) { }\n }\n\n } else if (mNum.endsWith(\"-2\") || mNum.endsWith(\"-3\") || mNum.endsWith(\"-4\") || mNum.endsWith(\"-5\") ||\n mNum.endsWith(\"-6\") || mNum.endsWith(\"-7\") || mNum.endsWith(\"-8\") || mNum.endsWith(\"-9\")) {\n\n primary = \"D\";\n mtype = \"Dependent\";\n mNum = mNum.substring(0, mNum.length() - 2);\n\n } else {\n\n primary = \"P\";\n gender = \"M\";\n mtype = \"Primary Male\";\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n if (mship.equalsIgnoreCase(\"Regular Equity\") || mship.equalsIgnoreCase(\"Member Type:001\")) {\n mship = \"Regular Equity\";\n } else if (mship.equalsIgnoreCase(\"Golf\") || mship.equalsIgnoreCase(\"Member Type:010\")) {\n mship = \"Golf\";\n } else if (mship.equalsIgnoreCase(\"Social Property Owner\") || mship.equalsIgnoreCase(\"Member Type:002\")) {\n mship = \"Social Property Owner\";\n } else if (mship.equalsIgnoreCase(\"Tennis Associate\") || mship.equalsIgnoreCase(\"Member Type:020\")) {\n mship = \"Tennis Associate\";\n } else if (mship.equalsIgnoreCase(\"Member Type:022\")) {\n mship = \"Jr Tennis Associate\";\n } else if (mship.startsWith(\"Dependent\")) {\n mship = \"Dependent\";\n } else if (mship.equalsIgnoreCase(\"Member Type:085\")) {\n mship = \"General Manager\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n }\n } // end if theoaksclub\n\n\n //******************************************************************\n // Admirals Cove\n //******************************************************************\n //\n if (club.equals(\"admiralscove\")) {\n\n found = true; // club found\n\n if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\")) {\n\n primary = \"S\";\n mNum = mNum.substring(0, mNum.length() - 1);\n\n } else {\n primary = \"P\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n if (mship.equals( \"\" )) {\n //\n // Spouse or Dependent - look for Primary mship type and use that\n //\n try {\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username != ? AND m_ship != '' AND memNum = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n pstmt2.setString(2, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n mship = rs.getString(\"m_ship\"); // use primary mship type\n } else { //\n skip = true; // skip this one\n mship = \"\";\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n }\n\n pstmt2.close();\n\n } catch (Exception e1) { }\n\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n if (!mship.equals(\"\")) {\n\n if (mship.startsWith(\"Golf\") || mship.equals(\"Full Golf\")) {\n mship = \"Full Golf\";\n } else if (mship.startsWith(\"Sports\")) {\n mship = \"Sports\";\n } else if (!mship.equals(\"Social\") && !mship.equals(\"Marina\") && !mship.equals(\"Tennis\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n }\n } // end if admiralscove\n\n\n //******************************************************************\n // Ozaukee CC\n //******************************************************************\n //\n if (club.equals(\"ozaukeecc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n if (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\") || mNum.endsWith(\"a\") || mNum.endsWith(\"B\") || mNum.endsWith(\"C\") || mNum.endsWith(\"D\")) {\n\n primary = \"S\";\n mNum = mNum.substring(0, mNum.length() - 1); // strip trailing 'A'\n\n } else {\n primary = \"P\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n if (mship.equalsIgnoreCase(\"EM\")) {\n mship = \"Emeritus\";\n }\n\n if (mship.equalsIgnoreCase(\"Curler\") || mship.equalsIgnoreCase(\"Resigned\") ||\n mship.equalsIgnoreCase(\"Social\") || mship.equalsIgnoreCase(\"Summer Social\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n posid = mNum; // set posid in case we need it in the future\n }\n } // end if ozaukeecc\n\n //******************************************************************\n // Palo Alto Hills G&CC - paloaltohills\n //******************************************************************\n //\n if (club.equals(\"paloaltohills\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n // trim off leading zeroes\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (gender.equals(\"F\")) {\n primary = \"S\";\n //mtype = \"Secondary Female\"; // no longer setting mtype with roster sync\n } else {\n primary = \"P\";\n //mtype = \"Primary Male\"; // no longer setting mtype with roster sync\n gender = \"M\";\n }\n\n if (mNum.endsWith(\"A\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (memid.startsWith(\"1\") || memid.startsWith(\"4\") || memid.startsWith(\"6\") || memid.startsWith(\"8\")) {\n mship = \"Golf\";\n } else if (memid.startsWith(\"2\")) {\n mship = \"Social\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n } // end if paloaltohills\n\n\n //******************************************************************\n // Woodside Plantation CC - wakefieldplantation\n //******************************************************************\n //\n if (club.equals(\"woodsideplantation\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum; // set posid in case we need it in the future\n\n\n if (memid.equals(\"399609\")) { // Marvin Cross has an invalid email address ([email protected]) - belongs to a church in FL\n email2 = \"\";\n }\n\n\n if (primary.equalsIgnoreCase(\"P\")) {\n memid = mNum;\n } else {\n memid = mNum + \"A\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n\n }\n } // end if woodsideplantation\n\n //******************************************************************\n // Timarron CC - timarroncc\n //******************************************************************\n //\n if (club.equals(\"timarroncc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum; // set posid in case we need it in the future\n\n mship = \"Golf\";\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid = mNum + \"A\";\n } else {\n memid = mNum;\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n }\n } // end if timarroncc\n\n //******************************************************************\n // Fountaingrove Golf & Athletic Club - fountaingrovegolf\n //******************************************************************\n //\n if (club.equals(\"fountaingrovegolf\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n String posSuffix = \"\";\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum;\n \n if (mNum.endsWith(\"A\")) {\n primary = \"P\";\n mNum = mNum.substring(0, mNum.length() - 1);\n memid = mNum;\n } else {\n primary = \"S\";\n mNum = mNum.substring(0, mNum.length() - 1);\n memid = mNum + \"A\";\n }\n\n if (mship.equalsIgnoreCase(\"Golf\") || mship.equalsIgnoreCase(\"Employee\")) {\n mship = \"Golf\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n }\n } // end if fountaingrovegolf\n\n\n/* Disabled, left ForeTees\n //******************************************************************\n // Austin Country Club - austincountryclub\n //******************************************************************\n //\n if (club.equals(\"austincountryclub\")) {\n\n found = true; // club found\n\n if (primary.equalsIgnoreCase(\"P\") && mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n if (mNum.toUpperCase().endsWith(\"A\")) {\n mNum = stripA(mNum);\n }\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n posid = mNum; // set posid in case we need it in the future\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n\n // If a spouse member, retrieve the primary user's membership type to use for them\n if (primary.equalsIgnoreCase(\"S\")) {\n try {\n PreparedStatement pstmtAus = null;\n ResultSet rsAus = null;\n\n pstmtAus = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE memNum = ? AND m_ship<>''\");\n pstmtAus.clearParameters();\n pstmtAus.setString(1, mNum);\n\n rsAus = pstmtAus.executeQuery();\n\n if (rsAus.next()) {\n mship = rsAus.getString(\"m_ship\");\n } else {\n mship = \"\";\n }\n\n pstmtAus.close();\n\n } catch (Exception ignore) {\n\n mship = \"\";\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Membership Type could not be retrieved from Primary Member record!\";\n }\n }\n\n if (mship.equalsIgnoreCase(\"JRF\") || mship.equalsIgnoreCase(\"Former Junior\")) {\n mship = \"Former Junior\";\n } else if (mship.equalsIgnoreCase(\"HON\") || mship.equalsIgnoreCase(\"Honorary\")) {\n mship = \"Honorary\";\n } else if (mship.equalsIgnoreCase(\"JR\") || mship.equalsIgnoreCase(\"Junior\")) {\n mship = \"Junior\";\n } else if (mship.equalsIgnoreCase(\"N-R\") || mship.equalsIgnoreCase(\"Non-Resident\")) {\n mship = \"Non-Resident\";\n } else if (mship.equalsIgnoreCase(\"RES\") || mship.equalsIgnoreCase(\"Resident\")) {\n mship = \"Resident\";\n } else if (mship.equalsIgnoreCase(\"SR\") || mship.equalsIgnoreCase(\"SRD\") || mship.equalsIgnoreCase(\"Senior\")) {\n mship = \"Senior\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n\n }\n } // end if austincountryclub\n */\n\n //******************************************************************\n // Treesdale Golf & Country Club - treesdalegolf\n //******************************************************************\n //\n if (club.equals(\"treesdalegolf\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Primary Female\";\n } else {\n gender = \"M\";\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Spouse Female\";\n } else {\n gender = \"M\";\n mtype = \"Spouse Male\";\n }\n\n memid += \"A\";\n\n } else {\n mtype = \"Junior\";\n }\n\n mship = \"Golf\";\n\n }\n } // end if treesdalegolf\n\n //******************************************************************\n // Sawgrass Country Club - sawgrass\n //******************************************************************\n //\n if (club.equals(\"sawgrass\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n if (mNum.endsWith(\"-1\")) {\n mNum = mNum.substring(0, mNum.length() - 2);\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n // Still filter on given mships even though using mtype field to determine what mship will be set to\n if (mship.equalsIgnoreCase(\"Associate Member\") || mship.equalsIgnoreCase(\"Complimentary Employee\") || mship.equalsIgnoreCase(\"Complimentary Other\") ||\n mship.startsWith(\"House\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE! (mship)\";\n }\n\n if (mtype.equalsIgnoreCase(\"7DAY\")) {\n mship = \"Sports\";\n } else if (mtype.equalsIgnoreCase(\"3DAY\")) {\n mship = \"Social\";\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE! (mtype)\";\n }\n\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Member Female\";\n } else {\n mtype = \"Member Male\";\n }\n\n }\n } // end if sawgrass\n\n /*\n //******************************************************************\n // TPC at SnoaQualmie Ridge\n //******************************************************************\n //\n if (club.equals(\"snoqualmieridge\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum; // set posid in case it's ever needed\n\n // Set primary/spouse value\n if (mNum.toUpperCase().endsWith(\"A\")) {\n primary = \"P\";\n mNum = stripA(mNum);\n } else {\n if (mNum.toUpperCase().endsWith(\"B\")) {\n primary = \"S\";\n mNum = stripA(mNum);\n } else {\n if (mNum.toUpperCase().endsWith(\"C\") || mNum.toUpperCase().endsWith(\"D\") ||\n mNum.toUpperCase().endsWith(\"E\") || mNum.toUpperCase().endsWith(\"F\") ||\n mNum.toUpperCase().endsWith(\"G\") || mNum.toUpperCase().endsWith(\"H\") ||\n mNum.toUpperCase().endsWith(\"I\") || mNum.toUpperCase().endsWith(\"J\")) {\n primary = \"D\";\n\n memid = mNum.toUpperCase(); // use mNum for memid, they are unique\n\n mNum = stripA(mNum);\n\n } else {\n primary = \"P\"; // if no alpha - assume primary\n }\n }\n }\n\n // set mtype based on gender and relationship\n if (gender.equalsIgnoreCase(\"F\")) {\n\n if (primary.equals(\"P\") || primary.equals(\"S\")) {\n\n mtype = \"Adult Female\";\n\n memid = mNum + \"F\"; // memid for Adult Females\n\n } else {\n\n mtype = \"Dependent Female\";\n }\n\n } else { // Male\n\n if (primary.equals(\"P\") || primary.equals(\"S\")) {\n mtype = \"Adult Male\";\n\n memid = mNum + \"M\"; // memid for Adult Males\n\n } else {\n\n mtype = \"Dependent Male\";\n }\n }\n\n // mships ?????????????\n\n }\n } // end if snoqualmieridge\n */\n\n //******************************************************************\n // Druid Hills Golf Club - dhgc\n //******************************************************************\n //\n if (club.equals(\"dhgc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum; // set posid in case we need it in the future\n\n // Remove leading zeroes\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mship.equalsIgnoreCase(\"House\")) {\n\n skip = true;\n errCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n if (primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n }\n } // end if dhgc\n\n //******************************************************************\n // The Reserve Club - thereserveclub\n //******************************************************************\n //\n if (club.equals(\"thereserveclub\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n if (mNum.endsWith(\"-1\")) {\n mNum = mNum.substring(0, mNum.length() - 2);\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n mship = mtype;\n\n if (mship.endsWith(\" - Spouse\")) {\n mship = mship.substring(0, mship.length() - 9);\n }\n\n if (mship.startsWith(\"Social\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE! (mtype)\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n } // end if thereserveclub\n\n\n //******************************************************************\n // Robert Trent Jones - rtjgc\n //******************************************************************\n //\n if (club.equals(\"rtjgc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n if (mNum.endsWith(\"-1\")) {\n\n memid = mNum;\n\n while (memid.length() < 5) {\n memid = \"0\" + memid;\n }\n\n if (gender.equals(\"F\")) {\n memid += \"A\"; // spouse or female\n }\n } else {\n memid = mNum; // primary males\n }\n\n\n //\n // Set the member type\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n }\n\n } // end if rtjgc\n\n\n //******************************************************************\n // Morgan Run - morganrun\n //******************************************************************\n //\n if (club.equals(\"morganrun\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n \n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n }\n\n mship = \"Golf\";\n\n //\n // Set the member type\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n }\n\n } // end if morganrun\n\n\n //******************************************************************\n // CC at DC Ranch - ccdcranch\n //******************************************************************\n //\n if (club.equals(\"ccdcranch\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (mship.equalsIgnoreCase(\"COR\") || mship.equalsIgnoreCase(\"GOLF\")) {\n mship = \"Full Golf\";\n } else if (mship.equalsIgnoreCase(\"SPS\")) {\n mship = \"Sports/Social\";\n } else if (mship.equalsIgnoreCase(\"SECONDARY\")) {\n if (mNum.startsWith(\"1\") || mNum.startsWith(\"5\")) {\n mship = \"Full Golf\";\n } else if (mNum.startsWith(\"3\")) {\n mship = \"Sports/Social\";\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n //\n // Set the member type\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n }\n\n } // end if ccdcranch\n\n\n //******************************************************************\n // Oakley CC - oakleycountryclub\n //******************************************************************\n //\n if (club.equals(\"oakleycountryclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (!mtype.equals(\"\")) {\n mship = mtype;\n }\n\n // Set the member type\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n\n }\n\n } // end if oakleycountryclub\n\n\n //******************************************************************\n // Black Rock CC - blackrockcountryclub\n //******************************************************************\n //\n if (club.equals(\"blackrockcountryclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\") || mNum.endsWith(\"D\") || mNum.endsWith(\"Z\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n gender = \"F\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n gender = \"M\";\n }\n }\n\n }\n\n } // end if blackrockcountryclub\n\n/*\n //******************************************************************\n // The Edison Club - edisonclub\n //******************************************************************\n //\n if (club.equals(\"edisonclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n while (posid.startsWith(\"0\")) {\n posid = posid.substring(1);\n }\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n gender = \"F\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n gender = \"M\";\n }\n } \n\n }\n\n } // end if edisonclub\n */\n\n\n //******************************************************************\n // Longue Vue Club - longuevueclub\n //******************************************************************\n //\n if (club.equals(\"longuevueclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mtype.equals(\"\")) {\n mtype = \"Adult Male\";\n }\n\n if (mtype.endsWith(\" Female\")) {\n gender = \"F\";\n } else {\n gender = \"M\";\n }\n }\n } // end if longuevueclub\n\n\n //******************************************************************\n // Happy Hollow Club - happyhollowclub\n //******************************************************************\n //\n if (club.equals(\"happyhollowclub\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n memid = mNum;\n\n while (memid.startsWith(\"0\")) {\n memid = memid.substring(1);\n }\n\n // If member number does not end with the first letter of member's last name, strip off the last character\n if (!mNum.endsWith(lname.substring(0,1))) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n // Add leading zeroes until mNum has a length of 5\n while (mNum.length() < 5) {\n mNum = \"0\" + mNum;\n }\n\n\n // Remove \"Member Status:\" from beginning of mship\n if (mtype.startsWith(\"Member Status:\")) {\n mtype = mtype.replace(\"Member Status:\", \"\");\n }\n\n // Filter mtypes and mships\n if (mtype.equalsIgnoreCase(\"DEPEND A\") || mtype.equalsIgnoreCase(\"DEPEND B\") || mtype.equalsIgnoreCase(\"DEPEND SOC\")) {\n\n if (mtype.equalsIgnoreCase(\"DEPEND A\") || mtype.equalsIgnoreCase(\"DEPEND B\")) {\n mship = \"Golf\";\n } else if (mtype.equalsIgnoreCase(\"DEPEND SOC\")) {\n mship = \"Social\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n\n } else if (mtype.equalsIgnoreCase(\"EMPLOYEE\") || mtype.equalsIgnoreCase(\"GOLF A\") || mtype.equalsIgnoreCase(\"GOLF B\") || mtype.equalsIgnoreCase(\"SOCIAL\")) {\n\n if (mtype.equalsIgnoreCase(\"EMPLOYEE\")) {\n mship = \"Employee\";\n } else if (mtype.equalsIgnoreCase(\"GOLF A\") || mtype.equalsIgnoreCase(\"GOLF B\")) {\n mship = \"Golf\";\n } else if (mtype.equalsIgnoreCase(\"SOCIAL\")) {\n mship = \"Social\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n \n } else if (mtype.equalsIgnoreCase(\"SPOUSE A\") || mtype.equalsIgnoreCase(\"SPOUSE B\") || mtype.equalsIgnoreCase(\"SPOUSE SOC\")) {\n\n if (mtype.equalsIgnoreCase(\"SPOUSE A\") || mtype.equalsIgnoreCase(\"SPOUSE B\")) {\n mship = \"Golf\";\n } else if (mtype.equalsIgnoreCase(\"SPOUSE SOC\")) {\n mship = \"Social\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP/MEMBER TYPE!\";\n }\n\n }\n } // end if happyhollowclub\n\n \n \n //******************************************************************\n // CC of Castle Pines\n //******************************************************************\n //\n if (club.equals(\"castlepines\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid for member\n useWebidQuery = true; // use webid to locate member in Query\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) { // strip any leading zeros\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n // Isolate the member number\n StringTokenizer tok9 = new StringTokenizer( mNum, \"-\" ); // look for a dash (i.e. 1234-1)\n\n if ( tok9.countTokens() > 1 ) { \n\n mNum = tok9.nextToken(); // get just the mNum if it contains an extension\n }\n\n // Filter mtypes and mships\n if (mship.equalsIgnoreCase(\"golf\") || mship.equalsIgnoreCase(\"corporate\")) {\n\n if (mship.equalsIgnoreCase(\"Corporate\")) {\n mship = \"Corporate\";\n } else {\n mship = \"Regular Member\"; // convert Golf to Regular Member\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP/MEMBER TYPE!\";\n }\n\n }\n } // end if castlepines\n\n\n\n //******************************************************************\n // Golf Club at Turner Hill - turnerhill\n //******************************************************************\n //\n if (club.equals(\"turnerhill\")) {\n\n found = true; // club found\n\n if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid for member\n useWebidQuery = true; // use webid to locate member in Query\n\n webid = memid; // use webid for this club\n\n memid = mNum;\n\n mship = \"Golf\";\n\n if (!gender.equalsIgnoreCase(\"F\")) {\n gender = \"M\";\n }\n\n if (mNum.endsWith(\"A\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n mNum = mNum.substring(0, mNum.length() - 1);\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n }\n } // end if turnerhill\n\n\n //******************************************************************\n // The Club at Mediterra - mediterra\n //******************************************************************\n //\n if (club.equals(\"mediterra\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid for member\n useWebidQuery = true; // use webid to locate member in Query\n\n webid = memid; // use webid for this club\n\n // Get ride of all leading zeroes.\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n // Strip off special character\n if (mNum.endsWith(\"A\") || mNum.endsWith(\"a\") || mNum.endsWith(\"B\") || mNum.endsWith(\"b\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (mship.equalsIgnoreCase(\"G\") || mship.equalsIgnoreCase(\"GNF\")) {\n mship = \"Golf\";\n } else if (mship.equalsIgnoreCase(\"S\")) {\n mship = \"Sports\";\n } else if (mship.equalsIgnoreCase(\"D\")) {\n\n try {\n\n pstmt2 = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum);\n\n rs = pstmt2.executeQuery();\n\n if (rs.next()) {\n mship = rs.getString(\"m_ship\");\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NO PRIMARY MEMBERSHIP TYPE!\";\n }\n\n pstmt2.close();\n\n } catch (Exception exc) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: ERROR WHILE LOOKING UP MEMBERSHIP TYPE!\";\n }\n\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP/MEMBER TYPE!\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n } // end if mediterra\n\n\n //******************************************************************\n // Hideaway Beach Club - hideawaybeachclub\n //******************************************************************\n //\n if (club.equals(\"hideawaybeachclub\")) {\n\n found = true; // club found\n\n if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid for member\n useWebidQuery = true; // use webid to locate member in Query\n\n webid = memid; // use webid for this club\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\") || mNum.endsWith(\"a\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (mNum.startsWith(\"7\")) {\n mship = \"Renter\";\n } else {\n mship = \"Golf\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n\n }\n } // end if hideawaybeachclub\n\n\n \n //******************************************************************\n // All clubs\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\") && !memid.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n fname_old = \"\";\n lname_old = \"\";\n mi_old = \"\";\n mship_old = \"\";\n mtype_old = \"\";\n email_old = \"\";\n mNum_old = \"\";\n ghin_old = \"\";\n bag_old = \"\";\n posid_old = \"\";\n email2_old = \"\";\n phone_old = \"\";\n phone2_old = \"\";\n suffix_old = \"\";\n u_hcap_old = 0;\n c_hcap_old = 0;\n birth_old = 0;\n msub_type_old = \"\";\n email_bounce1 = 0;\n email_bounce2 = 0;\n\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!phone2.equals( \"\" )) {\n\n phone2 = truncate(phone2, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n if (!webid.equals( \"\" )) {\n\n webid = truncate(webid, 15);\n }\n if (!msub_type.equals( \"\" )) {\n\n msub_type = truncate(msub_type, 30);\n }\n\n //\n // Set Gender and Primary values\n //\n if (!gender.equalsIgnoreCase( \"M\" ) && !gender.equalsIgnoreCase( \"F\" )) {\n\n gender = \"\";\n }\n\n pri_indicator = 0; // default = Primary\n\n if (primary.equalsIgnoreCase( \"S\" )) { // Spouse\n\n pri_indicator = 1;\n }\n if (primary.equalsIgnoreCase( \"D\" )) { // Dependent\n\n pri_indicator = 2;\n }\n\n\n //\n // See if a member already exists with this id (username or webid)\n //\n // **** NOTE: memid and webid MUST be set to their proper values before we get here!!!!!!!!!!!!!!!\n //\n //\n // 4/07/2010\n // We now use 2 booleans to indicate what to do with the webid field.\n // useWebid is the original boolean that was used to indicate that we should use the webid to identify the member.\n // We lost track of when this flag was used and why. It was no longer used to indicate the webid should be \n // used in the query, so we don't know what its real purpose is. We don't want to disrupt any clubs that are\n // using it, so we created a new boolean for the query.\n // useWebidQuery is the new flag to indicate that we should use the webid when searching for the member. You should use\n // both flags if you want to use this one.\n //\n try {\n \n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // yes, set new ids\n memid_new = \"\";\n\n } else { // DO NOT use webid\n\n webid_new = \"\"; // set new ids\n memid_new = memid;\n }\n\n if (useWebidQuery == false) {\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n\n } else { // use the webid field\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE webid = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, webid); // put the parm in stmt\n }\n\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n memid = rs.getString(\"username\"); // get username in case we used webid (use this for existing members)\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n\n if (useWebid == true) { // use webid to locate member?\n memid_new = memid; // yes, get this username\n } else {\n webid_new = rs.getString(\"webid\"); // no, get current webid\n }\n }\n pstmt2.close(); // close the stmt\n\n\n //\n // If member NOT found, then check if new member OR id has changed\n //\n boolean memFound = false;\n boolean dup = false;\n boolean userChanged = false;\n boolean nameChanged = false;\n String dupmship = \"\";\n\n if (fname_old.equals( \"\" )) { // if member NOT found\n\n //\n // New member - first check if name already exists\n //\n pstmt2 = con.prepareStatement (\n \"SELECT username, m_ship, memNum, webid FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next() && !club.equals(\"longcove\")) { // Allow duplicate names for Long Cove for members owning two properties at once\n\n dupuser = rs.getString(\"username\"); // get this username\n dupmship = rs.getString(\"m_ship\");\n dupmnum = rs.getString(\"memNum\");\n dupwebid = rs.getString(\"webid\"); // get this webid\n\n //\n // name already exists - see if this is the same member\n //\n sendemail = true; // send a warning email to us and MF\n\n if ((!dupmnum.equals( \"\" ) && dupmnum.equals( mNum )) || club.equals(\"imperialgc\")) { // if name and mNum match, then memid or webid must have changed\n\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // set new ids\n memid_new = dupuser;\n memid = dupuser; // update this record\n\n } else {\n\n webid_new = dupwebid; // set new ids\n memid_new = memid;\n memid = dupuser; // update this record\n userChanged = true; // indicate the username has changed\n }\n\n memFound = true; // update the member\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n }\n\n //\n // Add this info to the email message text\n //\n emailMsg1 = emailMsg1 + \"Name = \" +fname+ \" \" +mi+ \" \" +lname+ \", ForeTees Member Id has been updated to that received.\\n\\n\";\n\n } else {\n\n //\n // Add this info to the email message text\n //\n emailMsg1 = emailMsg1 + \"Name = \" +fname+ \" \" +mi+ \" \" +lname+ \", ForeTees username = \" +dupuser+ \", ForeTees webid = \" +dupwebid+ \", MF id = \" +memid+ \"\\n\\n\";\n\n dup = true; // dup member - do not add\n }\n\n }\n pstmt2.close(); // close the stmt\n\n } else { // member found\n\n memFound = true;\n }\n\n //\n // Now, update the member record if existing member\n //\n if (memFound == true) { // if member exists\n\n changed = false; // init change indicator\n\n lname_new = lname_old;\n\n // do not change lname for Saucon Valley if lname_old ends with '_*'\n if (club.equals( \"sauconvalleycc\" ) && lname_old.endsWith(\"_*\")) {\n\n lname = lname_old;\n\n } else if (!lname.equals( \"\" ) && !lname_old.equals( lname )) {\n\n lname_new = lname; // set value from MFirst record\n changed = true;\n nameChanged = true;\n }\n\n fname_new = fname_old;\n\n //\n // DO NOT change for select clubs\n //\n if (club.equals( \"pinery\" ) || club.equals( \"bellerive\" ) || club.equals( \"greenhills\" ) || club.equals( \"fairbanksranch\" ) ||\n club.equals( \"baltusrolgc\" ) || club.equals(\"charlottecc\") || club.equals(\"castlepines\")) {\n\n fname = fname_old; // do not change fnames\n\n } else {\n\n if (!fname.equals( \"\" ) && !fname_old.equals( fname )) {\n\n fname_new = fname; // set value from MFirst record\n changed = true;\n nameChanged = true;\n }\n }\n\n mi_new = mi_old;\n\n //\n // DO NOT change middle initial for ClubCorp clubs\n //\n if (clubcorp) {\n\n mi = mi_old;\n\n } else {\n if (!mi_old.equals( mi )) {\n\n mi_new = mi; // set value from MFirst record\n changed = true;\n nameChanged = true;\n }\n }\n\n mship_new = mship_old;\n\n if (!mship.equals( \"\" ) && !mship_old.equals( mship )) {\n\n mship_new = mship; // set value from MFirst record\n changed = true;\n }\n\n mtype_new = mtype_old;\n\n if (club.equals( \"greenhills\" ) || club.equals(\"paloaltohills\") ||\n (club.equals(\"navesinkcc\") && mtype_old.equals(\"Primary Male GP\"))) { // Green Hills - do not change the mtype\n\n mtype = mtype_old;\n\n } else {\n\n if (!mtype.equals( \"\" ) && !mtype_old.equals( mtype )) {\n\n mtype_new = mtype; // set value from MFirst record\n changed = true;\n }\n }\n\n mNum_new = mNum_old;\n\n if (!mNum.equals( \"\" ) && !mNum_old.equals( mNum )) {\n\n mNum_new = mNum; // set value from MFirst record\n changed = true;\n }\n\n ghin_new = ghin_old;\n\n if (!ghin.equals( \"\" ) && !ghin_old.equals( ghin )) {\n\n ghin_new = ghin; // set value from MFirst record\n changed = true;\n }\n\n bag_new = bag_old;\n\n if (!club.equals(\"edina\") && !club.equals(\"edina2010\")) { // never change for Edina\n\n if (!bag.equals( \"\" ) && !bag_old.equals( bag )) {\n\n bag_new = bag; // set value from MFirst record\n changed = true;\n }\n }\n\n posid_new = posid_old;\n\n if (!posid.equals( \"\" ) && !posid_old.equals( posid )) {\n\n posid_new = posid; // set value from MFirst record\n changed = true;\n }\n\n email_new = email_old;\n\n if (!club.equals(\"mesaverdecc\")) { // never change for Mesa Verde CC\n\n if (!email_old.equals( email )) { // if MF's email changed or was removed\n\n email_new = email; // set value from MFirst record\n changed = true;\n email_bounce1 = 0; // reset bounced flag\n }\n }\n\n email2_new = email2_old;\n\n if (!club.equals(\"mesaverdecc\")) { // never change for Mesa Verde CC\n\n if (!email2_old.equals( email2 )) { // if MF's email changed or was removed\n\n email2_new = email2; // set value from MFirst record\n changed = true;\n email_bounce2 = 0; // reset bounced flag\n }\n }\n\n phone_new = phone_old;\n\n if (!phone.equals( \"\" ) && !phone_old.equals( phone )) {\n\n phone_new = phone; // set value from MFirst record\n changed = true;\n }\n\n phone2_new = phone2_old;\n\n if (!phone2.equals( \"\" ) && !phone2_old.equals( phone2 )) {\n\n phone2_new = phone2; // set value from MFirst record\n changed = true;\n }\n\n suffix_new = suffix_old;\n\n if (!suffix.equals( \"\" ) && !suffix_old.equals( suffix )) {\n\n suffix_new = suffix; // set value from MFirst record\n changed = true;\n }\n\n birth_new = birth_old;\n\n if (!club.equals(\"fountaingrovegolf\")) { // Don't update birthdates for Fountain Grove\n\n if (birth > 0 && birth != birth_old) {\n\n birth_new = birth; // set value from MFirst record\n changed = true;\n }\n }\n\n if (!mobile.equals( \"\" )) { // if mobile phone provided\n\n if (phone_new.equals( \"\" )) { // if phone1 is empty\n\n phone_new = mobile; // use mobile number\n changed = true;\n\n } else {\n\n if (phone2_new.equals( \"\" )) { // if phone2 is empty\n\n phone2_new = mobile; // use mobile number\n changed = true;\n }\n }\n }\n\n msub_type_new = msub_type_old;\n\n if (!msub_type.equals( \"\" ) && !msub_type_old.equals( msub_type )) {\n\n msub_type_new = msub_type; // set value from MFirst record\n changed = true;\n }\n\n // don't allow both emails to be the same\n if (email_new.equalsIgnoreCase(email2_new)) email2_new = \"\";\n\n //\n // Update our record (always now to set the last_sync_date)\n //\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET username = ?, name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, ghin = ?, bag = ?, birth = ?, posid = ?, msub_type = ?, email2 = ?, phone1 = ?, \" +\n \"phone2 = ?, name_suf = ?, webid = ?, inact = 0, last_sync_date = now(), gender = ?, pri_indicator = ?, \" +\n \"email_bounced = ?, email2_bounced = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid_new);\n pstmt2.setString(2, lname_new);\n pstmt2.setString(3, fname_new);\n pstmt2.setString(4, mi_new);\n pstmt2.setString(5, mship_new);\n pstmt2.setString(6, mtype_new);\n pstmt2.setString(7, email_new);\n pstmt2.setString(8, mNum_new);\n pstmt2.setString(9, ghin_new);\n pstmt2.setString(10, bag_new);\n pstmt2.setInt(11, birth_new);\n pstmt2.setString(12, posid_new);\n pstmt2.setString(13, msub_type_new);\n pstmt2.setString(14, email2_new);\n pstmt2.setString(15, phone_new);\n pstmt2.setString(16, phone2_new);\n pstmt2.setString(17, suffix_new);\n pstmt2.setString(18, webid_new);\n pstmt2.setString(19, gender);\n pstmt2.setInt(20, pri_indicator);\n pstmt2.setInt(21, email_bounce1);\n pstmt2.setInt(22, email_bounce2);\n\n pstmt2.setString(23, memid);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n\n } else { // member NOT found - add it if we can\n\n if (dup == false) { // if not duplicate member\n\n //\n // New member is ok - add it\n //\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, webid, \" +\n \"last_sync_date, gender, pri_indicator) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,?,?,?,?,'',?,?, now(),?,?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, msub_type);\n pstmt2.setString(17, email2);\n pstmt2.setString(18, phone);\n pstmt2.setString(19, phone2);\n pstmt2.setString(20, suffix);\n pstmt2.setString(21, webid);\n pstmt2.setString(22, gender);\n pstmt2.setInt(23, pri_indicator);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n\n } else { // this member not found, but name already exists\n\n if (dup) {\n errCount++;\n errMsg = errMsg + \"\\n -Dup user found:\\n\" +\n \" new: memid = \" + memid + \" : cur: \" + dupuser + \"\\n\" +\n \" webid = \" + webid + \" : \" + dupwebid + \"\\n\" +\n \" mNum = \" + mNum + \" : \" + dupmnum;\n }\n\n if (club.equals( \"bentwaterclub\" ) && !dupuser.equals(\"\")) {\n\n //\n // Bentwater CC - Duplicate member name found. This is not uncommon for this club.\n // We must accept the member record with the highest priority mship type.\n // Members are property owners and can own multiple properties, each with a\n //\n // Order of Priority:\n // GPM\n // DOP\n // DCC\n // DOC\n // DGC\n // MGM\n // DOM\n // SCM\n // EMP\n // DSS\n // DCL\n // VSG\n // S\n //\n boolean switchMship = false;\n\n if (mship.equals(\"GPM\")) { // if new record has highest mship value\n\n switchMship = true; // update existing record to this mship\n\n } else {\n\n if (mship.equals(\"DOP\")) {\n\n if (!dupmship.equals(\"GPM\")) { // if existing mship is lower than new one\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DCC\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\")) { // if existing mship is lower than new one\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DOC\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\") && !dupmship.equals(\"DCC\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DGC\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\") && !dupmship.equals(\"DCC\") &&\n !dupmship.equals(\"DOC\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"MGM\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\") && !dupmship.equals(\"DCC\") &&\n !dupmship.equals(\"DOC\") && !dupmship.equals(\"DGC\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DOM\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\") && !dupmship.equals(\"DCC\") &&\n !dupmship.equals(\"DOC\") && !dupmship.equals(\"DGC\") && !dupmship.equals(\"MGM\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"SCM\")) {\n\n if (dupmship.equals(\"EMP\") || dupmship.equals(\"DSS\") || dupmship.equals(\"DCL\") ||\n dupmship.equals(\"VSG\") || dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"EMP\")) {\n\n if (dupmship.equals(\"DSS\") || dupmship.equals(\"DCL\") ||\n dupmship.equals(\"VSG\") || dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DSS\")) {\n\n if (dupmship.equals(\"DCL\") ||\n dupmship.equals(\"VSG\") || dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DCL\")) {\n\n if (dupmship.equals(\"VSG\") || dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"VSG\")) {\n\n if (dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n //\n // If we must switch the mship type, update the existing record to reflect the higher pri mship\n //\n if (switchMship == true) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET \" +\n \"username = ?, m_ship = ?, memNum = ?, posid = ?, webid = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // use this username so record gets updated correctly next time\n pstmt2.setString(2, mship);\n pstmt2.setString(3, mNum);\n pstmt2.setString(4, posid);\n pstmt2.setString(5, webid);\n pstmt2.setString(6, dupuser); // update existing record - keep username, change others\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n userChanged = true; // indicate username changed\n\n memid_new = memid; // new username\n memid = dupuser; // old username\n fname_new = fname;\n mi_new = mi;\n lname_new = lname;\n }\n\n } // end of IF Bentwater Club and dup user\n }\n } // end of IF Member Found\n\n //\n // Member updated - now see if the username or name changed\n //\n if (userChanged == true || nameChanged == true) { // if username or name changed\n\n //\n // username or name changed - we must update other tables now\n //\n StringBuffer mem_name = new StringBuffer( fname_new ); // get the new first name\n\n if (!mi_new.equals( \"\" )) {\n mem_name.append(\" \" +mi_new); // new mi\n }\n mem_name.append(\" \" +lname_new); // new last name\n\n String newName = mem_name.toString(); // convert to one string\n\n Admin_editmem.updTeecurr(newName, memid_new, memid, con); // update teecurr with new values\n\n Admin_editmem.updTeepast(newName, memid_new, memid, con); // update teepast with new values\n\n Admin_editmem.updLreqs(newName, memid_new, memid, con); // update lreqs with new values\n\n Admin_editmem.updPartner(memid_new, memid, con); // update partner with new values\n\n Admin_editmem.updEvents(newName, memid_new, memid, con); // update evntSignUp with new values\n\n Admin_editmem.updLessons(newName, memid_new, memid, con); // update the lesson books with new values\n }\n }\n catch (Exception e3b) {\n errCount++;\n errMsg = errMsg + \"\\n -Error2 processing roster for \" +club+ \"\\n\" +\n \" line = \" +line+ \": \" + e3b.getMessage(); // build msg\n }\n\n } else {\n\n // Only report errors that AREN'T due to skip == true, since those were handled earlier!\n if (!found) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBER NOT FOUND!\";\n }\n if (fname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n }\n if (lname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -LAST NAME missing!\";\n }\n if (memid.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -USERNAME missing!\";\n }\n } // end of IF skip\n\n } // end of IF minimum requirements\n\n } // end of IF tokens\n\n // log any errors and warnings that occurred\n if (errCount > 0) {\n totalErrCount += errCount;\n errList.add(errMemInfo + \"\\n *\" + errCount + \" error(s) found*\" + errMsg + \"\\n\");\n }\n if (warnCount > 0) {\n totalWarnCount += warnCount;\n warnList.add(errMemInfo + \"\\n *\" + warnCount + \" warning(s) found*\" + warnMsg + \"\\n\");\n }\n } // end of while (for each record in club's file)\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n \n \n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n }\n\n\n //\n // Send an email to us and MF support if any dup names found\n //\n if (sendemail == true) {\n\n Properties properties = new Properties();\n properties.put(\"mail.smtp.host\", host); // set outbound host address\n properties.put(\"mail.smtp.port\", port); // set outbound port\n properties.put(\"mail.smtp.auth\", \"true\"); // set 'use authentication'\n\n Session mailSess = Session.getInstance(properties, SystemUtils.getAuthenticator()); // get session properties\n\n MimeMessage message = new MimeMessage(mailSess);\n\n try {\n\n message.setFrom(new InternetAddress(efrom)); // set from addr\n\n message.setSubject( subject ); // set subject line\n message.setSentDate(new java.util.Date()); // set date/time sent\n }\n catch (Exception ignore) {\n }\n\n //message.addRecipient(Message.RecipientType.TO, new InternetAddress(emailFT)); // set our support email addr\n\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(emailMF)); // add MF email addr\n\n emailMsg1 = emailMsg1 + emailMsg2; // add trailer msg\n\n try {\n message.setText( emailMsg1 ); // put msg in email text area\n\n Transport.send(message); // send it!!\n }\n catch (Exception ignore) {\n }\n\n }\n\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster for \" +club+ \": \" + e3.getMessage() + \"\\n\"; // build msg\n SystemUtils.logError(errorMsg); // log it\n }\n\n // Print error and warning count totals to error log\n SystemUtils.logErrorToFile(\"\" +\n \"Total Errors Found: \" + totalErrCount + \"\\n\" +\n \"Total Warnings Found: \" + totalWarnCount + \"\\n\", club, true);\n\n // Print errors and warnings to error log\n if (totalErrCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****ERRORS FOR \" + club + \" (Member WAS NOT synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (errList.size() > 0) {\n SystemUtils.logErrorToFile(errList.remove(0), club, true);\n }\n }\n if (totalWarnCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****WARNINGS FOR \" + club + \" (Member MAY NOT have synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (warnList.size() > 0) {\n SystemUtils.logErrorToFile(warnList.remove(0), club, true);\n }\n }\n\n // Print end tiem to error log\n SystemUtils.logErrorToFile(\"End time: \" + new java.util.Date().toString() + \"\\n\", club, true);\n \n }", "public String addArchangel(String pname,String pphoto,String ppower,String ppray,String pcolor,double psize,String pessence,int plight,int pday,String pmonth,Candle cand,Date date){\n\tCandle can1 = new Candle(pcolor,psize,pessence,plight);\n\tDate dat1 = new Date(pday,pmonth);\n Archangel ang1 = new Archangel(pname,pphoto,ppower,ppray,can1,dat1);\n\tString msg = \"\";\n\tboolean val = false;\n\t//valida que termine en \"el\",que no exista otro con el mismo nombre o poder\n\tif(pname.substring(pname.length()-2).equalsIgnoreCase(\"el\")){\n\t\tfor(int i = 0;i<arch.length && !val;i++){\n \tif(arch[i] != null ){\n \t\tif(arch[i].getName().equalsIgnoreCase(pname)){\n msg = \"\\nError: There is another archangel with the same name.\\n\";\n \t val=true;\n \t} \n \t}\n\t}\n for(int j = 0;j<arch.length && !val;j++){\n \tif(arch[j] != null){\n \t\tif(arch[j].getPower().equalsIgnoreCase(ppower)){\n \t val=true;\n msg = \"\\nError: There is another archangel with the same power.\\n\";\n \t}\n \t}\n }\n if(arch[arch.length-1]!=null){\n \tval=true;\n \tmsg=\"You cant register more angels because you have registered all the angels.\\n\";\n } \n }\n else{\n \tmsg = \"\\nError: The name doesn't end in <el> \\n\";\n \tval=true;\n }\n\n if(val==false){\n \tfor(int t =0;t<arch.length && !val;t++){\n \t\tif(arch[t]==null){\n \t\t\tarch[t]=ang1;\n \t\t\tmsg = \"\\nYou have registered the archangel sucessfully\\n\";\n \t\t\tval = true;\n \t\t}\n\n \t}\n }\n return msg;\n}", "public Map<String, MarketData> getMarketData() {return marketData;}", "private MarketSnapshot() {\n\n }", "public RuleSet (RuleSet RS1, RuleSet RS2, SensorList sList, SensorMap sMap, RuleMap rMap) {\n \n // CREATING COMBINATION RULESET FROM RS1 & RS2\n \n this.references = new ArrayList();\n this.sList = sList;\n this.rulelist = RS1.rulelist;\n this.totalProb = 0.0;\n this.id = counter.incrementAndGet();\n this.precedences = new ArrayList ();\n Sensor precondition = RS1.getPrecursorWithID().merge(RS2.getPrecursorWithID());\n\n \n ArrayList <Integer> common_non_wildcarded_indexes = RS1.getSuccessor().detectCommonNonWilcardedIndexes(RS2.getSuccessor());\n\n Sensor root = new Sensor(RS1.getPrecursorWithID().tokenMap);\n \n int number = common_non_wildcarded_indexes.size();\n \n boolean insert;\n \n // THERE IS A CONFLICT ONLY IF SOME COMMON NON WILDCARDED INDEXES EXIST\n if (number >= 1) {\n SensorList conflicted_indexes_list = root.expand(common_non_wildcarded_indexes.get(0));\n \n if (number >= 2) { \n \n // Expanding the conflicted indexes in ArrayList\n for (int h = 2; h<=number; h++) {\n \n conflicted_indexes_list.expandListAt(common_non_wildcarded_indexes.get(h-1));\n }\n }\n \n for (int j = 0; j < conflicted_indexes_list.size(); j++) {\n \n // We only need to insert the Rules with postcondition corresponding to either RS1 or RS2\n //\n // So we check for post. matches in the first and then second RuleSet\n insert = false;\n\n // SEARCHING FOR MATCH IN FIRST RULESET\n for (int h1 = 0; h1 < RS1.size(); h1++) {\n ///\n if (RS1.getSuccessor(h1).sensorMatch(conflicted_indexes_list.getSensor(j+1))) {\n insert = true;\n \n break;\n }\n }\n \n // SEARCHING FOR MATCH IN SECOND RULESET\n if (!insert) {\n \n for (int h2 = 0; h2 < RS2.size(); h2++) {\n \n \n if (RS2.getSuccessor(h2).sensorMatch(conflicted_indexes_list.getSensor(j+1))) {\n insert = true;\n \n break;\n }\n \n\n }\n }\n \n // If the Rule postcondition was found in RS1 or RS2, we shall create it\n if (insert) {\n \n Rule rule = new Rule(precondition, conflicted_indexes_list.getSensor(j+1));\n \n rule.ruleset_id = this.id;\n \n int aa = sMap.getMatchingOccurencies(precondition);\n \n int tt = rMap.getMatchingOccurencies(rule);\n \n \n rule.prec_occurrencies = aa;\n rule.occurrencies = tt;\n \n this.rulelist.addRule(rule);\n this.add(rule);\n \n }\n \n }\n \n }\n \n \n // UPDATING RULESET PROBABILITY\n if (this.size() > 0) {\n for (int i = 0; i < this.size(); i++) {\n\n totalProb = totalProb + this.getRule(i).getProb();\n totalProb = Math.round(totalProb * 1000);\n totalProb = totalProb/1000;\n \n }\n }\n \n }", "int insertSelective(CmsChannel record);", "public void setMarketStatus(List<marketStatus> marketStatus) {\n\t\tthis.marketStatus = marketStatus;\n\t}", "protected boolean addNewStockToMarket(String tickerSymbol, double sharePrice){\r\n if(stocksSymbolToPrice.containsKey(tickerSymbol)){\r\n return false;\r\n }\r\n //if the stock is already listed, return false\r\n //otherwise, add the key-value pair to the stocksSymbolToPrice map and return true;\r\n stocksSymbolToPrice.put(tickerSymbol, sharePrice);\r\n return true;\r\n }", "int insertSelective(InternalTradeEpa022016 record);", "private void restoreInformationOfMarket() throws IOException, InterruptedException {\n\n Gson gson=Market.gsonForEveryoneMArket();\n\n Marble[] list;\n try {\n list = gson.fromJson(new FileReader(\"fileConfiguration/Market.json\"),Marble[].class);\n market= new Market(list);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public synchronized void updateCurrentMarket() throws InvalidDataException {\n\t\tPrice topBuyPrice = (getBuySide().topOfBookPrice() == null) ? PriceFactory.makeLimitPrice(0) : getBuySide().topOfBookPrice();\n\t\tPrice topSellPrice = (getSellSide().topOfBookPrice() == null) ? PriceFactory.makeLimitPrice(0) : getSellSide().topOfBookPrice();\n\n\t\tString data = topBuyPrice.toString() + getBuySide().topOfBookVolume()\n\t\t\t\t\t+ topSellPrice.toString() + getSellSide().topOfBookVolume();\n\t\tif (!getLatestMarketData().equals(data)) {\n\t\t\tMarketDataDTO latestData = new MarketDataDTO(getStock(), topBuyPrice, \n\t\t\t\t\tgetBuySide().topOfBookVolume(), topSellPrice, getSellSide().topOfBookVolume());\n\t\t\tCurrentMarketPublisher.getInstance().publishCurrentMarket(latestData);\n\t\t\tsetLatestMarketData(data);\n\t\t}\n\t}", "int updateByPrimaryKeySelective(Blacklist record);", "public void setMarket(String market) {\r\n this.market = market == null ? null : market.trim();\r\n }", "private void checkWholesaleMarket (WholesaleMarket market)\n {\n int offset =\n market.getTimeslotSerialNumber()\n - visualizerBean.getCurrentTimeslotSerialNumber();\n if (offset == 0) {\n market.close();\n // update model:\n wholesaleService.addTradedQuantityMWh(market.getTotalTradedQuantityMWh());\n // let wholesaleMarket contribute to global charts:\n WholesaleSnapshot lastSnapshot =\n market.getLastWholesaleSnapshotWithClearing();\n if (lastSnapshot != null) {\n WholesaleServiceJSON json = wholesaleService.getJson();\n try {\n json.getGlobalLastClearingPrices()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionPrice()));\n json.getGlobalLastClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionMWh()));\n\n json.getGlobalTotalClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(market.getTotalTradedQuantityMWh()));\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }", "int insertSelective(EbayLmsLog record);", "public static Class<? extends SugarHolder> m60887a(MarketCardModel marketCardModel) {\n try {\n String cardType = marketCardModel.getCardType();\n char c = 65535;\n int hashCode = cardType.hashCode();\n if (hashCode != -2047926814) {\n if (hashCode != -1994818566) {\n if (hashCode == 166933110) {\n if (cardType.equals(C6969H.m41409d(\"G7A8FDA0E8035BD2CE81AAF4BF3F7C7\"))) {\n c = 0;\n }\n }\n } else if (cardType.equals(C6969H.m41409d(\"G7A8FDA0E8026A22DE301AF4DE4E0CDC35680D408BB\"))) {\n c = 2;\n }\n } else if (cardType.equals(C6969H.m41409d(\"G7A8FDA0E803CA23FE331964DF7E1FCDE7D86D8\"))) {\n c = 1;\n }\n switch (c) {\n case 0:\n return TextUtils.equals(marketCardModel.getVersions(), \"V2\") ? MarketCardNew01ViewHolder.class : MarketCard01ViewHolder.class;\n case 1:\n return MarketCard03ViewHolder.class;\n case 2:\n return TextUtils.equals(marketCardModel.getVersions(), \"V2\") ? MarketCardNew07ViewHolder.class : MarketCard07ViewHolder.class;\n default:\n m60890a(MarketCardModel.class.getSimpleName());\n return NullDispatcherHolder.class;\n }\n } catch (Exception e) {\n e.printStackTrace();\n m60890a(MarketCardModel.class.getSimpleName());\n return NullDispatcherHolder.class;\n }\n }", "public void matchRecord(String buyRequestNo, String sellRequestNo, Integer buyId, Integer sellId, BigDecimal num,\n\t\t\tBigDecimal price, String symbol);", "public void saveFormData() throws edu.mit.coeus.exception.CoeusException {\r\n //Modified for COEUSDEV-413 : Subcontract Custom data bug - Data getting wiped out - Start\r\n// if( isDataChanged() ){\r\n\t\tif( isDataChanged() || getFunctionType() == NEW_ENTRY_SUBCONTRACT || getFunctionType() == NEW_SUBCONTRACT) { //COEUSDEV-413 : End\r\n Vector genericColumnValues = customElementsForm.getOtherColumnElementData();\r\n\t\t\tif( genericColumnValues != null && genericColumnValues.size() > 0 ){\r\n\t\t\t\tCustomElementsInfoBean genericCustElementsBean = null;\r\n\t\t\t\tint dataSize = genericColumnValues.size();\r\n\t\t\t\tfor( int indx = 0; indx < dataSize; indx++ ) {\r\n\t\t\t\t\tgenericCustElementsBean = (CustomElementsInfoBean)genericColumnValues.get(indx);\r\n\t\t\t\t\tSubContractCustomDataBean subContractCustomDataBean\r\n\t\t\t\t\t= new SubContractCustomDataBean(genericCustElementsBean);\r\n SubContractCustomDataBean oldSubContractCustomDataBean = (SubContractCustomDataBean)genericColumnValues.get(indx);\r\n\t\t\t\t\tif(getFunctionType() == NEW_ENTRY_SUBCONTRACT) {\r\n\t\t\t\t\t\tsubContractCustomDataBean.setAcType(\"I\");\r\n//\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n//\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif( INSERT_RECORD.equals(subContractCustomDataBean.getAcType()) ) {\r\n\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif( genericCustElementsBean instanceof SubContractCustomDataBean ) {\r\n//\t\t\t\t\t\t\tSubContractCustomDataBean oldSubContractCustomDataBean =\r\n//\t\t\t\t\t\t\t(SubContractCustomDataBean)genericCustElementsBean;\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setAcType(genericCustElementsBean.getAcType());\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(oldSubContractCustomDataBean.getSubContractCode());\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(oldSubContractCustomDataBean.getSequenceNumber());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tString custAcType = subContractCustomDataBean.getAcType();\r\n\t\t\t\t\t\tif( UPDATE_RECORD.equals(custAcType) ){\r\n//\t\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n//\t\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n\t\t\t\t\t\t\tqueryEngine.update(queryKey, subContractCustomDataBean);\r\n\t\t\t\t\t\t}else if( INSERT_RECORD.equals(custAcType)){\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n\t\t\t\t\t\t\tqueryEngine.insert(queryKey, subContractCustomDataBean);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}catch ( CoeusException ce ) {\r\n\t\t\t\t\t\tce.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcustomElementsForm.setSaveRequired(false);\r\n\t\t}\r\n\t}", "public synchronized MarketDataDTO getMarketData() {\n\t\tPrice bestBuyPrice = getBuySide().topOfBookPrice();\n\t\tPrice bestSellPrice = getSellSide().topOfBookPrice();\n\t\tif (bestBuyPrice == null) bestBuyPrice = PriceFactory.makeLimitPrice(0);\n\t\tif (bestSellPrice == null) bestSellPrice = PriceFactory.makeLimitPrice(0);\n\t\tint bestBuyVolume = getBuySide().topOfBookVolume();\n\t\tint bestSellVolume = getSellSide().topOfBookVolume();\n\t\tMarketDataDTO marketData = new MarketDataDTO(getStock(), bestBuyPrice, bestBuyVolume, bestSellPrice, bestSellVolume);\n\t\treturn marketData;\n\t}", "private static void receiverRecordCreator(DonorReceiver acc) {\n ReceiverOrganInventory organInventory = acc.getRequiredOrgans();\n\n boolean[] organPresent = {\n organInventory.getLiver(), organInventory.getKidneys(), organInventory.getHeart(),\n organInventory.getLungs(), organInventory.getIntestine(), organInventory.getCorneas(),\n organInventory.getMiddleEars(), organInventory.getSkin(), organInventory.getBone(),\n organInventory.getBoneMarrow(), organInventory.getConnectiveTissue(),\n organInventory.getPancreas()\n };\n\n LocalDateTime[] organTimes = {\n organInventory.getLiverTimeStamp(), organInventory.getKidneysTimeStamp(),\n organInventory.getHeartTimeStamp(), organInventory.getLungsTimeStamp(),\n organInventory.getIntestineTimeStamp(), organInventory.getCorneasTimeStamp(),\n organInventory.getMiddleEarsTimeStamp(), organInventory.getSkinTimeStamp(),\n organInventory.getBoneTimeStamp(), organInventory.getBoneMarrowTimeStamp(),\n organInventory.getConnectiveTissueTimeStamp(), organInventory.getPancreasTimeStamp()\n };\n\n String[] organString = {\n \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\", \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\",\n \"Bone Marrow\", \"Connective Tissue\", \"Pancreas\"\n };\n\n for (int i = 0; i < organPresent.length; i++) {\n if (organPresent[i]) {\n ReceiverRecord record = new ReceiverRecord(acc.fullName(), acc.getUserName(),\n acc.getContactDetails().getAddress().getRegion(), organTimes[i], organString[i]);\n records.add(record);\n }\n }\n }", "private static BetRestrictionCriterion deriveCriterion(Market market, Event event) {\n Map<Long, MarketType> marketTypes = SnapShot.getVerifiedInstance().get(SnapShotItemType.MARKETTYPES);\n MarketType mType = marketTypes.get(market.getMarketTypeId());\n return new BetRestrictionCriterion(event.getEventType().ordinal(), EventPathCriteria.specificEventPath(\n event.getEventPathId(), event.getPath()), event.getId(), mType.getMarketTypeGroup(),\n market.getMarketTypeId(), market.getPeriod(), 0);\n }", "void firebaseExistingDocAdapter(String image, int position){\n String editTextAmount = mAmountEditText.getText().toString();\n int editableAmount = Integer.parseInt(editTextAmount);\n\n //Adapter brick amount\n BrickModel currentBrick = mBrickList.get(position);\n int currentBrickAmount = Integer.parseInt(currentBrick.getAmount());\n\n //Compare brick amounts(to avoid nul point exceptions)\n boolean inputSmaller = editableAmount <= currentBrickAmount;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: currentAmount: \" + currentBrickAmount);\n\n //Make bool to show necesary update\n if (image.equals(\"mDestroy\") & inputSmaller){\n// requestFireUpdate = true;\n //TODO should make graveyard? // make who put it there and why..?(*inManufacturing*atClient*wrongData*fallInStacking*...**)\n Log.d(TAG, \"firebaseExistingDocAdapter: mDestroy: \" + editTextAmount);\n\n int newBrickAmount = currentBrickAmount - editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n\n } else if(image.equals(\"mSeal\") && inputSmaller){\n// requestFireUpdate = true;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: mSeal: \" + editTextAmount);\n int newBrickAmount = currentBrickAmount - editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n\n //TODO make \"create new purchase\"\n\n\n } else if (image.equals(\"mProduce\")){\n// requestFireUpdate = true;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: mProduce: \" + editTextAmount);\n\n int newBrickAmount = currentBrickAmount + editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n\n\n } else if (image.equals(\"m2Class\") && inputSmaller){\n if(currentBrick.getBrickName().endsWith(\"1\")){\n// requestFireUpdate = true;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: m2Class: \" + editTextAmount);\n\n int newBrickAmount = currentBrickAmount - editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n writeNew2ClassBrick(editTextAmount, currentBrick);\n } else {\n Log.d(TAG, \"firebaseExistingDocAdapter: m2Class already exist\");\n }\n\n\n } else {\n Log.wtf(TAG, \"firebaseExistingDocAdapter: Something went wrong!\\n\" +\n \"(Most likely you inserted too big number)\\n\");\n\n// requestFireUpdate = false;\n\n }\n \n if(requestFireUpdate){\n //TODO create Show updateButton\n Log.d(TAG, \"firebaseExistingDocAdapter: update button accessible\");\n\n\n }\n\n Collections.sort(mBrickList, BrickModel.StuNameComparator);\n notifyDataSetChanged();\n// notifyItemChanged(position);\n\n// itemView.clearFocus();\n// InputMethodManager imm = (InputMethodManager) itemView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.toggleSoftInput(0, InputMethodManager.HIDE_IMPLICIT_ONLY);\n\n// imm.hideSoftInputFromWindow(itemView.getWindowToken(), 0);\n\n\n }", "public void setData1(ArrayList<CurrencyModel> currencyModelArrayList){\n if (items != null) {\n CurrDiffCallback postDiffCallback = new CurrDiffCallback(currencyModelArrayList, items);\n DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(postDiffCallback);\n\n items.clear();\n items.addAll(currencyModelArrayList);\n diffResult.dispatchUpdatesTo(this);\n Log.d(TAG, \"setData: dispatched to adapter\");\n } else {\n // first initialization\n items = currencyModelArrayList;\n }\n }", "public BrokersStatus()\r\n {\r\n brokers = new ArrayList<BrokerStatus>();\r\n }", "private void parseRecord(String line){\n\t\tString[] recordSplit = line.split(\",\");\n\t\tString employeeId = recordSplit[RECORD_EMPLOYEE];\n\t\t/**\n\t\t * check if the key matching employeeId is found in \n\t\t * employeesStocks if not create a new EmployeeStocks \n \t\t * with employeeId as key\n\t\t */\n\t\t\n\t\tif(!mStockReport.getEmployeesRecords().containsKey(employeeId)){\n\t\t\tmStockReport.getEmployeesRecords().put(employeeId, new EmployeeRecords());\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).setEmployeeId(employeeId);\n\t\t}\n\t\tint recordDate = Integer.parseInt(recordSplit[RECORD_DATE]);\n\t\tRecord record = createRecord(recordSplit);\n\t\tswitch(recordSplit[RECORD_TYPE]){\n\t\tcase TYPE_VEST:\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).putVests(recordDate, record);\n\t\t\tbreak;\n\t\tcase TYPE_SALE:\t\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).putSales(recordDate, record);\n\t\t\tbreak;\n\t\tcase TYPE_PERF:\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).putPerfs(recordDate, record);\n\t\t\tbreak;\n\t\t}\n\t}", "River(Match match) {\n \n \n this.match = match;\n availableBet = new ArrayList<>();\n availableBet.add(Bet.CALL);\n availableBet.add(Bet.FOLD);\n availableBet.add(Bet.RAISE);\n availableBet.add(Bet.CHECK);\n }", "public void updateData(Context context) {\n dataUpdatedCheck = new PairCheck();\n List<Constants.Currency> currencyList = new ArrayList<>();\n currencyList.add(BTC);\n currencyList.add(ETH);\n currencyList.add(LTC);\n mDataCurrencyProvider.getCryptocurrencyInfoList(context, currencyList, this);\n mGlobalMarketDataProvider.getGlobalInfo(context, this);\n }", "@SuppressWarnings(\"RedundantThrows\")\n @Override\n protected void processServerData(long time,\n ESIAccountServerResult<List<GetCharactersCharacterIdSkillqueue200Ok>> data,\n List<CachedData> updates) throws IOException {\n Set<Integer> seenPositions = new HashSet<>();\n for (GetCharactersCharacterIdSkillqueue200Ok next : data.getData()) {\n seenPositions.add(next.getQueuePosition());\n updates.add(new SkillInQueue(nullSafeInteger(next.getLevelEndSp(), 0),\n nullSafeDateTime(next.getFinishDate(), new DateTime(new Date(0))).getMillis(),\n next.getFinishedLevel(),\n next.getQueuePosition(),\n nullSafeInteger(next.getLevelStartSp(), 0),\n nullSafeDateTime(next.getStartDate(), new DateTime(new Date(0))).getMillis(),\n next.getSkillId(),\n nullSafeInteger(next.getTrainingStartSp(), 0)));\n }\n // Delete skills no longer in the queue\n for (SkillInQueue existing : CachedData.retrieveAll(time,\n (contid, at) -> SkillInQueue.accessQuery(account, contid, 1000,\n false, at,\n AttributeSelector.any(),\n AttributeSelector.any(),\n AttributeSelector.any(),\n AttributeSelector.any(),\n AttributeSelector.any(),\n AttributeSelector.any(),\n AttributeSelector.any(),\n AttributeSelector.any()))) {\n if (!seenPositions.contains(existing.getQueuePosition())) {\n // Delete this clone\n existing.evolve(null, time);\n updates.add(existing);\n }\n }\n }", "public void setMarketGroupId(Integer marketGroupId) {\n this.marketGroupId = marketGroupId;\n }", "public void MakeOldMessageList(){\n byte[] nb = new byte[]{1};\n ArrayList<Integer> Ids = catalogue.getmasID();\n ArrayList<byte[]> names = catalogue.getCNameMessages();\n for(int b = 0; b < Ids.size(); b++){\n OldMessagesIDs.add(0);\n }\n for(int b = 0; b < names.size(); b++){\n OldMessages.add(nb);\n }\n\n for(int b = 0; b < Ids.size(); b++){\n OldMessagesIDs.set(b,Ids.get(b));\n }\n for(int b = 0; b < names.size(); b++){\n OldMessages.set(b,names.get(b));\n }\n }", "public VendingMachine(){\n this.customerMoney = new ArrayList<>();\n this.bank = new ArrayList<>();\n this.stock = new ArrayList<>();\n stock.add(new Product(\"Cookie\", .50, 10));\n stock.add(new Product(\"Crackers\", .25, 10));\n stock.add(new Product(\"Candy\", .45, 10));\n stock.add(new Product(\"Water\", 1.0, 10));\n stock.add(new Product(\"Juice\", 1.5, 10));\n }", "public MarketHistoricalState() {\n\t\tthis(MarketHistoricalSnapshot.newBuilder());\n\t}", "public void setMarketDataProvider(MarketDataProvider marketDataProvider) {\r\n this.marketDataProvider = marketDataProvider;\r\n }", "void loadWeather() {\n\n // existing station's weather records are never updated.\n // why not?????\n\n// if (!\"\".equals(stationId) && !stationIgnore) {\n if (!stationExists && !weather.isNullRecord()) {\n\n if (!weatherIsLoaded) {\n\n // is there a weather record?\n// int count = weather.getRecCnt(\n// MrnWeather.STATION_ID + \"=\" + stationId);\n\n// if (count == 0) {\n\n // insert weather record\n weather.setStationId(stationId);\n if (dbg3) System.out.println(\"<br>loadWeather: put weather = \" + weather);\n try {\n weather.put();\n } catch(Exception e) {\n System.err.println(\"loadWeather: put weather = \" + weather);\n System.err.println(\"loadWeather: put sql = \" + weather.getInsStr());\n e.printStackTrace();\n } // try-catch\n\n weatherCount++;\n\n// } else {\n//\n// // update weather record\n// MrnWeather whereWeather = new MrnWeather(stationId);\n// whereWeather.upd(weather);\n//\n// } // if (weatherRecordCount == 0)\n//\n weatherIsLoaded = true;\n } // if (!weather.isNullRecord())\n\n } // if (!stationExists && !weather.isNullRecord())\n// } // if (!\"\".equals(stationId) && !stationIgnore)\n\n weather = new MrnWeather();\n\n }", "public void run() {\n String data;\n PrintStream toServer;\n Socket sock;\n String newblockchain;\n String fakeVerifiedBlock;\n\n System.out.println(\"Starting the Unverified Block Priority Queue Consumer thread.\\n\");\n try {\n while (true) { //take a block from the queue, work to verify the block and then multicast the new blockchain out\n data = queue.take(); \n System.out.println(\"Consumer got unverified: \" + data);\n BlockRecord blockdata = BlockProcessing.toXML(data, Blockchain.PID);\n \n //if our blockchain already contains this block ID, break\n if (Blockchain.blockchain.contains(blockdata.getABlockID())) {\n \tbreak;\n }\n \t\n // Real work here\n String winningHash = Work.doWork(data); //creatively named class and function :)\n blockchainSize++; //increment the size of the blockchain so we know what to put as blockNum field\n blockdata.setASHA256String(winningHash);\n blockdata.setABlockNum(Integer.toString(blockchainSize));\n \n //here we sign the SHA256String with our Private Key\n blockdata.setASignedSHA256(BlockProcessing.signData(winningHash.getBytes(), inputKeyPair.getPrivate()).toString());\n\n //convert the data back to a string\n data = blockdata.toString(blockdata);\n \n //exclude duplicate blocks\n if (Blockchain.blockchain.indexOf(data.substring(1, 20)) < 0) {\n \tBlockRecord verifiedBlock = new BlockRecord();\n verifiedBlock = BlockProcessing.toXMLForExistingRecord(data, Blockchain.PID);\n String realVerifiedBlock = \"[\" + verifiedBlock.toString(verifiedBlock) + \"]\";\n \n String tempblockchain = realVerifiedBlock + Blockchain.blockchain;\n \n for (int i = 0; i < Blockchain.numProcesses; i++) { //multicast the new blockchain to the rest of the group\n sock = new Socket(Blockchain.serverName, Ports.BlockchainServerPortBase + i);\n toServer = new PrintStream(sock.getOutputStream());\n toServer.println(tempblockchain);\n toServer.flush();\n sock.close();\n }\n }\n Thread.sleep(1500); //wait for the blockchain to be updated\n }\n } catch (Exception e) {\n System.out.println(e);\n }\n }", "public Chain(String name)\n\t{\n\t\tthis.name = name; \n\t\tcars = new HashSet<RollingStock>(); \n\t}", "public Market(ArrayList<G> goods, ArrayList<B> bidders) throws MarketCreationException{\n // Create immutable goods list.\n if(goods == null || goods.size() == 0){\n throw new MarketCreationException(\"A market must contain at least one good.\");\n }\n ImmutableList.Builder<G> goodsBuilder = ImmutableList.builder();\n goodsBuilder.addAll(goods);\n this.goods = goodsBuilder.build();\n // Sets bidders\n this.setBidders(bidders);\n }", "int insertSelective(SmsCleanBagLine record);", "public void setMarketDataProvider(MarketDataProvider marketDataProvider) {\n this.marketDataProvider = marketDataProvider;\n }", "@Override\r\n\tpublic int createMarket(MarketDto dto) {\n\t\treturn session.insert(\"kdc.market.createMarket\", dto);\r\n\t}", "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 }", "@Override\n\tprotected void updateRecord(String[] data) {\n\t\tCategory category = new Category();\n\t\tcategory.setId(new Integer(data[0]));\n\t\tcategory.setName(data[1]);\n\t\tcategory.setGameId(new Integer(data[2]));\n\t\tnew Categories().update(category);\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}", "int updateByPrimaryKey(Blacklist record);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry addNewDebts();", "public ChannelCodeInnerDetail(ChannelCodeInnerDetail source) {\n if (source.Id != null) {\n this.Id = new Long(source.Id);\n }\n if (source.Type != null) {\n this.Type = new Long(source.Type);\n }\n if (source.Source != null) {\n this.Source = new String(source.Source);\n }\n if (source.SourceName != null) {\n this.SourceName = new String(source.SourceName);\n }\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.UseUserIdList != null) {\n this.UseUserIdList = new Long[source.UseUserIdList.length];\n for (int i = 0; i < source.UseUserIdList.length; i++) {\n this.UseUserIdList[i] = new Long(source.UseUserIdList[i]);\n }\n }\n if (source.UseUserOpenIdList != null) {\n this.UseUserOpenIdList = new String[source.UseUserOpenIdList.length];\n for (int i = 0; i < source.UseUserOpenIdList.length; i++) {\n this.UseUserOpenIdList[i] = new String(source.UseUserOpenIdList[i]);\n }\n }\n if (source.TagList != null) {\n this.TagList = new WeComTagDetail[source.TagList.length];\n for (int i = 0; i < source.TagList.length; i++) {\n this.TagList[i] = new WeComTagDetail(source.TagList[i]);\n }\n }\n if (source.SkipVerify != null) {\n this.SkipVerify = new Long(source.SkipVerify);\n }\n if (source.Friends != null) {\n this.Friends = new Long(source.Friends);\n }\n if (source.Remark != null) {\n this.Remark = new String(source.Remark);\n }\n if (source.MsgId != null) {\n this.MsgId = new Long(source.MsgId);\n }\n if (source.ConfigId != null) {\n this.ConfigId = new String(source.ConfigId);\n }\n if (source.QrCodeUrl != null) {\n this.QrCodeUrl = new String(source.QrCodeUrl);\n }\n if (source.RecStatus != null) {\n this.RecStatus = new Long(source.RecStatus);\n }\n if (source.AppId != null) {\n this.AppId = new String(source.AppId);\n }\n }", "@Test\n public void testMarketOrder() throws InterruptedException {\n setUp();\n testMatchingEngine.start();\n\n NewOrder nosB1 = createLimitOrder(\"BUY1\", Side.BUY, 100, 100.1, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB1);\n NewOrder nosB2 = createLimitOrder(\"BUY2\", Side.BUY, 200, 99.99, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB2);\n NewOrder nosB3 = createLimitOrder(\"BUY3\", Side.BUY, 300, 99.79, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB3);\n\n // Sell Order with Qty=150 and Market Order\n NewOrder nosS1 = createMarketOrder(\"SELL1\", Side.SELL, 700, System.currentTimeMillis());\n clientSession.sendNewOrder(nosS1);\n\n List<Event> msg = clientSession.getMessagesInQueue();\n assertEquals(7, msg.size());\n\n Trade t = ( Trade) msg.get(0);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(1);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(2);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(3);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(4);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n t = ( Trade) msg.get(5);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n Canceled t1 = ( Canceled) msg.get(6);\n assertEquals( t1.getCanceledQty() , 100 );\n }", "public static void init() {\n \n if(stock==null){\n stock=Analyser.stock;\n //for each stock, it price and the time\n// stoc\n// String[] listedCompanies = new NSELoader(20).getAllStocks();\n// \n// for (int i =0; i < listedCompanies.length; i++) {\n// \n// String stockName = listedCompanies[i];\n// float price = 0;\n// int time = 0;\n// ArrayList<String> value = new ArrayList<>();\n// String data = time + \":\" + price;// ':' is used as boundary token\n// value.add(data);\n// stock.put(stockName, value);\n// }\n \n\n }\n }" ]
[ "0.61932486", "0.48877782", "0.47556296", "0.46926028", "0.46918768", "0.46757805", "0.46454337", "0.46426114", "0.46276474", "0.46250454", "0.46123174", "0.46025828", "0.45799717", "0.45310336", "0.45204943", "0.45120183", "0.4487318", "0.4480724", "0.4476881", "0.446925", "0.4464777", "0.444857", "0.44481263", "0.4404565", "0.4371693", "0.43704534", "0.43541175", "0.4352295", "0.4350529", "0.43477273", "0.4332935", "0.4332141", "0.43285674", "0.4314564", "0.4307738", "0.43065095", "0.42894632", "0.42668623", "0.42602995", "0.4253847", "0.42410046", "0.4231578", "0.42153522", "0.4210763", "0.42099878", "0.41987863", "0.4198057", "0.41908485", "0.41859704", "0.41810438", "0.41733426", "0.41665542", "0.41575718", "0.4152453", "0.41515997", "0.41484135", "0.41479355", "0.41462708", "0.4141384", "0.41386792", "0.4119058", "0.4115824", "0.41157264", "0.4113413", "0.41065514", "0.41029537", "0.41017374", "0.40843138", "0.408057", "0.40792", "0.4076537", "0.40644112", "0.40633887", "0.4062669", "0.40613937", "0.40593803", "0.40578106", "0.4055149", "0.40470576", "0.4043838", "0.40419233", "0.40394846", "0.40392867", "0.4036807", "0.40359938", "0.40326545", "0.40270582", "0.4024944", "0.40222138", "0.4019007", "0.40161198", "0.40160134", "0.40138918", "0.4012116", "0.40117377", "0.40066886", "0.4006229", "0.40008757", "0.40006232", "0.399971" ]
0.5818035
1
putMarketData() Private methods copy nonnull fields only from mc to market data pass me null if you want me to create a new market data creates a newMarket data record from mc then uses statuses in mc to decide if to copy data from the newMarket to the given market data if runner change has only one runner, update the other as a counter point if this mc is not for our sort of thing then return null
private MarketData copyFrom(MarketData marketData, Mc mc, long timeStamp) { //convert from rawdata to data format MarketData mcData = new MarketData(mc, timeStamp); if (mc.getId().contains(Test.FORENSIC)) { // Utils.prettilyPrint(mcData, null); } //get given null if market data is to be created if (marketData == null) { marketData = new MarketData(); } //if there is market definition, copy market definition if (mc.getMarketDefinition() != null && mc.getMarketDefinition().getMarketType() != null) { //one track mind and singles if (!mc.getMarketDefinition().getMarketType().equals("MATCH_ODDS") || mc.getMarketDefinition().getRunners().get(0).getName().contains("/")) { return null; } else { //check if going in play marketData.setId(mc.getId()); /* System.out.println("timestatus: " + Utils.millisToDateTime(timeStamp) + ": " + mcData.getStatus() + "/" + mc.getMarketDefinition().isInPlay()); */ if (marketData.getTime().equals("")) { if (mc.getMarketDefinition().isInPlay()) { marketData.setTime(Utils.millisToDateTime(timeStamp)); } } if (mcData.getName() != null) { marketData.setName(mcData.getName()); } if (mcData.getMarketType() != null) { marketData.setMarketType(mcData.getMarketType()); } if (mcData.getEventName() != null) { marketData.setEventName(mcData.getEventName()); } //if there is runners, update or create players if (mc.getMarketDefinition().getRunners() != null && mc.getMarketDefinition().getRunners().size() > 0) { for (Runners runner : mc.getMarketDefinition().getRunners()) { Player existingPlayer = marketData.getPlayers().get(runner.getId()); //update existing player if (existingPlayer != null) { if (runner.getName() != null) { existingPlayer.setName(runner.getName()); } if (runner.getStatus() != null) { existingPlayer.setStatus(runner.getStatus()); } } //create new player else { existingPlayer = new Player(runner); } //overwrite/create marketData.getPlayers().put(runner.getId(), existingPlayer); } } } } //if there is runner change (can occur with or without market definition) update players if (mc.getRc() != null && mc.getRc().size() > 0) { for (Rc rc : mc.getRc()) { //update player from runner Player existingPlayer = marketData.getPlayers().get(rc.getId()); if (existingPlayer != null) { existingPlayer.addNewTransaction(rc, timeStamp); } //create new player else { marketData.addNewPlayer(rc, timeStamp); } //a transaction for only one player is present so the other player needs a counter point if (mc.getRc().size() < 2 && marketData.getPlayers().size() > 1) { //check if other player exists yet for (Player otherPlayer : marketData.getPlayers().values()) { if (otherPlayer != null && existingPlayer != null) { if (!(otherPlayer.getId() == existingPlayer.getId())) { Transaction counterTransaction = new Transaction( otherPlayer.getId(), timeStamp, Utils.counterPoint(rc.getLtp()), true); marketData.getPlayers().get(otherPlayer.getId()).getTransactions().add(counterTransaction); } } } } } } //TODO: // - probably should store and check timestamps to only overwrite older updates. // - don't just add runner change, check if a previous update with same timestamp is already there and overwrite it return marketData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void putMarketData(RawData rawData) {\n\t\t\n\t\t//raw data can have multiple market change messages (must have at least one)\n\t\tif (rawData.getMc().size() < 1) {\n\t\t\tSystem.out.println(\"ERROR: no mc in \" + rawData.getOp() + \n\t\t\t\t\t\", pt = \" + rawData.getPt() + \n\t\t\t\t\t\", clk = \" + rawData.getClk());\n\t\t\tRuntime.getRuntime().halt(0);\n\t\t}\n\n\t\t//not all have marketDefinition but all have id, check it against blacklist\n\t\tfor (Mc mc : rawData.getMc()) {\n\t\t\tif (!nonMarketData.containsKey(mc.getId())) {\n\t\t\t\t\n\t\t\t\t//copy non-null fields to attributes\n\t\t\t\tMarketData newMarketData = copyFrom(marketData.get(mc.getId()), mc, rawData.getPt());\n\n\t\t\t\tif (mc.getId().contains(Test.FORENSIC)) {\n\t\t\t\t\tUtils.prettilyPrint(newMarketData, null);\n\t\t\t\t}\n\n\t\t\t\t//if not a market in which we are not interested in\n\t\t\t\tif (newMarketData != null) {\n\t\t\t\t\tmarketData.put(mc.getId(), newMarketData);\n\t\t\t\t} else {\n\t\t\t\t\tmarketData.remove(mc.getId());\n\t\t\t\t\tnonMarketData.put(mc.getId(), mc.getMarketDefinition().getMarketType());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic int updateMarket(MarketDto dto) {\n\t\treturn session.update(\"kdc.market.updateMarket\", dto);\r\n\t}", "public synchronized MarketDataDTO getMarketData() {\n\t\tPrice bestBuyPrice = getBuySide().topOfBookPrice();\n\t\tPrice bestSellPrice = getSellSide().topOfBookPrice();\n\t\tif (bestBuyPrice == null) bestBuyPrice = PriceFactory.makeLimitPrice(0);\n\t\tif (bestSellPrice == null) bestSellPrice = PriceFactory.makeLimitPrice(0);\n\t\tint bestBuyVolume = getBuySide().topOfBookVolume();\n\t\tint bestSellVolume = getSellSide().topOfBookVolume();\n\t\tMarketDataDTO marketData = new MarketDataDTO(getStock(), bestBuyPrice, bestBuyVolume, bestSellPrice, bestSellVolume);\n\t\treturn marketData;\n\t}", "public synchronized void updateCurrentMarket() throws InvalidDataException {\n\t\tPrice topBuyPrice = (getBuySide().topOfBookPrice() == null) ? PriceFactory.makeLimitPrice(0) : getBuySide().topOfBookPrice();\n\t\tPrice topSellPrice = (getSellSide().topOfBookPrice() == null) ? PriceFactory.makeLimitPrice(0) : getSellSide().topOfBookPrice();\n\n\t\tString data = topBuyPrice.toString() + getBuySide().topOfBookVolume()\n\t\t\t\t\t+ topSellPrice.toString() + getSellSide().topOfBookVolume();\n\t\tif (!getLatestMarketData().equals(data)) {\n\t\t\tMarketDataDTO latestData = new MarketDataDTO(getStock(), topBuyPrice, \n\t\t\t\t\tgetBuySide().topOfBookVolume(), topSellPrice, getSellSide().topOfBookVolume());\n\t\t\tCurrentMarketPublisher.getInstance().publishCurrentMarket(latestData);\n\t\t\tsetLatestMarketData(data);\n\t\t}\n\t}", "public Map<String, MarketData> getMarketData() {return marketData;}", "@Test\n public void testMarketTransaction ()\n {\n initializeService();\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(2), 0.5, -45.0);\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(3), 0.7, -43.0);\n assertEquals(0, accountingService.getPendingTariffTransactions().size(), \"no tariff tx\");\n List<BrokerTransaction> pending = accountingService.getPendingTransactions();\n assertEquals(2, pending.size(), \"correct number in list\");\n MarketTransaction mtx = (MarketTransaction)pending.get(0);\n assertNotNull(mtx, \"first mtx not null\");\n assertEquals(2, mtx.getTimeslot().getSerialNumber(), \"correct timeslot id 0\");\n assertEquals(-45.0, mtx.getPrice(), 1e-6, \"correct price id 0\");\n Broker b1 = mtx.getBroker();\n Broker b2 = brokerRepo.findById(bob.getId());\n assertEquals(b1, b2, \"same broker\");\n mtx = (MarketTransaction)pending.get(1);\n assertNotNull(mtx, \"second mtx not null\");\n assertEquals(0.7, mtx.getMWh(), 1e-6, \"correct quantity id 1\");\n // broker market positions should have been updated already\n MarketPosition mp2 = bob.findMarketPositionByTimeslot(2);\n assertNotNull(mp2, \"should be a market position in slot 2\");\n assertEquals(0.5, mp2.getOverallBalance(), 1e-6, \".5 mwh in ts2\");\n MarketPosition mp3 = bob.findMarketPositionByTimeslot(3);\n assertNotNull(mp3, \"should be a market position in slot 3\");\n assertEquals(0.7, mp3.getOverallBalance(), 1e-6, \".7 mwh in ts3\");\n }", "@Override\r\n\tpublic int createMarket(MarketDto dto) {\n\t\treturn session.insert(\"kdc.market.createMarket\", dto);\r\n\t}", "public void setMarket(RedMarket market) {\n this.market = market;\n }", "private void setMarket() {\n\t\tObject [][] data = new Object[players.length][5];\n\t\t\n\t\tfor(int i = 0; i<players.length; i++) {\n\t\t\tdata[i][0] = game.getLastName(players[i].getName());\n\t\t\tdata[i][1] = players[i].getPosition();\n\t\t\tdata[i][2] = players[i].getTeamName();\n\t\t\tdata[i][3] = players[i].getScore();\n\t\t\tdata[i][4] = players[i].getMarketValue();\n\t\t}\n\t\tString [] columnNames = {\"Name\", \"Position\", \"Team\", \"Points\", \"Cost\"};\n\t\tDefaultTableModel tableModel = new DefaultTableModel(data,columnNames);\n\t\ttableMarket.setModel(tableModel);\n\t}", "void updateMarketBoard(LightMarketBoard market);", "@Test\n public void testSaveWrongDataType() {\n final MarketDataSet dataSet = MarketDataSet.empty();\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"JPYUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), \"NaN\");\n final ToolContext toolContext = StarlingTestUtils.getToolContext(\"/inmemory/marketdata-test.properties\");\n final LocalDate today = LocalDate.now();\n final MarketDataManager marketDataManager = new MarketDataManager(toolContext);\n // saves the data\n marketDataManager.saveOrUpdate(dataSet, today);\n final HistoricalTimeSeriesSource source = toolContext.getHistoricalTimeSeriesSource();\n assertNull(source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"JPYUSD\").toBundle(), \n DataSource.DEFAULT.getName(), DataProvider.DEFAULT.getName(), MARKET_VALUE));\n }", "public void initMarket() {\n marketInfo = Constant.marketInfo.get(market.toLowerCase());\n try {\n getData();\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void setMarket(WebMarket market) {\r\n this.market = market;\r\n }", "public boolean addOrUpdateCapitalMarkets(CapitalMarketsModel companyDetails) {\n //Use the Cached Connection\n SQLiteDatabase db = getWritableDatabase();\n Boolean transactionSuccessful = false;\n\n //As usual Wrap it in a transaction\n db.beginTransaction();\n try {\n ContentValues values = new ContentValues();\n values.put(KEY_COMPANY_OBJECT_ID, companyDetails.getCompanyObjectId());\n values.put(KEY_COMPANY_NAME, companyDetails.getCompanyName());\n values.put(KEY_COMPANY_IMAGE, companyDetails.getCompanyImage());\n values.put(KEY_COMPANY_ADDRESS, companyDetails.getCompanyAddress());\n values.put(KEY_COMPANY_STOCK_CODE, companyDetails.getCompanyStockCode());\n values.put(KEY_COMPANY_DESCRIPTION, companyDetails.getCompanyDescription());\n values.put(KEY_COMPANY_ESTABLISHED, companyDetails.getCompanyEstablished());\n values.put(KEY_COMPANY_CONTACTS, companyDetails.getCompanyContacts());\n values.put(KEY_COMPANY_INDUSTRY, companyDetails.getCompanyType());\n values.put(KEY_COMPANY_WEBSITE, companyDetails.getCompanyWebsite());\n values.put(KEY_COMPANY_STATUS, companyDetails.getCompanyStatus());\n values.put(KEY_COMPANY_SUMMARY, companyDetails.getCompanySummary());\n //Let's try to update the Saved Product if it exists.\n int rows = db.update(TABLE_BANKS, values, KEY_COMPANY_OBJECT_ID + \"= ?\", new String[]{companyDetails.getCompanyObjectId()});\n\n //Let's check if the update worked\n if (rows == 1) {\n //Ok, we have updated a Saved COMPANY, we could probably get the COMPANY updated at this point if we needed to\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n\n } else {\n //No Such Bank Here, insert it\n db.insertOrThrow(TABLE_CAPITAL_MARKETS, null, values);\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error trying to Update company table\");\n transactionSuccessful = false;\n } finally {\n db.endTransaction();\n }\n return transactionSuccessful;\n\n }", "public void setMarketDataProvider(MarketDataProvider marketDataProvider) {\r\n this.marketDataProvider = marketDataProvider;\r\n }", "public void setMarket(String market) {\r\n this.market = market == null ? null : market.trim();\r\n }", "private static MarketDataSet createTestMarketData() {\n final MarketDataSet dataSet = MarketDataSet.empty();\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"AUDUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 1.8);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"NZDUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 2.2);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"GBPUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 1.5);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"GBP1Y\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)),\n ImmutableLocalDateDoubleTimeSeries.builder()\n .putAll(new LocalDate[] {LocalDate.of(2016, 1, 1), LocalDate.of(2016, 1, 2)}, new double[] {0.01, 0.02}).build());\n return dataSet;\n }", "public void setMarketDataProvider(MarketDataProvider marketDataProvider) {\n this.marketDataProvider = marketDataProvider;\n }", "public Object copy_from(Object src) {\n\n MarketRun typedSrc = (MarketRun) src;\n MarketRun typedDst = this;\n\n typedDst.executionType = (org.openfmb.model.dds.rti.market.ExecutionTypeKind) typedDst.executionType.copy_from(typedSrc.executionType);\n typedDst.marketEndTime = typedSrc.marketEndTime;\n typedDst.marketID = typedSrc.marketID;\n typedDst.marketRunID = typedSrc.marketRunID;\n typedDst.marketStartTime = typedSrc.marketStartTime;\n typedDst.marketType = (org.openfmb.model.dds.rti.market.MarketTypeKind) typedDst.marketType.copy_from(typedSrc.marketType);\n\n return this;\n }", "public void setMarketId(String marketId) {\n this.marketId = marketId;\n }", "private void restoreInformationOfMarket() throws IOException, InterruptedException {\n\n Gson gson=Market.gsonForEveryoneMArket();\n\n Marble[] list;\n try {\n list = gson.fromJson(new FileReader(\"fileConfiguration/Market.json\"),Marble[].class);\n market= new Market(list);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "@Test\n public void testSaveOrUpdate() {\n // note these configurations should be used as time series are actually stored and retrieved from the source\n final ToolContext toolContext = StarlingTestUtils.getToolContext(\"/inmemory/marketdata-test.properties\");\n final LocalDate today = LocalDate.now();\n final MarketDataManager marketDataManager = new MarketDataManager(toolContext);\n // saves the data\n marketDataManager.saveOrUpdate(createTestMarketData(), today);\n final HistoricalTimeSeriesSource source = toolContext.getHistoricalTimeSeriesSource();\n HistoricalTimeSeries historicalTimeSeries1 = \n source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"AUDUSD\").toBundle(), DataSource.DEFAULT.getName(), \n DataProvider.DEFAULT.getName(), MARKET_VALUE);\n LocalDateDoubleTimeSeries timeSeries1 = historicalTimeSeries1.getTimeSeries();\n assertEquals(timeSeries1.size(), 1);\n assertEquals(timeSeries1.getValue(today), 1.8);\n HistoricalTimeSeries historicalTimeSeries2 = \n source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"NZDUSD\").toBundle(), DataSource.DEFAULT.getName(), \n DataProvider.DEFAULT.getName(), MARKET_VALUE);\n LocalDateDoubleTimeSeries timeSeries2 = historicalTimeSeries2.getTimeSeries();\n assertEquals(timeSeries2.size(), 1);\n assertEquals(timeSeries2.getValue(today), 2.2);\n HistoricalTimeSeries historicalTimeSeries3 = source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"GBPUSD\").toBundle(), \n DataSource.DEFAULT.getName(), DataProvider.DEFAULT.getName(), MARKET_VALUE);\n LocalDateDoubleTimeSeries timeSeries3 = historicalTimeSeries3.getTimeSeries();\n assertEquals(timeSeries3.size(), 1);\n assertEquals(timeSeries3.getValue(today), 1.5);\n HistoricalTimeSeries historicalTimeSeries4 = source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"GBP1Y\").toBundle(), \n DataSource.DEFAULT.getName(), DataProvider.DEFAULT.getName(), MARKET_VALUE);\n LocalDateDoubleTimeSeries timeSeries4 = historicalTimeSeries4.getTimeSeries();\n assertEquals(timeSeries4.size(), 2);\n assertEquals(timeSeries4.getValue(LocalDate.of(2016, 1, 1)), 0.01);\n assertEquals(timeSeries4.getValue(LocalDate.of(2016, 1, 2)), 0.02);\n // updates the data for some of the series\n final MarketDataSet updatedData = MarketDataSet.empty();\n updatedData.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"AUDUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 1.9);\n updatedData.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"GBP1Y\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)),\n ImmutableLocalDateDoubleTimeSeries.builder().putAll(new LocalDate[] {LocalDate.of(2016, 1, 1), LocalDate.of(2016, 1, 2)}, \n new double[] {0.01, 0.03}).build());\n marketDataManager.saveOrUpdate(updatedData, today);\n historicalTimeSeries1 = source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"AUDUSD\").toBundle(), DataSource.DEFAULT.getName(), \n DataProvider.DEFAULT.getName(), MARKET_VALUE);\n timeSeries1 = historicalTimeSeries1.getTimeSeries();\n assertEquals(timeSeries1.size(), 1);\n assertEquals(timeSeries1.getValue(today), 1.9);\n historicalTimeSeries2 = source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"NZDUSD\").toBundle(), DataSource.DEFAULT.getName(), \n DataProvider.DEFAULT.getName(), MARKET_VALUE);\n timeSeries2 = historicalTimeSeries2.getTimeSeries();\n assertEquals(timeSeries2.size(), 1);\n assertEquals(timeSeries2.getValue(today), 2.2);\n historicalTimeSeries3 = source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"GBPUSD\").toBundle(), DataSource.DEFAULT.getName(), \n DataProvider.DEFAULT.getName(), MARKET_VALUE);\n timeSeries3 = historicalTimeSeries3.getTimeSeries();\n assertEquals(timeSeries3.size(), 1);\n assertEquals(timeSeries3.getValue(today), 1.5);\n historicalTimeSeries4 = source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"GBP1Y\").toBundle(), DataSource.DEFAULT.getName(), \n DataProvider.DEFAULT.getName(), MARKET_VALUE);\n timeSeries4 = historicalTimeSeries4.getTimeSeries();\n assertEquals(timeSeries4.size(), 2);\n assertEquals(timeSeries4.getValue(LocalDate.of(2016, 1, 1)), 0.01);\n assertEquals(timeSeries4.getValue(LocalDate.of(2016, 1, 2)), 0.03);\n }", "public void syncToDataStore(String exchangeCode, Collection<MarketData> items);", "public void setMarketId(String marketId) {\n this.marketId = marketId;\n }", "@Override\n\tpublic void update(MarketSpreadManagerDo marketSpreadManagerDo) {\n\t\tMarketSpreadManager marketSpreadManager = new MarketSpreadManager();\n\t\tBeanUtils.copyProperties(marketSpreadManagerDo,marketSpreadManager);\n\t\tmarketSpreadManagerExtendMapper.updateByPrimaryKeyWithBLOBs(marketSpreadManager);\n\t}", "private void mSaveBillData(int TenderType) { // TenderType:\r\n // 1=PayCash\r\n // 2=PayBill\r\n\r\n // Insert all bill items to database\r\n InsertBillItems();\r\n\r\n // Insert bill details to database\r\n InsertBillDetail(TenderType);\r\n\r\n updateMeteringData();\r\n\r\n /*if (isPrintBill) {\r\n // Print bill\r\n PrintBill();\r\n }*/\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 run() {\n final EMVData emvData1 = emvDataCache.get(transactionId);\n if (emvData1 != null) {\n emvDataCache.remove(transactionId);\n // get transaction from poynt service first\n try {\n getTransaction(transactionId, requestId, new IPoyntTransactionServiceListener.Stub() {\n @Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n // update in converge\n // let's create an AdjustTransactionRequest so we don't need to create multiple variations\n // of this method\n AdjustTransactionRequest adjustTransactionRequest = new AdjustTransactionRequest();\n adjustTransactionRequest.setEmvData(emvData1);\n\n final ElavonTransactionRequest request = convergeMapper.getTransactionUpdateRequest(\n transaction.getFundingSource().getEntryDetails(),\n transaction.getProcessorResponse().getRetrievalRefNum(),\n adjustTransactionRequest);\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n if (elavonResponse.isSuccess()) {\n Log.d(TAG, \"Successfully Captured EMV Data for: \" + transaction.getId());\n } else {\n Log.e(TAG, \"Failed to capture EMV Data for: \" + transaction.getId());\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n Log.e(TAG, \"Failed to capture EMV Data for: \" + transaction.getId());\n }\n });\n }\n\n @Override\n public void onLoginRequired() throws RemoteException {\n Log.e(TAG, \"Failed to get transaction:\" + transactionId);\n }\n\n @Override\n public void onLaunchActivity(final Intent intent, final String s) throws RemoteException {\n Log.e(TAG, \"Failed to get transaction:\" + transactionId);\n }\n });\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n } else {\n Log.d(TAG, \"EMVData already captured for :\" + transactionId);\n }\n }", "private static void clubTecSync(Connection con, InputStreamReader isr, String club) {\n\n PreparedStatement pstmt2 = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n int inact = 0;\n int pri_indicator = 0;\n\n // Values from MFirst records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String mNum = \"\";\n String u_hndcp = \"\";\n String c_hndcp = \"\";\n String mship = \"\";\n String mtype = \"\";\n String msub_type = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String phone3 = \"\";\n String mobile = \"\";\n String primary = \"\";\n String webid = \"\";\n String custom1 = \"\";\n String custom2 = \"\";\n String custom3 = \"\";\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n\n // Values from ForeTees records\n //\n String fname_old = \"\";\n String lname_old = \"\";\n String mi_old = \"\";\n String mship_old = \"\";\n String mtype_old = \"\";\n String email_old = \"\";\n String mNum_old = \"\";\n String ghin_old = \"\";\n String bag_old = \"\";\n String posid_old = \"\";\n String email2_old = \"\";\n String phone_old = \"\";\n String phone2_old = \"\";\n String suffix_old = \"\";\n String msub_type_old = \"\";\n\n float u_hcap_old = 0;\n float c_hcap_old = 0;\n int birth_old = 0;\n\n // Values for New ForeTees records\n //\n String memid_new = \"\";\n String webid_new = \"\";\n String fname_new = \"\";\n String lname_new = \"\";\n String mi_new = \"\";\n String mship_new = \"\";\n String mtype_new = \"\";\n String email_new = \"\";\n String mNum_new = \"\";\n String ghin_new = \"\";\n String bag_new = \"\";\n String posid_new = \"\";\n String email2_new = \"\";\n String phone_new = \"\";\n String phone2_new = \"\";\n String suffix_new = \"\";\n String msub_type_new = \"\";\n String dupuser = \"\";\n String dupwebid = \"\";\n String dupmnum = \"\";\n\n float u_hcap_new = 0;\n float c_hcap_new = 0;\n int birth_new = 0;\n int errCount = 0;\n int warnCount = 0;\n int totalErrCount = 0;\n int totalWarnCount = 0;\n int email_bounce1 = 0;\n int email_bounce2 = 0;\n\n String errorMsg = \"\";\n String errMemInfo = \"\";\n String errMsg = \"\";\n String warnMsg = \"\";\n\n ArrayList<String> errList = new ArrayList<String>();\n ArrayList<String> warnList = new ArrayList<String>();\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean found = false;\n boolean genderMissing = false;\n boolean useWebid = false;\n boolean useWebidQuery = false;\n boolean headerFound = false;\n\n\n // Overwrite log file with fresh one for today's logs\n SystemUtils.logErrorToFile(\"ClubTec: Error log for \" + club + \"\\nStart time: \" + new java.util.Date().toString() + \"\\n\", club, false);\n\n try {\n\n Calendar caly = new GregorianCalendar(); // get todays date\n int thisYear = caly.get(Calendar.YEAR); // get this year value\n\n thisYear = thisYear - 2000;\n\n BufferedReader bfrin = new BufferedReader(isr);\n line = new String();\n\n // format of each line in the file:\n //\n // memid, mNum, fname, mi, lname, suffix, mship, mtype, gender, email, email2,\n // phone, phone2, bag, hndcp#, uhndcp, chndcp, birth, posid, mobile, primary\n //\n //\n while ((line = bfrin.readLine()) != null) { // get one line of text\n\n\n // Skip the 1st row (header row)\n\n if (headerFound == false) {\n\n headerFound = true;\n\n } else {\n\n // Remove the dbl quotes and check for embedded commas\n line = cleanRecord4( line );\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() >= 32 ) { // enough data ?\n\n // Gather data from input (* indicates field is used)\n mNum = tok.nextToken(); // Col A*\n fname = tok.nextToken(); // Col B*\n lname = tok.nextToken(); // Col C*\n suffix = tok.nextToken(); // Col D*\n primary = tok.nextToken(); // Col E*\n tok.nextToken(); // Col F\n mship = tok.nextToken(); // Col G*\n tok.nextToken(); // Col H\n tok.nextToken(); // Col I\n tok.nextToken(); // Col J\n tok.nextToken(); // Col K\n tok.nextToken(); // Col L\n tok.nextToken(); // Col M\n tok.nextToken(); // Col N\n phone = tok.nextToken(); // Col O*\n email = tok.nextToken(); // Col P*\n tok.nextToken(); // Col Q\n tok.nextToken(); // Col R\n tok.nextToken(); // Col S\n tok.nextToken(); // Col T\n tok.nextToken(); // Col U\n tok.nextToken(); // Col V\n tok.nextToken(); // Col W\n phone2 = tok.nextToken(); // Col X*\n email2 = tok.nextToken(); // Col Y*\n phone3 = tok.nextToken(); // Col Z*\n tok.nextToken(); // Col AA\n mi = tok.nextToken(); // Col AB*\n gender = tok.nextToken(); // Col AC*\n temp = tok.nextToken(); // Col AD*\n // AE and AF are skipped\n\n\n //\n // Check for ? (not provided)\n //\n if (webid.equals(\"?\")) webid = \"\";\n if (memid.equals(\"?\")) memid = \"\";\n if (mNum.equals(\"?\")) mNum = \"\";\n if (primary.equals(\"?\")) primary = \"\";\n if (fname.equals(\"?\")) fname = \"\";\n if (mi.equals(\"?\")) mi = \"\";\n if (lname.equals(\"?\")) lname = \"\";\n if (suffix.equals(\"?\")) suffix = \"\";\n if (mship.equals(\"?\")) mship = \"\";\n if (email.equals(\"?\")) email = \"\";\n if (email2.equals(\"?\")) email2 = \"\";\n if (phone.equals(\"?\")) phone = \"\";\n if (phone2.equals(\"?\")) phone2 = \"\";\n if (phone3.equals(\"?\")) phone3 = \"\";\n if (temp.equals(\"?\")) temp = \"\";\n\n if (gender.equals( \"?\" ) || (!gender.equalsIgnoreCase(\"M\") && !gender.equalsIgnoreCase(\"F\"))) {\n\n if (gender.equals( \"?\" )) {\n genderMissing = true;\n } else {\n genderMissing = false;\n }\n gender = \"\";\n }\n\n // trim gender in case followed be spaces\n gender = gender.trim();\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!mNum.equals( \"\" ) && !lname.equals( \"\" ) && !fname.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 && mi.equals( \"\" )) {\n\n mi = tok.nextToken();\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n lname = tok.nextToken(); // remove suffix and spaces\n\n if (!suffix.equals( \"\" ) && tok.countTokens() > 0 && club.equals(\"pradera\")) { // Pradera - if suffix AND 2-part lname, use both\n\n String lpart2 = tok.nextToken();\n\n lname = lname + \"_\" + lpart2; // combine them (i.e. Van Ess = Van_Ess)\n\n } else {\n\n if (suffix.equals( \"\" ) && tok.countTokens() > 0) { // if suffix not provided\n\n suffix = tok.nextToken();\n }\n }\n\n //\n // Make sure name is titled (most are already)\n //\n /*\n fname = toTitleCase(fname);\n lname = toTitleCase(lname);\n */\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n lname = lname + \"_\" + suffix; // append suffix to last name\n }\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n if (!u_hndcp.equals( \"\" ) && !u_hndcp.equalsIgnoreCase(\"NH\") && !u_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n u_hndcp = u_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n u_hndcp = u_hndcp.replace('H', ' '); // or 'H' if present\n u_hndcp = u_hndcp.replace('N', ' '); // or 'N' if present\n u_hndcp = u_hndcp.replace('J', ' '); // or 'J' if present\n u_hndcp = u_hndcp.replace('R', ' '); // or 'R' if present\n u_hndcp = u_hndcp.trim();\n\n u_hcap = Float.parseFloat(u_hndcp); // usga handicap\n\n if ((!u_hndcp.startsWith(\"+\")) && (!u_hndcp.startsWith(\"-\"))) {\n\n u_hcap = 0 - u_hcap; // make it a negative hndcp (normal)\n }\n }\n\n if (!c_hndcp.equals( \"\" ) && !c_hndcp.equalsIgnoreCase(\"NH\") && !c_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n c_hndcp = c_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n c_hndcp = c_hndcp.replace('H', ' '); // or 'H' if present\n c_hndcp = c_hndcp.replace('N', ' '); // or 'N' if present\n c_hndcp = c_hndcp.replace('J', ' '); // or 'J' if present\n c_hndcp = c_hndcp.replace('R', ' '); // or 'R' if present\n c_hndcp = c_hndcp.trim();\n\n c_hcap = Float.parseFloat(c_hndcp); // usga handicap\n\n if ((!c_hndcp.startsWith(\"+\")) && (!c_hndcp.startsWith(\"-\"))) {\n\n c_hcap = 0 - c_hcap; // make it a negative hndcp (normal)\n }\n }\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n // if phone #2 is empty then assign phone #3 to it\n if (phone2.equals(\"\")) phone2 = phone3;\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n\n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n //\n // convert birth date (mm/dd/yyyy to yyyymmdd)\n //\n if (!temp.equals( \"\" )) {\n\n int mm = 0;\n int dd = 0;\n int yy = 0;\n\n tok = new StringTokenizer( temp, \"/-\" ); // delimiters are / & -\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n mm = Integer.parseInt(b1);\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else { // try 'Jan 20, 1951' format\n\n tok = new StringTokenizer( temp, \", \" ); // delimiters are comma and space\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n if (b1.startsWith( \"Jan\" )) {\n mm = 1;\n } else {\n if (b1.startsWith( \"Feb\" )) {\n mm = 2;\n } else {\n if (b1.startsWith( \"Mar\" )) {\n mm = 3;\n } else {\n if (b1.startsWith( \"Apr\" )) {\n mm = 4;\n } else {\n if (b1.startsWith( \"May\" )) {\n mm = 5;\n } else {\n if (b1.startsWith( \"Jun\" )) {\n mm = 6;\n } else {\n if (b1.startsWith( \"Jul\" )) {\n mm = 7;\n } else {\n if (b1.startsWith( \"Aug\" )) {\n mm = 8;\n } else {\n if (b1.startsWith( \"Sep\" )) {\n mm = 9;\n } else {\n if (b1.startsWith( \"Oct\" )) {\n mm = 10;\n } else {\n if (b1.startsWith( \"Nov\" )) {\n mm = 11;\n } else {\n if (b1.startsWith( \"Dec\" )) {\n mm = 12;\n } else {\n mm = Integer.parseInt(b1);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else {\n\n birth = 0;\n }\n }\n\n if (mm > 0) { // if birth provided\n\n if (mm == 1 && dd == 1 && yy == 1) { // skip if 1/1/0001\n\n birth = 0;\n\n } else {\n\n if (yy < 100) { // if 2 digit year\n\n if (yy <= thisYear) {\n\n yy += 2000; // 20xx\n\n } else {\n\n yy += 1900; // 19xx\n }\n }\n\n birth = (yy * 10000) + (mm * 100) + dd; // yyyymmdd\n\n if (yy < 1900) { // check for invalid date\n\n birth = 0;\n }\n }\n\n } else {\n\n birth = 0;\n }\n\n } else {\n\n birth = 0;\n }\n\n\n skip = false;\n errCount = 0; // reset error count\n warnCount = 0; // reset warning count\n errMsg = \"\"; // reset error message\n warnMsg = \"\"; // reset warning message\n errMemInfo = \"\"; // reset error member info\n found = false; // init club found\n\n\n //\n // Format member info for use in error logging before club-specific manipulation\n //\n errMemInfo = \"Member Details:\\n\" +\n \" name: \" + lname + \", \" + fname + \" \" + mi + \"\\n\" +\n \" mtype: \" + mtype + \" mship: \" + mship + \"\\n\" +\n \" memid: \" + memid + \" mNum: \" + mNum + \" gender: \" + gender;\n\n // if gender is incorrect or missing, flag a warning in the error log\n if (gender.equals(\"\")) {\n\n // report only if not a club that uses blank gender fields (set to true for now, change if club's want other options down the line)\n if (true) {\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'M')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'M')\";\n }\n\n gender = \"M\";\n\n } else if (false) { // default to female instead (left in for future clubs)\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'F')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'F)\";\n }\n\n gender = \"F\";\n\n } else if (false) { // skip anyone missing gender (left in for future clubs)\n\n errCount++;\n skip = true;\n if (genderMissing) {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER missing!\";\n } else {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER incorrect!\";\n }\n }\n }\n\n //\n // Skip entries with first/last names of 'admin'\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -INVALID NAME! 'Admin' or 'admin' not allowed for first or last name\";\n }\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n\n //******************************************************************\n // Rolling Hills CC - CO - rhillscc\n //******************************************************************\n //\n if (club.equals(\"rhillscc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n StringTokenizer temptok = new StringTokenizer(mNum, \"-\");\n\n if (temptok.countTokens() > 1) {\n mNum = temptok.nextToken();\n }\n\n if (mship.contains(\"social\") || mship.contains(\"Social\")) {\n mship = \"Social\";\n } else if (mship.contains(\"absentee\") || mship.contains(\"Absentee\")) {\n mship = \"Absentee\";\n } else {\n mship = \"Golf\";\n }\n\n if (memid.endsWith(\"-000\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (memid.endsWith(\"-001\")) {\n\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Secondary Male\";\n } else {\n mtype = \"Secondary Female\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n }\n } // end if rhillscc\n\n\n //******************************************************************\n // All clubs\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\") && !memid.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n fname_old = \"\";\n lname_old = \"\";\n mi_old = \"\";\n mship_old = \"\";\n mtype_old = \"\";\n email_old = \"\";\n mNum_old = \"\";\n ghin_old = \"\";\n bag_old = \"\";\n posid_old = \"\";\n email2_old = \"\";\n phone_old = \"\";\n phone2_old = \"\";\n suffix_old = \"\";\n u_hcap_old = 0;\n c_hcap_old = 0;\n birth_old = 0;\n msub_type_old = \"\";\n email_bounce1 = 0;\n email_bounce2 = 0;\n\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!phone2.equals( \"\" )) {\n\n phone2 = truncate(phone2, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n if (!webid.equals( \"\" )) {\n\n webid = truncate(webid, 15);\n }\n if (!msub_type.equals( \"\" )) {\n\n msub_type = truncate(msub_type, 30);\n }\n\n //\n // Set Gender and Primary values\n //\n if (!gender.equalsIgnoreCase( \"M\" ) && !gender.equalsIgnoreCase( \"F\" )) {\n\n gender = \"\";\n }\n\n pri_indicator = 0; // default = Primary\n\n if (primary.equalsIgnoreCase( \"S\" )) { // Spouse\n\n pri_indicator = 1;\n }\n if (primary.equalsIgnoreCase( \"D\" )) { // Dependent\n\n pri_indicator = 2;\n }\n\n\n //\n // See if a member already exists with this id (username or webid)\n //\n // **** NOTE: memid and webid MUST be set to their proper values before we get here!!!!!!!!!!!!!!!\n //\n //\n // 4/07/2010\n // We now use 2 booleans to indicate what to do with the webid field.\n // useWebid is the original boolean that was used to indicate that we should use the webid to identify the member.\n // We lost track of when this flag was used and why. It was no longer used to indicate the webid should be\n // used in the query, so we don't know what its real purpose is. We don't want to disrupt any clubs that are\n // using it, so we created a new boolean for the query.\n // useWebidQuery is the new flag to indicate that we should use the webid when searching for the member. You should use\n // both flags if you want to use this one.\n //\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // yes, set new ids\n memid_new = \"\";\n\n } else { // DO NOT use webid\n\n webid_new = \"\"; // set new ids\n memid_new = memid;\n }\n\n if (useWebidQuery == false) {\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n\n } else { // use the webid field\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE webid = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, webid); // put the parm in stmt\n }\n\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n memid = rs.getString(\"username\"); // get username in case we used webid (use this for existing members)\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n\n if (useWebid == true) { // use webid to locate member?\n memid_new = memid; // yes, get this username\n } else {\n webid_new = rs.getString(\"webid\"); // no, get current webid\n }\n }\n pstmt2.close(); // close the stmt\n\n\n //\n // If member NOT found, then check if new member OR id has changed\n //\n boolean memFound = false;\n boolean dup = false;\n boolean userChanged = false;\n boolean nameChanged = false;\n String dupmship = \"\";\n\n if (fname_old.equals( \"\" )) { // if member NOT found\n\n //\n // New member - first check if name already exists\n //\n pstmt2 = con.prepareStatement (\n \"SELECT username, m_ship, memNum, webid FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) { // Allow duplicate names for Long Cove for members owning two properties at once\n\n dupuser = rs.getString(\"username\"); // get this username\n dupmship = rs.getString(\"m_ship\");\n dupmnum = rs.getString(\"memNum\");\n dupwebid = rs.getString(\"webid\"); // get this webid\n\n //\n // name already exists - see if this is the same member\n //\n if ((!dupmnum.equals( \"\" ) && dupmnum.equals( mNum )) || club.equals(\"imperialgc\")) { // if name and mNum match, then memid or webid must have changed\n\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // set new ids\n memid_new = dupuser;\n memid = dupuser; // update this record\n\n } else {\n\n webid_new = dupwebid; // set new ids\n memid_new = memid;\n memid = dupuser; // update this record\n userChanged = true; // indicate the username has changed\n }\n\n memFound = true; // update the member\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n }\n\n } else {\n dup = true; // dup member - do not add\n }\n\n }\n pstmt2.close(); // close the stmt\n\n } else { // member found\n memFound = true;\n }\n\n //\n // Now, update the member record if existing member\n //\n if (memFound == true) { // if member exists\n\n changed = false; // init change indicator\n\n lname_new = lname_old;\n\n // do not change lname for Saucon Valley if lname_old ends with '_*'\n if (!lname.equals( \"\" ) && !lname_old.equals( lname )) {\n\n lname_new = lname; // set value from ClubTec record\n changed = true;\n nameChanged = true;\n }\n\n fname_new = fname_old;\n\n if (!fname.equals( \"\" ) && !fname_old.equals( fname )) {\n\n fname_new = fname; // set value from ClubTec record\n changed = true;\n nameChanged = true;\n }\n\n mi_new = mi_old;\n\n if (!mi_old.equals( mi )) {\n\n mi_new = mi; // set value from ClubTec record\n changed = true;\n nameChanged = true;\n }\n\n mship_new = mship_old;\n\n if (!mship.equals( \"\" ) && !mship_old.equals( mship )) {\n\n mship_new = mship; // set value from ClubTec record\n changed = true;\n }\n\n mtype_new = mtype_old;\n\n if (!mtype.equals( \"\" ) && !mtype_old.equals( mtype )) {\n\n mtype_new = mtype; // set value from ClubTec record\n changed = true;\n }\n\n mNum_new = mNum_old;\n\n if (!mNum.equals( \"\" ) && !mNum_old.equals( mNum )) {\n\n mNum_new = mNum; // set value from ClubTec record\n changed = true;\n }\n\n ghin_new = ghin_old;\n\n if (!ghin.equals( \"\" ) && !ghin_old.equals( ghin )) {\n\n ghin_new = ghin; // set value from ClubTec record\n changed = true;\n }\n\n bag_new = bag_old;\n\n if (!bag.equals( \"\" ) && !bag_old.equals( bag )) {\n\n bag_new = bag; // set value from ClubTec record\n changed = true;\n }\n\n posid_new = posid_old;\n\n if (!posid.equals( \"\" ) && !posid_old.equals( posid )) {\n\n posid_new = posid; // set value from ClubTec record\n changed = true;\n }\n\n email_new = email_old;\n\n if (!email_old.equals( email )) { // if MF's email changed or was removed\n\n email_new = email; // set value from ClubTec record\n changed = true;\n email_bounce1 = 0; // reset bounced flag\n }\n\n email2_new = email2_old;\n\n if (!email2_old.equals( email2 )) { // if MF's email changed or was removed\n\n email2_new = email2; // set value from ClubTec record\n changed = true;\n email_bounce2 = 0; // reset bounced flag\n }\n\n phone_new = phone_old;\n\n if (!phone.equals( \"\" ) && !phone_old.equals( phone )) {\n\n phone_new = phone; // set value from ClubTec record\n changed = true;\n }\n\n phone2_new = phone2_old;\n\n if (!phone2.equals( \"\" ) && !phone2_old.equals( phone2 )) {\n\n phone2_new = phone2; // set value from ClubTec record\n changed = true;\n }\n\n suffix_new = suffix_old;\n\n if (!suffix.equals( \"\" ) && !suffix_old.equals( suffix )) {\n\n suffix_new = suffix; // set value from ClubTec record\n changed = true;\n }\n\n birth_new = birth_old;\n\n if (birth > 0 && birth != birth_old) {\n\n birth_new = birth; // set value from ClubTec record\n changed = true;\n }\n\n if (!mobile.equals( \"\" )) { // if mobile phone provided\n\n if (phone_new.equals( \"\" )) { // if phone1 is empty\n\n phone_new = mobile; // use mobile number\n changed = true;\n\n } else {\n\n if (phone2_new.equals( \"\" )) { // if phone2 is empty\n\n phone2_new = mobile; // use mobile number\n changed = true;\n }\n }\n }\n\n msub_type_new = msub_type_old;\n\n if (!msub_type.equals( \"\" ) && !msub_type_old.equals( msub_type )) {\n\n msub_type_new = msub_type; // set value from ClubTec record\n changed = true;\n }\n\n // don't allow both emails to be the same\n if (email_new.equalsIgnoreCase(email2_new)) email2_new = \"\";\n\n //\n // Update our record (always now to set the last_sync_date)\n //\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET username = ?, name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, ghin = ?, bag = ?, birth = ?, posid = ?, msub_type = ?, email2 = ?, phone1 = ?, \" +\n \"phone2 = ?, name_suf = ?, webid = ?, inact = 0, last_sync_date = now(), gender = ?, pri_indicator = ?, \" +\n \"email_bounced = ?, email2_bounced = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid_new);\n pstmt2.setString(2, lname_new);\n pstmt2.setString(3, fname_new);\n pstmt2.setString(4, mi_new);\n pstmt2.setString(5, mship_new);\n pstmt2.setString(6, mtype_new);\n pstmt2.setString(7, email_new);\n pstmt2.setString(8, mNum_new);\n pstmt2.setString(9, ghin_new);\n pstmt2.setString(10, bag_new);\n pstmt2.setInt(11, birth_new);\n pstmt2.setString(12, posid_new);\n pstmt2.setString(13, msub_type_new);\n pstmt2.setString(14, email2_new);\n pstmt2.setString(15, phone_new);\n pstmt2.setString(16, phone2_new);\n pstmt2.setString(17, suffix_new);\n pstmt2.setString(18, webid_new);\n pstmt2.setString(19, gender);\n pstmt2.setInt(20, pri_indicator);\n pstmt2.setInt(21, email_bounce1);\n pstmt2.setInt(22, email_bounce2);\n\n pstmt2.setString(23, memid);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n\n } else { // member NOT found - add it if we can\n\n if (dup == false) { // if not duplicate member\n\n //\n // New member is ok - add it\n //\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, webid, \" +\n \"last_sync_date, gender, pri_indicator) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,?,?,?,?,'',?,?, now(),?,?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, msub_type);\n pstmt2.setString(17, email2);\n pstmt2.setString(18, phone);\n pstmt2.setString(19, phone2);\n pstmt2.setString(20, suffix);\n pstmt2.setString(21, webid);\n pstmt2.setString(22, gender);\n pstmt2.setInt(23, pri_indicator);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n\n } else { // this member not found, but name already exists\n\n if (dup) {\n errCount++;\n errMsg = errMsg + \"\\n -Dup user found:\\n\" +\n \" new: memid = \" + memid + \" : cur: \" + dupuser + \"\\n\" +\n \" webid = \" + webid + \" : \" + dupwebid + \"\\n\" +\n \" mNum = \" + mNum + \" : \" + dupmnum;\n }\n }\n } // end of IF Member Found\n\n //\n // Member updated - now see if the username or name changed\n //\n if (userChanged == true || nameChanged == true) { // if username or name changed\n\n //\n // username or name changed - we must update other tables now\n //\n StringBuffer mem_name = new StringBuffer( fname_new ); // get the new first name\n\n if (!mi_new.equals( \"\" )) {\n mem_name.append(\" \" +mi_new); // new mi\n }\n mem_name.append(\" \" +lname_new); // new last name\n\n String newName = mem_name.toString(); // convert to one string\n\n Admin_editmem.updTeecurr(newName, memid_new, memid, con); // update teecurr with new values\n\n Admin_editmem.updTeepast(newName, memid_new, memid, con); // update teepast with new values\n\n Admin_editmem.updLreqs(newName, memid_new, memid, con); // update lreqs with new values\n\n Admin_editmem.updPartner(memid_new, memid, con); // update partner with new values\n\n Admin_editmem.updEvents(newName, memid_new, memid, con); // update evntSignUp with new values\n\n Admin_editmem.updLessons(newName, memid_new, memid, con); // update the lesson books with new values\n }\n\n } else {\n\n // Only report errors that AREN'T due to skip == true, since those were handled earlier!\n if (!found) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBER NOT FOUND!\";\n }\n if (fname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n }\n if (lname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -LAST NAME missing!\";\n }\n if (memid.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -USERNAME missing!\";\n }\n } // end of IF skip\n\n } // end of IF minimum requirements\n\n } // end of IF tokens\n\n } // end of IF header row\n\n // log any errors and warnings that occurred\n if (errCount > 0) {\n totalErrCount += errCount;\n errList.add(errMemInfo + \"\\n *\" + errCount + \" error(s) found*\" + errMsg + \"\\n\");\n }\n if (warnCount > 0) {\n totalWarnCount += warnCount;\n warnList.add(errMemInfo + \"\\n *\" + warnCount + \" warning(s) found*\" + warnMsg + \"\\n\");\n }\n } // end of while (for each record in club's file)\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n\n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n }\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster for \" +club+ \": \" + e3.getMessage() + \"\\n\"; // build msg\n SystemUtils.logError(errorMsg); // log it\n }\n\n // Print error and warning count totals to error log\n SystemUtils.logErrorToFile(\"\" +\n \"Total Errors Found: \" + totalErrCount + \"\\n\" +\n \"Total Warnings Found: \" + totalWarnCount + \"\\n\", club, true);\n\n // Print errors and warnings to error log\n if (totalErrCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****ERRORS FOR \" + club + \" (Member WAS NOT synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (errList.size() > 0) {\n SystemUtils.logErrorToFile(errList.remove(0), club, true);\n }\n }\n if (totalWarnCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****WARNINGS FOR \" + club + \" (Member MAY NOT have synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (warnList.size() > 0) {\n SystemUtils.logErrorToFile(warnList.remove(0), club, true);\n }\n }\n\n // Print end tiem to error log\n SystemUtils.logErrorToFile(\"End time: \" + new java.util.Date().toString() + \"\\n\", club, true);\n\n }", "private void setLatestMarketData(String latestData) {\n\t\tlatestMarketData = latestData;\n\t}", "public Market getMarket(){\n\t\treturn market;\n\t}", "public Market getMarket() {\n return market;\n }", "public void assignPortfolioShareholders(Customer cust, Map<ModelPortfolio, Portfolio> portMap,\n Map<ModelPortfolio, AllocationModel> allocMap, ModelPortfolio portfolioModel) {\n\n if (portfolioModel == ModelPortfolio.AGGRESSIVEGROWTH) {\n portMap.get(ModelPortfolio.AGGRESSIVEGROWTH).addShareHolder(cust, allocMap.get(ModelPortfolio.AGGRESSIVEGROWTH));\n // portMap.get(ModelPortfolio.AGGRESSIVEGROWTH).displayPortfolio();\n } else if (portfolioModel == ModelPortfolio.GROWTH) {\n portMap.get(ModelPortfolio.GROWTH).addShareHolder(cust, allocMap.get(ModelPortfolio.GROWTH));\n //portMap.get(ModelPortfolio.GROWTH).displayPortfolio();\n } else if (portfolioModel == ModelPortfolio.INCOME) {\n portMap.get(ModelPortfolio.INCOME).addShareHolder(cust, allocMap.get(ModelPortfolio.INCOME));\n //portMap.get(ModelPortfolio.INCOME).displayPortfolio();\n } else if (portfolioModel == ModelPortfolio.RETIREMENT) {\n portMap.get(ModelPortfolio.RETIREMENT).addShareHolder(cust, allocMap.get(ModelPortfolio.RETIREMENT));\n //portMap.get(ModelPortfolio.RETIREMENT).displayPortfolio();\n } else if (portfolioModel == ModelPortfolio.INVALIDPORTFOLIO) {\n System.out.println(\"Customer \" + cust.getLastName() + \" Cannot be assigned to a portfolio\");\n }\n }", "public void updateReactionsMarketAndTreasures() {\r\n\t\t((TextChannel) gameChannel).clearReactionsById(marketAndTsID).queue();\r\n\t\tif (currentPlayer.getGold() >= 7) {\r\n\t\t\tif (marketItemCount[0] > 0) {\r\n\t\t\t\tgameChannel.addReactionById(marketAndTsID, GlobalVars.emojis.get(\"key\")).queue();\r\n\t\t\t}\r\n\t\t\tif (marketItemCount[1] > 0) {\r\n\t\t\t\tgameChannel.addReactionById(marketAndTsID, GlobalVars.emojis.get(\"briefcase\")).queue();\r\n\t\t\t}\r\n\t\t\tif (marketItemCount[2] > 0) {\r\n\t\t\t\tgameChannel.addReactionById(marketAndTsID, GlobalVars.emojis.get(\"crown\")).queue();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void run() {\n int queueSize = dataQueue.size();\n List<IData> allDataList = new ArrayList<>(queueSize);\n dataQueue.drainTo(allDataList, queueSize);\n\n // each data list\n List<MarketData> marketDatas = new ArrayList<>(queueSize);\n List<Order> orders = new ArrayList<>();\n List<Position> positions = new ArrayList<>();\n List<IndicatorInformation> indicatorInformations = new ArrayList<>();\n List<ModelInformation> modelInformations = new ArrayList<>();\n List<PLInformation> plInformations = new ArrayList<>();\n List<OptimizedExecution> executionInformations = new ArrayList<>();\n List<SystemInformation> systemInformations = new ArrayList<>();\n List<TimerInformation> timerInformations = new ArrayList<>();\n\n try {\n // Create List\n for (IData data : allDataList) {\n if (data instanceof MarketData) {\n marketDatas.add((MarketData) data);\n\n } else if (data instanceof Order) {\n orders.add((Order) data);\n\n } else if (data instanceof Position) {\n positions.add((Position) data);\n\n } else if (data instanceof IndicatorInformation) {\n indicatorInformations.add((IndicatorInformation) data);\n\n } else if (data instanceof ModelInformation) {\n modelInformations.add((ModelInformation) data);\n\n } else if (data instanceof PLInformation) {\n plInformations.add((PLInformation) data);\n\n } else if (data instanceof OptimizedExecution) {\n executionInformations.add((OptimizedExecution) data);\n\n } else if (data instanceof SystemInformation) {\n systemInformations.add((SystemInformation) data);\n\n } else if (data instanceof TimerInformation) {\n timerInformations.add((TimerInformation) data);\n\n } else {\n throw new UnExpectedDataException(data.getClass());\n }\n }\n\n // insert\n if (!marketDatas.isEmpty()) {\n // logger.debug(\"Insert List : MarketData - size = \" + marketDatas.size());\n eventDao.insert(MarketData.class, marketDatas);\n }\n if (!orders.isEmpty()) {\n // logger.debug(\"Insert List : Order - size = \" + orders.size());\n eventDao.insert(Order.class, orders);\n }\n if (!positions.isEmpty()) {\n // logger.debug(\"Insert List : Position - size = \" + positions.size());\n eventDao.insert(Position.class, positions);\n }\n if (!indicatorInformations.isEmpty()) {\n // logger.debug(\"Insert List : IndicatorInformation - size = \" + indicatorInformations.size());\n eventDao.insert(IndicatorInformation.class, indicatorInformations);\n }\n if (!modelInformations.isEmpty()) {\n // logger.debug(\"Insert List : ModelInformation - size = \" + modelInformations.size());\n eventDao.insert(ModelInformation.class, modelInformations);\n }\n if (!plInformations.isEmpty()) {\n // logger.debug(\"Insert List : PLInformation - size = \" + plInformations.size());\n eventDao.insert(PLInformation.class, plInformations);\n }\n if (!executionInformations.isEmpty()) {\n // logger.debug(\"Insert List : OptimizedExecution - size = \" + executionInformations.size());\n eventDao.insert(OptimizedExecution.class, executionInformations);\n }\n if (!systemInformations.isEmpty()) {\n // logger.debug(\"Insert List : SystemInformation - size = \" + systemInformations.size());\n eventDao.insert(SystemInformation.class, systemInformations);\n }\n if (!timerInformations.isEmpty()) {\n // logger.debug(\"Insert List : TimerInformation - size = \" + timerInformations.size());\n eventDao.insert(TimerInformation.class, timerInformations);\n }\n\n } catch (Exception e) {\n logger.error(\"Error in inserting data.\", e);\n }\n }", "public void updateData(Context context) {\n dataUpdatedCheck = new PairCheck();\n List<Constants.Currency> currencyList = new ArrayList<>();\n currencyList.add(BTC);\n currencyList.add(ETH);\n currencyList.add(LTC);\n mDataCurrencyProvider.getCryptocurrencyInfoList(context, currencyList, this);\n mGlobalMarketDataProvider.getGlobalInfo(context, this);\n }", "public void setMarketNo(String marketNo) {\r\n this.marketNo = marketNo == null ? null : marketNo.trim();\r\n }", "public ObsCommon getDecodedData(ObsCommon receiver) {\n if (receiver != null) {\n // Set to null here. If any data needs to be added, then the\n // object will be created.\n AncCloud layer = null;\n\n if (cloudAmount != null) {\n if (layer == null) {\n layer = new AncCloud(4);\n receiver.addCloud(layer);\n }\n layer.setCloudAmount(cloudAmount);\n }\n if (cloudGenus != null) {\n if (layer == null) {\n layer = new AncCloud(4);\n receiver.addCloud(layer);\n }\n layer.setCloudgenus(cloudGenus);\n }\n if (cloudAltitude != null) {\n if (layer == null) {\n layer = new AncCloud(4);\n receiver.addCloud(layer);\n }\n layer.setCloudHeight(cloudAltitude);\n }\n if (cloudDescription != null) {\n if (layer == null) {\n layer = new AncCloud(4);\n receiver.addCloud(layer);\n }\n layer.setCloudObsType(cloudDescription);\n }\n }\n return receiver;\n }", "public static void updateSharePrice(){\r\n\t\r\n\tMap<String, ShareMarket> allShareDetails = ShareMarketHashMap.getShareMarket();\r\n\tdisplayMap(allShareDetails);\r\n\tShareMarket editUniqueShareQuantity = new ShareMarket();\r\n\tSystem.out.println('\\n'+\"Enter Share Name for updating price : \");\r\n\tString updateShareName = input.next();\r\n\tif(!allShareDetails.containsKey(updateShareName))\t{\r\n\t\tSystem.out.println(\"Share doesn't exist :( .You will be returned to main menu\" +'\\n');\r\n\t\treturn;\r\n\t}\r\n\tSystem.out.println(\"Enter Share Price : \");\r\n\tif(!input.hasNextInt()) {\r\n\t\tSystem.out.println(\"Price entered in invalid, it should be a postive integer.You will be returned to main menu\" + '\\n');\r\n\t\treturn;\r\n\t}\t\r\n\tint updateSharePrice = input.nextInt();\t\t\t\r\n\teditUniqueShareQuantity.setShareName(updateShareName);\r\n\teditUniqueShareQuantity.setSharePrice(updateSharePrice);\r\n\teditUniqueShareQuantity.setShareQuantity(allShareDetails.get(updateShareName).getShareQuantity());\r\n\tallShareDetails.put(editUniqueShareQuantity.getShareName(),editUniqueShareQuantity);\r\n\tShareMarketHashMap.editShare();\r\n\tMap<String, ShareMarket> allShareDetailsupdated = ShareMarketHashMap.getShareMarket();\r\n\tSystem.out.println(\"Share Name: \" + allShareDetailsupdated.get(updateShareName).getShareName() +',' + \" Share Price:\" + allShareDetailsupdated.get(updateShareName).getSharePrice() +',' + \" Share Quantity:\" + allShareDetailsupdated.get(updateShareName).getShareQuantity());\r\n\tSystem.out.println(\"Successfully updated price, please find above available shares\" +'\\n');\t\r\n}", "public TradeHistoryReq market(String market) {\n this.market = market;\n return this;\n }", "public void saveFormData() throws edu.mit.coeus.exception.CoeusException {\r\n //Modified for COEUSDEV-413 : Subcontract Custom data bug - Data getting wiped out - Start\r\n// if( isDataChanged() ){\r\n\t\tif( isDataChanged() || getFunctionType() == NEW_ENTRY_SUBCONTRACT || getFunctionType() == NEW_SUBCONTRACT) { //COEUSDEV-413 : End\r\n Vector genericColumnValues = customElementsForm.getOtherColumnElementData();\r\n\t\t\tif( genericColumnValues != null && genericColumnValues.size() > 0 ){\r\n\t\t\t\tCustomElementsInfoBean genericCustElementsBean = null;\r\n\t\t\t\tint dataSize = genericColumnValues.size();\r\n\t\t\t\tfor( int indx = 0; indx < dataSize; indx++ ) {\r\n\t\t\t\t\tgenericCustElementsBean = (CustomElementsInfoBean)genericColumnValues.get(indx);\r\n\t\t\t\t\tSubContractCustomDataBean subContractCustomDataBean\r\n\t\t\t\t\t= new SubContractCustomDataBean(genericCustElementsBean);\r\n SubContractCustomDataBean oldSubContractCustomDataBean = (SubContractCustomDataBean)genericColumnValues.get(indx);\r\n\t\t\t\t\tif(getFunctionType() == NEW_ENTRY_SUBCONTRACT) {\r\n\t\t\t\t\t\tsubContractCustomDataBean.setAcType(\"I\");\r\n//\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n//\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif( INSERT_RECORD.equals(subContractCustomDataBean.getAcType()) ) {\r\n\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif( genericCustElementsBean instanceof SubContractCustomDataBean ) {\r\n//\t\t\t\t\t\t\tSubContractCustomDataBean oldSubContractCustomDataBean =\r\n//\t\t\t\t\t\t\t(SubContractCustomDataBean)genericCustElementsBean;\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setAcType(genericCustElementsBean.getAcType());\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(oldSubContractCustomDataBean.getSubContractCode());\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(oldSubContractCustomDataBean.getSequenceNumber());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tString custAcType = subContractCustomDataBean.getAcType();\r\n\t\t\t\t\t\tif( UPDATE_RECORD.equals(custAcType) ){\r\n//\t\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n//\t\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n\t\t\t\t\t\t\tqueryEngine.update(queryKey, subContractCustomDataBean);\r\n\t\t\t\t\t\t}else if( INSERT_RECORD.equals(custAcType)){\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSubContractCode(this.subContractBean.getSubContractCode());\r\n\t\t\t\t\t\t\tsubContractCustomDataBean.setSequenceNumber(this.subContractBean.getSequenceNumber());\r\n\t\t\t\t\t\t\tqueryEngine.insert(queryKey, subContractCustomDataBean);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}catch ( CoeusException ce ) {\r\n\t\t\t\t\t\tce.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcustomElementsForm.setSaveRequired(false);\r\n\t\t}\r\n\t}", "public static void updateShareQuantity(){\r\n\r\n\tMap<String, ShareMarket> everyShareDetails = ShareMarketHashMap.getShareMarket();\r\n\tdisplayMap(everyShareDetails);\r\n\tShareMarket editUniqueSharePrice = new ShareMarket();\t\r\n\tSystem.out.println('\\n' + \"Enter Share Name for updating quantity: \");\r\n\tString shareName = input.next();\r\n\tif(!everyShareDetails.containsKey(shareName))\t{\r\n\t\tSystem.out.println(\"Share doesn't exist :( .You will be returned to main menu\" +'\\n');\r\n\t\treturn;\r\n\t}\r\n\tSystem.out.println(\"Enter Share Quantiy : \");\r\n\tif(!input.hasNextInt()) {\r\n\t\tSystem.out.println(\"Quantity entered in invalid, it should be a postive integer.You will be returned to main menu\" + '\\n');\r\n\t\treturn;\r\n\t}\t\r\n\tint updateshareQuantity = input.nextInt();\t\t\t\r\n\teditUniqueSharePrice.setShareName(shareName);\r\n\teditUniqueSharePrice.setShareQuantity(updateshareQuantity);\r\n\teditUniqueSharePrice.setSharePrice(everyShareDetails.get(shareName).getSharePrice());\r\n\teveryShareDetails.put(editUniqueSharePrice.getShareName(),editUniqueSharePrice);\r\n\tShareMarketHashMap.editShare();\r\n\tMap<String, ShareMarket> everyShareDetailsupdate = ShareMarketHashMap.getShareMarket();\r\n\tSystem.out.println(\" Share Name: \" + everyShareDetailsupdate.get(shareName).getShareName() +',' + \" Share Price: \" + everyShareDetailsupdate.get(shareName).getSharePrice() +',' + \" Share Quantity: \" + everyShareDetailsupdate.get(shareName).getShareQuantity());\r\n\r\n\tSystem.out.println(\"Successfully updated quantiy, Please find above available shares\" + '\\n');\r\n}", "private static void ceSync(Connection con, InputStreamReader isr, String club) {\n\n PreparedStatement pstmt2 = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n int ext = 1;\n\n // Values from CE records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String webid = \"\";\n String mNum = \"\";\n String u_hndcp = \"\";\n String c_hndcp = \"\";\n String mship = \"\";\n String mtype = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String mobile = \"\";\n String primary = \"\";\n String active = \"\";\n String webid_new = \"\";\n String memid_new = \"\";\n String lnamePart2;\n\n String mship2 = \"\"; // used to tell if match was found\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n int inact = 0;\n\n // Values from ForeTees records\n //\n String memid_old = \"\";\n String fname_old = \"\";\n String lname_old = \"\";\n String mi_old = \"\";\n String mship_old = \"\";\n String mtype_old = \"\";\n String email_old = \"\";\n String mNum_old = \"\";\n String ghin_old = \"\";\n String bag_old = \"\";\n String posid_old = \"\";\n String email2_old = \"\";\n String phone_old = \"\";\n String phone2_old = \"\";\n String suffix_old = \"\";\n\n float u_hcap_old = 0;\n float c_hcap_old = 0;\n int birth_old = 0;\n int inact_old = 0;\n\n // Values for New ForeTees records\n //\n String fname_new = \"\";\n String lname_new = \"\";\n String mi_new = \"\";\n String mship_new = \"\";\n String mtype_new = \"\";\n String email_new = \"\";\n String mNum_new = \"\";\n String ghin_new = \"\";\n String bag_new = \"\";\n String posid_new = \"\";\n String email2_new = \"\";\n String phone_new = \"\";\n String phone2_new = \"\";\n String suffix_new = \"\";\n String last_mship = \"\";\n String last_mnum = \"\";\n String openParen = \"(\";\n String closeParen = \")\";\n String asterik = \"*\";\n String slash = \"/\";\n String backslash = \"\\\\\";\n\n float u_hcap_new = 0;\n float c_hcap_new = 0;\n int birth_new = 0;\n int inact_new = 0;\n int rcount = 0;\n int pcount = 0;\n int ncount = 0;\n int ucount = 0;\n int errCount = 0;\n int warnCount = 0;\n int totalErrCount = 0;\n int totalWarnCount = 0;\n int email_bounce1 = 0;\n int email_bounce2 = 0;\n\n String errorMsg = \"\";\n String errMsg = \"\";\n String warnMsg = \"\";\n String errMemInfo = \"\";\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean headerFound = false;\n boolean found = false;\n boolean useWebid = false;\n boolean genderMissing = false;\n\n ArrayList<String> errList = new ArrayList<String>();\n ArrayList<String> warnList = new ArrayList<String>();\n\n\n // Overwrite log file with fresh one for today's logs\n SystemUtils.logErrorToFile(\"Clubessential: Error log for \" + club + \"\\nStart time: \" + new java.util.Date().toString() + \"\\n\", club, false);\n\n try {\n\n Calendar caly = new GregorianCalendar(); // get todays date\n int thisYear = caly.get(Calendar.YEAR); // get this year value\n\n thisYear = thisYear - 2000; // 2 digit value\n\n\n BufferedReader br = new BufferedReader(isr);\n\n // format of each line in the file:\n //\n // memid, mNum, fname, mi, lname, suffix, mship, mtype, gender, email, email2,\n // phone, phone2, bag, hndcp#, uhndcp, chndcp, birth, posid, mobile, primary, act/inact\n //\n //\n while (true) {\n\n line = br.readLine();\n\n if (line == null) {\n break;\n }\n\n // Skip the 1st row (header row)\n\n if (headerFound == false) {\n\n headerFound = true;\n\n } else {\n\n // Remove the dbl quotes and check for embedded commas\n\n line = cleanRecord( line );\n\n rcount++; // count the records\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() > 20 ) { // enough data ?\n\n memid = tok.nextToken(); // a\n mNum = tok.nextToken(); // b\n fname = tok.nextToken(); // c\n mi = tok.nextToken(); // d\n lname = tok.nextToken(); // e\n suffix = tok.nextToken(); // f\n mship = tok.nextToken(); // g\n mtype = tok.nextToken(); // h\n gender = tok.nextToken(); // i\n email = tok.nextToken(); // j\n email2 = tok.nextToken(); // k\n phone = tok.nextToken(); // l\n phone2 = tok.nextToken(); // m\n bag = tok.nextToken(); // n\n ghin = tok.nextToken(); // o\n u_hndcp = tok.nextToken(); // p\n c_hndcp = tok.nextToken(); // q\n temp = tok.nextToken(); // r\n posid = tok.nextToken(); // s\n mobile = tok.nextToken(); // t\n primary = tok.nextToken(); // u\n active = tok.nextToken(); // v\n\n //\n // Check for ? (not provided)\n //\n if (memid.equals( \"?\" )) {\n\n memid = \"\";\n }\n if (mNum.equals( \"?\" )) {\n\n mNum = \"\";\n }\n if (fname.equals( \"?\" )) {\n\n fname = \"\";\n }\n if (mi.equals( \"?\" )) {\n\n mi = \"\";\n }\n if (lname.equals( \"?\" )) {\n\n lname = \"\";\n }\n if (suffix.equals( \"?\" )) {\n\n suffix = \"\";\n }\n if (mship.equals( \"?\" )) {\n\n mship = \"\";\n }\n if (mtype.equals( \"?\" )) {\n\n mtype = \"\";\n }\n if (gender.equals( \"?\" ) || (!gender.equalsIgnoreCase(\"M\") && !gender.equalsIgnoreCase(\"F\"))) {\n\n if (gender.equals( \"?\" )) {\n genderMissing = true;\n } else {\n genderMissing = false;\n }\n gender = \"\";\n }\n if (email.equals( \"?\" )) {\n\n email = \"\";\n }\n if (email2.equals( \"?\" )) {\n\n email2 = \"\";\n }\n if (phone.equals( \"?\" )) {\n\n phone = \"\";\n }\n if (phone2.equals( \"?\" )) {\n\n phone2 = \"\";\n }\n if (bag.equals( \"?\" )) {\n\n bag = \"\";\n }\n if (ghin.equals( \"?\" )) {\n\n ghin = \"\";\n }\n if (u_hndcp.equals( \"?\" )) {\n\n u_hndcp = \"\";\n }\n if (c_hndcp.equals( \"?\" )) {\n\n c_hndcp = \"\";\n }\n if (temp.equals( \"?\" ) || temp.equals( \"0\" )) {\n\n temp = \"\";\n }\n if (posid.equals( \"?\" )) {\n\n posid = \"\";\n }\n if (mobile.equals( \"?\" )) {\n\n mobile = \"\";\n }\n if (primary.equals( \"?\" )) {\n\n primary = \"\";\n }\n if (active.equals( \"?\" )) {\n\n active = \"\";\n }\n\n\n //\n // Westchester memids will be empty for dependents\n //\n if (club.equals( \"westchester\" ) && memid.equals( \"\" )) {\n\n memid = mNum; // use mNum\n }\n\n\n if (club.equals( \"virginiacc\" )) {\n\n //\n // Make sure name is titled\n //\n fname = toTitleCase(fname);\n lname = toTitleCase(lname);\n }\n\n\n //\n // Ignore mi if not alpha\n //\n if (mi.endsWith( \"0\" ) || mi.endsWith( \"1\" ) || mi.endsWith( \"2\" ) || mi.endsWith( \"3\" ) ||\n mi.endsWith( \"4\" ) || mi.endsWith( \"5\" ) || mi.endsWith( \"6\" ) || mi.endsWith( \"7\" ) ||\n mi.endsWith( \"8\" ) || mi.endsWith( \"9\" )) {\n\n mi = \"\";\n }\n\n\n tok = new StringTokenizer( lname, openParen ); // check for open paren '('\n\n if ( tok.countTokens() > 1 ) {\n\n lname = tok.nextToken(); // skip open paren and anything following it\n }\n\n tok = new StringTokenizer( lname, slash ); // check for slash\n\n if ( tok.countTokens() > 1 ) {\n\n lname = tok.nextToken(); // skip them and anything following it\n }\n\n tok = new StringTokenizer( lname, backslash ); // check for backslash\n\n if ( tok.countTokens() > 1 ) {\n\n lname = tok.nextToken(); // skip them and anything following it\n }\n\n tok = new StringTokenizer( fname, openParen ); // check for open paren '('\n\n if ( tok.countTokens() > 1 ) {\n\n fname = tok.nextToken(); // skip open paren and anything following it\n }\n\n tok = new StringTokenizer( fname, \"/\\\\\" ); // check for slash and backslash\n\n if ( tok.countTokens() > 1 ) {\n\n fname = tok.nextToken(); // skip them and anything following it\n }\n\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!memid.equals( \"\" ) && !mNum.equals( \"\" ) && !lname.equals( \"\" ) && !fname.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 ) {\n\n mi = tok.nextToken(); // over-write mi if already there\n\n if (mi.startsWith(\"&\")) {\n mi = \"\";\n }\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n\n if ( tok.countTokens() > 0 ) { // more than just lname?\n\n lname = tok.nextToken(); // remove suffix and spaces\n }\n\n if (suffix.equals( \"\" )) { // if suffix not provided\n\n if ( tok.countTokens() > 1 ) { // check for suffix and 2 part lname (i.e. Van Buren)\n\n lnamePart2 = tok.nextToken();\n\n if (!lnamePart2.startsWith(\"&\") && !lnamePart2.startsWith(openParen)) { // if ok to add\n\n lname = lname + lnamePart2; // combine (i.e. VanBuren)\n }\n }\n\n if ( tok.countTokens() > 0 ) { // suffix?\n\n suffix = tok.nextToken();\n\n if (suffix.startsWith(\"&\")) {\n suffix = \"\";\n }\n }\n\n } else { // suffix provided in suffix field - check for 2 part lname (i.e. Van Buren)\n\n if ( tok.countTokens() > 0 ) {\n\n lnamePart2 = tok.nextToken();\n\n if (!lnamePart2.startsWith(\"&\") && !lnamePart2.startsWith(\"(\") && !lnamePart2.equals(suffix)) { // if ok to add\n\n lname = lname + lnamePart2; // combine (i.e. VanBuren)\n }\n }\n }\n\n if (suffix.startsWith(openParen)) { // if not really a suffix\n\n suffix = \"\";\n }\n\n\n //\n // Isolate the last name in case extra info attached (i.e. lname..yyyy/nnn)\n //\n if (!lname.equals( \"\" )) {\n\n tok = new StringTokenizer( lname, asterik ); // delimiters are slashes, asterics (backslash needs 2)\n\n if ( tok.countTokens() > 0 ) {\n\n lname = tok.nextToken(); // isolate lname\n }\n\n tok = new StringTokenizer( lname, slash );\n\n if ( tok.countTokens() > 0 ) {\n\n lname = tok.nextToken();\n }\n\n tok = new StringTokenizer( lname, backslash );\n\n if ( tok.countTokens() > 0 ) {\n\n lname = tok.nextToken();\n }\n }\n\n //\n // Append the suffix to last name if it exists and isn't already appended\n //\n if (!suffix.equals(\"\")) {\n\n if (!lname.endsWith(suffix)) {\n\n lname = lname + \"_\" + suffix; // append it\n }\n\n suffix = \"\"; // done with it now\n }\n\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n if (!u_hndcp.equals( \"\" ) && !u_hndcp.equalsIgnoreCase(\"NH\") && !u_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n u_hndcp = u_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n u_hndcp = u_hndcp.replace('H', ' '); // or 'H' if present\n u_hndcp = u_hndcp.replace('N', ' '); // or 'N' if present\n u_hndcp = u_hndcp.replace('J', ' '); // or 'J' if present\n u_hndcp = u_hndcp.replace('R', ' '); // or 'R' if present\n u_hndcp = u_hndcp.trim();\n\n u_hcap = Float.parseFloat(u_hndcp); // usga handicap\n\n if ((!u_hndcp.startsWith(\"+\")) && (!u_hndcp.startsWith(\"-\"))) {\n\n u_hcap = 0 - u_hcap; // make it a negative hndcp (normal)\n }\n }\n\n if (!c_hndcp.equals( \"\" ) && !c_hndcp.equalsIgnoreCase(\"NH\") && !c_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n c_hndcp = c_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n c_hndcp = c_hndcp.replace('H', ' '); // or 'H' if present\n c_hndcp = c_hndcp.replace('N', ' '); // or 'N' if present\n c_hndcp = c_hndcp.replace('J', ' '); // or 'J' if present\n c_hndcp = c_hndcp.replace('R', ' '); // or 'R' if present\n c_hndcp = c_hndcp.trim();\n\n c_hcap = Float.parseFloat(c_hndcp); // usga handicap\n\n if ((!c_hndcp.startsWith(\"+\")) && (!c_hndcp.startsWith(\"-\"))) {\n\n c_hcap = 0 - c_hcap; // make it a negative hndcp (normal)\n }\n }\n\n //\n // convert birth date (mm/dd/yyyy to yyyymmdd)\n //\n if (!temp.equals( \"\" )) {\n\n int mm = 0;\n int dd = 0;\n int yy = 0;\n\n tok = new StringTokenizer( temp, \"/-\" ); // delimiters are / & -\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n mm = Integer.parseInt(b1);\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else { // try 'Jan 20, 1951' format\n\n tok = new StringTokenizer( temp, \", \" ); // delimiters are comma and space\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n if (b1.startsWith( \"Jan\" )) {\n mm = 1;\n } else {\n if (b1.startsWith( \"Feb\" )) {\n mm = 2;\n } else {\n if (b1.startsWith( \"Mar\" )) {\n mm = 3;\n } else {\n if (b1.startsWith( \"Apr\" )) {\n mm = 4;\n } else {\n if (b1.startsWith( \"May\" )) {\n mm = 5;\n } else {\n if (b1.startsWith( \"Jun\" )) {\n mm = 6;\n } else {\n if (b1.startsWith( \"Jul\" )) {\n mm = 7;\n } else {\n if (b1.startsWith( \"Aug\" )) {\n mm = 8;\n } else {\n if (b1.startsWith( \"Sep\" )) {\n mm = 9;\n } else {\n if (b1.startsWith( \"Oct\" )) {\n mm = 10;\n } else {\n if (b1.startsWith( \"Nov\" )) {\n mm = 11;\n } else {\n if (b1.startsWith( \"Dec\" )) {\n mm = 12;\n } else {\n mm = Integer.parseInt(b1);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else {\n\n birth = 0;\n }\n }\n\n if (mm > 0) { // if birth provided\n\n if (mm == 1 && dd == 1 && yy == 1) { // skip if 1/1/0001\n\n birth = 0;\n\n } else {\n\n if (yy < 100) { // if 2 digit year\n\n if (yy <= thisYear) {\n\n yy += 2000; // 20xx\n\n } else {\n\n yy += 1900; // 19xx\n }\n }\n\n birth = (yy * 10000) + (mm * 100) + dd; // yyyymmdd\n\n if (yy < 1900) { // check for invalid date\n\n birth = 0;\n }\n }\n\n } else {\n\n birth = 0;\n }\n\n } else {\n\n birth = 0;\n }\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n\n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n\n skip = false;\n errCount = 0; // reset the error counter\n warnCount = 0; // reset warning counter\n errMsg = \"\"; // reset error message\n warnMsg = \"\"; // reset warning message\n errMemInfo = \"\"; // reset the error member info\n found = false; // default to club NOT found\n\n\n //\n // Set the active/inactive flag in case it is used\n //\n inact = 0; // default = active\nif (!club.equals(\"tpcwakefieldplantation\")) {\n if (active.equalsIgnoreCase( \"I\" )) {\n\n inact = 1; // set inactive\n }\n}\n\n //\n // Weed out any non-members\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\") ||\n fname.equalsIgnoreCase(\"test\") || lname.equalsIgnoreCase(\"test\")) {\n\n inact = 1; // skip this record\n }\n\n //\n // Format member info for use in error logging before club-specific manipulation\n //\n errMemInfo = \"Member Details:\\n\" +\n \" name: \" + lname + \", \" + fname + \" \" + mi + \"\\n\" +\n \" mtype: \" + mtype + \" mship: \" + mship + \"\\n\" +\n \" memid: \" + memid + \" mNum: \" + mNum + \" gender: \" + gender;\n\n\n // if gender is incorrect or missing, flag a warning in the error log\n if (gender.equals(\"\")) {\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'M')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'M')\";\n }\n gender = \"M\";\n }\n\n //\n // Skip entries with no membership type\n //\n if (mship.equals(\"\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n }\n\n //\n // Skip entries with first/last names of 'admin'\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -INVALID NAME! 'Admin' or 'admin' not allowed for first or last name\";\n }\n\n //\n // Make sure the member is not inactive - skip it it is\n //\n if (inact == 0 || club.equals( \"congressional\" )) { // if active or Congressional\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n if (club.equals( \"weeburn\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (mship.equalsIgnoreCase( \"house\" ) ||\n mship.equalsIgnoreCase( \"non-golf\" ) || mship.equalsIgnoreCase( \"non-resident house\" ) ||\n mship.equalsIgnoreCase( \"non-resident non-golf\" ) || mship.equalsIgnoreCase( \"senior house\" ) ||\n mship.equalsIgnoreCase( \"senior non-golf\" ) || mship.equalsIgnoreCase( \"senior non golf\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: MEMBERSHIP TYPE NOT FOUND!\";\n \n } else {\n\n if (mship.startsWith( \"WFG\" )) {\n\n mship = \"WAITING FOR GOLF\"; // convert mship\n }\n\n if (mship.equalsIgnoreCase( \"golf\" )) {\n\n mship = \"Golf\"; // convert mship\n }\n\n //\n // set defaults\n //\n if (gender.equalsIgnoreCase( \"f\" )) {\n\n gender = \"F\"; // Female\n\n } else {\n\n gender = \"M\"; // default to Male\n }\n\n //\n // Set the Member Type\n //\n if (primary.equalsIgnoreCase( \"p\" )) {\n\n mtype = \"Primary Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Primary Female\";\n }\n\n posid = mNum;\n\n } else if (primary.equalsIgnoreCase( \"s\" )) {\n\n mtype = \"Spouse Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Spouse Female\";\n }\n\n posid = mNum + \"S\";\n\n } else {\n\n mtype = \"Junior\";\n }\n\n if (mship.equalsIgnoreCase( \"DEPENDENT CHILD\" )) {\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 18 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 18 yrs old\n\n mtype = \"Junior\";\n\n } else {\n\n year = year - 5; // back up 5 more years (23 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 18 - 22 yrs old (< 23)\n\n mtype = \"Adult Child\";\n\n } else {\n\n year = year - 6; // back up 6 more years (29 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 23 - 28 yrs old (< 29)\n\n mtype = \"Extended Family\";\n\n } else {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT CHILD OVER 29\";\n }\n }\n }\n }\n\n //\n // Try to set the correct mship type (spouses must be changed)\n //\n if (primary.equalsIgnoreCase( \"s\" ) || mship.equalsIgnoreCase( \"Dependent Spouse\" ) ||\n mship.equalsIgnoreCase(\"DEPENDENT CHILD\")) {\n\n if (mNum.equals( last_mnum )) { // if spouse of last member processed\n\n mship = last_mship; // get primary's mship value\n\n } else {\n\n //\n // Check the db for the primary's mship type\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE memNum = ? AND m_type like 'Primary%'\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\");\n\n } else {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n pstmt2.close();\n }\n\n } else { // must be primary\n\n last_mnum = mNum; // save these for spouse\n last_mship = mship;\n }\n\n }\n\n } // end of IF club = ???\n\n\n if (club.equals( \"westchester\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (mship.equalsIgnoreCase( \"courtesy\" ) || mship.equalsIgnoreCase( \"houseres\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // Set the Member & Membership Types\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n mship = \"Members\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Member Female\";\n\n } else {\n\n mtype = \"Member Male\";\n }\n\n } else { // all others (spouse and dependents)\n\n mship = \"Family Members\";\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n\n //\n // Set memid for dependents\n //\n ext++; // bump common extension value (1 - nnnnn)\n memid = memid + ext;\n }\n }\n } else {\n\n skip = true;\n }\n } // end of IF club = westchester\n\n\n //\n // CC of Virginia\n //\n if (club.equals( \"virginiacc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // Set the Member Types (based on age and gender)\n //\n if (birth == 0) { // if age unknown\n\n mtype = \"Adult Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 16; // backup 16 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 16 yrs old\n\n mtype = \"Junior Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Junior Female\";\n }\n\n } else {\n\n year = year - 7; // backup 7 more years (23 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 16 - 22 yrs old (< 23)\n\n mtype = \"Student Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Student Female\";\n }\n\n } else {\n\n year = year - 7; // backup 7 more years (30 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 23 - 29 yrs old (< 30)\n\n mtype = \"Young Adult Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Young Adult Female\";\n }\n\n } else {\n\n year = year - 30; // backup 30 more years (60 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 30 - 59 yrs old (< 60)\n\n mtype = \"Adult Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n mtype = \"Senior Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Senior Female\";\n }\n }\n }\n }\n }\n }\n\n if (mship.equalsIgnoreCase(\"HONORARY-MALE\")) {\n mtype = \"Honorary Male\";\n } else if (mship.equalsIgnoreCase(\"HONORARY-FEMALE\")) {\n mtype = \"Honorary Female\";\n } else if (mship.equalsIgnoreCase(\"HONORARY RETIREES\")) {\n mtype = \"Honorary Retirees\";\n }\n\n mship = \"Active\"; // convert all to Active\n\n } else {\n\n skip = true;\n }\n } // end of IF club =\n\n\n //\n // The Point Lake CLub\n //\n/*\n if (club.equals( \"pointlake\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" ) || mship.equalsIgnoreCase(\"CSH\")) {\n\n //\n // Set the Member Types\n //\n if (gender.equals( \"\" )) {\n\n gender = \"M\";\n }\n\n if (mship.equalsIgnoreCase( \"SPS\" ) || mship.equalsIgnoreCase( \"SPG\" )) { // TEMP until they fix their genders\n\n gender = \"F\";\n }\n\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else { // spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n\n } else { // no mship\n\n skip = true; // skip this record\n }\n\n } // end of IF club =\n*/\n\n //\n // Wichita - uses mapping (webid) !!!\n //\n if (club.equals( \"wichita\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n //\n // Set the Member Types\n //\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n mtype = \"Adult Male\";\n }\n\n if (mship.equalsIgnoreCase( \"child\" )) {\n\n //\n // if Child, set member type according to age\n //\n mtype = \"Juniors\"; // default\n\n if (birth > 0) { // if age provided\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 18 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 18 yrs old\n\n mtype = \"Juniors\";\n\n } else {\n\n mtype = \"18-24\";\n }\n }\n }\n\n mship = \"Golf\"; // everyone is Golf\n\n } else { // no mship\n\n skip = true; // skip this record\n }\n\n } // end of IF club =\n\n\n //\n // Brantford\n //\n if (club.equals( \"brantford\" )) {\n\n found = true; // club found\n\n // if there is no posid, then use the mNum\n if (posid.equals(\"\")) posid = mNum;\n\n mship = mtype; // use member type for mship\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"1 day curl\" ) || mship.equalsIgnoreCase( \"asc crl ld\" ) ||\n mship.startsWith( \"ASSC CUR\" ) || mship.startsWith( \"RESIGN\" )) {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) { // mship ok\n\n //\n // Set the Membership Types\n //\n if (mship.startsWith( \"EXT\" )) {\n\n mship = \"Extended Junior\";\n }\n\n if (mship.startsWith( \"CURL\" ) || mship.equalsIgnoreCase( \"lds curl\" )) {\n\n mship = \"Curler\";\n }\n\n if (mship.startsWith( \"FULL\" ) || mship.startsWith( \"HONO\" ) || mship.startsWith( \"INT\" ) ||\n mship.startsWith( \"LDYFULL\" ) || mship.startsWith( \"MST FL\" ) || mship.startsWith( \"MSTR FU\" ) ||\n mship.startsWith( \"PLAYER\" ) || mship.startsWith( \"SEN\" ) || mship.startsWith( \"SR FULL\" )) {\n\n mship = \"Full\";\n }\n\n if (mship.startsWith( \"JR\" ) || mship.startsWith( \"JUNIO\" )) {\n\n mship = \"Junior\";\n }\n\n if (mship.startsWith( \"NOVIC\" )) {\n\n mship = \"Novice\";\n }\n\n if (mship.startsWith( \"OV65\" ) || mship.startsWith( \"OVR 65\" )) {\n\n mship = \"Over 65 Restricted\";\n }\n\n if (mship.startsWith( \"MST RST\" ) || mship.startsWith( \"MSTR/RE\" )) {\n\n mship = \"Restricted\";\n }\n\n if (mship.startsWith( \"SOCGLF\" )) {\n\n mship = \"Social Golf Waitlist\";\n }\n\n if (mship.startsWith( \"SOCIAL\" ) || mship.startsWith( \"MAIN\" )) {\n\n mship = \"Social\";\n }\n\n //\n // Now check the birth date and set anyone age 19 - 25 to 'Extended Junior'\n //\n if (birth > 0) { // if birth date provided\n\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 19; // backup 19 years\n\n int oldDate1 = (year * 10000) + (month * 100) + day; // get date\n\n year = year - 7; // backup another 7 years (26 total)\n\n int oldDate2 = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate2 && birth < oldDate1) { // if member is 19 to 25 yrs old\n\n mship = \"Extended Junior\";\n }\n }\n\n\n //\n // Set the Member Types\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase( \"S\" )) { // spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n } else {\n mtype = \"Dependent\";\n }\n\n } else {\n\n skip = true;\n }\n\n } // end of IF club =\n\n\n //\n // Congressional\n //\n if (club.equals( \"congressional\" )) {\n\n found = true; // club found\n\n // if there is no posid, then use the mNum\n if (posid.equals(\"\")) posid = mNum;\n\n if (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"SG\" ) || mship.equalsIgnoreCase( \"BI\" )) {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) { // mship ok\n\n if (mship.equals( \"SP\" )) { // if Spouse\n\n mship = \"\";\n\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum); // primary's username is the mNum\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\"); // spouse = use primary's mship type\n }\n pstmt2.close();\n \n if (mship.equals(\"\")) { \n \n skip = true; // skip if mship or primary not found\n }\n }\n\n } else {\n\n skip = true;\n }\n\n if (skip == false) {\n\n //\n // Set the Membership Types\n //\n if (mship.equals( \"AG\" )) {\n\n mship = \"Annual Guest\";\n }\n if (mship.equals( \"BA\" )) {\n\n mship = \"Beneficiary Active\";\n }\n if (mship.equals( \"BS\" )) {\n\n mship = \"Beneficiary Special\";\n }\n if (mship.equals( \"BT\" )) {\n\n mship = \"Beneficiary Twenty\";\n }\n if (mship.equals( \"HL\" )) {\n\n mship = \"Honorary Life\";\n }\n if (mship.equals( \"HO\" )) {\n\n mship = \"Honorary\";\n }\n if (mship.equals( \"JA\" )) {\n\n mship = \"Junior A\";\n }\n if (mship.equals( \"JB\" )) {\n\n mship = \"Junior B\";\n }\n if (mship.equals( \"JC\" )) {\n\n mship = \"Junior C\";\n }\n if (mship.equals( \"JM\" )) {\n\n mship = \"Junior Military\";\n }\n if (mship.equals( \"JX\" )) {\n\n mship = \"Junior Absent\";\n }\n if (mship.equals( \"NR\" )) {\n\n mship = \"Non Resident\";\n }\n if (mship.equals( \"NS\" )) {\n\n mship = \"Non Resident Special\";\n }\n if (mship.equals( \"RA\" )) {\n\n mship = \"Resident Active\";\n }\n if (mship.equals( \"RI\" )) {\n\n mship = \"Resident Inactive\";\n }\n if (mship.equals( \"RT\" )) {\n\n mship = \"Resident Twenty\";\n }\n if (mship.equals( \"RX\" )) {\n\n mship = \"Resident Absent\";\n }\n\n\n //\n // Now check the birth date and set anyone age 19 - 25 to 'Extended Junior'\n //\n if (birth == 19000101) { // if birth date mot good\n\n birth = 0;\n }\n\n\n //\n // Set the Member Types\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else { // spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n\n //\n // Set the Username\n //\n if (mtype.startsWith( \"Primary\" )) { // if primary member\n\n memid = mNum; // use mNum\n\n } else {\n\n memid = mNum + \"A\"; // use mNum + A\n }\n\n //\n // Set the password for Monagus\n //\n password = \"jjjj\";\n\n }\n\n } // end of IF club =\n\n\n //\n // Cherry Creek\n //\n/*\n if (club.equals( \"cherrycreek\" )) {\n\n found = true; // club found\n\n if (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n mship = toTitleCase(mship);\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"professional member honorary\" ) ||\n mship.startsWith( \"Reciprocal\" ) || mship.startsWith( \"Social\" )) {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) { // mship ok\n\n if (mship.startsWith( \"Corp Full Golf Founders Individ\" )) {\n\n mship = \"Corp Full Golf Founders Indiv\";\n\n } else {\n\n\n /* 3-13-08 ALLOW CORP FULL GOLF FOUNDERS FAMILY TO COME ACROSS AS IS - PER LARRY\n if (mship.startsWith( \"Corp Full Golf Founders\" )) {\n\n mship = \"Corp Full Golf Founders\";\n }\n */\n /*\n }\n\n\n //\n // Set the Member Types\n //\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n if (gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Adult Male\";\n\n } else { // unknown gender - check pri/spouse\n\n if (primary.equalsIgnoreCase( \"S\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n mtype = \"Adult Male\";\n }\n }\n }\n\n\n //\n // Set the Username\n //\n if (mtype.equals( \"Adult Male\" )) { // if primary member\n\n memid = mNum + \"-000\";\n\n } else {\n\n memid = mNum + \"-001\";\n }\n\n // if there is no posid, then use the memid\n if (posid.equals(\"\")) posid = memid;\n\n } else {\n\n skip = true;\n }\n\n } // end of IF club =\n*/\n\n //\n // Baltimore CC\n //\n if (club.equals( \"baltimore\" )) {\n\n found = true; // club found\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n // if there is no posid, then use the mNum\n if (posid.equals(\"\")) posid = mNum;\n\n\n mship2 = mship;\n mship = \"\";\n\n //\n // convert mship\n //\n\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF NON ACTIV DISC\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF NON ACTIV DISC\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF NON ACTIV\" )) { // supposed to be non?\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF HONORARY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF FULL SEAS\")) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Male Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF HONORARY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR GENT\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Dependent\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR LADIES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Dependent\";\n }\n\n // end non online members\n\n\n // start on members\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF PART SEAS DISC\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non-Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF FULL SEAS DISC\" )) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Male Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF PART SEAS DISC\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non-Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF FULL SEAS DISC\" )) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Female Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"JM Gent Season\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Junior Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Junior Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"JW Ladies Season\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Junior Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF PART SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Junior Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"LW Ladies Golf\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n //\n // New mship types (6/12/07)\n //\n if (mship2.equalsIgnoreCase( \"J GENT GOLF COLL STUD\" )) {\n\n mship = \"College Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF COLL STUD\" )) {\n\n mship = \"College Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Female Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR GENT GOLF ENT\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR LADIES GOLF ENT\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF EXT LEGASY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF EXT LEGASY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"J JUNIOR GENT NON GOLF GE\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n //\n // Skip this record if a valid mship type was not specified\n //\n if (mship.equals(\"\")) {\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n } // end if club == baltimore\n\n\n //\n // Providence\n //\n if (club.equals( \"providence\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" ) && (mship.equalsIgnoreCase( \"A\" ) || mship.equalsIgnoreCase( \"E\" ) ||\n mship.equalsIgnoreCase( \"Z\" ) || mship.equalsIgnoreCase( \"H\" ) || mship.equalsIgnoreCase( \"I\" ) ||\n mship.equalsIgnoreCase( \"L\" ) || mship.equalsIgnoreCase( \"S\" ) || mship.equalsIgnoreCase( \"ZA\" ))) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n //\n // Set the Member Type\n //\n mtype = \"Primary Male\"; // default\n\n// if (mNum.endsWith( \"B\" ) ||mNum.endsWith( \"C\" ) ||\n// mNum.endsWith( \"D\" ) || mNum.endsWith( \"E\" ) ||mNum.endsWith( \"F\" ) ||\n// mNum.endsWith( \"G\" ) || mNum.endsWith( \"H\" ) ||mNum.endsWith( \"I\" )) {\n//\n// mtype = \"Dependent\";\n//\n// } else {\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else { // primary\n\n if (primary.equalsIgnoreCase( \"P\" )) { // if Primary\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Primary Male\";\n\n } else {\n\n mtype = \"Primary Female\";\n }\n\n } else {\n\n mtype = \"Dependent\"; // all others = juniors\n }\n }\n\n //\n // Set the Mship Type\n //\n if (mship.equalsIgnoreCase( \"A\" )) {\n\n mship = \"Active\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"E\" )) {\n\n mship = \"Employee\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"H\" )) {\n\n mship = \"Honorary\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"I\" )) {\n\n mship = \"Inactive\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"L\" )) {\n\n mship = \"Member Resigning\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"S\" )) {\n\n mship = \"Suspended\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"Z\" ) || mship.equalsIgnoreCase( \"ZA\" )) {\n\n mship = \"Family Active\";\n\n } else {\n\n skip = true; // skip all others\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n }\n }\n }\n }\n }\n\n } else {\n\n skip = true; // skip this record\n\n if (!mship.equals( \"\" )) {\n\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n\n } // end of IF club\n\n //\n // Algonquin\n //\n if (club.equals( \"algonquin\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // Set the Membership and Member Types - both dependent on the mship received\n //\n mtype = \"Primary Male\"; // default\n\n mship2 = \"\"; // init as none\n\n if (mship.equalsIgnoreCase( \"Active\" )) {\n\n mship2 = \"Active\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Associate\" )) {\n\n mship2 = \"Associate\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Senior\" )) {\n\n mship2 = \"Senior\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"non-res\" )) {\n\n mship2 = \"Non-Res\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"nonresgolf\" )) {\n\n mship2 = \"Nonresgolf\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Social\" )) {\n\n mship2 = \"Social\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Clerical M\" )) {\n\n mship2 = \"Clerical M\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Junior Class A\" ) || mship.equalsIgnoreCase( \"Jr Class A\" )) {\n\n mship2 = \"Jr Class A\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Junior Class B\" ) || mship.equalsIgnoreCase( \"Jr Class B\" )) {\n\n mship2 = \"Jr Class B\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Junior Class C\" ) || mship.equalsIgnoreCase( \"Jr Class C\" )) {\n\n mship2 = \"Jr Class C\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Spouse\" ) || mship.equalsIgnoreCase( \"Child\" )) { // if Spouse or Dependent\n\n if (mship.equalsIgnoreCase( \"Child\" )) { // if Dependent\n\n mtype = \"Dependent\";\n\n } else {\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n\n\n //\n // Get the mship type from the primary\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username != ? AND memNum = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n pstmt2.setString(2, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship2 = rs.getString(\"m_ship\"); // spouse = use primary's mship type\n }\n pstmt2.close();\n\n } // end of IF spouse or child\n\n if (mship2.equals( \"\" )) { // if matching mship NOT found\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else {\n\n mship = mship2; // set new mship\n }\n\n } else { // mship not provided\n\n skip = true; // skip this record\n }\n\n } // end of IF Algonquin\n\n\n //\n // Bent Tree\n //\n if (club.equals( \"benttreecc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equalsIgnoreCase( \"Active\" ) && !mship.startsWith( \"D\" )) { // if NOT Active or Dxx\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MSHIP invalid!\";\n\n } else {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n\n //\n // Set the Member Type\n //\n mtype = \"Member Male\"; // default\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else { // primary\n\n if (primary.equalsIgnoreCase( \"P\" )) { // if Primary\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Member Male\";\n\n } else {\n\n mtype = \"Member Female\";\n }\n\n } else {\n\n mtype = \"Junior\"; // all others = juniors\n }\n }\n\n //\n // Convert the mship from Dxx to real value\n //\n if (!mship.equalsIgnoreCase( \"Active\" )) { // accept Active as is\n\n if (mship.equalsIgnoreCase( \"D01\" )) {\n\n mship = \"Resident\";\n\n } else if (mship.equalsIgnoreCase( \"D02\" )) {\n\n mship = \"Young Executive\";\n\n } else if (mship.equalsIgnoreCase( \"D03\" ) || mship.equalsIgnoreCase( \"D05\" )) {\n\n mship = \"Tennis\";\n\n } else if (mship.equalsIgnoreCase( \"D04\" ) || mship.equalsIgnoreCase( \"D11\" )) {\n\n mship = \"Junior\";\n\n } else if (mship.equalsIgnoreCase( \"D06\" )) {\n\n mship = \"Temp Non-Resident\";\n\n } else if (mship.equalsIgnoreCase( \"D08\" )) {\n\n mship = \"Non-Resident\";\n\n } else if (mship.equalsIgnoreCase( \"D09\" )) {\n\n mship = \"Senior\";\n\n } else if (mship.equalsIgnoreCase( \"D12\" )) {\n\n mship = \"Employee\";\n\n } else {\n\n skip = true;\n }\n }\n } // end of IF mship ok\n\n } // end of IF club\n\n\n //\n // Orchid Island\n //\n if (club.equals( \"orchidisland\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // Primary = 1234\n\n if (mship.equalsIgnoreCase(\"Depend\") ||\n (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\"))) {\n\n memid = memid + \"-\" + primary; // 1234-2\n\n mtype = \"Dependents\";\n\n } else if (mship.equalsIgnoreCase( \"Spouse\" ) || primary.equalsIgnoreCase( \"S\" )) {\n\n memid = memid + \"-1\"; // 1234-1\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n } else {\n \n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n\n\n\n\n //\n // Set mship\n //\n if (mship.endsWith( \"TEN\" )) {\n\n mship = \"Beach & Tennis\";\n\n } else if (mship.endsWith( \"GOLF\" ) || mship.equalsIgnoreCase(\"Employee\")) {\n\n if (mship.equalsIgnoreCase(\"I GOLF\")) {\n mship = \"Invitational Golf\";\n } else {\n mship = \"EQ Golf\";\n }\n\n } else {\n\n //\n // Spouse or Dependent - look for Primary mship type and use that\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username != ? AND (m_ship = 'EQ Golf' OR m_ship = 'Beach & Tennis' OR m_ship = 'Invitational Golf') AND memNum = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n pstmt2.setString(2, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\"); // use primary mship type\n } else {\n skip = true;\n }\n pstmt2.close();\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n\n //\n // Colleton River\n //\n if (club.equals( \"colletonriverclub\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // Primary = 1234\n\n mtype = \"Adult Male\"; // default\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n memid = memid + \"-\" + primary; // 1234-2\n\n mtype = \"Dependents\";\n\n } else {\n\n if (primary.equalsIgnoreCase( \"S\" )) {\n\n memid = memid + \"-1\"; // 1234-1\n }\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n }\n\n // Convert 'FULL3' mship to 'FULL'\n if (mship.equalsIgnoreCase(\"FULL3\")) {\n mship = \"FULL\";\n }\n\n\n //\n // Set mship\n //\n if (mship.equalsIgnoreCase( \"Member\" )) {\n\n //mship = \"Resident\"; // do not change others\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n\n //\n // Claremont CC\n //\n if (club.equals( \"claremontcc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n\n mtype = \"Adult Male\"; // default\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Juniors\";\n\n } else {\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n }\n\n //\n // Set mship - TEMP until CE fixes them !!!!!!!!!!!!!!!!!!!!!!!\n //\n if (mship.equalsIgnoreCase( \"Member\" )) {\n\n mship = \"Employee\";\n\n } else if (mship.equalsIgnoreCase(\"Exempt\")) {\n\n mship = \"REG\";\n\n } else if (mship.equalsIgnoreCase(\"active\") || mship.equalsIgnoreCase(\"Oak Tree\") || mship.equalsIgnoreCase(\"Standards\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n /*\n //\n // Meridian GC\n //\n if (club.equals( \"meridiangc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n\n mtype = \"Primary Male\"; // default\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Dependent\";\n\n } else if (primary.equalsIgnoreCase(\"P\") && gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Primary Male\";\n\n } else if (primary.equalsIgnoreCase(\"P\") && gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else if (primary.equalsIgnoreCase(\"S\") && gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Non-Primary Female\";\n\n } else if (primary.equalsIgnoreCase(\"S\") && gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Non-Primary Male\";\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n\n\n*/\n if (club.equals(\"berkeleyhall\")) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n posid = mNum; // they use their member numbers as their posid\n webid = memid; // they use their member id (our username) as their webid\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Dependent\";\n\n } else if (gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Adult Male\";\n\n } else if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end if berkeleyhall\n\n\n if (club.equals(\"indianhillscc\")) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Social\" ) || mship.equalsIgnoreCase( \"Social SS\" ) || mship.equalsIgnoreCase( \"Spouse\" ) ||\n mship.equalsIgnoreCase( \"Spouse S\" ) || mship.equalsIgnoreCase( \"Child\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n\n posid = mNum; // they use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum;\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"-1\"; // spouse\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (2 and up)\n }\n }\n\n mship = toTitleCase(mship);\n\n //\n // Set the member types\n //\n if (mship.startsWith(\"Spouse\")) {\n\n if (gender.equalsIgnoreCase(\"M\")) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else {\n\n if (mship.startsWith(\"Child\")) {\n\n if (gender.equalsIgnoreCase(\"M\")) {\n\n mtype = \"Junior Male\";\n\n } else {\n\n mtype = \"Junior Female\";\n }\n\n } else { // all others\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n }\n }\n\n //\n // Convert some mship types\n //\n if (mship.equals(\"Found\") || mship.equals(\"Spouse F\") || mship.equals(\"Child F\") ||\n mship.equalsIgnoreCase(\"G/F SS\") || mship.equalsIgnoreCase(\"Golf SS\")) {\n\n mship = \"Foundation\";\n\n } else {\n\n if (mship.equals(\"Interm\") || mship.equals(\"Spouse I\") || mship.equals(\"Child I\")) {\n\n mship = \"Intermediate\";\n }\n }\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if indianhillscc\n\n /*\n if (club.equals(\"rtjgc\")) { // Robert Trent Jones GC\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\") || gender.equalsIgnoreCase(\"F\")) {\n\n memid = mNum + \"A\"; // spouse or female\n\n } else {\n\n memid = mNum; // primary males\n }\n\n\n //\n // Set the member type\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n\n //\n // Set the membership type\n //\n if (mship.equalsIgnoreCase(\"HON\")) {\n\n mship = \"Honorary\";\n\n } else {\n\n if (mship.endsWith(\"IR\")) {\n\n mship = \"Individual Resident\";\n\n } else {\n\n if (mship.endsWith(\"SNR\")) {\n\n mship = \"Senior Non Resident\";\n\n } else {\n\n if (mship.endsWith(\"SR\")) {\n\n mship = \"Senior\";\n\n } else {\n\n if (mship.endsWith(\"CR\")) {\n\n mship = \"Corporate Resident\";\n\n } else {\n\n if (mship.endsWith(\"CNR\")) {\n\n mship = \"Corporate Non Resident\";\n\n } else {\n\n if (mship.endsWith(\"INR\")) {\n\n mship = \"Individual Non Resident\";\n\n } else {\n\n if (mship.endsWith(\"P\")) {\n\n mship = \"Playing Member\";\n\n } else {\n\n mship = \"Junior\";\n }\n }\n }\n }\n }\n }\n }\n }\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if Robert Trent Jones GC\n */\n\n if (club.equals(\"oakhillcc\")) { // Oak Hill CC\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"A\"; // spouse\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum; // Primary\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (nnn-p)\n }\n }\n\n\n //\n // Set the member type\n //\n if (primary.equalsIgnoreCase(\"P\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n }\n\n //\n // Set the membership type\n //\n mship = \"G\"; // all are Golf\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if Oak Hill CC\n\n\n if (club.equals(\"internationalcc\")) { // International CC\n\n found = true; // club found\n\n mship = toTitleCase(mship);\n\n //\n // Determine if we should process this record\n //\n if (mship.equalsIgnoreCase( \"Corp-Social\" ) || mship.equalsIgnoreCase( \"Employees\" ) ||\n mship.equalsIgnoreCase( \"Leave Of Absence\" ) || mship.equalsIgnoreCase( \"Member\" ) ||\n mship.equalsIgnoreCase( \"Social\" ) || mship.equalsIgnoreCase( \"Social-Wci\" ) ||\n mship.equalsIgnoreCase( \"Bad Addresses\" ) || mship.equalsIgnoreCase( \"Expelled\" ) ||\n mship.equalsIgnoreCase( \"Resigned\" ) || mship.equalsIgnoreCase( \"Parties\" ) ||\n mship.equalsIgnoreCase( \"Clubhouse\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n \n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n/*\n // Custom to handle memNum 1217 differently, as they have to have the primary and spouse flip-flopped\n if (mNum.equals(\"1217\")) {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n primary = \"S\";\n } else if (primary.equalsIgnoreCase(\"S\")) {\n primary = \"P\";\n }\n }\n*/\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"A\"; // spouse\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum; // Primary\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (nnn-p)\n }\n }\n\n\n //\n // Set the member type\n //\n if (primary.equalsIgnoreCase(\"P\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n // If Spouse/Dependent, hit the database and use the Primary's membership type (if exists)\n try {\n PreparedStatement pstmtTemp = null;\n ResultSet rsTemp = null;\n\n pstmtTemp = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n pstmtTemp.clearParameters();\n pstmtTemp.setString(1, mNum);\n\n rsTemp = pstmtTemp.executeQuery();\n\n if (rsTemp.next()) {\n \n mship = rsTemp.getString(\"m_ship\"); // get primary's mship type\n \n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NO PRIMARY FOUND!\";\n }\n\n pstmtTemp.close();\n \n } catch (Exception ignore) { }\n }\n\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if International CC\n\n\n if (club.equals(\"greenwich\")) { // Greenwich CC\n\n found = true; // club found\n\n mship = toTitleCase(mship);\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n //\n // mship - ALL = Golf !!!!!!\n //\n mship = \"Golf\";\n\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"A\"; // spouse\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum; // Primary\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (nnn-p)\n }\n }\n\n\n //\n // Set the member type\n //\n if (primary.equalsIgnoreCase(\"P\") || primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if Greenwich CC\n\n\n\n //******************************************************************\n // TPC Southwind\n //******************************************************************\n //\n if (club.equals(\"tpcsouthwind\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n }\n\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcsouthwind\n\n\n //******************************************************************\n // TPC Sugarloaf\n //******************************************************************\n //\n if (club.equals(\"tpcsugarloaf\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" ) || mship.equalsIgnoreCase(\"Charter Social\") || mship.equalsIgnoreCase(\"Charter Swim/Tennis\")) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n } else if (primary.equals(\"7\")) {\n memid += \"G\";\n }\n\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcsugarloaf\n\n\n //******************************************************************\n // TPC Wakefield Plantation\n //******************************************************************\n //\n if (club.equals(\"tpcwakefieldplantation\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" ) || mship.equalsIgnoreCase(\"Sports Club\") || mship.equalsIgnoreCase(\"Sports Club Non-Resident\")) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcwakefieldplantation\n\n\n //******************************************************************\n // TPC River Highlands\n //******************************************************************\n //\n if (club.equals(\"tpcriverhighlands\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcriverhighlands\n\n\n //******************************************************************\n // TPC River's Bend\n //******************************************************************\n //\n if (club.equals(\"tpcriversbend\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcriversbend\n\n //******************************************************************\n // TPC Jasna Polana\n //******************************************************************\n //\n if (club.equals(\"tpcjasnapolana\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcjasnapolana\n\n\n //******************************************************************\n // TPC Boston\n //******************************************************************\n //\n if (club.equals(\"tpcboston\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n\n if (mship.equalsIgnoreCase(\"CHARTER NON-REFUNDABLE\")) {\n mship = \"CHARTER\";\n }\n }\n\n } // end if tpcboston\n\n //******************************************************************\n // TPC Craig Ranch\n //******************************************************************\n //\n if (club.equals(\"tpccraigranch\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpccraigranch\n\n\n //******************************************************************\n // TPC Potomac\n //******************************************************************\n //\n if (club.equals(\"tpcpotomac\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n // memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n //memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n/*\n if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n } else if (primary.equals(\"7\")) {\n memid += \"G\";\n }\n */\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n/*\n if (primary.equals(\"8\")) {\n memid += \"H\";\n } else if (primary.equals(\"9\")) {\n memid += \"I\";\n } else if (primary.equals(\"10\")) {\n memid += \"J\";\n } else if (primary.equals(\"11\")) {\n memid += \"K\";\n }\n */\n primary = \"AC\";\n }\n }\n\n } // end if tpcpotomac\n\n\n //******************************************************************\n // TPC Summerlin\n //******************************************************************\n //\n if (club.equals(\"tpcsummerlin\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\") ||\n primary.equals(\"8\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcsummerlin\n\n\n //******************************************************************\n // TPC Twin Cities\n //******************************************************************\n //\n if (club.equals(\"tpctc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n /*\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else if ((primary.equals(\"1\") || primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\") || primary.equals(\"8\")) &&\n birth == 0) {\n skip = true;\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -BIRTH DATE missing for DEPENDENT!\";\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n\n mship = toTitleCase(mship); // make sure mship is titlecased\n\n\n if (mship.equalsIgnoreCase(\"Social\") || mship.equalsIgnoreCase(\"Member\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n if (primary.equals(\"1\") || primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\") || primary.equals(\"8\")) {\n\n //\n // Determine the age in years\n //\n\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 16 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 18 yrs old\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Certified Dependent Female\";\n } else {\n mtype = \"Certified Dependent Male\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n if (primary.equals(\"1\")) {\n memid = memid + \"B\";\n } else if (primary.equals(\"2\")) {\n memid = memid + \"C\";\n } else if (primary.equals(\"3\")) {\n memid = memid + \"D\";\n } else if (primary.equals(\"4\")) {\n memid = memid + \"E\";\n } else if (primary.equals(\"5\")) {\n memid = memid + \"F\";\n } else if (primary.equals(\"6\")) {\n memid = memid + \"G\";\n } else if (primary.equals(\"7\")) {\n memid = memid + \"H\";\n } else if (primary.equals(\"8\")) {\n memid = memid + \"I\";\n }\n\n primary = \"D\";\n\n } else if (primary.equals(\"9\") || primary.equals(\"10\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n\n if (primary.equals(\"9\")) {\n memid = memid + \"J\";\n } else if (primary.equals(\"10\")) {\n memid = memid + \"K\";\n }\n\n } else if (primary.equalsIgnoreCase(\"P\")) { // Primary\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else {\n skip = true;\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -UNKNOWN RELATIONSHIP TYPE!\";\n }\n }\n */\n } // end if tpctc\n\n/*\n //******************************************************************\n // Royal Oaks CC - Houston\n //******************************************************************\n //\n if (club.equals(\"royaloakscc\")) {\n\n int mshipInt = 0;\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid = memid + \"A\";\n } else if (primary.equals(\"2\")) {\n mtype = \"Dependent\";\n memid = memid + \"B\";\n } else if (primary.equals(\"3\")) {\n mtype = \"Dependent\";\n memid = memid + \"C\";\n } else if (primary.equals(\"4\")) {\n mtype = \"Dependent\";\n memid = memid + \"D\";\n } else if (primary.equals(\"5\")) {\n mtype = \"Dependent\";\n memid = memid + \"E\";\n } else if (primary.equals(\"6\")) {\n mtype = \"Dependent\";\n memid = memid + \"F\";\n } else if (primary.equals(\"7\")) {\n mtype = \"Dependent\";\n memid = memid + \"G\";\n }\n\n if (gender.equalsIgnoreCase(\"F\") && !mtype.equals(\"Dependent\")) {\n mtype = \"Adult Female\";\n } else if (!mtype.equals(\"Dependent\")) {\n mtype = \"Adult Male\";\n }\n\n try {\n mshipInt = Integer.parseInt(mNum);\n } catch (Exception exc) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Invalid Member Number!\";\n }\n\n if (!skip) {\n if (mshipInt >= 0 && mshipInt < 200) {\n mship = \"Honorary\";\n } else if (mshipInt >= 500 && mshipInt < 600) {\n mship = \"Executive Honorary\";\n } else if (mshipInt >= 1000 && mshipInt < 2000) {\n mship = \"Golf\";\n } else if (mshipInt >= 2000 && mshipInt < 3000) {\n mship = \"Executive\";\n } else if (mshipInt >= 3000 && mshipInt < 3400) {\n mship = \"Sports Club w/Golf\";\n } else if (mshipInt >= 5000 && mshipInt < 5400) {\n mship = \"Preview Golf\";\n } else if (mshipInt >= 5400 && mshipInt < 5700) {\n mship = \"Preview Executive\";\n } else if (mshipInt >= 7000 && mshipInt < 7500) {\n mship = \"Sampler Golf\";\n } else if (mshipInt >= 7500 && mshipInt < 8000) {\n mship = \"Sampler Executive\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n }\n } // end if royaloakscc\n*/\n\n //******************************************************************\n // TPC San Francisco Bay\n //******************************************************************\n //\n if (club.equals(\"tpcsfbay\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (mship.equalsIgnoreCase(\"Social\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else { // Dependent\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n memid = memid + primary;\n primary = \"D\";\n }\n }\n } // end if tpcsfbay\n\n/*\n //******************************************************************\n // Mission Viejo - missionviejo\n //******************************************************************\n //\n if (club.equals(\"missionviejo\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n memid += \"B\";\n mtype = \"Green\";\n } else {\n gender = \"M\";\n memid += \"A\";\n mtype = \"Gold\";\n }\n\n if (mship.equalsIgnoreCase(\"Employee\")) {\n mship = \"Staff\";\n } else if (mship.equalsIgnoreCase(\"Equity\") || mship.equalsIgnoreCase(\"Honorary\") || mship.equalsIgnoreCase(\"Member\")) {\n mship = \"Equity\";\n } else if (mship.equalsIgnoreCase(\"Non-Res\") || mship.equalsIgnoreCase(\"Non-Resident\")) {\n mship = \"Non-Res\";\n } else if (mship.equalsIgnoreCase(\"Senior\")) {\n mship = \"Senior\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if missionviejo\n\n*/\n\n //******************************************************************\n // Cherry Hills CC - cherryhills\n //******************************************************************\n //\n if (club.equals(\"cherryhills\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum + \"-000\"; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n mtype = \"Spouse\";\n } else {\n mtype = \"Member\";\n }\n \n if (mship.equalsIgnoreCase(\"CLG\")) {\n mship = \"Clergy\";\n } else if (mship.equalsIgnoreCase(\"RES\")) {\n mship = \"Resident\";\n } else if (mship.equalsIgnoreCase(\"SRA\")) {\n mship = \"Special Resident A\";\n } else if (mship.equalsIgnoreCase(\"SRB\")) {\n mship = \"Special Resident B\";\n } else if (mship.equalsIgnoreCase(\"SRC\")) {\n mship = \"Special Resident C\";\n } else if (mship.equalsIgnoreCase(\"NRE\")) {\n mship = \"Non-Resident\";\n } else if (mship.equalsIgnoreCase(\"SSP\")) {\n mship = \"Surviving Spouse\";\n } else if (mship.equalsIgnoreCase(\"FSP\")) {\n mship = \"Former Spouse\";\n } else if (mship.equalsIgnoreCase(\"LFE\")) {\n mship = \"Life Member\";\n } else if (mship.equalsIgnoreCase(\"HLF\")) {\n mship = \"Honorary Life\";\n } else if (mship.equalsIgnoreCase(\"SEN\")) {\n mship = \"Senior\";\n } else if (mship.equalsIgnoreCase(\"RE\")) {\n mship = \"Resident Emeritus\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if cherryhills\n\n //\n // Mission Viejo CC\n //\n /*\n if (club.equals( \"missionviejo\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Social\" ) || mship.equalsIgnoreCase( \"Social SS\" ) || mship.equalsIgnoreCase( \"Spouse\" ) ||\n mship.equalsIgnoreCase( \"Spouse S\" ) || mship.equalsIgnoreCase( \"Child\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n\n }\n\n } // end of IF missionviejo club\n*/\n\n //******************************************************************\n // Philadelphia Cricket Club\n //******************************************************************\n //\n if (club.equals( \"philcricket\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is not an admin record or missing mship/mtype\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (lname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' MEMBERSHIP TYPE!\";\n } else {\n\n if (mship.equalsIgnoreCase(\"Leave of Absence\") || mship.equalsIgnoreCase(\"Loa\") || mship.equalsIgnoreCase(\"Member\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n } else if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n } else if (primary.equals(\"7\")) {\n memid += \"G\";\n } else if (primary.equals(\"8\")) {\n memid += \"H\";\n } else if (primary.equals(\"9\")) {\n memid += \"I\";\n }\n\n //\n // determine member type\n //\n if (mship.equalsIgnoreCase( \"golf stm family\" ) || mship.equalsIgnoreCase( \"golf stm ind.\" )) {\n\n lname = lname + \"*\"; // add an astericks\n }\n\n // if mtype = no golf, add ^ to their last name\n if (mship.equalsIgnoreCase( \"no golf\" )) {\n\n lname += \"^\";\n }\n\n mship = toTitleCase(mship); // mship = mtype\n\n }\n } // end of IF club = philcricket\n \n/*\n //******************************************************************\n // Sea Pines CC - seapines\n //******************************************************************\n //\n if (club.equals(\"seapines\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n if (mship.equalsIgnoreCase(\"EQUITY-NP\") || mship.equalsIgnoreCase(\"RESIGN A\") || mship.equalsIgnoreCase(\"ASSOC\") || mship.equalsIgnoreCase(\"NON-EQ-NP\")) {\n mship = \"Social\";\n } else if (mship.equalsIgnoreCase(\"SELECT\") || mship.equalsIgnoreCase(\"TENNIS\")) {\n mship = \"Tennis\";\n } else if (mship.equalsIgnoreCase(\"GOLF\") || mship.equalsIgnoreCase(\"GOLF-CART\")) {\n mship = \"Golf\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if seapines\n*/\n\n //\n //******************************************************************\n // Common processing - add or update the member record\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\") && !memid.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n memid_old = \"\";\n fname_old = \"\";\n lname_old = \"\";\n mi_old = \"\";\n mship_old = \"\";\n mtype_old = \"\";\n email_old = \"\";\n mNum_old = \"\";\n ghin_old = \"\";\n bag_old = \"\";\n posid_old = \"\";\n email2_old = \"\";\n phone_old = \"\";\n phone2_old = \"\";\n suffix_old = \"\";\n u_hcap_old = 0;\n c_hcap_old = 0;\n birth_old = 0;\n email_bounce1 = 0;\n email_bounce2 = 0;\n\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!phone2.equals( \"\" )) {\n\n phone2 = truncate(phone2, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n if (!webid.equals( \"\" )) {\n\n webid = truncate(webid, 15);\n }\n\n //\n // Use try/catch here so processing will continue on rest of file if it fails\n //\n try {\n\n if (useWebid == false) { // use webid to locate member?\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n\n } else { // use webid\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE webid = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, webid);\n }\n\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if(rs.next()) {\n\n memid_old = rs.getString(\"username\"); // get username in case we used webid\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n inact_old = rs.getInt(\"inact\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n\n }\n pstmt2.close(); // close the stmt\n\n\n boolean memFound = false;\n boolean dup = false;\n boolean userChanged = false;\n boolean nameChanged = false;\n String dupuser = \"\";\n String dupmnum = \"\";\n String dupwebid = \"\";\n\n webid_new = webid; // default\n\n if ((club.equals(\"tpcsouthwind\") || club.equals(\"tpcpotomac\") || club.equals(\"tpcsugarloaf\")) && !memid.equals(memid_old)) { // Look into making this change for ALL tpc clubs!\n\n // memid has changed! Update the username\n memid_new = memid;\n userChanged = true;\n\n } else {\n memid_new = memid_old; // Don't change for old clubs\n }\n\n //\n // If member NOT found, then check if new member OR id has changed\n //\n if (fname_old.equals( \"\" )) { // if member NOT found\n\n //\n // New member - first check if name already exists\n //\n pstmt2 = con.prepareStatement (\n \"SELECT username, memNum, webid FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n dupuser = rs.getString(\"username\"); // get this username\n dupmnum = rs.getString(\"memNum\");\n dupwebid = rs.getString(\"webid\"); // get this webid\n\n if (club.equals( \"virginiacc\" ) || club.equals( \"algonquin\" ) || club.equals( \"congressional\" )) {\n\n dup = true; // do not change members for these clubs\n\n } else {\n\n //\n // name already exists - see if this is the same member\n //\n if (!dupmnum.equals( \"\" ) && dupmnum.equals( mNum )) { // if name and mNum match, then memid or webid must have changed\n\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // set new ids\n memid_new = dupuser;\n memid_old = dupuser; // update this record\n\n } else {\n\n webid_new = dupwebid; // set new ids\n memid_new = memid;\n memid_old = dupuser; // update this record\n userChanged = true; // indicate the username has changed\n }\n\n memFound = true; // update the member\n\n } else {\n\n dup = true; // dup member - do not add\n }\n }\n\n }\n pstmt2.close(); // close the stmt\n\n } else { // member found\n\n memFound = true;\n }\n\n //\n // Now, update the member record if existing member\n //\n if (memFound == true) { // if member exists\n\n changed = false; // init change indicator\n\n lname_new = lname_old;\n\n if (!lname.equals( \"\" ) && !lname_old.equals( lname )) {\n\n lname_new = lname; // set value from CE record\n changed = true;\n nameChanged = true;\n }\n\n fname_new = fname_old;\n\n if (club.equals( \"virginiacc\" ) || club.equals( \"algonquin\" ) || club.equals( \"congressional\" )) {\n\n fname = fname_old; // DO NOT change first names\n }\n\n if (!fname.equals( \"\" ) && !fname_old.equals( fname )) {\n\n fname_new = fname; // set value from CE record\n changed = true;\n nameChanged = true;\n }\n\n mi_new = mi_old;\n\n if (!mi.equals( \"\" ) && !mi_old.equals( mi )) {\n\n mi_new = mi; // set value from CE record\n changed = true;\n nameChanged = true;\n }\n\n mship_new = mship_old;\n\n if (!mship.equals( \"\" ) && !mship_old.equals( mship )) {\n\n mship_new = mship; // set value from CE record\n changed = true;\n }\n\n mtype_new = mtype_old;\n birth_new = birth_old;\n\n if (club.equals( \"meridiangc\" )) { // TEMP until they fix gender !!!!!!!!!!!!!!!!!!!!!\n\n mtype = mtype_old; // DO NOT change mtype\n }\n\n if (!mtype.equals( \"\" ) && (club.equalsIgnoreCase(\"brantford\") || club.equalsIgnoreCase(\"oakhillcc\") || !mtype.equals( \"Dependent\" )) && !mtype_old.equals( mtype )) {\n\n mtype_new = mtype; // set value from CE record\n changed = true;\n }\n\n if (birth > 0 && birth != birth_old) {\n\n birth_new = birth; // set value from CE record\n changed = true;\n }\n\n ghin_new = ghin_old;\n\n if (!ghin.equals( \"\" ) && !ghin_old.equals( ghin )) {\n\n ghin_new = ghin; // set value from CE record\n changed = true;\n }\n\n bag_new = bag_old;\n\n if (!bag.equals( \"\" ) && !bag_old.equals( bag )) {\n\n bag_new = bag; // set value from CE record\n changed = true;\n }\n\n posid_new = posid_old;\n\n if (!posid.equals( \"\" ) && !posid_old.equals( posid )) {\n\n posid_new = posid; // set value from CE record\n changed = true;\n }\n\n phone_new = phone_old;\n\n if (!phone.equals( \"\" ) && !phone_old.equals( phone )) {\n\n phone_new = phone; // set value from CE record\n changed = true;\n }\n\n phone2_new = phone2_old;\n\n if (!phone2.equals( \"\" ) && !phone2_old.equals( phone2 )) {\n\n phone2_new = phone2; // set value from CE record\n changed = true;\n }\n\n suffix_new = suffix_old;\n\n if (!suffix.equals( \"\" ) && !suffix_old.equals( suffix )) {\n\n suffix_new = suffix; // set value from CE record\n changed = true;\n }\n\n email_new = email_old; // start with old emails\n email2_new = email2_old;\n\n //\n // Update email addresses if specified and different than current\n //\n if ((!email.equals( \"\" ) || club.startsWith(\"tpc\")) && !email_old.equals( email )) {\n\n email_new = email; // set value from CE record\n changed = true;\n email_bounce1 = 0; // reset bounce flag\n }\n\n if (club.equals(\"colletonriverclub\")) { // don't update email2 for these clubs\n email2 = email2_old;\n }\n\n if ((!email2.equals( \"\" ) || club.startsWith(\"tpc\")) && !email2_old.equals( email2 )) {\n\n email2_new = email2; // set value from CE record\n changed = true;\n email_bounce2 = 0; // reset bounce flag\n }\n\n // don't allow both emails to be the same\n if (email_new.equalsIgnoreCase(email2_new)) email2_new = \"\";\n\n\n mNum_new = mNum_old; // do not change mNums (?? not sure why we do this for CE clubs ??)\n\n if (club.equals( \"weeburn\" ) || club.equals( \"benttreecc\" ) || club.equals( \"algonquin\" ) ||\n club.equals( \"berkeleyhall\" ) || club.equals( \"cherrycreek\" ) || club.equals(\"internationalcc\") ||\n club.startsWith( \"tpc\" ) || club.equals( \"missionviejo\" ) || club.equals(\"virginiacc\") ||\n club.equals(\"oakhillcc\") || club.equals( \"orchidisland\" )) { // change mNums for some clubs\n\n if (!mNum.equals( \"\" ) && !mNum_old.equals( mNum )) {\n\n mNum_new = mNum; // set value from CE record\n changed = true;\n }\n }\n\n inact_new = 0; // do not change inact status for most clubs\n\n if (club.equals( \"congressional\" )) { // change status for Congressional\n\n if (inact_new != inact) { // if status has changed\n\n inact_new = inact; // set value from CE record\n changed = true;\n }\n }\n\n\n if (club.equals( \"benttreecc\" )) { // special processing for Bent Tree\n\n String tempM = remZeroS(mNum_old); // strip alpha from our old mNum\n\n if ((tempM.startsWith(\"5\") || tempM.startsWith(\"7\")) && inact_old == 1) {\n\n // If our mNum contains an old inactive value and the member is inactive\n // then set him active and let mNum change (above).\n\n inact_new = inact; // set value from CE record (must be active to get this far)\n }\n }\n\n\n //\n // Update our record if something has changed\n //\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET username = ?, name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, ghin = ?, bag = ?, birth = ?, posid = ?, email2 = ?, phone1 = ?, \" +\n \"phone2 = ?, name_suf = ?, webid = ?, inact = ?, last_sync_date = now(), gender = ?, \" +\n \"email_bounced = ?, email2_bounced = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid_new);\n pstmt2.setString(2, lname_new);\n pstmt2.setString(3, fname_new);\n pstmt2.setString(4, mi_new);\n pstmt2.setString(5, mship_new);\n pstmt2.setString(6, mtype_new);\n pstmt2.setString(7, email_new);\n pstmt2.setString(8, mNum_new);\n pstmt2.setString(9, ghin_new);\n pstmt2.setString(10, bag_new);\n pstmt2.setInt(11, birth_new);\n pstmt2.setString(12, posid_new);\n pstmt2.setString(13, email2_new);\n pstmt2.setString(14, phone_new);\n pstmt2.setString(15, phone2_new);\n pstmt2.setString(16, suffix_new);\n pstmt2.setString(17, webid_new);\n pstmt2.setInt(18, inact_new);\n pstmt2.setString(19, gender);\n pstmt2.setInt(20, email_bounce1);\n pstmt2.setInt(21, email_bounce2);\n\n pstmt2.setString(22, memid_old);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n ucount++; // count records updated\n\n //\n // Member updated - now see if the username or name changed\n //\n if (userChanged == true || nameChanged == true) { // if username or name changed\n\n //\n // username or name changed - we must update other tables now\n //\n StringBuffer mem_name = new StringBuffer( fname_new ); // get the new first name\n\n if (!mi_new.equals( \"\" )) {\n mem_name.append(\" \" +mi_new); // new mi\n }\n mem_name.append(\" \" +lname_new); // new last name\n\n String newName = mem_name.toString(); // convert to one string\n\n Admin_editmem.updTeecurr(newName, memid_new, memid_old, con); // update teecurr with new values\n\n Admin_editmem.updTeepast(newName, memid_new, memid_old, con); // update teepast with new values\n\n Admin_editmem.updLreqs(newName, memid_new, memid_old, con); // update lreqs with new values\n\n Admin_editmem.updPartner(memid_new, memid_old, con); // update partner with new values\n\n Admin_editmem.updEvents(newName, memid_new, memid_old, con); // update evntSignUp with new values\n\n Admin_editmem.updLessons(newName, memid_new, memid_old, con); // update the lesson books with new values\n }\n\n\n } else { // member NOT found\n\n\n if (dup == false && !fname.equals(\"\") && !lname.equals(\"\")) { // if name does not already exist\n\n //\n // New member - add it\n //\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, \" +\n \"webid, last_sync_date, gender) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,'',?,?,?,'',?,?,now(),?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, email2);\n pstmt2.setString(17, phone);\n pstmt2.setString(18, phone2);\n pstmt2.setString(19, suffix);\n pstmt2.setString(20, webid);\n pstmt2.setString(21, gender);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n\n ncount++; // count records added (new)\n\n } else if (dup) {\n errCount++;\n errMsg = errMsg + \"\\n -Dup user found:\\n\" +\n \" new: memid = \" + memid + \" : cur: \" + dupuser + \"\\n\" +\n \" webid = \" + webid + \" : \" + dupwebid + \"\\n\" +\n \" mNum = \" + mNum + \" : \" + dupmnum;\n }\n }\n\n pcount++; // count records processed (not skipped)\n\n\n }\n catch (Exception e3b) {\n errCount++;\n errMsg = errMsg + \"\\n -Error2 processing roster (record #\" +rcount+ \") for \" +club+ \"\\n\" +\n \" line = \" +line+ \": \" + e3b.getMessage(); // build msg\n }\n\n } else {\n\n // Only report errors that AREN'T due to skip == true, since those were handled earlier!\n if (!found) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBER NOT FOUND!\";\n }\n if (fname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n }\n if (lname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -LAST NAME missing!\";\n }\n if (memid.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -USERNAME missing!\";\n }\n\n } // end of IF skip\n\n } // end of IF inactive\n\n } // end of IF minimum requirements\n\n } // end of IF tokens\n\n } // end of IF header row\n\n // log any errors and warnings that occurred\n if (errCount > 0) {\n totalErrCount += errCount;\n errList.add(errMemInfo + \"\\n *\" + errCount + \" error(s) found*\" + errMsg + \"\\n\");\n }\n if (warnCount > 0) {\n totalWarnCount += warnCount;\n warnList.add(errMemInfo + \"\\n *\" + warnCount + \" warning(s) found*\" + warnMsg + \"\\n\");\n }\n } // end of while\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n \n \n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n\n }\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster (record #\" +rcount+ \") for \" +club+ \", line = \" +line+ \": \" + e3.getMessage() + \"\\n\"; // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.ceSync: \"; // reset msg\n }\n\n // Print error and warning count totals to error log\n SystemUtils.logErrorToFile(\"\" +\n \"Total Errors Found: \" + totalErrCount + \"\\n\" +\n \"Total Warnings Found: \" + totalWarnCount + \"\\n\", club, true);\n\n // Print errors and warnings to error log\n if (totalErrCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****ERRORS FOR \" + club + \" (Member WAS NOT synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (errList.size() > 0) {\n SystemUtils.logErrorToFile(errList.remove(0), club, true);\n }\n }\n if (totalWarnCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****WARNINGS FOR \" + club + \" (Member MAY NOT have synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (warnList.size() > 0) {\n SystemUtils.logErrorToFile(warnList.remove(0), club, true);\n }\n }\n\n // TEMP!!!!\n if (club.equals(\"berkeleyhall\")) {\n\n errorMsg = \" CE sync complete. Records = \" +rcount+ \" for \" +club+ \", records processed = \" +pcount+ \", records added = \" +ncount+ \", records updated = \" +ucount + \"\\n\"; // build msg\n SystemUtils.logErrorToFile(errorMsg, club, true); // log it\n }\n\n // Print end time to error log\n SystemUtils.logErrorToFile(\"End time: \" + new java.util.Date().toString() + \"\\n\", club, true);\n }", "public void updateById__customers( String qualificationId, String fk, Map<String, ? extends Object> data, final ObjectCallback<Customer> callback){\n\n /**\n Call the onBefore event\n */\n callback.onBefore();\n\n\n //Definging hashMap for data conversion\n Map<String, Object> hashMapObject = new HashMap<>();\n //Now add the arguments...\n \n hashMapObject.put(\"qualificationId\", qualificationId);\n \n hashMapObject.put(\"fk\", fk);\n \n hashMapObject.putAll(data);\n \n\n \n\n\n \n \n \n invokeStaticMethod(\"prototype.__updateById__customers\", hashMapObject, new Adapter.JsonObjectCallback() {\n \n @Override\n public void onError(Throwable t) {\n callback.onError(t);\n //Call the finally method..\n callback.onFinally();\n }\n\n @Override\n public void onSuccess(JSONObject response) {\n \n if(response != null){\n CustomerRepository customerRepo = getRestAdapter().createRepository(CustomerRepository.class);\n if(context != null){\n try {\n Method method = customerRepo.getClass().getMethod(\"addStorage\", Context.class);\n method.invoke(customerRepo, context);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n //customerRepo.addStorage(context);\n }\n Map<String, Object> result = Util.fromJson(response);\n Customer customer = customerRepo.createObject(result);\n\n //Add to database if persistent storage required..\n if(isSTORE_LOCALLY()){\n //http://stackoverflow.com/questions/160970/how-do-i-invoke-a-java-method-when-given-the-method-name-as-a-string\n try {\n Method method = customer.getClass().getMethod(\"save__db\");\n method.invoke(customer);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n }\n\n callback.onSuccess(customer);\n }else{\n callback.onSuccess(null);\n }\n \n //Call the finally method..\n callback.onFinally();\n }\n });\n \n\n \n\n }", "@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n MarketDto other = (MarketDto) that;\n return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()));\n }", "private void mStoreCustomerPassbookData(int iCustId, double dblCustCreditAmount, String strBillNo) {\r\n Cursor cursorCustomerData = null;\r\n try {\r\n cursorCustomerData = db.getCustomer(iCustId);\r\n if (cursorCustomerData != null && cursorCustomerData.getCount() > 0) {\r\n if (cursorCustomerData.moveToFirst()) {\r\n //if (cursorCustomerData.getDouble(cursorCustomerData.getColumnIndex(DatabaseHandler.KEY_OpeningBalance)) > 0) {\r\n CustomerPassbookBean customerPassbookBean = new CustomerPassbookBean();\r\n customerPassbookBean.setStrCustomerID(cursorCustomerData.getInt(cursorCustomerData.getColumnIndex(DatabaseHandler.KEY_CustId)) + \"\");\r\n customerPassbookBean.setStrName(cursorCustomerData.getString(cursorCustomerData.getColumnIndex(DatabaseHandler.KEY_CustName)));\r\n customerPassbookBean.setStrPhoneNo(cursorCustomerData.getString(cursorCustomerData.getColumnIndex(DatabaseHandler.KEY_CustContactNumber)));\r\n customerPassbookBean.setDblOpeningBalance(0);\r\n customerPassbookBean.setDblDepositAmount(0);\r\n customerPassbookBean.setDblDepositAmount(dblCustCreditAmount);\r\n //double dblTotalAmountFromCustPassbookDB = getCustomerPassbookAvailableAmount(customerPassbookBean.getStrCustomerID(), customerPassbookBean.getStrPhoneNo());\r\n double dblTotalDepositAmount = getCustomerPassbookTotalDepositAndOpeningAmount(customerPassbookBean.getStrCustomerID(), customerPassbookBean.getStrPhoneNo());\r\n double dblTotalCrdeitAmount = getCustomerPassbookTotalCreditAmount(customerPassbookBean.getStrCustomerID(), customerPassbookBean.getStrPhoneNo());\r\n //double dblTotalAmountFinal = (Double.parseDouble(String.format(\"%.2f\", dblCustCreditAmount)) + Math.abs(dblTotalAmountFromCustPassbookDB));\r\n double dblTotalAmountFinal;\r\n dblTotalAmountFinal = dblTotalCrdeitAmount - (dblTotalDepositAmount + customerPassbookBean.getDblDepositAmount());\r\n customerPassbookBean.setDblTotalAmount(Double.parseDouble(String.format(\"%.2f\", (dblTotalAmountFinal))));\r\n if (trainingMode)\r\n customerPassbookBean.setStrDescription(Constants.BILL_NO + \" : TM\" + strBillNo);\r\n else\r\n customerPassbookBean.setStrDescription(Constants.BILL_NO + \" : \" + strBillNo);\r\n\r\n Date date1 = new Date();\r\n try {\r\n date1 = new SimpleDateFormat(\"dd-MM-yyyy\").parse(BUSINESS_DATE);\r\n } catch (Exception e) {\r\n Log.e(TAG, \"\" + e);\r\n Log.e(TAG, \"\" + e);\r\n }\r\n customerPassbookBean.setStrDate(\"\" + date1.getTime());\r\n customerPassbookBean.setDblCreditAmount(0);\r\n customerPassbookBean.setDblPettyCashTransaction(dblCustCreditAmount);\r\n customerPassbookBean.setDblRewardPoints(0);\r\n try {\r\n //Commented for git push purpose\r\n db.addCustomerPassbook(customerPassbookBean);\r\n } catch (Exception ex) {\r\n Log.i(TAG, \"Inserting data into customer passbook in billing screen: \" + ex.getMessage());\r\n }\r\n // }\r\n }\r\n } else {\r\n Log.i(TAG, \"No customer data selected for storing customer passbook in billing screen.\");\r\n }\r\n } catch (Exception ex) {\r\n Log.i(TAG, \"Unable to store the customer passbook data in billing screen.\" + ex.getMessage());\r\n } finally {\r\n if (cursorCustomerData != null) {\r\n cursorCustomerData.close();\r\n }\r\n }\r\n }", "@Override\r\n\tpublic void saveASNew(Trade trade) {\n\t\ttradeid.setText(new Integer(trade.getId()).toString());\r\n\t\ttradestatus.setText(trade.getStatus());\r\n\t\tactionstatus.removeAllElements();\r\n\t\t\r\n\t//\tprocessActionData(actionstatus,trade.getTradedesc1()); \r\n\t\t/// imp note : wf understand CASH productType as MM so passing MM as hardcoded\r\n processActionData(actionstatus,productType.toUpperCase(),trade.getTradedesc1(),tradestatus.getText(),rtradeservices);\r\n\t\tthis.trade = trade;\r\n\t\tsetTrade(trade);\r\n\t\tgetTradeTransfers(transferPanel);\r\n\t\tgetTradeTask(taskPanel);\r\n\t\tgetTradeSDI(sdiPanel);\r\n\t}", "private static void mFirstSync(Connection con, FileReader fr, String club, boolean clubcorp) {\n\n PreparedStatement pstmt2 = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n int inact = 0;\n int pri_indicator = 0;\n\n // Values from MFirst records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String mNum = \"\";\n String u_hndcp = \"\";\n String c_hndcp = \"\";\n String mship = \"\";\n String mtype = \"\";\n String msub_type = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String mobile = \"\";\n String primary = \"\";\n String webid = \"\";\n String custom1 = \"\";\n String custom2 = \"\";\n String custom3 = \"\";\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n\n // Values from ForeTees records\n //\n String fname_old = \"\";\n String lname_old = \"\";\n String mi_old = \"\";\n String mship_old = \"\";\n String mtype_old = \"\";\n String email_old = \"\";\n String mNum_old = \"\";\n String ghin_old = \"\";\n String bag_old = \"\";\n String posid_old = \"\";\n String email2_old = \"\";\n String phone_old = \"\";\n String phone2_old = \"\";\n String suffix_old = \"\";\n String msub_type_old = \"\";\n\n float u_hcap_old = 0;\n float c_hcap_old = 0;\n int birth_old = 0;\n\n // Values for New ForeTees records\n //\n String memid_new = \"\";\n String webid_new = \"\";\n String fname_new = \"\";\n String lname_new = \"\";\n String mi_new = \"\";\n String mship_new = \"\";\n String mtype_new = \"\";\n String email_new = \"\";\n String mNum_new = \"\";\n String ghin_new = \"\";\n String bag_new = \"\";\n String posid_new = \"\";\n String email2_new = \"\";\n String phone_new = \"\";\n String phone2_new = \"\";\n String suffix_new = \"\";\n String msub_type_new = \"\";\n String dupuser = \"\";\n String dupwebid = \"\";\n String dupmnum = \"\";\n String emailMF = \"[email protected]\";\n String subject = \"Roster Sync Warning from ForeTees for \" +club;\n\n float u_hcap_new = 0;\n float c_hcap_new = 0;\n int birth_new = 0;\n int errCount = 0;\n int warnCount = 0;\n int totalErrCount = 0;\n int totalWarnCount = 0;\n int email_bounce1 = 0;\n int email_bounce2 = 0;\n\n String errorMsg = \"\";\n String errMemInfo = \"\";\n String errMsg = \"\";\n String warnMsg = \"\";\n String emailMsg1 = \"Duplicate names found in MembersFirst file during ForeTees Roster Sync processing for club: \" +club+ \".\\n\\n\";\n String emailMsg2 = \"\\nThis indicates that either 2 members have the exact same names (not allowed), or MF's member id has changed.\\n\\n\";\n\n ArrayList<String> errList = new ArrayList<String>();\n ArrayList<String> warnList = new ArrayList<String>();\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean found = false;\n boolean sendemail = false;\n boolean genderMissing = false;\n boolean useWebid = false;\n boolean useWebidQuery = false;\n\n\n // Overwrite log file with fresh one for today's logs\n SystemUtils.logErrorToFile(\"Members First: Error log for \" + club + \"\\nStart time: \" + new java.util.Date().toString() + \"\\n\", club, false);\n\n try {\n\n BufferedReader bfrin = new BufferedReader(fr);\n line = new String();\n\n // format of each line in the file:\n //\n // memid, mNum, fname, mi, lname, suffix, mship, mtype, gender, email, email2,\n // phone, phone2, bag, hndcp#, uhndcp, chndcp, birth, posid, mobile, primary\n //\n //\n while ((line = bfrin.readLine()) != null) { // get one line of text\n\n // Remove the dbl quotes and check for embedded commas\n\n line = cleanRecord( line );\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() > 20 ) { // enough data ?\n\n memid = tok.nextToken();\n mNum = tok.nextToken();\n fname = tok.nextToken();\n mi = tok.nextToken();\n lname = tok.nextToken();\n suffix = tok.nextToken();\n mship = tok.nextToken(); // col G\n mtype = tok.nextToken(); // col H\n gender = tok.nextToken();\n email = tok.nextToken();\n email2 = tok.nextToken();\n phone = tok.nextToken();\n phone2 = tok.nextToken();\n bag = tok.nextToken();\n ghin = tok.nextToken();\n u_hndcp = tok.nextToken();\n c_hndcp = tok.nextToken();\n temp = tok.nextToken();\n posid = tok.nextToken();\n mobile = tok.nextToken();\n primary = tok.nextToken(); // col U\n\n if ( tok.countTokens() > 0 ) {\n\n custom1 = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n custom2 = tok.nextToken();\n }\n if ( tok.countTokens() > 0 ) {\n\n custom3 = tok.nextToken();\n }\n\n\n // trim gender in case followed be spaces\n gender = gender.trim();\n\n //\n // Check for ? (not provided)\n //\n if (memid.equals( \"?\" )) {\n\n memid = \"\";\n }\n if (mNum.equals( \"?\" )) {\n\n mNum = \"\";\n }\n if (fname.equals( \"?\" )) {\n\n fname = \"\";\n }\n if (mi.equals( \"?\" )) {\n\n mi = \"\";\n }\n if (lname.equals( \"?\" )) {\n\n lname = \"\";\n }\n if (suffix.equals( \"?\" )) {\n\n suffix = \"\";\n }\n if (mship.equals( \"?\" )) {\n\n mship = \"\";\n }\n if (mtype.equals( \"?\" )) {\n\n mtype = \"\";\n }\n if (gender.equals( \"?\" ) || (!gender.equalsIgnoreCase(\"M\") && !gender.equalsIgnoreCase(\"F\"))) {\n\n if (gender.equals( \"?\" )) {\n genderMissing = true;\n } else {\n genderMissing = false;\n }\n gender = \"\";\n }\n if (email.equals( \"?\" )) {\n\n email = \"\";\n }\n if (email2.equals( \"?\" )) {\n\n email2 = \"\";\n }\n if (phone.equals( \"?\" )) {\n\n phone = \"\";\n }\n if (phone2.equals( \"?\" )) {\n\n phone2 = \"\";\n }\n if (bag.equals( \"?\" )) {\n\n bag = \"\";\n }\n if (ghin.equals( \"?\" )) {\n\n ghin = \"\";\n }\n if (u_hndcp.equals( \"?\" )) {\n\n u_hndcp = \"\";\n }\n if (c_hndcp.equals( \"?\" )) {\n\n c_hndcp = \"\";\n }\n if (temp.equals( \"?\" )) {\n\n birth = 0;\n\n } else {\n\n birth = Integer.parseInt(temp);\n }\n if (posid.equals( \"?\" )) {\n\n posid = \"\";\n }\n if (mobile.equals( \"?\" )) {\n\n mobile = \"\";\n }\n if (primary.equals( \"?\" )) {\n\n primary = \"\";\n }\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!memid.equals( \"\" ) && !mNum.equals( \"\" ) &&\n !lname.equals( \"\" ) && !fname.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 && mi.equals( \"\" )) {\n\n mi = tok.nextToken();\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n lname = tok.nextToken(); // remove suffix and spaces\n\n if (!suffix.equals( \"\" ) && tok.countTokens() > 0 && club.equals(\"pradera\")) { // Pradera - if suffix AND 2-part lname, use both\n\n String lpart2 = tok.nextToken();\n\n lname = lname + \"_\" + lpart2; // combine them (i.e. Van Ess = Van_Ess)\n\n } else {\n\n if (suffix.equals( \"\" ) && tok.countTokens() > 0) { // if suffix not provided\n\n suffix = tok.nextToken();\n }\n }\n\n //\n // Make sure name is titled (most are already)\n //\n if (!club.equals(\"thereserveclub\")) {\n fname = toTitleCase(fname);\n }\n\n if (!club.equals(\"lakewoodranch\") && !club.equals(\"ballantyne\") && !club.equals(\"pattersonclub\") && !club.equals(\"baldpeak\") && !club.equals(\"pradera\") &&\n !club.equals(\"wellesley\") && !club.equals(\"portlandgc\") && !club.equals(\"trooncc\") && !club.equals(\"pmarshgc\") && !club.equals(\"paloaltohills\") &&\n !club.equals(\"thereserveclub\") && !club.equals(\"castlepines\")) {\n\n lname = toTitleCase(lname);\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n lname = lname + \"_\" + suffix; // append suffix to last name\n }\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n if (!u_hndcp.equals( \"\" ) && !u_hndcp.equalsIgnoreCase(\"NH\") && !u_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n u_hndcp = u_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n u_hndcp = u_hndcp.replace('H', ' '); // or 'H' if present\n u_hndcp = u_hndcp.replace('N', ' '); // or 'N' if present\n u_hndcp = u_hndcp.replace('J', ' '); // or 'J' if present\n u_hndcp = u_hndcp.replace('R', ' '); // or 'R' if present\n u_hndcp = u_hndcp.trim();\n\n u_hcap = Float.parseFloat(u_hndcp); // usga handicap\n\n if ((!u_hndcp.startsWith(\"+\")) && (!u_hndcp.startsWith(\"-\"))) {\n\n u_hcap = 0 - u_hcap; // make it a negative hndcp (normal)\n }\n }\n\n if (!c_hndcp.equals( \"\" ) && !c_hndcp.equalsIgnoreCase(\"NH\") && !c_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n c_hndcp = c_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n c_hndcp = c_hndcp.replace('H', ' '); // or 'H' if present\n c_hndcp = c_hndcp.replace('N', ' '); // or 'N' if present\n c_hndcp = c_hndcp.replace('J', ' '); // or 'J' if present\n c_hndcp = c_hndcp.replace('R', ' '); // or 'R' if present\n c_hndcp = c_hndcp.trim();\n\n c_hcap = Float.parseFloat(c_hndcp); // usga handicap\n\n if ((!c_hndcp.startsWith(\"+\")) && (!c_hndcp.startsWith(\"-\"))) {\n\n c_hcap = 0 - c_hcap; // make it a negative hndcp (normal)\n }\n }\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n \n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n skip = false;\n errCount = 0; // reset error count\n warnCount = 0; // reset warning count\n errMsg = \"\"; // reset error message\n warnMsg = \"\"; // reset warning message\n errMemInfo = \"\"; // reset error member info\n found = false; // init club found\n\n\n //\n // Format member info for use in error logging before club-specific manipulation\n //\n errMemInfo = \"Member Details:\\n\" +\n \" name: \" + lname + \", \" + fname + \" \" + mi + \"\\n\" +\n \" mtype: \" + mtype + \" mship: \" + mship + \"\\n\" +\n \" memid: \" + memid + \" mNum: \" + mNum + \" gender: \" + gender;\n\n // if gender is incorrect or missing, flag a warning in the error log\n if (gender.equals(\"\")) {\n\n // report only if not a club that uses blank gender fields\n if (!club.equals(\"roccdallas\") && !club.equals(\"charlottecc\") && !club.equals(\"sawgrass\") && !clubcorp) {\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'M')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'M')\";\n }\n\n gender = \"M\";\n\n } else if (club.equals(\"charlottecc\") || club.equals(\"sawgrass\")) { // default to female instead\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'F')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'F)\";\n }\n\n gender = \"F\";\n\n } else if (clubcorp) {\n\n errCount++;\n skip = true;\n if (genderMissing) {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER missing!\";\n } else {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER incorrect!\";\n }\n }\n }\n\n //\n // Skip entries with first/last names of 'admin'\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -INVALID NAME! 'Admin' or 'admin' not allowed for first or last name\";\n }\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n\n //******************************************************************\n // Saucon Valley Country Club\n //******************************************************************\n //\n if (club.equals( \"sauconvalleycc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equalsIgnoreCase( \"No Privileges\" ) && !mtype.equalsIgnoreCase( \"Social\" ) &&\n !mtype.equalsIgnoreCase( \"Recreational\" )) {\n\n //\n // determine member type\n //\n if (mtype.equals( \"\" )) { // if not specified\n mtype = \"Staff\"; // they are staff\n }\n if (mship.equals( \"\" )) { // if not specified\n mship = \"Staff\"; // they are staff\n }\n\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n //\n // The Member Types and Mship Types for this club are backwards.\n // We must set our fields accordingly.\n //\n String memType = mship; // set actual mtype value\n mship = mtype; // set actual mship value\n\n if (memType.equals( \"Full Golf Privileges\" )) {\n\n mtype = \"Full Golf Privileges Men\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Full Golf Privileges Women\";\n }\n }\n\n if (memType.equals( \"Limited Golf Privileges\" )) {\n\n mtype = \"Limited Golf Privileges Men\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Limited Golf Privileges Women\";\n }\n }\n\n if (memType.equals( \"Senior Limited Golf Privileges\" )) {\n\n mtype = \"Senior Limited Golf Privileges\";\n }\n\n //\n // set posid according to mNum\n //\n if (mNum.endsWith( \"-1\" )) { // if spouse\n\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n posid = tok.nextToken(); // get mNum without extension\n posid = stripA(posid); // remove the ending '0' (i.e. was 2740-1)\n posid = posid + \"1\"; // add a '1' (now 2741)\n\n } else {\n\n if (mNum.endsWith( \"-2\" )) { // if spouse or other\n\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n posid = tok.nextToken(); // get mNum without extension\n posid = stripA(posid); // remove the ending '0' (i.e. was 2740-2)\n posid = posid + \"2\"; // add a '2' (now 2742)\n\n } else {\n\n if (mNum.endsWith( \"-3\" )) { // if spouse or other\n\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n posid = tok.nextToken(); // get mNum without extension\n posid = stripA(posid); // remove the ending '0' (i.e. was 2740-3)\n posid = posid + \"3\"; // add a '3' (now 2743)\n\n } else {\n\n if (mNum.endsWith( \"-4\" )) { // if spouse or other\n\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n posid = tok.nextToken(); // get mNum without extension\n posid = stripA(posid); // remove the ending '0' (i.e. was 2740-4)\n posid = posid + \"4\"; // add a '4' (now 2744)\n\n } else {\n\n posid = mNum; // primary posid = mNum\n }\n }\n }\n }\n\n suffix = \"\"; // done with suffix for now\n\n //\n // Check if member is over 70 yrs old - if so, add '_*' to the end of the last name\n // so proshop will know\n //\n if (birth > 0 && birth < 19500000) { // if worth checking\n\n //\n // Get today's date and then go back 70 years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 70; // go back 70 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth <= oldDate) { // if member is 70+ yrs old\n\n lname = lname + \"_*\"; // inidicate such\n }\n }\n\n } else {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n } // end of IF club = sauconvalleycc\n\n //******************************************************************\n // Crestmont CC\n //******************************************************************\n //\n if (club.equals( \"crestmontcc\" )) {\n\n found = true; // club found\n\n //\n // determine member type\n //\n\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n mtype = \"T Designated Male\";\n\n if (gender.equals( \"F\" )) {\n mtype = \"T Designated Female\";\n }\n\n } // end of IF club = crestmontcc\n\n //******************************************************************\n // Black Rock CC\n //******************************************************************\n //\n /*\n if (club.equals( \"blackrock\" )) {\n\n found = true; // club found\n\n //\n // remove the 'A' from spouses mNum\n //\n if (mNum.endsWith( \"A\" ) || mNum.endsWith( \"B\" ) || mNum.endsWith( \"C\" ) ||\n mNum.endsWith( \"D\" ) || mNum.endsWith( \"E\" ) || mNum.endsWith( \"F\" )) {\n\n mNum = stripA(mNum); // remove the ending 'A'\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n if (!mtype.equals( \"Dependents\" )) { // if not a junior\n\n if (gender.equals( \"F\" )) {\n\n if (mtype.equals( \"Primary\" )) {\n\n mtype = \"Member Female\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else { // Male\n\n if (mtype.equals( \"Primary\" )) {\n\n mtype = \"Member Male\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n }\n\n } // end of IF club = blackrock\n */\n\n //******************************************************************\n // John's Island CC\n //******************************************************************\n //\n if (club.equals( \"johnsisland\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is not a blank or admin record\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (lname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine membership type\n //\n if (mship.equals( \"Golf Member\" )) {\n mship = \"Golf\";\n } else if (mship.startsWith( \"Golf Swap\" )) {\n mship = \"Golf Swap\";\n lname = lname + \"*\"; // mark these members\n } else if (mship.equals( \"Sport/Social Member\" )) {\n mship = \"Sport Social\";\n lname = lname + \"*\"; // mark these members\n } else if (mship.startsWith( \"Sport/Social Swap\" )) {\n mship = \"Sport Social Swap\";\n } else {\n mship = \"Golf\";\n }\n\n //\n // determine member type\n //\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n if (gender.equals( \"M\" ) && primary.equals( \"P\" )) {\n mtype = \"Primary Male\";\n } else if (gender.equals( \"F\" ) && primary.equals( \"P\" )) {\n mtype = \"Primary Female\";\n } else if (gender.equals( \"M\" ) && primary.equals( \"S\" )) {\n mtype = \"Spouse Male\";\n } else if (gender.equals( \"F\" ) && primary.equals( \"S\" )) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n } // end of IF club = johnsisland\n\n/*\n //******************************************************************\n // Philadelphia Cricket Club\n //******************************************************************\n //\n if (club.equals( \"philcricket\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is not an admin record or missing mship/mtype\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*Note* mship located in mtype field)\";\n\n } else if (lname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' MEMBERSHIP TYPE!\";\n } else {\n\n if (mtype.equalsIgnoreCase(\"Leave of Absence\")) {\n \n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (mtype.equalsIgnoreCase( \"golf stm family\" ) || mtype.equalsIgnoreCase( \"golf stm ind.\" )) {\n\n lname = lname + \"*\"; // add an astericks\n }\n\n // if mtype = no golf, add ^ to their last name\n if (mtype.equalsIgnoreCase( \"no golf\" )) {\n\n lname += \"^\";\n }\n\n mship = toTitleCase(mtype); // mship = mtype\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n\n /*\n //\n // determine member type\n //\n if (mtype.equalsIgnoreCase( \"2 junior ft golfers\" ) || mtype.equalsIgnoreCase( \"add'l jr. ft golfers\" ) ||\n mtype.equalsIgnoreCase( \"ft golf full 18-20\" ) || mtype.equalsIgnoreCase( \"ft jr. 17 & under\" ) ||\n mtype.equalsIgnoreCase( \"jr 17 & under w/golf\" ) || mtype.equalsIgnoreCase( \"jr 18-20 w/golf\" ) ||\n mtype.equalsIgnoreCase( \"jr. activity/no chg\" )) {\n\n mtype = \"Certified Juniors\";\n\n } else {\n\n if (gender.equals( \"\" )) { // if not specified\n\n gender = \"M\"; // default to Male\n }\n\n if (mtype.equalsIgnoreCase( \"ft assoc golf 21-30\" ) || mtype.equalsIgnoreCase( \"ft assoc ind golf\" ) ||\n mtype.equalsIgnoreCase( \"ft assoc ind/stm fm\" )) {\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Associate Male\";\n\n } else {\n\n mtype = \"Associate Female\";\n }\n\n } else {\n\n if (mtype.equalsIgnoreCase( \"ft full fm/ind 21-30\" ) || mtype.equalsIgnoreCase( \"ft full ind/sm fm\" ) ||\n mtype.equalsIgnoreCase( \"ft golf full fam.\" ) || mtype.equalsIgnoreCase( \"ft golf full ind.\" ) ||\n mtype.equalsIgnoreCase( \"ft golf honorary\" )) {\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Full Male\";\n\n } else {\n\n mtype = \"Full Female\";\n }\n\n } else {\n\n if (mtype.equalsIgnoreCase( \"golf stm family\" ) || mtype.equalsIgnoreCase( \"golf stm ind.\" )) {\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"STM Male\";\n\n } else {\n\n mtype = \"STM Female\";\n }\n\n } else {\n\n if (mtype.equalsIgnoreCase( \"golf stm (17-20)\" ) || mtype.equalsIgnoreCase( \"golf stm 16 & under\" )) {\n\n mtype = \"STM Junior\";\n\n } else {\n\n mtype = \"Non-Golfing\";\n }\n }\n }\n }\n }\n }\n\n } // end of IF club = philcricket\n\n */\n /*\n //******************************************************************\n // Edgewood CC\n //******************************************************************\n //\n if (club.equals( \"edgewood\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Sport\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Sport' MEMBERSHIP TYPE!\";\n } else if (mship.equalsIgnoreCase( \"Dining\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Dining' MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // May have to strip -1 off end of mnum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get mNum without extension\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Strip any leading zeros from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (primary.equals( \"P\" )) {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Primary Female\";\n }\n\n } else {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = edgewood\n */\n /*\n //******************************************************************\n // Out Door CC\n //******************************************************************\n //\n if (club.equals( \"outdoor\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Translate the mship value - remove the '00x-' prefix\n //\n tok = new StringTokenizer( mship, \"-\" ); // delimiter is '-'\n\n if ( tok.countTokens() > 1 ) {\n\n mship = tok.nextToken(); // get prefix\n mship = tok.nextToken(); // get mship without prefix\n }\n\n\n //\n // May have to strip -1 off end of mnum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get mNum without extension\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (primary.equals( \"P\" )) {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Member Male\";\n } else {\n mtype = \"Member Female\";\n }\n\n } else {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = outdoor\n */\n\n\n //******************************************************************\n // Rhode Island CC\n //******************************************************************\n //\n if (club.equals( \"rhodeisland\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // May have to strip -1 off end of mnum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiter is '-'\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get mNum without extension\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (primary.equals( \"P\" )) {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Primary Female\";\n }\n\n } else {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = rhodeisland\n\n //******************************************************************\n // Wellesley CC\n //******************************************************************\n //\n if (club.equals( \"wellesley\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type (mship value plus 'Male' or 'Female' - i.e. 'Golf Male')\n //\n if (gender.equals( \"F\" )) { // if Female\n mtype = mship + \" Female\";\n } else {\n mtype = mship + \" Male\";\n }\n }\n } // end of IF club = wellesley\n\n //******************************************************************\n // Lakewood Ranch CC\n //******************************************************************\n //\n if (club.equals( \"lakewoodranch\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (mship.equalsIgnoreCase(\"SMR Members and Staff\")) {\n mship = \"SMR Members\";\n }\n\n if (primary.equals( \"P\" )) {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Primary Female\";\n }\n\n } else {\n\n if (gender.equals( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = lakewoodranch\n\n //******************************************************************\n // Long Cove CC\n //******************************************************************\n //\n if (club.equals( \"longcove\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member sub-type (MGA or LGA)\n //\n msub_type = \"\";\n\n if (!mtype.equals( \"\" )) { // if mtype specified (actually is sub-type)\n\n msub_type = mtype; // set it in case they ever need it\n }\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n gender = \"M\"; // default to Male\n }\n\n if (gender.equals( \"M\" )) {\n mtype = \"Adult Male\";\n } else {\n mtype = \"Adult Female\";\n }\n }\n } // end of IF club = longcove\n\n //******************************************************************\n // Bellerive CC\n //******************************************************************\n //\n /*\n if (club.equals( \"bellerive\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) { // mship exist ?\n\n skip = true; // no - skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (gender.equals( \"\" ) || gender.equals( \"U\" )) { // if not specified or U (??)\n\n if (primary.equalsIgnoreCase( \"P\" )) {\n\n gender = \"M\"; // default to Male\n\n } else {\n\n gender = \"F\"; // default to Female\n }\n }\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Adult Male\";\n\n } else {\n\n mtype = \"Adult Female\";\n }\n\n //\n // Strip any extra chars from mNum\n //\n if (mNum.endsWith( \"A\" ) || mNum.endsWith( \"B\" ) || mNum.endsWith( \"C\" ) ||\n mNum.endsWith( \"D\" ) || mNum.endsWith( \"E\" ) || mNum.endsWith( \"F\" )) {\n\n mNum = stripA(mNum); // remove the ending 'A'\n }\n\n if (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n // *** see oahucc and common MF processing below if we use this again *****************\n\n webid = memid; // use id from MF\n\n //\n // Set the proper mship type\n //\n if (mship.equalsIgnoreCase( \"Active\" ) || mship.equalsIgnoreCase( \"Associate\" ) ||\n mship.equalsIgnoreCase( \"Junior\" ) || mship.equalsIgnoreCase( \"Life\" )) {\n\n mship = \"Golf\";\n }\n\n if (mship.equalsIgnoreCase( \"Non-Golf\" )) {\n\n mship = \"Non-Golf Senior\";\n }\n\n if (mship.equalsIgnoreCase( \"Non-Res\" )) {\n\n mship = \"Non-Resident\";\n }\n\n if (mship.equalsIgnoreCase( \"Spouse\" )) {\n\n //\n // See if we can locate the primary and use his/her mship (else leave as is, it will change next time)\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE memNum = ? AND webid != ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum);\n pstmt2.setString(2, webid);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\");\n }\n pstmt2.close(); // close the stmt\n }\n }\n } // end of IF club = bellerive\n */\n\n //******************************************************************\n // Peninsula Club\n //******************************************************************\n //\n if (club.equals( \"peninsula\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals(\"\")) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (!mship.equalsIgnoreCase( \"Full\" ) && !mship.equalsIgnoreCase( \"Sports\" ) && !mship.equalsIgnoreCase( \"Corp Full\" ) &&\n !mship.equalsIgnoreCase( \"Tennis\" )) { // mship ok ?\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // determine member type\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if Primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else { // Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n }\n }\n } // end of IF club = peninsula\n\n\n //******************************************************************\n // Wilmington CC\n //******************************************************************\n //\n if (club.equals( \"wilmington\" )) {\n\n found = true; // club found\n\n // Make sure this is ok\n if (mship.equals( \"\" )) { // mship missing ?\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else {\n\n // Set POS Id in case they ever need it\n posid = mNum;\n\n // determine membership type and member type\n if (mship.equalsIgnoreCase( \"Child\" )) { // if child\n\n mship = \"Associate\";\n\n // Check if member is 13 or over\n if (birth > 0) {\n\n // Get today's date and then go back 13 years\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 13; // go back 13 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth <= oldDate) { // if member is 13+ yrs old\n mtype = \"Dependent\";\n } else {\n mtype = \"Dependent - U13\";\n }\n }\n\n } else {\n\n if (mship.equalsIgnoreCase( \"Senior\" ) || mship.equalsIgnoreCase( \"Associate\" ) || mship.equalsIgnoreCase(\"Clerical\")) { // if Senior or spouse\n skip = false; // ok\n } else if (mship.endsWith( \"Social\" )) { // if any Social\n mship = \"Social\"; // convert all to Social\n } else if (mship.equalsIgnoreCase( \"Senior Special\" )) { // if Senior Special\n mship = \"Associate\"; // convert to Associate\n } else if (mship.equalsIgnoreCase( \"Senior Transfer\" )) { // if Senior Special\n mship = \"Senior\"; // convert to Senior\n } else {\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n if (gender.equalsIgnoreCase( \"M\" )) {\n mtype = \"Adult Male\";\n } else {\n mtype = \"Adult Female\";\n }\n }\n\n // Check if member has range privileges\n msub_type = \"\"; // init\n\n if (custom1.equalsIgnoreCase( \"range\" )) {\n msub_type = \"R\"; // yes, indicate this so it can be displayed on Pro's tee sheet\n }\n\n }\n } // end of IF club = wilmington\n\n\n //******************************************************************\n // Awbrey Glen CC\n //******************************************************************\n //\n if (club.equals( \"awbreyglen\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) { // mship missing ?\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (mship.equalsIgnoreCase(\"Employee\")) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (gender.equals( \"\" )) { // if gender not specified\n\n gender = \"M\"; // default to Male\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n gender = \"F\"; // assume Female\n }\n }\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n } // end of IF club = awbreyglen\n\n\n //******************************************************************\n // The Pinery CC\n //******************************************************************\n //\n if (club.equals( \"pinery\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Tennis Dues\" ) || mship.equalsIgnoreCase( \"Social Dues\" ) ||\n mship.equalsIgnoreCase( \"Premier Tennis Dues\" ) || mship.equalsIgnoreCase( \"Premier Social Prepaid\" ) ||\n mship.equalsIgnoreCase( \"Premier Social Dues\" ) || mship.equalsIgnoreCase( \"Premier Dining Dues\" ) ||\n mship.equalsIgnoreCase( \"Dining Dues\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // Set mtype\n //\n if (primary.equals( \"\" )) { // if primary not specified\n\n primary = \"P\"; // default to Primary\n }\n\n if (gender.equals( \"\" )) { // if gender not specified\n\n gender = \"M\"; // default to Male\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n gender = \"F\"; // assume Female\n }\n }\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\"; // default Spouse\n }\n\n } else { // Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n }\n } // end of IF club = pinery\n\n\n\n //******************************************************************\n // The Country Club\n //******************************************************************\n //\n if (club.equals( \"tcclub\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else {\n\n if (mship.startsWith( \"65 & above \" )) {\n\n mship = \"65 & Above Exempt\"; // remove garbage character\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (primary.equals( \"\" )) { // if primary not specified\n\n primary = \"P\"; // default to Primary\n }\n\n if (gender.equals( \"\" )) { // if gender not specified\n\n gender = \"M\"; // default to Male\n }\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\"; // default Spouse\n }\n\n } else { // Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n //\n // Check for dependents\n //\n if (mNum.endsWith(\"-2\") || mNum.endsWith(\"-3\") || mNum.endsWith(\"-4\") || mNum.endsWith(\"-5\") ||\n mNum.endsWith(\"-6\") || mNum.endsWith(\"-7\") || mNum.endsWith(\"-8\") || mNum.endsWith(\"-9\")) {\n if (gender.equalsIgnoreCase( \"F \")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n }\n } // end of IF club = tcclub\n\n //******************************************************************\n // Navesink Country Club\n //******************************************************************\n //\n if (club.equals( \"navesinkcc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok - mship is in the mtype field for this club!!!!!!!!\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else {\n\n useWebid = true;\n webid = memid;\n memid = mNum; // use mNum for username, they are unique!\n\n\n if (mtype.startsWith( \"Member Type\" )) {\n\n mship = mtype.substring(12); // remove garbage character\n\n } else {\n mship = mtype;\n }\n\n if (mship.equalsIgnoreCase(\"SS\") || mship.equalsIgnoreCase(\"SSQ\") || mship.equalsIgnoreCase(\"WMF\") ||\n mship.equalsIgnoreCase(\"WMS\") || mship.equalsIgnoreCase(\"HQ\") || mship.equalsIgnoreCase(\"HM\") ||\n mship.equalsIgnoreCase(\"H\") || mship.equalsIgnoreCase(\"HL\") || mship.equalsIgnoreCase(\"HR\") ||\n mship.equalsIgnoreCase(\"JSQ\") || mship.equalsIgnoreCase(\"SHL\") || mship.equalsIgnoreCase(\"SP\") ||\n mship.equalsIgnoreCase(\"SPJ\") || mship.equalsIgnoreCase(\"SPQ\")) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n StringTokenizer navTok = null;\n\n // check Primary/Spouse\n if (mNum.endsWith(\"-1\")) {\n primary = \"S\";\n mNum = mNum.substring(0, mNum.length() - 2);\n\n } else if (mNum.endsWith(\"-2\") || mNum.endsWith(\"-3\") || mNum.endsWith(\"-4\") ||\n mNum.endsWith(\"-5\") || mNum.endsWith(\"-6\") || mNum.endsWith(\"-7\") ||\n mNum.endsWith(\"-8\") || mNum.endsWith(\"-9\")) {\n primary = \"D\";\n mNum = mNum.substring(0, mNum.length() - 2);\n } else {\n primary = \"P\";\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\"; // default Spouse\n }\n\n } else if (primary.equalsIgnoreCase( \"D\" )) {\n\n //\n // Dependent mtype based on age\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 18 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate || birth == 0) { // dependent is under 18 or no bday provided\n\n mtype = \"Dependent Under 18\";\n } else {\n mtype = \"Dependent 18-24\";\n }\n\n } else { // Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n if (mship.equalsIgnoreCase(\"SR\") || mship.equalsIgnoreCase(\"SRQ\")) {\n mship = \"SR\";\n } else if (mship.equalsIgnoreCase(\"JR\") || mship.equalsIgnoreCase(\"JRQ\")) {\n mship = \"JR\";\n } else if (mship.equalsIgnoreCase(\"NR\") || mship.equalsIgnoreCase(\"NRQ\")) {\n mship = \"NR\";\n } else if (mship.equalsIgnoreCase(\"R\") || mship.equalsIgnoreCase(\"RQ\")) {\n mship = \"R\";\n }\n }\n }\n } // end of IF club = navesinkcc\n\n\n //******************************************************************\n // The International\n //******************************************************************\n //\n if (club.equals( \"international\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n mship = \"Unknown\"; // allow for missing mships for now\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n\n //\n // Set mship\n //\n if (mship.equals( \"Other\" ) || mship.equals( \"Social\" ) || mship.startsWith( \"Spouse of\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else {\n\n if (mship.startsWith( \"Corporate\" ) || mship.startsWith( \"ITT\" )) {\n mship = \"Corporate\";\n } else if (mship.equals( \"Individual\" ) || mship.endsWith( \"Individual\" ) || mship.startsWith( \"Honorary\" ) ||\n mship.startsWith( \"Owner\" ) || mship.equals( \"Trade\" )) {\n mship = \"Individual\";\n } else if (mship.startsWith( \"Family\" ) || mship.startsWith( \"Senior Family\" )) {\n mship = \"Family\";\n } else if (mship.startsWith( \"Out of Region\" )) {\n mship = \"Out of Region\";\n } else if (mship.startsWith( \"Associat\" )) {\n mship = \"Associate\";\n } else if (mship.startsWith( \"Staff\" )) {\n mship = \"Staff\";\n }\n\n }\n } // end of IF club = international\n\n\n //******************************************************************\n // Blue Hill\n //******************************************************************\n //\n if (club.equals( \"bluehill\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok - mship is in the mtype field for this club!!!!!!!!\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n } else {\n\n mship = mtype; // move over\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n\n } else { // must be Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n //\n // Set mship\n //\n if (mship.startsWith( \"Social\" )) {\n mship = \"Social Golf\";\n } else if (mship.startsWith( \"Associat\" )) {\n mship = \"Associate\";\n } else if (mship.startsWith( \"Corporate\" )) {\n mship = \"Corporate\";\n } else if (!mship.equals( \"Junior\" )) {\n mship = \"Regular Golf\"; // all others (Junior remains as Junior)\n }\n }\n } // end of IF club = bluehill\n\n\n //******************************************************************\n // Oak Lane\n //******************************************************************\n //\n if (club.equals( \"oaklane\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok - mship is in the mtype field for this club!!!!!!!!!!!!!!!!!\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing or not allowed! (*NOTE* mship located in mtype field)\";\n } else {\n\n mship = mtype; // move over\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Remove '-n' from mNum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiters are space\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get main mNum\n }\n\n //\n // Set mtype\n //\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"M\" )) { // if Male\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n\n } else { // must be Primary\n\n if (gender.equalsIgnoreCase( \"F\" )) { // if Female\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\"; // default Primary\n }\n }\n\n //\n // Set mship\n //\n if (mship.startsWith( \"Senior Social\" ) || mship.startsWith( \"Social\" )) {\n mship = \"Social\";\n } else if (mship.startsWith( \"Senior Tennis\" ) || mship.startsWith( \"Summer Tennis\" ) || mship.startsWith( \"Tennis\" )) {\n mship = \"Tennis\";\n }\n }\n } // end of IF club = oaklane\n\n\n //******************************************************************\n // Green Hills\n //******************************************************************\n //\n if (club.equals( \"greenhills\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok - mship is in the mtype field for this club!!!!!!!!!!!!!!!!!\n //\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n } else {\n\n mship = mtype; // move over\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n mtype = \"Primary Male\"; // default Primary\n\n if (mNum.endsWith( \"-1\" )) { // if Spouse\n mtype = \"Spouse Female\";\n }\n\n //\n // Remove '-n' from mNum\n //\n tok = new StringTokenizer( mNum, \"-\" ); // delimiters are space\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // get main mNum\n }\n }\n } // end of IF club = greenhills\n\n\n //******************************************************************\n // Oahu CC\n //******************************************************************\n //\n if (club.equals( \"oahucc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n // mNum can change so we can't count on this being the username for existing members!!\n\n // This family has a last name consisting of 3 words. If them, just plug in the correct name\n if (memid.equals(\"4081\") || memid.equals(\"4081-1\")) {\n lname = \"de_los_Reyes\";\n }\n\n //\n // Convert some mships\n //\n if (mship.equalsIgnoreCase( \"Surviving Spouse 50 Year Honorary\" )) {\n mship = \"Surv Sp 50 Year Honorary\";\n } else if (mship.equalsIgnoreCase( \"Surviving Spouse - Non-Resident\" )) {\n mship = \"Surviving Spouse Non-Resident\";\n } else if (mship.equalsIgnoreCase( \"Surviving Spouse Non-Resident - Golf\" )) {\n mship = \"Surv Sp Non-Resident - Golf\";\n } else if (mship.equalsIgnoreCase( \"Surviving Spouse Super Senior - Golf\" )) {\n mship = \"Surv Sp Super Senior - Golf\";\n } else if (mship.equalsIgnoreCase( \"Surviving Spouse Super Senior - Social\" )) {\n mship = \"Surv Sp Super Senior - Social\";\n }\n\n //\n // Set mtype\n //\n if (mship.startsWith(\"Surv\") || mship.equalsIgnoreCase(\"SS50\")) { // if Surviving Spouse\n\n mtype = \"Spouse\"; // always Spouse\n\n } else {\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if spouse\n mtype = \"Spouse\";\n } else {\n mtype = \"Primary\"; // default to Primary\n }\n }\n\n //\n // Check for Junior Legacy members last\n //\n if (mship.startsWith( \"Jr\" )) {\n\n mship = \"Junior Legacy\";\n mtype = \"Spouse\";\n }\n }\n } // end of IF club = oahucc\n\n\n\n //******************************************************************\n // Ballantyne CC\n //******************************************************************\n //\n if (club.equals( \"ballantyne\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n // mNum can change so we can't count on this being the username for existing members!!\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken();\n }\n\n //\n // Convert some mships ************** finish this!!!!!!!!! ************\n //\n if (mtype.equalsIgnoreCase( \"Full Golf\" ) || mship.equalsIgnoreCase(\"Trial Member - Golf\")) {\n\n mship = \"Golf\";\n skip = false;\n\n } else if (mtype.equalsIgnoreCase( \"Limited Golf\" ) || mship.equalsIgnoreCase( \"Master Member\" ) || mship.equalsIgnoreCase(\"Trial Sports Membership\")) {\n\n mship = \"Sports\";\n skip = false;\n\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n //\n // Set mtype ?????????? **************** and this !!!! **************\n //\n if (primary.equalsIgnoreCase( \"S\" )) { // if spouse\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\"; // default to Primary\n }\n }\n } // end of IF club is ballantyne\n\n\n //******************************************************************\n // Troon CC\n //******************************************************************\n //\n if (club.equals( \"trooncc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n // mNum can change so we can't count on this being the username for existing members!!\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken();\n }\n\n if (mship.equalsIgnoreCase(\"Golf\") || mship.equalsIgnoreCase(\"Intermediate Golf\") ||\n mship.equalsIgnoreCase(\"Social to Golf Upgrade\") || mship.equalsIgnoreCase(\"Founding\")) {\n mship = \"Golf\";\n } else if (mship.equalsIgnoreCase(\"Social\") || mship.equalsIgnoreCase(\"Social from Golf\")) {\n mship = \"Social\";\n } else if (!mship.equalsIgnoreCase(\"Senior\") && !mship.equalsIgnoreCase(\"Dependent\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n try {\n if (mship.equalsIgnoreCase(\"Dependent\") && (mNum.endsWith(\"A\") || mNum.endsWith(\"a\") || mNum.endsWith(\"B\") || mNum.endsWith(\"b\"))) {\n String mNumTemp = mNum.substring(0, mNum.length() - 1);\n PreparedStatement pstmtTemp = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n\n pstmtTemp.clearParameters();\n pstmtTemp.setString(1, mNumTemp);\n\n ResultSet rsTemp = pstmtTemp.executeQuery();\n\n if (rsTemp.next()) {\n mship = rsTemp.getString(\"m_ship\");\n }\n\n pstmtTemp.close();\n }\n } catch (Exception exc) {\n mship = \"Unknown\";\n }\n\n //\n // Set mtype\n //\n if (gender.equalsIgnoreCase( \"F\" )) { // if spouse\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\"; // default to Primary\n }\n }\n } // end of IF club = trooncc\n\n\n //******************************************************************\n // Imperial GC\n //******************************************************************\n //\n if (club.equals( \"imperialgc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mship.startsWith( \"Account\" ) || mship.equals( \"Dining Full\" ) ||\n mship.equals( \"Dining Honorary\" ) || mship.equals( \"Dining Single\" ) ||\n mship.equals( \"Resigned\" ) || mship.equals( \"Suspended\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n //useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n // mNum can change so we can't count on this being the username for existing members!!\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n\n mNum = tok.nextToken();\n }\n\n\n //\n // Convert some mships\n //\n if (mship.startsWith( \"Associate\" )) {\n mship = \"Associate\";\n } else if (mship.startsWith( \"Dining Summer\" )) {\n mship = \"Dining Summer Golf\";\n } else if (mship.startsWith( \"Golf Royal\" )) {\n mship = \"Golf Royal\";\n } else if (mship.startsWith( \"Golf Single\" ) || mship.equalsIgnoreCase(\"RISINGLE\")) {\n mship = \"Golf Single\";\n } else if (mship.equalsIgnoreCase(\"RIMEMBER\")) {\n mship = \"Golf Full\";\n } else if (mship.startsWith( \"Limited Convert\" )) {\n mship = \"Limited Convertible\";\n } else if (mship.startsWith( \"Resigned\" )) {\n mship = \"Resigned PCD\";\n }\n\n //\n // Set mtype\n //\n if (gender.equals( \"\" )) {\n\n gender = \"M\";\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if spouse\n\n gender = \"F\";\n }\n }\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\"; // default to Primary\n }\n }\n } // end of IF club = imperialgc\n\n\n\n /* Disable - Pro wants to maintain roster himself !!!\n *\n //******************************************************************\n // Hop Meadow GC\n //******************************************************************\n //\n if (club.equals( \"hopmeadowcc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n\n mNum = tok.nextToken(); // keep mnum same for all family members\n }\n\n\n //\n // Convert some mships\n //\n if (mship.startsWith( \"Sporting\" )) {\n\n mship = \"Sporting Member\";\n\n } else {\n\n if (mship.startsWith( \"Dependent\" )) {\n\n mship = \"Dependents\";\n\n } else {\n\n if (mship.startsWith( \"Non-Resid\" )) {\n\n mship = \"Non Resident\";\n\n } else {\n\n if (mship.equals( \"Clergy\" ) || mship.startsWith( \"Full Privilege\" ) ||\n mship.equals( \"Honorary\" ) || mship.startsWith( \"Retired Golf\" )) {\n\n mship = \"Full Privilege Golf\";\n\n } else if (mship.equals(\"Senior\")) {\n\n // let Senior come through as-is\n\n } else {\n\n skip = true; // skip all others\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n }\n }\n\n //\n // Set mtype\n //\n if (gender.equals( \"\" )) {\n\n gender = \"M\";\n }\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if spouse\n\n mtype = \"Spouse Female\";\n\n if (!gender.equalsIgnoreCase( \"F\")) {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Primary Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n }\n }\n }\n } // end of IF club = hopmeadowcc\n */\n\n\n\n //******************************************************************\n // Bentwater Yacht & CC\n //******************************************************************\n //\n if (club.equals( \"bentwaterclub\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique) - if new member!!!\n\n //\n // Convert the mships (\"Member Type:xxx\" - just take the xxx)\n //\n tok = new StringTokenizer( mship, \":\" );\n\n if ( tok.countTokens() > 1 ) {\n\n mship = tok.nextToken(); // skip 1st part\n mship = tok.nextToken(); // get actual mship\n }\n\n\n //\n // Set mtype\n //\n mtype = \"Member\"; // same for all\n }\n } // end of IF club = bentwaterclub\n\n\n //******************************************************************\n // Sharon Heights\n //******************************************************************\n //\n if (club.equals( \"sharonheights\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else {\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n\n //\n // Set POS Id - leave leading zeros, but strip trailing alpha!!\n //\n if (!mNum.endsWith( \"0\" ) && !mNum.endsWith( \"1\" ) && !mNum.endsWith( \"2\" ) && !mNum.endsWith( \"3\" ) &&\n !mNum.endsWith( \"4\" ) && !mNum.endsWith( \"5\" ) && !mNum.endsWith( \"6\" ) && !mNum.endsWith( \"7\" ) &&\n !mNum.endsWith( \"8\" ) && !mNum.endsWith( \"9\" )) {\n\n posid = stripA(mNum); // remove trailing alpha for POSID\n }\n\n\n //\n // Strip any leading zeros and from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum w/o zeros for username (each is unique - MUST include the trailing alpha!!)\n\n //\n // Set mtype\n //\n mtype = \"Adult Male\"; // default\n\n if (!gender.equals(\"\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n if (mNum.endsWith(\"B\") || mNum.endsWith(\"b\")) {\n\n mtype = \"Adult Female\";\n }\n }\n\n //\n // Now remove the trainling alpha from mNum\n //\n if (!mNum.endsWith( \"0\" ) && !mNum.endsWith( \"1\" ) && !mNum.endsWith( \"2\" ) && !mNum.endsWith( \"3\" ) &&\n !mNum.endsWith( \"4\" ) && !mNum.endsWith( \"5\" ) && !mNum.endsWith( \"6\" ) && !mNum.endsWith( \"7\" ) &&\n !mNum.endsWith( \"8\" ) && !mNum.endsWith( \"9\" )) {\n\n mNum = stripA(mNum); // remove trailing alpha\n }\n }\n } // end of IF club = sharonheights\n\n\n/*\n //******************************************************************\n // Bald Peak\n //******************************************************************\n //\n if (club.equals( \"baldpeak\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else {\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use MF's memid\n memid = mNum; // use mNum for username (each is unique)\n\n\n if (!mNum.endsWith( \"0\" ) && !mNum.endsWith( \"1\" ) && !mNum.endsWith( \"2\" ) && !mNum.endsWith( \"3\" ) &&\n !mNum.endsWith( \"4\" ) && !mNum.endsWith( \"5\" ) && !mNum.endsWith( \"6\" ) && !mNum.endsWith( \"7\" ) &&\n !mNum.endsWith( \"8\" ) && !mNum.endsWith( \"9\" )) {\n\n mNum = stripA(mNum); // remove trailing alpha\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n\n //\n // Set mtype\n //\n mtype = \"Adult Male\"; // default\n\n if (!gender.equals(\"\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Adult Female\";\n gender = \"F\";\n }\n }\n }\n } // end of IF club = baldpeak\n*/\n\n //******************************************************************\n // Mesa Verde CC\n //******************************************************************\n //\n if (club.equals( \"mesaverdecc\" )) {\n\n found = true; // club found\n\n //\n // Make sure mship is titled\n //\n mship = toTitleCase(mship);\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (mship.startsWith( \"Social\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n //\n // Set mtype\n //\n mtype = \"Member\"; // default\n\n if (!gender.equals(\"\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Auxiliary\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Auxiliary\";\n gender = \"F\";\n }\n }\n }\n } // end of IF club = mesaverdecc\n\n\n //******************************************************************\n // Portland CC\n //******************************************************************\n //\n if (club.equals( \"portlandcc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n //\n // Set mtype\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Spouse Female\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Spouse Male\";\n }\n }\n\n //\n // Set mship\n //\n if (mship.endsWith(\"10\") || mship.endsWith(\"11\") || mship.endsWith(\"12\") || mship.endsWith(\"14\") ||\n mship.endsWith(\"15\") || mship.endsWith(\"16\") || mship.endsWith(\"17\")) {\n\n mship = \"Active\";\n\n } else if (mship.endsWith(\"20\") || mship.endsWith(\"21\")) {\n mship = \"Social\";\n } else if (mship.endsWith(\"30\") || mship.endsWith(\"31\")) {\n mship = \"Senior Active\";\n } else if (mship.endsWith(\"40\") || mship.endsWith(\"41\")) {\n mship = \"Junior Active\";\n } else if (mship.endsWith(\"18\") || mship.endsWith(\"19\")) {\n mship = \"Junior Social\";\n } else if (mship.endsWith(\"50\") || mship.endsWith(\"51\") || mship.endsWith(\"60\")) {\n mship = \"Unattached\";\n } else if (mship.endsWith(\"78\") || mship.endsWith(\"79\")) {\n mship = \"Social Non-Resident\";\n } else if (mship.endsWith(\"80\") || mship.endsWith(\"81\")) {\n mship = \"Active Non-Resident\";\n } else if (mship.endsWith(\"70\") || mship.endsWith(\"71\") || mship.endsWith(\"72\")) {\n mship = \"Spousal\";\n } else {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club = portlandcc\n\n\n /*\n //******************************************************************\n // Dorset FC - The Pro does not want to use RS - he will maintain the roster\n //******************************************************************\n //\n if (club.equals( \"dorsetfc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else {\n\n if (!mship.endsWith( \":5\" ) && !mship.endsWith( \":9\" ) && !mship.endsWith( \":17\" ) && !mship.endsWith( \":21\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n\n //\n // Set mtype\n //\n mtype = \"Adult Male\"; // default\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Adult Female\";\n }\n\n //\n // Set mship\n //\n mship = \"Family Full\";\n }\n }\n } // end of IF club = dorsetfc\n */\n\n\n //******************************************************************\n // Baltusrol GC\n //******************************************************************\n //\n if (club.equals( \"baltusrolgc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else {\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n\n //\n // Set mtype\n //\n if (memid.endsWith(\"-1\")) { // if Spouse\n\n if (gender.equalsIgnoreCase(\"M\")) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n\n fname = \"Mrs_\" + fname; // change to Mrs....\n }\n\n } else { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n }\n\n //\n // Set the mship type\n //\n if (mship.startsWith(\"Junior\")) { // Funnel anything starting with 'Junior' to be simply \"Junior\"\n\n mship = \"Junior\";\n\n } else if (mship.equalsIgnoreCase(\"Staff\") || mship.startsWith(\"Type\")) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club = baultusrolcc\n\n\n\n\n //******************************************************************\n // The Club at Pradera\n //******************************************************************\n //\n if (club.equals( \"pradera\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // use mNum for username (each is unique)\n\n //\n // Set mtype\n //\n if (mNum.endsWith(\"-1\")) { // if Spouse\n mNum = mNum.substring(0, mNum.length()-2);\n if (!genderMissing && gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n gender = \"F\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Spouse\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set the mship type\n //\n mship = \"Golf\"; // default\n\n if (mNum.startsWith(\"I\")) {\n mship = \"Invitational\";\n } else if (mNum.startsWith(\"P\")) {\n mship = \"Prestige\";\n } else if (mNum.startsWith(\"F\")) {\n mship = \"Founding\";\n } else if (mNum.startsWith(\"J\")) {\n mship = \"Junior Executive\";\n } else if (mNum.startsWith(\"C\")) {\n mship = \"Corporate\";\n } else if (mNum.startsWith(\"H\")) {\n mship = \"Honorary\";\n } else if (mNum.startsWith(\"Z\")) {\n mship = \"Employee\";\n } else if (mNum.startsWith(\"S\")) {\n mship = \"Sports\";\n } else if (mNum.startsWith(\"L\") || mNum.startsWith(\"l\")) {\n mship = \"Lifetime\";\n } else if (mNum.startsWith(\"X\")) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club = pradera\n\n\n\n //******************************************************************\n // Scarsdale GC\n //******************************************************************\n //\n if (club.equals( \"scarsdalegolfclub\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else if (fname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' FIRST NAME!\";\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n if (!mNum.endsWith(\"-1\")) {\n\n memid = mNum; // use mNum for username\n\n } else {\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n if ( tok.countTokens() > 1 ) {\n mNum = tok.nextToken(); // isolate mnum\n }\n\n memid = mNum + \"A\";\n }\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n //\n // Set mship\n //\n if (mship.endsWith(\"egular\")) { // catch all Regulars\n mship = \"Regular\";\n } else if (mship.endsWith(\"ssociate\")) { // catch all Associates\n mship = \"Associate\";\n } else if (mship.endsWith(\"Social\")) { // catch all Socials\n mship = \"House Social\";\n } else if (mship.endsWith(\"Sports\")) { // catch all Sports\n mship = \"House Sports\";\n } else if (mship.equals(\"P\") || mship.equals(\"Privilege\")) {\n mship = \"Privilege\";\n } else if (!mship.equals(\"Special Visitors\") && !mship.equals(\"Non-Resident\") && !mship.equals(\"Honorary\")) {\n\n skip = true; // skip if not one of the above\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club is Scarsdale\n\n\n\n //******************************************************************\n // Patterson Club\n //******************************************************************\n //\n if (club.equals( \"pattersonclub\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else if (fname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' FIRST NAME!\";\n } else if (mship.startsWith( \"DS\" ) || mship.startsWith( \"Employee\" ) || mship.equals( \"LOA\" ) ||\n mship.equals( \"Resigned\" ) || mship.equals( \"Honorary\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use id from MF\n\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n\n memid = mNum; // use mNum for username\n\n\n tok = new StringTokenizer( mNum, \"-\" );\n\n /*\n if ( tok.countTokens() > 1 ) {\n\n mNum = tok.nextToken(); // isolate mnum\n\n if (memid.endsWith(\"-1\")) {\n\n memid = mNum + \"A\"; // use nnnA\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else {\n mtype = \"Dependent\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n */\n\n if (mNum.endsWith(\"A\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n\n //\n // Set mship - these do not exist any longer, but leave just in case\n //\n if (mship.equalsIgnoreCase(\"FP-Intermediate\")) {\n mship = \"FP\";\n } else {\n if (mship.equalsIgnoreCase(\"HTP Intermediate\")) {\n mship = \"HTP\";\n }\n } // Accept others as is\n }\n } // end of IF club = pattersonclub\n\n\n //******************************************************************\n // Tamarack\n //******************************************************************\n //\n if (club.equals( \"tamarack\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n } else if (fname.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n } else if (fname.equalsIgnoreCase( \"survey\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Survey' FIRST NAME!\";\n } else if (fname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' FIRST NAME!\";\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n webid = memid; // use id from MF\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // Set username to mNum (it is unique)\n //\n memid = mNum;\n\n //\n // Remove extension from mNum if not primary\n //\n StringTokenizer tok9 = new StringTokenizer( mNum, \"-\" ); // look for a dash (i.e. 1234-1)\n\n if ( tok9.countTokens() > 1 ) { \n\n mNum = tok9.nextToken(); // get just the mNum if it contains an extension\n }\n\n /*\n if (!primary.equalsIgnoreCase(\"P\")) {\n mNum = stripA(mNum);\n }\n */\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n //\n // Set mtype\n //\n if (mship.startsWith(\"SP-\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n mship = mship.substring(3);\n\n } else if (mship.startsWith(\"DEP-\")) {\n\n mtype = \"Dependent\";\n\n mship = mship.substring(4);\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n if (memid.contains(\"-\")) {\n memid = memid.substring(0, memid.length() - 2) + memid.substring(memid.length() - 1);\n }\n \n\n //\n // Set mship\n //\n if (mship.equalsIgnoreCase(\"Associate\") || mship.equalsIgnoreCase(\"Corporate\") || mship.equalsIgnoreCase(\"Dependent\") ||\n mship.equalsIgnoreCase(\"Junior\") || mship.equalsIgnoreCase(\"Non-Resident\") || mship.equalsIgnoreCase(\"Senior\") ||\n mship.equalsIgnoreCase(\"Regular\") || mship.equalsIgnoreCase(\"Sr Cert\") || mship.equalsIgnoreCase(\"Intermed/C\") ||\n mship.equalsIgnoreCase(\"Widow\")) {\n\n // Do nothing\n\n } else if (mship.equalsIgnoreCase(\"Certificate\")) {\n mship = \"Certificat\";\n } else if (mship.equalsIgnoreCase(\"Intermediate\")) {\n mship = \"Intermedia\";\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n } // end of IF club = tamarack\n\n //******************************************************************\n // St. Clair Country Club\n //******************************************************************\n //\n if (club.equals( \"stclaircc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n } else {\n\n // strip \"Member Type:\" from mship if present\n if (mtype.startsWith(\"Member Type:\")) {\n mtype = mtype.substring(12);\n }\n\n // set mship\n if (mtype.equalsIgnoreCase(\"ACTIVE\") || mtype.equalsIgnoreCase(\"VOTING\")) {\n mship = \"Voting\";\n } else if (mtype.equalsIgnoreCase(\"ACTIVESR\") || mtype.equalsIgnoreCase(\"SENIOR\")) {\n mship = \"Senior\";\n } else if (mtype.startsWith(\"INT\")) {\n mship = \"Intermediate\";\n } else if (mtype.equalsIgnoreCase(\"ASSOC20\")) {\n mship = \"Assoc20\";\n } else if (mtype.equalsIgnoreCase(\"ASSOCIATE\")) {\n mship = \"Associate Golf\";\n } else if (mtype.equalsIgnoreCase(\"LTD GOLF\")) {\n mship = \"Limited Golf\";\n } else if (mtype.equalsIgnoreCase(\"SOCGLF\")) {\n mship = \"Social Golf\";\n } else if (mtype.equalsIgnoreCase(\"NRGP\")) {\n mship = \"NR Golf\";\n } else if (mtype.equalsIgnoreCase(\"FAMILY GP\") || mtype.equalsIgnoreCase(\"SPOUSE GP\")) {\n mship = \"Spouse Golf\";\n } else if (mtype.equalsIgnoreCase(\"FAMILYSPGP\") || mtype.equalsIgnoreCase(\"SPOUSESPGP\")) {\n mship = \"Spouse Golf 9\";\n } else if (mtype.equalsIgnoreCase(\"ASSP20GP\")) {\n mship = \"Assoc Spouse20\";\n } else if (mtype.equalsIgnoreCase(\"ASGP\")) {\n mship = \"Assoc/Ltd Spouse\";\n } else if (mtype.equalsIgnoreCase(\"LTDSP GP\") || mtype.equalsIgnoreCase(\"ASGP\")) {\n mship = \"Limited Spouse\";\n } else if (mtype.equalsIgnoreCase(\"ASSSPGP\")) {\n mship = \"Associate Spouse\";\n } else if (mtype.equalsIgnoreCase(\"SOCSP GP\") || mtype.equalsIgnoreCase(\"ASRGP\")) {\n mship = \"Soc Golf Spouse\";\n } else if (mtype.equalsIgnoreCase(\"JR 12-17\") || mtype.equalsIgnoreCase(\"JR 18-24\")) {\n mship = \"Junior Golf\";\n } else if (mtype.equalsIgnoreCase(\"ASSOC20J\") || mtype.equalsIgnoreCase(\"ASSOC20J18\")) {\n mship = \"Assoc Jr20\";\n } else if (mtype.equalsIgnoreCase(\"ASSOCJR\") || mtype.equalsIgnoreCase(\"ASSOCJR18\")) {\n mship = \"Associate Jr\";\n } else if (mtype.startsWith(\"LTD JR\")) {\n mship = \"Limited Jr\";\n } else if (mtype.equalsIgnoreCase(\"SOCJR<18\") || mtype.equalsIgnoreCase(\"SOCJR>18\")) {\n mship = \"Soc Jr Golf\";\n } else if (mtype.equalsIgnoreCase(\"EMERITUS\")) {\n mship = \"Emeritus\";\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n // set other values\n posid = mNum; // set posid in case we ever need it\n while (mNum.startsWith(\"0\")){\n mNum = remZeroS(mNum);\n }\n\n useWebid = true; // use these webids\n webid = memid;\n memid = mNum;\n\n // set mtype\n if (mNum.endsWith(\"S\")) {\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n }\n mNum = mNum.substring(0,mNum.length()-1); // remove extension char\n } else if (mNum.endsWith(\"J\") || mNum.endsWith(\"K\") || mNum.endsWith(\"L\") || mNum.endsWith(\"M\") || mNum.endsWith(\"N\") || mNum.endsWith(\"O\") || mNum.endsWith(\"P\")) {\n mtype = \"Dependent\";\n mNum = mNum.substring(0,mNum.length()-1); // remove extension char\n } else {\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Primary Male\";\n } else {\n mtype = \"Primary Female\";\n }\n }\n }\n\n } // end of IF club = stclaircc\n\n\n //******************************************************************\n // The Trophy Club Country Club\n //******************************************************************\n //\n if (club.equals( \"trophyclubcc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n\n } else {\n\n useWebid = true;\n webid = memid;\n posid = mNum;\n\n mship = \"Golf\";\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n }\n } // end of IF club = trophyclubcc\n\n\n\n //******************************************************************\n // Pelican Marsh Golf Club\n //******************************************************************\n //\n if (club.equals( \"pmarshgc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true;\n webid = memid;\n memid = mNum;\n\n mNum = stripDash(mNum); // remove the -00 etc from end of mNums\n\n posid = mNum;\n\n // check for proper membership types\n if (mtype.equalsIgnoreCase(\"Equity Golf\") || mtype.equalsIgnoreCase(\"Non-Equity Golf\") ||\n mtype.equalsIgnoreCase(\"Trial Golf\")) {\n mship = \"Golf\";\n } else if (mtype.equalsIgnoreCase(\"Equity Social\")) {\n mship = \"Social\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n }\n } // end of IF club is pmarshgc\n\n\n //******************************************************************\n // Silver Lake Country Club\n //******************************************************************\n //\n if (club.equals( \"silverlakecc\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is ok\n //\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum;\n mNum = remZeroS(mNum);\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n if (mtype.startsWith(\"Social\")) {\n mship = \"Social Elite\";\n } else {\n mship = \"Full Golf\";\n }\n\n //Will need to add \"Social Elite\" eventually!\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n memid = mNum + \"A\";\n } else {\n mtype = \"Adult Male\";\n memid = mNum;\n }\n\n }\n } // end of IF club is silverlakecc\n\n\n //******************************************************************\n // Edina Country Club\n //******************************************************************\n //\n if (club.equals(\"edina\") || club.equals(\"edina2010\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n StringTokenizer tempTok = new StringTokenizer(mNum, \"-\");\n String suf = \"0\";\n\n if (tempTok.countTokens() > 1){ // if mNum contains a - then it is a spouse\n mNum = stripDash(mNum);\n suf = \"1\";\n }\n\n posid = mNum; // set posid before zeros are removed\n\n while (mNum.startsWith(\"0\")) {\n mNum = remZeroS(mNum);\n }\n\n memid = mNum + suf; // set memid\n\n // ignore specific membership types\n if (mship.equalsIgnoreCase(\"Other Clubs\") || mship.equalsIgnoreCase(\"Party Account\") ||\n mship.equalsIgnoreCase(\"Resigned with Balance Due\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (mship.equalsIgnoreCase(\"Social\") || mship.equalsIgnoreCase(\"Honorary Social\") || mship.equalsIgnoreCase(\"Clergy\") || mship.equalsIgnoreCase(\"Social Widow\")) {\n\n mship = \"Social\";\n\n } else if (mship.equalsIgnoreCase(\"Pool/Tennis\")) {\n\n mship = \"Pool/Tennis\";\n\n } else { // leave these two as they are, everything else = golf\n \n mship = \"Golf\";\n }\n\n // set member type based on gender\n if (primary.equalsIgnoreCase(\"P\") || primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n } else {\n mtype = \"Dependent\";\n }\n \n \n //\n // Custom to filter out a member's 2nd email address - she doesn't want ForeTees emails on this one, but wants it in MF\n //\n if (webid.equals(\"2720159\")) {\n \n email2 = \"\";\n }\n \n }\n\n } // end if edina\n\n //******************************************************************\n // Seville Golf & Country Club\n //******************************************************************\n //\n if (club.equals(\"sevillegcc\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid before zeros are removed\n\n while (mNum.startsWith(\"0\")) {\n mNum = remZeroS(mNum);\n }\n\n // ignore specific membership types\n if (mtype.startsWith(\"Sports\")) {\n mship = \"Sports Golf\";\n } else {\n mship = \"Full Golf\";\n }\n\n // set member type and memid based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n memid = mNum + \"A\";\n } else {\n mtype = \"Adult Male\";\n memid = mNum;\n }\n }\n\n } // end if sevillegcc\n\n\n //******************************************************************\n // Royal Oaks CC - Dallas\n //******************************************************************\n //\n if (club.equals(\"roccdallas\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mship.equalsIgnoreCase(\"Tennis Member\") || mship.equalsIgnoreCase(\"Tennis Special Member\") ||\n mship.equalsIgnoreCase(\"Junior Tennis Member\") || mship.equalsIgnoreCase(\"Social Member\") ||\n mship.equalsIgnoreCase(\"Dining Member\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid before zeros are removed\n // memid = mNum; // user mNum as memid, mNums ARE UNIQUE! - USE MF's ID !!!!\n\n if (!mNum.endsWith( \"0\" ) && !mNum.endsWith( \"1\" ) && !mNum.endsWith( \"2\" ) && !mNum.endsWith( \"3\" ) &&\n !mNum.endsWith( \"4\" ) && !mNum.endsWith( \"5\" ) && !mNum.endsWith( \"6\" ) && !mNum.endsWith( \"7\" ) &&\n !mNum.endsWith( \"8\" ) && !mNum.endsWith( \"9\" )) {\n\n mNum = stripA(mNum); // remove trailing alpha\n }\n\n\n // handle 'Spouse of member' membership type\n if (mship.equalsIgnoreCase(\"Spouse of member\")) {\n\n primary = \"S\"; // they are a Spouse\n\n // if Spouse: determine mship from 2nd character of mNum\n if (!mNum.equals(\"\")) {\n\n if (mNum.charAt(1) == 'P') {\n mship = \"Golf Associate Member\";\n } else if (mNum.charAt(1) == 'E') {\n mship = \"Special Member\";\n } else if (mNum.charAt(1) == 'G') {\n mship = \"Senior Member\";\n } else if (mNum.charAt(1) == 'J') {\n mship = \"Junior Member\";\n } else if (mNum.charAt(1) == 'N') {\n mship = \"Non Resident Member\";\n } else if (mNum.charAt(1) == 'F') {\n mship = \"Temp Non Certificate\";\n } else if (mNum.charAt(1) == 'L') {\n mship = \"Ladies Member\";\n } else if (mNum.charAt(1) == 'K') {\n mship = \"Associate Resident Member\";\n } else if (mNum.charAt(1) == 'H') {\n mship = \"Honorary\";\n } else if (mNum.charAt(1) == 'B') {\n mship = \"Tennis with Golf\";\n } else if (mNum.charAt(1) == 'D' || mNum.charAt(1) == 'T' || mNum.charAt(1) == 'R' || mNum.charAt(1) == 'S') {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n } else { // no letter for 2nd char of mNum\n mship = \"Resident Member\";\n }\n } else {\n\n skip = true;\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE could not be determined! (mNum missing)\";\n }\n }\n\n // set member type based on gender\n // blank gender and mNum ending with 'A' = female, otherwise male\n if (gender.equalsIgnoreCase(\"F\") || (gender.equalsIgnoreCase(\"\") && mNum.toLowerCase().endsWith(\"a\"))) {\n\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n }\n } // end if roccdallas\n\n\n //******************************************************************\n // Hackberry Creek CC - hackberrycreekcc\n //******************************************************************\n //\n if (club.equals(\"hackberrycreekcc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid in case we need it in the future\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n mship = \"Golf\"; // everyone changed to \"Golf\"\n\n // set member type and memid based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n memid = mNum + \"A\";\n } else {\n mtype = \"Adult Male\";\n memid = mNum;\n }\n }\n } // end if hackberrycreekcc\n\n //******************************************************************\n // Brookhaven CC - brookhavenclub\n //******************************************************************\n //\n if (club.equals(\"brookhavenclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid in case we need it in the future\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n\n if (mtype.startsWith(\"DFW\")) {\n mship = \"DFWY\";\n } else {\n mship = \"Golf\"; // everyone changed to \"Golf\"\n }\n\n // set member type and memid based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n memid = mNum + \"A\";\n } else {\n mtype = \"Adult Male\";\n memid = mNum;\n }\n }\n } // end if brookhavenclub\n\n //******************************************************************\n // Stonebridge Ranch CC - stonebridgeranchcc\n //******************************************************************\n //\n if (club.equals(\"stonebridgeranchcc\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid in case we need it in the future\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n if (mtype.equalsIgnoreCase(\"Dual Club\") || mtype.equalsIgnoreCase(\"Dual Club Distant\") || mtype.equalsIgnoreCase(\"Dual Club Society\") ||\n mtype.equalsIgnoreCase(\"Honorary\") || mtype.equalsIgnoreCase(\"Honorary Society\") || mtype.equalsIgnoreCase(\"Prem Charter Select\") ||\n mtype.equalsIgnoreCase(\"Prem Chrtr Sel Scty\") || mtype.equalsIgnoreCase(\"Prem Club Corp Scty\") || mtype.equalsIgnoreCase(\"Prem Mbr Sel Society\") ||\n mtype.equalsIgnoreCase(\"Prem Member Charter\") || mtype.equalsIgnoreCase(\"Prem Member Select\") || mtype.equalsIgnoreCase(\"Prem Mbrshp Society\") ||\n mtype.equalsIgnoreCase(\"Premier Club Corp D\") || mtype.equalsIgnoreCase(\"Premier Club Jr\") || mtype.equalsIgnoreCase(\"Premier Corporate\") ||\n mtype.equalsIgnoreCase(\"Premier Membership\") || mtype.equalsIgnoreCase(\"Premier Nr\") || mtype.equalsIgnoreCase(\"Prem Mbr Chrtr Scty\") ||\n mtype.equalsIgnoreCase(\"Premier Club Jr Scty\") || mtype.equalsIgnoreCase(\"Westerra\") || mtype.equalsIgnoreCase(\"Premier Club C Ppd\") ||\n mtype.equalsIgnoreCase(\"Premier Club Corp Ds\") || mtype.equalsIgnoreCase(\"Preview\")) {\n\n mship = \"Dual\";\n\n } else if (mtype.equalsIgnoreCase(\"Pr SB Sel Scty\") || mtype.equalsIgnoreCase(\"Prem Stnbrdge Select\") || mtype.equalsIgnoreCase(\"Prem Stonbrdg Scty \") ||\n mtype.equalsIgnoreCase(\"Premier Stonebridge\") || mtype.equalsIgnoreCase(\"Stonebridge Assoc.\") || mtype.equalsIgnoreCase(\"Stonebridge Charter\") ||\n mtype.equalsIgnoreCase(\"Stonebridge Golf\") || mtype.equalsIgnoreCase(\"Stonebridge Golf Soc\") || mtype.equalsIgnoreCase(\"Options II\") ||\n mtype.equalsIgnoreCase(\"Options II Society\") || mtype.equalsIgnoreCase(\"Options I \") || mtype.equalsIgnoreCase(\"Options I Society\") ||\n mtype.equalsIgnoreCase(\"Stonebridge Distn Gf\") || mtype.equalsIgnoreCase(\"Sb Premier Nr\") || mtype.equalsIgnoreCase(\"Prem Stonbrdg Scty\") ||\n mtype.equalsIgnoreCase(\"Stonebridge Soc Scty\") || mtype.equalsIgnoreCase(\"Stnbrdge Assoc Scty\") || mtype.equalsIgnoreCase(\"Sb Golf Legacy Soc.\")) {\n\n mship = \"Dye\";\n\n } else if (mtype.equalsIgnoreCase(\"Pr Rcc Pr 6/96 Scty\") || mtype.equalsIgnoreCase(\"Pr Rnch Aft 6/96 Sct\") || mtype.equalsIgnoreCase(\"Prem Rcc Jr Select\") ||\n mtype.equalsIgnoreCase(\"Prem Rcc Prior 6/96\") || mtype.equalsIgnoreCase(\"Prem Rnch After 6/96\") || mtype.equalsIgnoreCase(\"Prem Rnch Select Sty\") ||\n mtype.equalsIgnoreCase(\"Premier Ranch Select\") || mtype.equalsIgnoreCase(\"Prm Rcc Sel Aft\") || mtype.equalsIgnoreCase(\"Prm Rcc Sel Aft 96st\") ||\n mtype.equalsIgnoreCase(\"Ranch Charter\") || mtype.equalsIgnoreCase(\"Ranch Golf\") || mtype.equalsIgnoreCase(\"Ranch Golf Legacy\") ||\n mtype.equalsIgnoreCase(\"Ranch Golf Non-Res\") || mtype.equalsIgnoreCase(\"Ranch Golf Society\") || mtype.equalsIgnoreCase(\"Special Golf\") ||\n mtype.equalsIgnoreCase(\"Prem Rcc Pr Nr\") || mtype.equalsIgnoreCase(\"Prem Rnch Sports Sty\") || mtype.equalsIgnoreCase(\"Ranch Nr Society\") ||\n mtype.equalsIgnoreCase(\"Pr Rcc Aft799 Society\") || mtype.equalsIgnoreCase(\"Ranch Non Resident\") || mtype.equalsIgnoreCase(\"Ranch Ppd Rcc Golf\")) {\n\n mship = \"Hills\";\n\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n // set member type and memid based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n\n } // end if stonebridgeranchcc\n\n\n //******************************************************************\n // Charlotte CC - charlottecc\n //******************************************************************\n //\n if (club.equals(\"charlottecc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum.toUpperCase(); // use mNum for memid, they are unique\n\n // Set primary/spouse value\n if (mNum.toUpperCase().endsWith(\"S\")) {\n primary = \"S\";\n mNum = stripA(mNum);\n } else {\n primary = \"P\";\n }\n\n posid = mNum; // set posid in case it's ever needed\n\n // set mtype based on gender\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n // if mship starts with 'Spousal-surviving' or 'Spousal', remove the prefix\n if (mship.equalsIgnoreCase(\"Spousal-surviving Resident\")) {\n mship = \"Dependent Spouse\";\n } else {\n if (mship.startsWith(\"Spousal-surviving\")) {\n mship = mship.substring(18, mship.length() - 1);\n }\n if (mship.startsWith(\"Spousal\") && !mship.equalsIgnoreCase(\"Spousal Member\")) {\n mship = mship.substring(8, mship.length() - 1);\n }\n\n // set mship\n if (mship.startsWith(\"Resident\") || mship.equalsIgnoreCase(\"Ministerial-NM\")) {\n mship = \"Resident\";\n } else if (mship.startsWith(\"Non-Resident\")) {\n mship = \"Non Resident\";\n } else if (mship.startsWith(\"Dependant\")) {\n mship = \"Dependent Spouse\";\n } else if (mship.startsWith(\"Honorary\")) {\n mship = \"Honorary\";\n } else if (mship.startsWith(\"Lady\") || mship.equalsIgnoreCase(\"Spousal Member\")) {\n mship = \"Lady\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n }\n } // end if charlottecc\n\n\n //******************************************************************\n // Gleneagles CC - gleneaglesclub\n //******************************************************************\n //\n if (club.equals(\"gleneaglesclub\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // set posid in case we need it in the future\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n mship = \"Golf\"; // everyone changed to \"Golf\"\n\n // set member type and memid based on gender\n if (primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n memid = mNum + \"A\";\n\n } else if (primary.equalsIgnoreCase(\"P\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Member Female\";\n } else {\n mtype = \"Member Male\";\n }\n memid = mNum;\n } else { // Dependent\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n // use provided memid\n }\n }\n\n } // end if gleneaglesclub\n\n\n\n\n //******************************************************************\n // Portland CC - portlandgc\n //******************************************************************\n //\n if (club.equals(\"portlandgc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n if (mNum.length() == 6) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Female Spouse\";\n } else {\n mtype = \"Male Spouse\";\n }\n\n mNum = mNum.substring(0, mNum.length() - 1); // get rid of extra number on end of spouse mNums\n primary = \"S\";\n\n memid = mNum;\n\n while (memid.startsWith(\"0\")) { // strip leading zeros\n memid = remZeroS(memid);\n }\n memid = memid + \"A\";\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Female Member\";\n } else {\n mtype = \"Male Member\";\n }\n\n primary = \"P\";\n\n memid = mNum;\n\n while (memid.startsWith(\"0\")) { // strip leading zeros\n memid = remZeroS(memid);\n }\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n if (mship.equalsIgnoreCase(\"AAR-FG\") || mship.equalsIgnoreCase(\"NON-RES\") ||\n mship.equalsIgnoreCase(\"REGULAR\") || mship.equalsIgnoreCase(\"TEMPORARY\")) { mship = \"Regular\"; }\n else if (mship.equalsIgnoreCase(\"30YEARS\")) { mship = \"30 Year Social\"; }\n else if (mship.equalsIgnoreCase(\"EMPLOYEE\")) { mship = \"Employee\"; }\n else if (mship.equalsIgnoreCase(\"HONORARY\")) { mship = \"Honorary\"; }\n else if (mship.equalsIgnoreCase(\"JUNIOR\")) { mship = \"Junior Associate\"; }\n else if (mship.equalsIgnoreCase(\"SOCIAL\")) { mship = \"Social\"; }\n else if (mship.startsWith(\"L\")) { mship = \"Leave of Absence\"; }\n else if (mship.equalsIgnoreCase(\"SPOUSE\")) { mship = \"Spouse Associate\"; }\n else if (mship.equalsIgnoreCase(\"Member Status:SENIOR\")) { mship = \"Senior\"; }\n else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if portlandgc\n\n\n //******************************************************************\n // Quechee Club\n //******************************************************************\n //\n if (club.equals(\"quecheeclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum;\n\n\n mNum = mNum.substring(0, mNum.length() - 1); // get rid of trailing primary indicator # on mNum\n\n if (memid.endsWith(\"0\")) { // Primary\n primary = \"P\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (memid.endsWith(\"1\")) { // Spouse\n primary = \"S\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else { // Dependent\n primary = \"D\";\n mtype = \"Dependent\";\n }\n\n // Set the posid\n if (primary.equals(\"S\")) {\n posid = mNum + \"1\"; // set posid in case we need it in the future\n } else {\n posid = mNum + \"0\";\n }\n\n if (mship.equalsIgnoreCase(\"ALL-F\")) {\n mship = \"ALL Family\";\n } else if (mship.equalsIgnoreCase(\"ALL-S\")) {\n mship = \"ALL Single\";\n } else if (mship.equalsIgnoreCase(\"GAP-F\")) {\n mship = \"GAP Family\";\n } else if (mship.equalsIgnoreCase(\"GAP-S\")) {\n mship = \"GAP Single\";\n } else if (mship.equalsIgnoreCase(\"GAPM-F\")) {\n mship = \"GAPM Family\";\n } else if (mship.equalsIgnoreCase(\"GAPM-S\")) {\n mship = \"GAPM Single\";\n } else if (mship.equalsIgnoreCase(\"NON-GAP\")) {\n mship = \"NON-GAP\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if quecheeclub\n\n\n\n //******************************************************************\n // Quechee Club - Tennis\n //******************************************************************\n //\n if (club.equals(\"quecheeclubtennis\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum;\n\n\n mNum = mNum.substring(0, mNum.length() - 1); // get rid of trailing primary indicator # on mNum\n\n if (memid.endsWith(\"0\")) { // Primary\n primary = \"P\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (memid.endsWith(\"1\")) { // Spouse\n primary = \"S\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else { // Dependent\n primary = \"D\";\n mtype = \"Dependent\";\n }\n\n // Set the posid\n if (primary.equals(\"S\")) {\n posid = mNum + \"1\"; // set posid in case we need it in the future\n } else {\n posid = mNum + \"0\";\n }\n\n if (mship.equalsIgnoreCase(\"ALL-F\")) {\n mship = \"ALL Family\";\n } else if (mship.equalsIgnoreCase(\"ALL-S\")) {\n mship = \"ALL Single\";\n } else if (custom1.equalsIgnoreCase(\"Tennis-F\")) {\n mship = \"TAP Family\";\n } else if (custom1.equalsIgnoreCase(\"Tennis-S\")) {\n mship = \"TAP Single\";\n } else if (custom1.equals(\"?\") || custom1.equals(\"\")) {\n mship = \"NON-TAP\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if quecheeclubtennis\n\n //******************************************************************\n // The Oaks Club\n //******************************************************************\n //\n if (club.equals(\"theoaksclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum;\n\n if (mNum.endsWith(\"-1\")) {\n\n primary = \"S\";\n gender = \"F\";\n mtype = \"Spouse Female\";\n\n mNum = mNum.substring(0, mNum.length() - 2);\n\n if (mship.startsWith(\"Dependent\")) { // Use the primary's mship\n try {\n ResultSet oaksRS = null;\n PreparedStatement oaksStmt = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n oaksStmt.clearParameters();\n oaksStmt.setString(1, mNum);\n oaksRS = oaksStmt.executeQuery();\n\n if (oaksRS.next()) {\n mship = oaksRS.getString(\"m_ship\");\n } else {\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SPOUSE with DEPENDENT membership type - NO PRIMARY FOUND!\";\n }\n\n oaksStmt.close();\n\n } catch (Exception exc) { }\n }\n\n } else if (mNum.endsWith(\"-2\") || mNum.endsWith(\"-3\") || mNum.endsWith(\"-4\") || mNum.endsWith(\"-5\") ||\n mNum.endsWith(\"-6\") || mNum.endsWith(\"-7\") || mNum.endsWith(\"-8\") || mNum.endsWith(\"-9\")) {\n\n primary = \"D\";\n mtype = \"Dependent\";\n mNum = mNum.substring(0, mNum.length() - 2);\n\n } else {\n\n primary = \"P\";\n gender = \"M\";\n mtype = \"Primary Male\";\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n if (mship.equalsIgnoreCase(\"Regular Equity\") || mship.equalsIgnoreCase(\"Member Type:001\")) {\n mship = \"Regular Equity\";\n } else if (mship.equalsIgnoreCase(\"Golf\") || mship.equalsIgnoreCase(\"Member Type:010\")) {\n mship = \"Golf\";\n } else if (mship.equalsIgnoreCase(\"Social Property Owner\") || mship.equalsIgnoreCase(\"Member Type:002\")) {\n mship = \"Social Property Owner\";\n } else if (mship.equalsIgnoreCase(\"Tennis Associate\") || mship.equalsIgnoreCase(\"Member Type:020\")) {\n mship = \"Tennis Associate\";\n } else if (mship.equalsIgnoreCase(\"Member Type:022\")) {\n mship = \"Jr Tennis Associate\";\n } else if (mship.startsWith(\"Dependent\")) {\n mship = \"Dependent\";\n } else if (mship.equalsIgnoreCase(\"Member Type:085\")) {\n mship = \"General Manager\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n }\n } // end if theoaksclub\n\n\n //******************************************************************\n // Admirals Cove\n //******************************************************************\n //\n if (club.equals(\"admiralscove\")) {\n\n found = true; // club found\n\n if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\")) {\n\n primary = \"S\";\n mNum = mNum.substring(0, mNum.length() - 1);\n\n } else {\n primary = \"P\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n if (mship.equals( \"\" )) {\n //\n // Spouse or Dependent - look for Primary mship type and use that\n //\n try {\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username != ? AND m_ship != '' AND memNum = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n pstmt2.setString(2, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n mship = rs.getString(\"m_ship\"); // use primary mship type\n } else { //\n skip = true; // skip this one\n mship = \"\";\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n }\n\n pstmt2.close();\n\n } catch (Exception e1) { }\n\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n if (!mship.equals(\"\")) {\n\n if (mship.startsWith(\"Golf\") || mship.equals(\"Full Golf\")) {\n mship = \"Full Golf\";\n } else if (mship.startsWith(\"Sports\")) {\n mship = \"Sports\";\n } else if (!mship.equals(\"Social\") && !mship.equals(\"Marina\") && !mship.equals(\"Tennis\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n }\n } // end if admiralscove\n\n\n //******************************************************************\n // Ozaukee CC\n //******************************************************************\n //\n if (club.equals(\"ozaukeecc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n if (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\") || mNum.endsWith(\"a\") || mNum.endsWith(\"B\") || mNum.endsWith(\"C\") || mNum.endsWith(\"D\")) {\n\n primary = \"S\";\n mNum = mNum.substring(0, mNum.length() - 1); // strip trailing 'A'\n\n } else {\n primary = \"P\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n if (mship.equalsIgnoreCase(\"EM\")) {\n mship = \"Emeritus\";\n }\n\n if (mship.equalsIgnoreCase(\"Curler\") || mship.equalsIgnoreCase(\"Resigned\") ||\n mship.equalsIgnoreCase(\"Social\") || mship.equalsIgnoreCase(\"Summer Social\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n posid = mNum; // set posid in case we need it in the future\n }\n } // end if ozaukeecc\n\n //******************************************************************\n // Palo Alto Hills G&CC - paloaltohills\n //******************************************************************\n //\n if (club.equals(\"paloaltohills\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) { // this club has its mship values in mtype field!!\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n // trim off leading zeroes\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (gender.equals(\"F\")) {\n primary = \"S\";\n //mtype = \"Secondary Female\"; // no longer setting mtype with roster sync\n } else {\n primary = \"P\";\n //mtype = \"Primary Male\"; // no longer setting mtype with roster sync\n gender = \"M\";\n }\n\n if (mNum.endsWith(\"A\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (memid.startsWith(\"1\") || memid.startsWith(\"4\") || memid.startsWith(\"6\") || memid.startsWith(\"8\")) {\n mship = \"Golf\";\n } else if (memid.startsWith(\"2\")) {\n mship = \"Social\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n } // end if paloaltohills\n\n\n //******************************************************************\n // Woodside Plantation CC - wakefieldplantation\n //******************************************************************\n //\n if (club.equals(\"woodsideplantation\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum; // set posid in case we need it in the future\n\n\n if (memid.equals(\"399609\")) { // Marvin Cross has an invalid email address ([email protected]) - belongs to a church in FL\n email2 = \"\";\n }\n\n\n if (primary.equalsIgnoreCase(\"P\")) {\n memid = mNum;\n } else {\n memid = mNum + \"A\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n\n }\n } // end if woodsideplantation\n\n //******************************************************************\n // Timarron CC - timarroncc\n //******************************************************************\n //\n if (club.equals(\"timarroncc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum; // set posid in case we need it in the future\n\n mship = \"Golf\";\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid = mNum + \"A\";\n } else {\n memid = mNum;\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n }\n } // end if timarroncc\n\n //******************************************************************\n // Fountaingrove Golf & Athletic Club - fountaingrovegolf\n //******************************************************************\n //\n if (club.equals(\"fountaingrovegolf\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n String posSuffix = \"\";\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum;\n \n if (mNum.endsWith(\"A\")) {\n primary = \"P\";\n mNum = mNum.substring(0, mNum.length() - 1);\n memid = mNum;\n } else {\n primary = \"S\";\n mNum = mNum.substring(0, mNum.length() - 1);\n memid = mNum + \"A\";\n }\n\n if (mship.equalsIgnoreCase(\"Golf\") || mship.equalsIgnoreCase(\"Employee\")) {\n mship = \"Golf\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n }\n } // end if fountaingrovegolf\n\n\n/* Disabled, left ForeTees\n //******************************************************************\n // Austin Country Club - austincountryclub\n //******************************************************************\n //\n if (club.equals(\"austincountryclub\")) {\n\n found = true; // club found\n\n if (primary.equalsIgnoreCase(\"P\") && mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n if (mNum.toUpperCase().endsWith(\"A\")) {\n mNum = stripA(mNum);\n }\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n posid = mNum; // set posid in case we need it in the future\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n\n // If a spouse member, retrieve the primary user's membership type to use for them\n if (primary.equalsIgnoreCase(\"S\")) {\n try {\n PreparedStatement pstmtAus = null;\n ResultSet rsAus = null;\n\n pstmtAus = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE memNum = ? AND m_ship<>''\");\n pstmtAus.clearParameters();\n pstmtAus.setString(1, mNum);\n\n rsAus = pstmtAus.executeQuery();\n\n if (rsAus.next()) {\n mship = rsAus.getString(\"m_ship\");\n } else {\n mship = \"\";\n }\n\n pstmtAus.close();\n\n } catch (Exception ignore) {\n\n mship = \"\";\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Membership Type could not be retrieved from Primary Member record!\";\n }\n }\n\n if (mship.equalsIgnoreCase(\"JRF\") || mship.equalsIgnoreCase(\"Former Junior\")) {\n mship = \"Former Junior\";\n } else if (mship.equalsIgnoreCase(\"HON\") || mship.equalsIgnoreCase(\"Honorary\")) {\n mship = \"Honorary\";\n } else if (mship.equalsIgnoreCase(\"JR\") || mship.equalsIgnoreCase(\"Junior\")) {\n mship = \"Junior\";\n } else if (mship.equalsIgnoreCase(\"N-R\") || mship.equalsIgnoreCase(\"Non-Resident\")) {\n mship = \"Non-Resident\";\n } else if (mship.equalsIgnoreCase(\"RES\") || mship.equalsIgnoreCase(\"Resident\")) {\n mship = \"Resident\";\n } else if (mship.equalsIgnoreCase(\"SR\") || mship.equalsIgnoreCase(\"SRD\") || mship.equalsIgnoreCase(\"Senior\")) {\n mship = \"Senior\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n\n }\n } // end if austincountryclub\n */\n\n //******************************************************************\n // Treesdale Golf & Country Club - treesdalegolf\n //******************************************************************\n //\n if (club.equals(\"treesdalegolf\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Primary Female\";\n } else {\n gender = \"M\";\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Spouse Female\";\n } else {\n gender = \"M\";\n mtype = \"Spouse Male\";\n }\n\n memid += \"A\";\n\n } else {\n mtype = \"Junior\";\n }\n\n mship = \"Golf\";\n\n }\n } // end if treesdalegolf\n\n //******************************************************************\n // Sawgrass Country Club - sawgrass\n //******************************************************************\n //\n if (club.equals(\"sawgrass\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n if (mNum.endsWith(\"-1\")) {\n mNum = mNum.substring(0, mNum.length() - 2);\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n // Still filter on given mships even though using mtype field to determine what mship will be set to\n if (mship.equalsIgnoreCase(\"Associate Member\") || mship.equalsIgnoreCase(\"Complimentary Employee\") || mship.equalsIgnoreCase(\"Complimentary Other\") ||\n mship.startsWith(\"House\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE! (mship)\";\n }\n\n if (mtype.equalsIgnoreCase(\"7DAY\")) {\n mship = \"Sports\";\n } else if (mtype.equalsIgnoreCase(\"3DAY\")) {\n mship = \"Social\";\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE! (mtype)\";\n }\n\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Member Female\";\n } else {\n mtype = \"Member Male\";\n }\n\n }\n } // end if sawgrass\n\n /*\n //******************************************************************\n // TPC at SnoaQualmie Ridge\n //******************************************************************\n //\n if (club.equals(\"snoqualmieridge\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum; // set posid in case it's ever needed\n\n // Set primary/spouse value\n if (mNum.toUpperCase().endsWith(\"A\")) {\n primary = \"P\";\n mNum = stripA(mNum);\n } else {\n if (mNum.toUpperCase().endsWith(\"B\")) {\n primary = \"S\";\n mNum = stripA(mNum);\n } else {\n if (mNum.toUpperCase().endsWith(\"C\") || mNum.toUpperCase().endsWith(\"D\") ||\n mNum.toUpperCase().endsWith(\"E\") || mNum.toUpperCase().endsWith(\"F\") ||\n mNum.toUpperCase().endsWith(\"G\") || mNum.toUpperCase().endsWith(\"H\") ||\n mNum.toUpperCase().endsWith(\"I\") || mNum.toUpperCase().endsWith(\"J\")) {\n primary = \"D\";\n\n memid = mNum.toUpperCase(); // use mNum for memid, they are unique\n\n mNum = stripA(mNum);\n\n } else {\n primary = \"P\"; // if no alpha - assume primary\n }\n }\n }\n\n // set mtype based on gender and relationship\n if (gender.equalsIgnoreCase(\"F\")) {\n\n if (primary.equals(\"P\") || primary.equals(\"S\")) {\n\n mtype = \"Adult Female\";\n\n memid = mNum + \"F\"; // memid for Adult Females\n\n } else {\n\n mtype = \"Dependent Female\";\n }\n\n } else { // Male\n\n if (primary.equals(\"P\") || primary.equals(\"S\")) {\n mtype = \"Adult Male\";\n\n memid = mNum + \"M\"; // memid for Adult Males\n\n } else {\n\n mtype = \"Dependent Male\";\n }\n }\n\n // mships ?????????????\n\n }\n } // end if snoqualmieridge\n */\n\n //******************************************************************\n // Druid Hills Golf Club - dhgc\n //******************************************************************\n //\n if (club.equals(\"dhgc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n\n posid = mNum; // set posid in case we need it in the future\n\n // Remove leading zeroes\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mship.equalsIgnoreCase(\"House\")) {\n\n skip = true;\n errCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n if (primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n }\n } // end if dhgc\n\n //******************************************************************\n // The Reserve Club - thereserveclub\n //******************************************************************\n //\n if (club.equals(\"thereserveclub\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n if (mNum.endsWith(\"-1\")) {\n mNum = mNum.substring(0, mNum.length() - 2);\n }\n\n posid = mNum; // set posid in case we need it in the future\n\n mship = mtype;\n\n if (mship.endsWith(\" - Spouse\")) {\n mship = mship.substring(0, mship.length() - 9);\n }\n\n if (mship.startsWith(\"Social\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE! (mtype)\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n } // end if thereserveclub\n\n\n //******************************************************************\n // Robert Trent Jones - rtjgc\n //******************************************************************\n //\n if (club.equals(\"rtjgc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n if (mNum.endsWith(\"-1\")) {\n\n memid = mNum;\n\n while (memid.length() < 5) {\n memid = \"0\" + memid;\n }\n\n if (gender.equals(\"F\")) {\n memid += \"A\"; // spouse or female\n }\n } else {\n memid = mNum; // primary males\n }\n\n\n //\n // Set the member type\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n }\n\n } // end if rtjgc\n\n\n //******************************************************************\n // Morgan Run - morganrun\n //******************************************************************\n //\n if (club.equals(\"morganrun\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n \n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n }\n\n mship = \"Golf\";\n\n //\n // Set the member type\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n }\n\n } // end if morganrun\n\n\n //******************************************************************\n // CC at DC Ranch - ccdcranch\n //******************************************************************\n //\n if (club.equals(\"ccdcranch\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (mship.equalsIgnoreCase(\"COR\") || mship.equalsIgnoreCase(\"GOLF\")) {\n mship = \"Full Golf\";\n } else if (mship.equalsIgnoreCase(\"SPS\")) {\n mship = \"Sports/Social\";\n } else if (mship.equalsIgnoreCase(\"SECONDARY\")) {\n if (mNum.startsWith(\"1\") || mNum.startsWith(\"5\")) {\n mship = \"Full Golf\";\n } else if (mNum.startsWith(\"3\")) {\n mship = \"Sports/Social\";\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n //\n // Set the member type\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n }\n\n } // end if ccdcranch\n\n\n //******************************************************************\n // Oakley CC - oakleycountryclub\n //******************************************************************\n //\n if (club.equals(\"oakleycountryclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (!mtype.equals(\"\")) {\n mship = mtype;\n }\n\n // Set the member type\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n\n }\n\n } // end if oakleycountryclub\n\n\n //******************************************************************\n // Black Rock CC - blackrockcountryclub\n //******************************************************************\n //\n if (club.equals(\"blackrockcountryclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\") || mNum.endsWith(\"D\") || mNum.endsWith(\"Z\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n gender = \"F\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n gender = \"M\";\n }\n }\n\n }\n\n } // end if blackrockcountryclub\n\n/*\n //******************************************************************\n // The Edison Club - edisonclub\n //******************************************************************\n //\n if (club.equals(\"edisonclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n while (posid.startsWith(\"0\")) {\n posid = posid.substring(1);\n }\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (primary.equalsIgnoreCase(\"S\")) {\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Spouse Male\";\n } else {\n mtype = \"Spouse Female\";\n gender = \"F\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n gender = \"M\";\n }\n } \n\n }\n\n } // end if edisonclub\n */\n\n\n //******************************************************************\n // Longue Vue Club - longuevueclub\n //******************************************************************\n //\n if (club.equals(\"longuevueclub\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n if (mtype.equals(\"\")) {\n mtype = \"Adult Male\";\n }\n\n if (mtype.endsWith(\" Female\")) {\n gender = \"F\";\n } else {\n gender = \"M\";\n }\n }\n } // end if longuevueclub\n\n\n //******************************************************************\n // Happy Hollow Club - happyhollowclub\n //******************************************************************\n //\n if (club.equals(\"happyhollowclub\")) {\n\n found = true; // club found\n\n if (mtype.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing! (*NOTE* mship located in mtype field)\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n memid = mNum;\n\n while (memid.startsWith(\"0\")) {\n memid = memid.substring(1);\n }\n\n // If member number does not end with the first letter of member's last name, strip off the last character\n if (!mNum.endsWith(lname.substring(0,1))) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n // Add leading zeroes until mNum has a length of 5\n while (mNum.length() < 5) {\n mNum = \"0\" + mNum;\n }\n\n\n // Remove \"Member Status:\" from beginning of mship\n if (mtype.startsWith(\"Member Status:\")) {\n mtype = mtype.replace(\"Member Status:\", \"\");\n }\n\n // Filter mtypes and mships\n if (mtype.equalsIgnoreCase(\"DEPEND A\") || mtype.equalsIgnoreCase(\"DEPEND B\") || mtype.equalsIgnoreCase(\"DEPEND SOC\")) {\n\n if (mtype.equalsIgnoreCase(\"DEPEND A\") || mtype.equalsIgnoreCase(\"DEPEND B\")) {\n mship = \"Golf\";\n } else if (mtype.equalsIgnoreCase(\"DEPEND SOC\")) {\n mship = \"Social\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n\n } else if (mtype.equalsIgnoreCase(\"EMPLOYEE\") || mtype.equalsIgnoreCase(\"GOLF A\") || mtype.equalsIgnoreCase(\"GOLF B\") || mtype.equalsIgnoreCase(\"SOCIAL\")) {\n\n if (mtype.equalsIgnoreCase(\"EMPLOYEE\")) {\n mship = \"Employee\";\n } else if (mtype.equalsIgnoreCase(\"GOLF A\") || mtype.equalsIgnoreCase(\"GOLF B\")) {\n mship = \"Golf\";\n } else if (mtype.equalsIgnoreCase(\"SOCIAL\")) {\n mship = \"Social\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n \n } else if (mtype.equalsIgnoreCase(\"SPOUSE A\") || mtype.equalsIgnoreCase(\"SPOUSE B\") || mtype.equalsIgnoreCase(\"SPOUSE SOC\")) {\n\n if (mtype.equalsIgnoreCase(\"SPOUSE A\") || mtype.equalsIgnoreCase(\"SPOUSE B\")) {\n mship = \"Golf\";\n } else if (mtype.equalsIgnoreCase(\"SPOUSE SOC\")) {\n mship = \"Social\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP/MEMBER TYPE!\";\n }\n\n }\n } // end if happyhollowclub\n\n \n \n //******************************************************************\n // CC of Castle Pines\n //******************************************************************\n //\n if (club.equals(\"castlepines\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid for member\n useWebidQuery = true; // use webid to locate member in Query\n\n webid = memid; // use webid for this club\n\n while (mNum.startsWith(\"0\")) { // strip any leading zeros\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n // Isolate the member number\n StringTokenizer tok9 = new StringTokenizer( mNum, \"-\" ); // look for a dash (i.e. 1234-1)\n\n if ( tok9.countTokens() > 1 ) { \n\n mNum = tok9.nextToken(); // get just the mNum if it contains an extension\n }\n\n // Filter mtypes and mships\n if (mship.equalsIgnoreCase(\"golf\") || mship.equalsIgnoreCase(\"corporate\")) {\n\n if (mship.equalsIgnoreCase(\"Corporate\")) {\n mship = \"Corporate\";\n } else {\n mship = \"Regular Member\"; // convert Golf to Regular Member\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP/MEMBER TYPE!\";\n }\n\n }\n } // end if castlepines\n\n\n\n //******************************************************************\n // Golf Club at Turner Hill - turnerhill\n //******************************************************************\n //\n if (club.equals(\"turnerhill\")) {\n\n found = true; // club found\n\n if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid for member\n useWebidQuery = true; // use webid to locate member in Query\n\n webid = memid; // use webid for this club\n\n memid = mNum;\n\n mship = \"Golf\";\n\n if (!gender.equalsIgnoreCase(\"F\")) {\n gender = \"M\";\n }\n\n if (mNum.endsWith(\"A\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n mNum = mNum.substring(0, mNum.length() - 1);\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n }\n\n }\n } // end if turnerhill\n\n\n //******************************************************************\n // The Club at Mediterra - mediterra\n //******************************************************************\n //\n if (club.equals(\"mediterra\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid for member\n useWebidQuery = true; // use webid to locate member in Query\n\n webid = memid; // use webid for this club\n\n // Get ride of all leading zeroes.\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n // Strip off special character\n if (mNum.endsWith(\"A\") || mNum.endsWith(\"a\") || mNum.endsWith(\"B\") || mNum.endsWith(\"b\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (mship.equalsIgnoreCase(\"G\") || mship.equalsIgnoreCase(\"GNF\")) {\n mship = \"Golf\";\n } else if (mship.equalsIgnoreCase(\"S\")) {\n mship = \"Sports\";\n } else if (mship.equalsIgnoreCase(\"D\")) {\n\n try {\n\n pstmt2 = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum);\n\n rs = pstmt2.executeQuery();\n\n if (rs.next()) {\n mship = rs.getString(\"m_ship\");\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NO PRIMARY MEMBERSHIP TYPE!\";\n }\n\n pstmt2.close();\n\n } catch (Exception exc) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: ERROR WHILE LOOKING UP MEMBERSHIP TYPE!\";\n }\n\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP/MEMBER TYPE!\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n } // end if mediterra\n\n\n //******************************************************************\n // Hideaway Beach Club - hideawaybeachclub\n //******************************************************************\n //\n if (club.equals(\"hideawaybeachclub\")) {\n\n found = true; // club found\n\n if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n // use memid as webid\n useWebid = true; // use webid for member\n useWebidQuery = true; // use webid to locate member in Query\n\n webid = memid; // use webid for this club\n\n memid = mNum;\n\n if (mNum.endsWith(\"A\") || mNum.endsWith(\"a\")) {\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n\n if (mNum.startsWith(\"7\")) {\n mship = \"Renter\";\n } else {\n mship = \"Golf\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n mtype = \"Adult Female\";\n } else {\n gender = \"M\";\n mtype = \"Adult Male\";\n }\n\n }\n } // end if hideawaybeachclub\n\n\n \n //******************************************************************\n // All clubs\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\") && !memid.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n fname_old = \"\";\n lname_old = \"\";\n mi_old = \"\";\n mship_old = \"\";\n mtype_old = \"\";\n email_old = \"\";\n mNum_old = \"\";\n ghin_old = \"\";\n bag_old = \"\";\n posid_old = \"\";\n email2_old = \"\";\n phone_old = \"\";\n phone2_old = \"\";\n suffix_old = \"\";\n u_hcap_old = 0;\n c_hcap_old = 0;\n birth_old = 0;\n msub_type_old = \"\";\n email_bounce1 = 0;\n email_bounce2 = 0;\n\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!phone2.equals( \"\" )) {\n\n phone2 = truncate(phone2, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n if (!webid.equals( \"\" )) {\n\n webid = truncate(webid, 15);\n }\n if (!msub_type.equals( \"\" )) {\n\n msub_type = truncate(msub_type, 30);\n }\n\n //\n // Set Gender and Primary values\n //\n if (!gender.equalsIgnoreCase( \"M\" ) && !gender.equalsIgnoreCase( \"F\" )) {\n\n gender = \"\";\n }\n\n pri_indicator = 0; // default = Primary\n\n if (primary.equalsIgnoreCase( \"S\" )) { // Spouse\n\n pri_indicator = 1;\n }\n if (primary.equalsIgnoreCase( \"D\" )) { // Dependent\n\n pri_indicator = 2;\n }\n\n\n //\n // See if a member already exists with this id (username or webid)\n //\n // **** NOTE: memid and webid MUST be set to their proper values before we get here!!!!!!!!!!!!!!!\n //\n //\n // 4/07/2010\n // We now use 2 booleans to indicate what to do with the webid field.\n // useWebid is the original boolean that was used to indicate that we should use the webid to identify the member.\n // We lost track of when this flag was used and why. It was no longer used to indicate the webid should be \n // used in the query, so we don't know what its real purpose is. We don't want to disrupt any clubs that are\n // using it, so we created a new boolean for the query.\n // useWebidQuery is the new flag to indicate that we should use the webid when searching for the member. You should use\n // both flags if you want to use this one.\n //\n try {\n \n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // yes, set new ids\n memid_new = \"\";\n\n } else { // DO NOT use webid\n\n webid_new = \"\"; // set new ids\n memid_new = memid;\n }\n\n if (useWebidQuery == false) {\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n\n } else { // use the webid field\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE webid = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, webid); // put the parm in stmt\n }\n\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n memid = rs.getString(\"username\"); // get username in case we used webid (use this for existing members)\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n\n if (useWebid == true) { // use webid to locate member?\n memid_new = memid; // yes, get this username\n } else {\n webid_new = rs.getString(\"webid\"); // no, get current webid\n }\n }\n pstmt2.close(); // close the stmt\n\n\n //\n // If member NOT found, then check if new member OR id has changed\n //\n boolean memFound = false;\n boolean dup = false;\n boolean userChanged = false;\n boolean nameChanged = false;\n String dupmship = \"\";\n\n if (fname_old.equals( \"\" )) { // if member NOT found\n\n //\n // New member - first check if name already exists\n //\n pstmt2 = con.prepareStatement (\n \"SELECT username, m_ship, memNum, webid FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next() && !club.equals(\"longcove\")) { // Allow duplicate names for Long Cove for members owning two properties at once\n\n dupuser = rs.getString(\"username\"); // get this username\n dupmship = rs.getString(\"m_ship\");\n dupmnum = rs.getString(\"memNum\");\n dupwebid = rs.getString(\"webid\"); // get this webid\n\n //\n // name already exists - see if this is the same member\n //\n sendemail = true; // send a warning email to us and MF\n\n if ((!dupmnum.equals( \"\" ) && dupmnum.equals( mNum )) || club.equals(\"imperialgc\")) { // if name and mNum match, then memid or webid must have changed\n\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // set new ids\n memid_new = dupuser;\n memid = dupuser; // update this record\n\n } else {\n\n webid_new = dupwebid; // set new ids\n memid_new = memid;\n memid = dupuser; // update this record\n userChanged = true; // indicate the username has changed\n }\n\n memFound = true; // update the member\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n }\n\n //\n // Add this info to the email message text\n //\n emailMsg1 = emailMsg1 + \"Name = \" +fname+ \" \" +mi+ \" \" +lname+ \", ForeTees Member Id has been updated to that received.\\n\\n\";\n\n } else {\n\n //\n // Add this info to the email message text\n //\n emailMsg1 = emailMsg1 + \"Name = \" +fname+ \" \" +mi+ \" \" +lname+ \", ForeTees username = \" +dupuser+ \", ForeTees webid = \" +dupwebid+ \", MF id = \" +memid+ \"\\n\\n\";\n\n dup = true; // dup member - do not add\n }\n\n }\n pstmt2.close(); // close the stmt\n\n } else { // member found\n\n memFound = true;\n }\n\n //\n // Now, update the member record if existing member\n //\n if (memFound == true) { // if member exists\n\n changed = false; // init change indicator\n\n lname_new = lname_old;\n\n // do not change lname for Saucon Valley if lname_old ends with '_*'\n if (club.equals( \"sauconvalleycc\" ) && lname_old.endsWith(\"_*\")) {\n\n lname = lname_old;\n\n } else if (!lname.equals( \"\" ) && !lname_old.equals( lname )) {\n\n lname_new = lname; // set value from MFirst record\n changed = true;\n nameChanged = true;\n }\n\n fname_new = fname_old;\n\n //\n // DO NOT change for select clubs\n //\n if (club.equals( \"pinery\" ) || club.equals( \"bellerive\" ) || club.equals( \"greenhills\" ) || club.equals( \"fairbanksranch\" ) ||\n club.equals( \"baltusrolgc\" ) || club.equals(\"charlottecc\") || club.equals(\"castlepines\")) {\n\n fname = fname_old; // do not change fnames\n\n } else {\n\n if (!fname.equals( \"\" ) && !fname_old.equals( fname )) {\n\n fname_new = fname; // set value from MFirst record\n changed = true;\n nameChanged = true;\n }\n }\n\n mi_new = mi_old;\n\n //\n // DO NOT change middle initial for ClubCorp clubs\n //\n if (clubcorp) {\n\n mi = mi_old;\n\n } else {\n if (!mi_old.equals( mi )) {\n\n mi_new = mi; // set value from MFirst record\n changed = true;\n nameChanged = true;\n }\n }\n\n mship_new = mship_old;\n\n if (!mship.equals( \"\" ) && !mship_old.equals( mship )) {\n\n mship_new = mship; // set value from MFirst record\n changed = true;\n }\n\n mtype_new = mtype_old;\n\n if (club.equals( \"greenhills\" ) || club.equals(\"paloaltohills\") ||\n (club.equals(\"navesinkcc\") && mtype_old.equals(\"Primary Male GP\"))) { // Green Hills - do not change the mtype\n\n mtype = mtype_old;\n\n } else {\n\n if (!mtype.equals( \"\" ) && !mtype_old.equals( mtype )) {\n\n mtype_new = mtype; // set value from MFirst record\n changed = true;\n }\n }\n\n mNum_new = mNum_old;\n\n if (!mNum.equals( \"\" ) && !mNum_old.equals( mNum )) {\n\n mNum_new = mNum; // set value from MFirst record\n changed = true;\n }\n\n ghin_new = ghin_old;\n\n if (!ghin.equals( \"\" ) && !ghin_old.equals( ghin )) {\n\n ghin_new = ghin; // set value from MFirst record\n changed = true;\n }\n\n bag_new = bag_old;\n\n if (!club.equals(\"edina\") && !club.equals(\"edina2010\")) { // never change for Edina\n\n if (!bag.equals( \"\" ) && !bag_old.equals( bag )) {\n\n bag_new = bag; // set value from MFirst record\n changed = true;\n }\n }\n\n posid_new = posid_old;\n\n if (!posid.equals( \"\" ) && !posid_old.equals( posid )) {\n\n posid_new = posid; // set value from MFirst record\n changed = true;\n }\n\n email_new = email_old;\n\n if (!club.equals(\"mesaverdecc\")) { // never change for Mesa Verde CC\n\n if (!email_old.equals( email )) { // if MF's email changed or was removed\n\n email_new = email; // set value from MFirst record\n changed = true;\n email_bounce1 = 0; // reset bounced flag\n }\n }\n\n email2_new = email2_old;\n\n if (!club.equals(\"mesaverdecc\")) { // never change for Mesa Verde CC\n\n if (!email2_old.equals( email2 )) { // if MF's email changed or was removed\n\n email2_new = email2; // set value from MFirst record\n changed = true;\n email_bounce2 = 0; // reset bounced flag\n }\n }\n\n phone_new = phone_old;\n\n if (!phone.equals( \"\" ) && !phone_old.equals( phone )) {\n\n phone_new = phone; // set value from MFirst record\n changed = true;\n }\n\n phone2_new = phone2_old;\n\n if (!phone2.equals( \"\" ) && !phone2_old.equals( phone2 )) {\n\n phone2_new = phone2; // set value from MFirst record\n changed = true;\n }\n\n suffix_new = suffix_old;\n\n if (!suffix.equals( \"\" ) && !suffix_old.equals( suffix )) {\n\n suffix_new = suffix; // set value from MFirst record\n changed = true;\n }\n\n birth_new = birth_old;\n\n if (!club.equals(\"fountaingrovegolf\")) { // Don't update birthdates for Fountain Grove\n\n if (birth > 0 && birth != birth_old) {\n\n birth_new = birth; // set value from MFirst record\n changed = true;\n }\n }\n\n if (!mobile.equals( \"\" )) { // if mobile phone provided\n\n if (phone_new.equals( \"\" )) { // if phone1 is empty\n\n phone_new = mobile; // use mobile number\n changed = true;\n\n } else {\n\n if (phone2_new.equals( \"\" )) { // if phone2 is empty\n\n phone2_new = mobile; // use mobile number\n changed = true;\n }\n }\n }\n\n msub_type_new = msub_type_old;\n\n if (!msub_type.equals( \"\" ) && !msub_type_old.equals( msub_type )) {\n\n msub_type_new = msub_type; // set value from MFirst record\n changed = true;\n }\n\n // don't allow both emails to be the same\n if (email_new.equalsIgnoreCase(email2_new)) email2_new = \"\";\n\n //\n // Update our record (always now to set the last_sync_date)\n //\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET username = ?, name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, ghin = ?, bag = ?, birth = ?, posid = ?, msub_type = ?, email2 = ?, phone1 = ?, \" +\n \"phone2 = ?, name_suf = ?, webid = ?, inact = 0, last_sync_date = now(), gender = ?, pri_indicator = ?, \" +\n \"email_bounced = ?, email2_bounced = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid_new);\n pstmt2.setString(2, lname_new);\n pstmt2.setString(3, fname_new);\n pstmt2.setString(4, mi_new);\n pstmt2.setString(5, mship_new);\n pstmt2.setString(6, mtype_new);\n pstmt2.setString(7, email_new);\n pstmt2.setString(8, mNum_new);\n pstmt2.setString(9, ghin_new);\n pstmt2.setString(10, bag_new);\n pstmt2.setInt(11, birth_new);\n pstmt2.setString(12, posid_new);\n pstmt2.setString(13, msub_type_new);\n pstmt2.setString(14, email2_new);\n pstmt2.setString(15, phone_new);\n pstmt2.setString(16, phone2_new);\n pstmt2.setString(17, suffix_new);\n pstmt2.setString(18, webid_new);\n pstmt2.setString(19, gender);\n pstmt2.setInt(20, pri_indicator);\n pstmt2.setInt(21, email_bounce1);\n pstmt2.setInt(22, email_bounce2);\n\n pstmt2.setString(23, memid);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n\n } else { // member NOT found - add it if we can\n\n if (dup == false) { // if not duplicate member\n\n //\n // New member is ok - add it\n //\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, webid, \" +\n \"last_sync_date, gender, pri_indicator) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,?,?,?,?,'',?,?, now(),?,?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, msub_type);\n pstmt2.setString(17, email2);\n pstmt2.setString(18, phone);\n pstmt2.setString(19, phone2);\n pstmt2.setString(20, suffix);\n pstmt2.setString(21, webid);\n pstmt2.setString(22, gender);\n pstmt2.setInt(23, pri_indicator);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n\n } else { // this member not found, but name already exists\n\n if (dup) {\n errCount++;\n errMsg = errMsg + \"\\n -Dup user found:\\n\" +\n \" new: memid = \" + memid + \" : cur: \" + dupuser + \"\\n\" +\n \" webid = \" + webid + \" : \" + dupwebid + \"\\n\" +\n \" mNum = \" + mNum + \" : \" + dupmnum;\n }\n\n if (club.equals( \"bentwaterclub\" ) && !dupuser.equals(\"\")) {\n\n //\n // Bentwater CC - Duplicate member name found. This is not uncommon for this club.\n // We must accept the member record with the highest priority mship type.\n // Members are property owners and can own multiple properties, each with a\n //\n // Order of Priority:\n // GPM\n // DOP\n // DCC\n // DOC\n // DGC\n // MGM\n // DOM\n // SCM\n // EMP\n // DSS\n // DCL\n // VSG\n // S\n //\n boolean switchMship = false;\n\n if (mship.equals(\"GPM\")) { // if new record has highest mship value\n\n switchMship = true; // update existing record to this mship\n\n } else {\n\n if (mship.equals(\"DOP\")) {\n\n if (!dupmship.equals(\"GPM\")) { // if existing mship is lower than new one\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DCC\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\")) { // if existing mship is lower than new one\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DOC\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\") && !dupmship.equals(\"DCC\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DGC\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\") && !dupmship.equals(\"DCC\") &&\n !dupmship.equals(\"DOC\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"MGM\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\") && !dupmship.equals(\"DCC\") &&\n !dupmship.equals(\"DOC\") && !dupmship.equals(\"DGC\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DOM\")) {\n\n if (!dupmship.equals(\"GPM\") && !dupmship.equals(\"DOP\") && !dupmship.equals(\"DCC\") &&\n !dupmship.equals(\"DOC\") && !dupmship.equals(\"DGC\") && !dupmship.equals(\"MGM\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"SCM\")) {\n\n if (dupmship.equals(\"EMP\") || dupmship.equals(\"DSS\") || dupmship.equals(\"DCL\") ||\n dupmship.equals(\"VSG\") || dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"EMP\")) {\n\n if (dupmship.equals(\"DSS\") || dupmship.equals(\"DCL\") ||\n dupmship.equals(\"VSG\") || dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DSS\")) {\n\n if (dupmship.equals(\"DCL\") ||\n dupmship.equals(\"VSG\") || dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"DCL\")) {\n\n if (dupmship.equals(\"VSG\") || dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n\n } else {\n\n if (mship.equals(\"VSG\")) {\n\n if (dupmship.equals(\"S\")) {\n\n switchMship = true; // update existing record to this mship\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n //\n // If we must switch the mship type, update the existing record to reflect the higher pri mship\n //\n if (switchMship == true) {\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET \" +\n \"username = ?, m_ship = ?, memNum = ?, posid = ?, webid = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // use this username so record gets updated correctly next time\n pstmt2.setString(2, mship);\n pstmt2.setString(3, mNum);\n pstmt2.setString(4, posid);\n pstmt2.setString(5, webid);\n pstmt2.setString(6, dupuser); // update existing record - keep username, change others\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n userChanged = true; // indicate username changed\n\n memid_new = memid; // new username\n memid = dupuser; // old username\n fname_new = fname;\n mi_new = mi;\n lname_new = lname;\n }\n\n } // end of IF Bentwater Club and dup user\n }\n } // end of IF Member Found\n\n //\n // Member updated - now see if the username or name changed\n //\n if (userChanged == true || nameChanged == true) { // if username or name changed\n\n //\n // username or name changed - we must update other tables now\n //\n StringBuffer mem_name = new StringBuffer( fname_new ); // get the new first name\n\n if (!mi_new.equals( \"\" )) {\n mem_name.append(\" \" +mi_new); // new mi\n }\n mem_name.append(\" \" +lname_new); // new last name\n\n String newName = mem_name.toString(); // convert to one string\n\n Admin_editmem.updTeecurr(newName, memid_new, memid, con); // update teecurr with new values\n\n Admin_editmem.updTeepast(newName, memid_new, memid, con); // update teepast with new values\n\n Admin_editmem.updLreqs(newName, memid_new, memid, con); // update lreqs with new values\n\n Admin_editmem.updPartner(memid_new, memid, con); // update partner with new values\n\n Admin_editmem.updEvents(newName, memid_new, memid, con); // update evntSignUp with new values\n\n Admin_editmem.updLessons(newName, memid_new, memid, con); // update the lesson books with new values\n }\n }\n catch (Exception e3b) {\n errCount++;\n errMsg = errMsg + \"\\n -Error2 processing roster for \" +club+ \"\\n\" +\n \" line = \" +line+ \": \" + e3b.getMessage(); // build msg\n }\n\n } else {\n\n // Only report errors that AREN'T due to skip == true, since those were handled earlier!\n if (!found) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBER NOT FOUND!\";\n }\n if (fname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n }\n if (lname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -LAST NAME missing!\";\n }\n if (memid.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -USERNAME missing!\";\n }\n } // end of IF skip\n\n } // end of IF minimum requirements\n\n } // end of IF tokens\n\n // log any errors and warnings that occurred\n if (errCount > 0) {\n totalErrCount += errCount;\n errList.add(errMemInfo + \"\\n *\" + errCount + \" error(s) found*\" + errMsg + \"\\n\");\n }\n if (warnCount > 0) {\n totalWarnCount += warnCount;\n warnList.add(errMemInfo + \"\\n *\" + warnCount + \" warning(s) found*\" + warnMsg + \"\\n\");\n }\n } // end of while (for each record in club's file)\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n \n \n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n }\n\n\n //\n // Send an email to us and MF support if any dup names found\n //\n if (sendemail == true) {\n\n Properties properties = new Properties();\n properties.put(\"mail.smtp.host\", host); // set outbound host address\n properties.put(\"mail.smtp.port\", port); // set outbound port\n properties.put(\"mail.smtp.auth\", \"true\"); // set 'use authentication'\n\n Session mailSess = Session.getInstance(properties, SystemUtils.getAuthenticator()); // get session properties\n\n MimeMessage message = new MimeMessage(mailSess);\n\n try {\n\n message.setFrom(new InternetAddress(efrom)); // set from addr\n\n message.setSubject( subject ); // set subject line\n message.setSentDate(new java.util.Date()); // set date/time sent\n }\n catch (Exception ignore) {\n }\n\n //message.addRecipient(Message.RecipientType.TO, new InternetAddress(emailFT)); // set our support email addr\n\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(emailMF)); // add MF email addr\n\n emailMsg1 = emailMsg1 + emailMsg2; // add trailer msg\n\n try {\n message.setText( emailMsg1 ); // put msg in email text area\n\n Transport.send(message); // send it!!\n }\n catch (Exception ignore) {\n }\n\n }\n\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster for \" +club+ \": \" + e3.getMessage() + \"\\n\"; // build msg\n SystemUtils.logError(errorMsg); // log it\n }\n\n // Print error and warning count totals to error log\n SystemUtils.logErrorToFile(\"\" +\n \"Total Errors Found: \" + totalErrCount + \"\\n\" +\n \"Total Warnings Found: \" + totalWarnCount + \"\\n\", club, true);\n\n // Print errors and warnings to error log\n if (totalErrCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****ERRORS FOR \" + club + \" (Member WAS NOT synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (errList.size() > 0) {\n SystemUtils.logErrorToFile(errList.remove(0), club, true);\n }\n }\n if (totalWarnCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****WARNINGS FOR \" + club + \" (Member MAY NOT have synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (warnList.size() > 0) {\n SystemUtils.logErrorToFile(warnList.remove(0), club, true);\n }\n }\n\n // Print end tiem to error log\n SystemUtils.logErrorToFile(\"End time: \" + new java.util.Date().toString() + \"\\n\", club, true);\n \n }", "public PointRewardData getPointRewardData(Customer fromAccount, Customer toAccount, RewardCurrency fromRewardCurrency, RewardCurrency toRewardCurrency,double rewardQty, TransferPointSetting transferPointSetting ) {\n\n // Create the PointRewardData object\n PointRewardData pointRewardData = new PointRewardData();\n\n\n // Set the fields\n pointRewardData.setMerchantNo(toAccount.getCusMerchantNo());\n\n pointRewardData.setLoyaltyId(toAccount.getCusLoyaltyId());\n\n\n pointRewardData.setRwdCurrencyId(toRewardCurrency.getRwdCurrencyId());\n\n pointRewardData.setRwdCurrencyName(toRewardCurrency.getRwdCurrencyName());\n\n\n\n // Get the creditRewardQty\n double creditRewardQty = getCreditRewardQty(fromRewardCurrency,toRewardCurrency,rewardQty);\n\n pointRewardData.setRewardQty(creditRewardQty);\n\n pointRewardData.setTxnType(TransactionType.TRANSFER_POINT_TO);\n\n\n\n pointRewardData.setTxnLocation(toAccount.getCusLocation());\n\n pointRewardData.setTxnDate(new Date(new java.util.Date().getTime()));\n\n pointRewardData.setExpiryDt(getExpiryDateForPoints(transferPointSetting));\n\n\n // Check if tierAffected field is set\n if ( transferPointSetting.getTpsIsTierAffected() == IndicatorStatus.YES ) {\n\n pointRewardData.setAddToAccumulatedBalance(true);\n\n } else{\n\n pointRewardData.setAddToAccumulatedBalance(false);\n\n }\n\n\n // Return the object\n return pointRewardData;\n }", "@Test\n public void testSaveUpdatedDatasets() throws Exception {\n // generate SyncResult, including a single updated Dataset\n SyncResult syncResult = synchroniser.syncInstallation(installation, Lists.newArrayList(dataset));\n\n // update Dataset in Registry\n updater.saveUpdatedDatasets(syncResult);\n\n // update dataset 1 time\n verify(updater.getDatasetService(), times(1)).update(any(Dataset.class));\n\n // delete 1 existing machine tag, add 2 new\n verify(updater.getDatasetService(), times(1)).deleteMachineTag(any(UUID.class), anyInt());\n verify(updater.getDatasetService(), times(2)).addMachineTag(any(UUID.class), any(MachineTag.class));\n\n // delete 1 existing contact, add 2 new\n verify(updater.getDatasetService(), times(1)).deleteContact(any(UUID.class), anyInt());\n verify(updater.getDatasetService(), times(2)).addContact(any(UUID.class), any(Contact.class));\n\n // delete 1 endpoint, add 1 endpoint\n verify(updater.getDatasetService(), times(1)).deleteEndpoint(any(UUID.class), anyInt());\n verify(updater.getDatasetService(), times(1)).addEndpoint(any(UUID.class), any(Endpoint.class));\n\n // delete 0 identifiers, add 0 identifiers\n verify(updater.getDatasetService(), times(0)).deleteIdentifier(any(UUID.class), anyInt());\n verify(updater.getDatasetService(), times(0)).addIdentifier(any(UUID.class), any(Identifier.class));\n\n // delete 0 tags, add 0 tags\n verify(updater.getDatasetService(), times(0)).deleteTag(any(UUID.class), anyInt());\n verify(updater.getDatasetService(), times(0)).addTag(any(UUID.class), any(Tag.class));\n }", "public void saveInformation(){\n market.saveInformationOfMarket();\n deckProductionCardOneBlu.saveInformationOfProductionDeck();\n deckProductionCardOneGreen.saveInformationOfProductionDeck();\n deckProductionCardOneViolet.saveInformationOfProductionDeck();\n deckProductionCardOneYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeBlu.saveInformationOfProductionDeck();\n deckProductionCardThreeGreen.saveInformationOfProductionDeck();\n deckProductionCardThreeYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoBlu.saveInformationOfProductionDeck();\n deckProductionCardTwoGreen.saveInformationOfProductionDeck();\n deckProductionCardTwoViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoYellow.saveInformationOfProductionDeck();\n\n\n }", "@Override\n\tpublic BasicMarketData convert(MarketDataLevel1 from) {\n\t\treturn null;\n\t}", "private void checkWholesaleMarket (WholesaleMarket market)\n {\n int offset =\n market.getTimeslotSerialNumber()\n - visualizerBean.getCurrentTimeslotSerialNumber();\n if (offset == 0) {\n market.close();\n // update model:\n wholesaleService.addTradedQuantityMWh(market.getTotalTradedQuantityMWh());\n // let wholesaleMarket contribute to global charts:\n WholesaleSnapshot lastSnapshot =\n market.getLastWholesaleSnapshotWithClearing();\n if (lastSnapshot != null) {\n WholesaleServiceJSON json = wholesaleService.getJson();\n try {\n json.getGlobalLastClearingPrices()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionPrice()));\n json.getGlobalLastClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(lastSnapshot.getClearedTrade()\n .getExecutionMWh()));\n\n json.getGlobalTotalClearingVolumes()\n .put(new JSONArray().put(lastSnapshot.getTimeslot()\n .getStartInstant()\n .getMillis())\n .put(market.getTotalTradedQuantityMWh()));\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public Map<String, Object> update(Trade obj) {\n\t\treturn null;\n\t}", "public void setMarketStatus(List<marketStatus> marketStatus) {\n\t\tthis.marketStatus = marketStatus;\n\t}", "private void updateMarketAndTreasures(boolean isFirst) {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Updating market and treasures\");\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setTitle(\"Market & Treasures\");\r\n\t\tembed.setColor(Color.YELLOW);\r\n\t\t\r\n\t\tString marketString = \"\";\r\n\t\tfor (int i = 0; i < market.length; i++) {\r\n\t\t\tif (market[i] != null) {\r\n\t\t\t\tif (market[i].startsWith(\"Key\")) {\r\n\t\t\t\t\tmarketString += \":key:**5** \";\r\n\t\t\t\t} else if (market[i].startsWith(\"Backpack\")) {\r\n\t\t\t\t\tmarketString += \":briefcase:**5** \";\r\n\t\t\t\t} else if (market[i].startsWith(\"Crown\")) {\r\n\t\t\t\t\tmarketString += \":crown:**\"+market[i].substring(5)+\"** \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Add strings\r\n\t\tembed.addField(\"In Stock (**7x**:moneybag: each)\", marketString, false);\r\n\t\tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\tPlayer p = players.get(i);\r\n\t\t\tembed.addField(\"``\"+getName(p)+\"`` **\"+p.getGold()+\"x**:moneybag:\",p.getInventoryAsString(false), false);\r\n\t\t}\r\n\t\t\r\n\t\tif (isFirst) {\r\n\t\t\tgameChannel.sendMessage(embed.build()).queueAfter(500, TimeUnit.MILLISECONDS);\r\n\t\t} else {\r\n\t\t\tgameChannel.editMessageById(marketAndTsID, embed.build()).queue();\r\n\t\t\tupdateReactionsMarketAndTreasures();\r\n\t\t}\r\n\t}", "public String getMarketId() {\n return marketId;\n }", "public void persistData(RatingData[] data) {\n //start by setting long_comp_result\n //TODO: maybe remove old_rating / vol and move to the record creation?\n String sqlStr = \"update long_comp_result set rated_ind = 1, \" +\n \"old_rating = (select rating from algo_rating \" +\n \" where coder_id = long_comp_result.coder_id and algo_rating_type_id = 3), \" +\n \"old_vol = (select vol from algo_rating \" +\n \" where coder_id = long_comp_result.coder_id and algo_rating_type_id = 3), \" +\n \"new_rating = ?, \" +\n \"new_vol = ? \" +\n \"where round_id = ? and coder_id = ?\";\n PreparedStatement psUpdate = null;\n PreparedStatement psInsert = null;\n \n try {\n psUpdate = conn.prepareStatement(sqlStr);\n for(int i = 0; i < data.length; i++) {\n psUpdate.clearParameters();\n psUpdate.setInt(1, data[i].getRating());\n psUpdate.setInt(2, data[i].getVolatility());\n psUpdate.setInt(3, roundId);\n psUpdate.setInt(4, data[i].getCoderID());\n psUpdate.executeUpdate();\n }\n \n psUpdate.close();\n //update algo_rating\n String updateSql = \"update algo_rating set rating = ?, vol = ?,\" +\n \" round_id = ?, num_ratings = num_ratings + 1 \" +\n \"where coder_id = ? and algo_rating_type_id = 3\";\n \n psUpdate = conn.prepareStatement(updateSql);\n \n String insertSql = \"insert into algo_rating (rating, vol, round_id, coder_id, algo_rating_type_id, num_ratings) \" +\n \"values (?,?,?,?,3,1)\";\n \n psInsert = conn.prepareStatement(insertSql);\n \n for(int i = 0; i < data.length; i++) {\n psUpdate.clearParameters();\n psUpdate.setInt(1, data[i].getRating());\n psUpdate.setInt(2, data[i].getVolatility());\n psUpdate.setInt(3, roundId);\n psUpdate.setInt(4, data[i].getCoderID());\n if(psUpdate.executeUpdate() == 0) {\n psInsert.clearParameters();\n psInsert.setInt(1, data[i].getRating());\n psInsert.setInt(2, data[i].getVolatility());\n psInsert.setInt(3, roundId);\n psInsert.setInt(4, data[i].getCoderID());\n psInsert.executeUpdate();\n }\n }\n \n psUpdate.close();\n psInsert.close();\n \n //mark the round as rated\n psUpdate = conn.prepareStatement(\"update round set rated_ind = 1 where round_id = ?\");\n psUpdate.setInt(1, roundId);\n psUpdate.executeUpdate();\n \n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n DBMS.close(psUpdate);\n DBMS.close(psInsert);\n }\n }", "@Override\r\n public boolean setResultSpecific(int taskid, Object data, String message, String sender) {\r\n String token=\"c4csecretkey\";\r\n boolean flag = false; \r\n String[] msg = message.split(\",\");\r\n HashMap<String,String> model=(HashMap<String,String>)data;\r\n //System.out.println(\"[C4C-REPLY] response received with: \"+msg[0]+ \"--\"+msg[1]+\"--\"+msg[2]);\r\n String tupleTag = msg[0];\r\n String taskType = msg[1];\r\n //double result = Double.valueOf(msg[2]);\r\n String localdisc=null;\r\n String port = msg[3];\r\n String discipline =msg[msg.length-1];\r\n if(tupleTag.equals(\"FETCH\")){\r\n synchronized(lock){\r\n if(taskType.equals(\"c4c\")){ \r\n //----PETRI\r\n System.out.println(\"[C4C-Notification] Received response from \"+\"\" + \r\n \"discipline \"+discipline );\r\n try {\r\n localdisc=C4CHelper.getDiscipline(token);\r\n if (!localdisc.equals(discipline)){ \r\n //System.out.println(\"[Notification-Reciever] Received \"+model.size()+\" objects from discipline \"+discipline);\r\n C4CHelper.models.add(model); \r\n C4CHelper.modelNames.add(discipline.substring(0,1));\r\n if (C4CHelper.models.size()>=3) {\r\n System.out.println(\"[Notification-Reciever] Merging Models\");\r\n C4CHelper.finalModels = new ArrayList<HashMap<String,String>>();\r\n C4CHelper.finalModels=C4CHelper.models;\r\n //System.out.println(\"[C4C-FECTH] merge model activated!\");\r\n \r\n } \r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n Logger.getLogger(FedMeteorPublisherMaster.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n \r\n }\r\n //end change way to decide winner in auction\r\n }\r\n //long stime = System.currentTimeMillis();\r\n System.out.println(\"[C4C-Notification] Fetch process finished!\");\r\n \r\n } else if(tupleTag.contains(\"EVENT\")){\r\n //long stime = System.currentTimeMillis();\r\n System.out.println(\"[C4C-Notification] Event process finished!\");\r\n \r\n } else if(tupleTag.contains(\"CONFIG\")){\r\n //long stime = System.currentTimeMillis();\r\n System.out.println(\"[C4C-Notification] Config process finished!\");\r\n }\r\n \r\n else{\r\n System.out.println(\"Result message type not found!\");\r\n }\r\n \r\n //Set task as done and increment completed tasks\r\n setTaskStatus(taskid); \r\n\r\n //System.out.println(\"Result taskid=\" + taskid + \" received \" + countFinishedTasks() + \"/\" + getNumOfTasks());\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1],\"masterLog%g-\"+this.getPeerIP().substring(2)+\".log\",\"Result taskid=\" + taskid + \" received \" + countFinishedTasks() + \"/\" + getNumOfTasks(),\"info\"); \r\n //System.out.println(\"ResultList: \"+ resultList);\r\n //check if it gets all results \r\n \r\n return true;\r\n }", "public void setMarketName(String marketName) {\r\n this.marketName = marketName == null ? null : marketName.trim();\r\n }", "private void getLocalDataInsertUpdate(String lastUpdateDate) {\n\n\n try {\n JSONObject params = new JSONObject();\n params.put(\"action\", \"syncMobileData\");\n params.put(\"last_modified_timestamp\", lastUpdateDate);\n String url = WebUrls.MAIN_URL;\n JsonObjectRequest request_json = new JsonObjectRequest(url, params, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n //dialog.dismiss();\n String result = response.toString();\n getResponseDataupdate(result);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n }\n });\n request_json.setRetryPolicy(new DefaultRetryPolicy(15000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(request_json);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void setJsonDataInUnifiedCampaign(UnifiedCampaignDTO unifiedCampaignDTO, boolean checkMaster){\n\t\ttry{\n\t\t\tJSONObject jsonObject = (JSONObject) JSONSerializer.toJSON(request.getParameter(\"jsonParam\").trim());\n\n\t\t \tIProductService productService = (IProductService) BusinessServiceLocator.locate(IProductService.class);\n\t\t\tString products = jsonObject.getString(\"products\");\n\t\t\t\n\t\t\tDate startDate = new Date();\n\t\t\tDate endDate = DateUtil.getDateBeforeAfterDays(30);\n\t\t\tunifiedCampaignDTO.setStartDate(DateUtil.getDateAsString(startDate, \"MM-dd-yyyy\"));\n\t\t\tunifiedCampaignDTO.setEndDate(DateUtil.getDateAsString(endDate, \"MM-dd-yyyy\"));\n\t\t\tunifiedCampaignDTO.setPStartDate(DateUtil.getDateAsString(startDate, \"MM-dd-yyyy\"));\n\t\t\tunifiedCampaignDTO.setPEndDate(DateUtil.getDateAsString(endDate, \"MM-dd-yyyy\"));\n\t\t\t\n\t\t\tif(products != null && products.trim().length() > 0){\n\t\t\t\tList<ProductsObj> productsList = productService.loadProducts(Arrays.asList(products.split(\",\")));\n\t\t\t\tif(productsList != null){\n\t\t\t\t\tSet<CommonDTO> creatives = new HashSet<CommonDTO>();\n\t\t\t\t\tSet<CommonDTO> platforms = new HashSet<CommonDTO>();\n\t\t\t\t\tSet<CommonDTO> devices = new HashSet<CommonDTO>();\n\t\t\t\t\tfor(ProductsObj product: productsList){\n\t\t\t\t\t\tif(product.getCreative() != null){\n\t\t\t\t\t\t\tfor(CreativeObj creative: product.getCreative()){\n\t\t\t\t\t\t\t\tcreatives.add(new CommonDTO(String.valueOf(creative.getId()), creative.getSize()));\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\tif(product.getPlatforms() != null && product.getPlatforms().size() > 0){\n\t\t\t\t\t\t\tfor(PlatformObj platform : product.getPlatforms()){\n\t\t\t\t\t\t\t\tif(String.valueOf(platform.getId()).equals(ProductService.allOptionId)){\n\t\t\t\t\t\t\t\t\tplatforms.clear();\n\t\t\t\t\t\t\t\t\tplatforms.add(new CommonDTO(ProductService.allOptionId, ProductService.allOption));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tplatforms.add(new CommonDTO(String.valueOf(platform.getId()), platform.getText()));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tplatforms.add(new CommonDTO(ProductService.allOptionId, ProductService.allOption));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(product.getDevices() != null && product.getDevices().size() > 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(DeviceObj device : product.getDevices()){\n\t\t\t\t\t\t\t\tif(String.valueOf(device.getId()).equals(ProductService.allOptionId)){\n\t\t\t\t\t\t\t\t\tdevices.clear();\n\t\t\t\t\t\t\t\t\tdevices.add(new CommonDTO(ProductService.allOptionId, ProductService.allOption));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tdevices.add(new CommonDTO(String.valueOf(device.getId()), device.getText()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tdevices.add(new CommonDTO(ProductService.allOptionId, ProductService.allOption));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunifiedCampaignDTO.setDeviceCapability(product.getDeviceCapability());\t\n\t\t\t\t\t\tunifiedCampaignDTO.setSelectedDevicePlacementList(new ArrayList<CommonDTO>(devices));\n\t\t\t\t\t\tunifiedCampaignDTO.setSelectedPlatformPlacementList(new ArrayList<CommonDTO>(platforms));\n\t\t\t\t\t\tunifiedCampaignDTO.setSelectedCreativePlacementList(new ArrayList<CommonDTO>(creatives));\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\tint deviceCapability = ReportUtil.TARGETING_ANY;\n\t\t\t\tfor(ProductsObj product: productsList){\n\t\t\t\t\tif((deviceCapability == ReportUtil.TARGETING_MOBILE_WEB_ONLY && product.getDeviceCapability() == ReportUtil.TARGETING_MOBILE_APP_ONLY)||\n\t\t\t\t\t\t(deviceCapability == ReportUtil.TARGETING_MOBILE_APP_ONLY && product.getDeviceCapability() == ReportUtil.TARGETING_MOBILE_WEB_ONLY)){\n\t\t\t\t\t\t\tdeviceCapability = ReportUtil.TARGETING_MOBILE_APP_AND_WEB; \n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\tif(product.getDeviceCapability() == ReportUtil.TARGETING_ANY){\n\t\t\t\t\t\tdeviceCapability = ReportUtil.TARGETING_ANY;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tdeviceCapability = product.getDeviceCapability();\n\t\t\t\t}\n\t\t\t\tunifiedCampaignDTO.setDeviceCapability(deviceCapability);\n \t\t\t}\n\t\t\ttry{unifiedCampaignDTO.setSelectedPlacementProducts(jsonObject.getString(\"products\"));}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setUpperAge(jsonObject.getString(\"upperAge\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setLowerAge(jsonObject.getString(\"lowerAge\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setUpperIncome(jsonObject.getString(\"upperIncome\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setLowerIncome(jsonObject.getString(\"lowerIncome\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setGender(jsonObject.getString(\"gender\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setSelectedEducationList(getDTOListFromJSONObject(jsonObject.getString(\"educationList\"), unifiedCampaignDTO.getEducationList(), checkMaster));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setSelectedEthinicityList(getDTOListFromJSONObject(jsonObject.getString(\"ethnicityList\"), unifiedCampaignDTO.getEthinicityList(), checkMaster));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\n\t\t\ttry{unifiedCampaignDTO.setSelectedCountryList(getDTOListFromJSON(jsonObject.getString(\"countryList\"), unifiedCampaignDTO.getCountryList(), checkMaster));unifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t \ttry{unifiedCampaignDTO.setSelectedDMAPlacementList(getDTOListFromJSONObject(jsonObject.getString(\"dmaList\"), unifiedCampaignDTO.getDmaList(), checkMaster));unifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t \ttry{unifiedCampaignDTO.setSelectedStateList(getDTOListFromJSONObject(jsonObject.getString(\"stateList\"), unifiedCampaignDTO.getStateList(), checkMaster));unifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{\n\t\t\t\tString cityList = jsonObject.getString(\"cityList\");\n\t\t\t\tif(cityList != null && cityList.trim().length()>0){\n\t\t\t\t\tunifiedCampaignDTO.setCityJSON(\"{\\\"cityList\\\":\"+cityList+\"}\");\t\t\t\t\n\t\t\t\t}\n\t\t\t\tunifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());\n\t\t\t}catch(Exception e){}\n\t\t\ttry{\n\t\t\t\tString zipList = jsonObject.getString(\"zipList\");\n\t\t\t\tif(zipList != null && zipList.trim().length()>0){\n\t\t\t\t\tunifiedCampaignDTO.setZipJSON(\"{\\\"zipList\\\":\"+zipList+\"}\");\t\t\t\t\n\t\t\t\t}\n\t\t\t\tunifiedCampaignDTO.setIsGeographic(Boolean.TRUE.toString());\n\t\t\t}catch(Exception e){}\n\t\t\t\n\t\t\ttry{unifiedCampaignDTO.setSelectedCensusAge(jsonObject.getString(\"age\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setSelectedCensusIncome(jsonObject.getString(\"income\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setSelectedCensusEducation(jsonObject.getString(\"education\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setSelectedCensusEthnicity(jsonObject.getString(\"ethnicity\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\ttry{unifiedCampaignDTO.setSelectedCensusGender(jsonObject.getString(\"gender\"));unifiedCampaignDTO.setIsDemographic(Boolean.TRUE.toString());}catch(Exception e){}\n\t\t\t\n\t\t\ttry{unifiedCampaignDTO.setSelectedCensusRank(jsonObject.getString(\"rank\"));}catch(Exception e){}\n\t\t\t\n\t\t\t\n\t\t\t}catch(Exception e){\n\t\t\t\tlog.severe(\"ERROR while parsing main JSON [\"+ request.getParameter(\"jsonParam\") +\"]\");\n\t\t\t}\n\t}", "public abstract Map<Integer, QuantDataset> updatedDatasets();", "@Override\n public boolean writeWithVersionCheck(ProcessorContext context, DataSet<Row> dataSet, int expireTime) {\n Row row = dataSet.getFirstItem().orElse(new Row());\n String key = row.getFieldValue(AllFieldName.tair_key);\n String value = row.getFieldValue(AllFieldName.tair_value);\n Objects.requireNonNull(key, \"put tair key is required\");\n Objects.requireNonNull(value, \"put tair value is required\");\n// ResultCode code = tairClient.putDataWithVersionCheck(context, key, value, expireTime);\n return true;// code.getCode() == ResultCode.VERERROR.getCode() ? false : true;\n }", "public static void main(String[] args) {\n\t\tJSONObject obj=new JSONObject(); \n\t\tobj.put(\"userId\", \"[email protected]\");\n\t\tJSONObject obj2=new JSONObject();\n\t\tobj2.put(\"modulename\", \"SCM\");\n\t\tobj2.put(\"hitserverflag\",1);\n\t\tobj.put(\"extraParam\",obj2);\n\t\tobj.put(\"action\",\"UPDATE\");\n\t\tJSONArray arr=new JSONArray();\n\t\tJSONObject obj3=new JSONObject();\n\t\tJSONArray arr3=new JSONArray();\n\t\tarr3.add(\"UPDATE_PRODUCT\");\n\t\tobj3.put(\"actionarray\",arr3);\n\t\tJSONObject obj4=new JSONObject();\n\t\tobj4.put(\"CML_TITLE\",\"CCR-2\");\n\t\tJSONArray arr4=new JSONArray();\n\t\tobj4.put(\"CML_IMAGE_PATH\",arr4);\n\t\tobj4.put(\"SYNC_PENDING_STATUS\",0);\n\t\tobj4.put(\"LAST_MODIFIED_ON\",\"2019-12-31T06:52:36.441Z\");\n\t\tobj4.put(\"stockMinValue\",36);\n\t\tobj3.put(\"calmailobject\",obj4);\n\t\tobj3.put(\"keyType\",\"TSK\");\n\t\tobj3.put(\"keyVal\",\"rebrand.clouzer.com#PRJ_DEPT_ORG_1231231231231_1234#SEC_WIZ_PRD_DB_0011#TSK_PRD_LST_1577774826691_49\");\n\t\tobj3.put(\"subKeyType\",\"TSK_PRD_LST\");\n\t\tarr.add(obj3);\n\t\t\n\t\tobj.put(\"dataarray\",arr);\n\t\tobj.put(\"modulename\",\"SCM\" );\n\t\tobj.put(\"requestId\",\"/sync#/sync#[email protected]#1577710294530r168r226\");\n\t\tobj.put(\"FROM\",\"senddatatoserver\");\n\t\tobj.put(\"socketId\",\"/sync#wjYh2leVm1goGm_DAABH\");\n\t\tJSONArray arr12=new JSONArray();\n\t\tJSONObject obj9=new JSONObject();\n\t\tobj9.put(\"Location\",\"serverOperation : front_end\");\n\t\tobj9.put(\"Timestamp\",157770);\n\t\tarr12.add(obj9);\n\t\tJSONObject obj11=new JSONObject();\n\t\tobj11.put(\"Location\",\"etRouteHandler2Paget_serverOperation : node\");\n\t\tobj11.put(\"Timestamp\",157770);\n\t\tarr.add(obj11);\n\t\tJSONObject obj12=new JSONObject();\n\t\tobj12.put(\"Location\",\"etOrgActionCreator_sendtoJava : node\");\n\t\tobj12.put(\"Timestamp\",157770);\n\t\tarr12.add(obj12);\n\t\tJSONObject obj13=new JSONObject();\n\t\tobj13.put(\"Location\",\"etDirectToQueue_sendToJavaProcess : node\");\n\t\tobj13.put(\"Timestamp\",157770);\n\t\tarr12.add(obj13);\n\t\tJSONObject obj14=new JSONObject();\n\t\tobj14.put(\"Location\",\"etKafka_producer_sendMessage:node\");\n\t\tobj14.put(\"Timestamp\",157770);\n\t\tarr12.add(obj14);\n\t\tobj.put(\"baton\",arr12);\n\t\tobj.put(\"topic\",\"CCR_CLZ_COM\");\n\t\tSystem.out.println(obj);\n\t\t\n\t\t\n\t}", "public void setMoneyMarketAccount(BankAccount moneyMarketAcct) {\n this.moneyMarket = moneyMarketAcct;\n }", "@Test\n\tpublic void insertTradeRequest() {\n\t\t\n\t\tDBI dbi = TEST_ENVIRONMENT.getDbi();\n\t\tTradeDao tradeDao = dbi.onDemand(TradeDao.class);\n\t\t\n\t\tString collectionId = \"1\";\n\t\tString itemId = \"1\";\n\t\tString itemAmount = \"1\";\n\t\tTrade insertedTrade = new Trade(collectionId, itemId, itemAmount);\n\t\t\n\t\ttradeDao.insert(insertedTrade);\n\t\t\n\t\tint expectedSize = 1;\n\t\t\n\t\tList<Trade> allTrades = tradeDao.getAll();\n\t\t\n\t\tint actualSize = allTrades.size();\n\t\t\n\t\tAssert.assertEquals(\"Trade table should have 1 trade\", expectedSize, actualSize);\n\t\t\n\t\tSet<String> insertedTradeRequest = new HashSet<String>();\n\t\tDBI dbi1 = TEST_ENVIRONMENT.getDbi();\n\t\tTradeRequestDao tradeRequestDao = dbi1.onDemand(TradeRequestDao.class);\n\t\t\n\t\tString offeredCollectionId = \"1\";\n\t\tString userId = \"1\";\n\t\tString requestId = \"1\";\n\t\tTradeRequest insertedRequest = new TradeRequest(offeredCollectionId, \n\t\t\t\tuserId);\n\t\t\n\t\tinsertedRequest = insertedRequest.setRequestId(requestId);\n\t\t\n\t\ttradeRequestDao.insert(insertedRequest);\n\t\t\n\t\tint expectedSize1 = 1;\n\t\t\n\t\tList<TradeRequest> allTrades1 = tradeRequestDao.getAll();\n\t\t\n\t\tint actualSize1 = allTrades1.size();\n\t\t\n\t\tAssert.assertEquals(\"Trade Request table should have 1 Request made\", expectedSize1, actualSize1);\n\t\t\n\t}", "public void setMarketId(String marketId) {\n\t\tthis.marketId = marketId;\n\t}", "public synchronized void updatePlayerPoint(long playerId, String playerName, int point) {\n/* 98 */ if (point <= this.component.getMinPoint()) {\n/* */ return;\n/* */ }\n/* 101 */ int level = MentalUtil.getShowLevel();\n/* 102 */ ZhenfaTempleWorldBean zhenfaTempleWorldBean = JsonTableService.<ZhenfaTempleWorldBean>getJsonData(level, ZhenfaTempleWorldBean.class);\n/* 103 */ if (point < zhenfaTempleWorldBean.getEntryScore()) {\n/* */ return;\n/* */ }\n/* 106 */ for (MentalRankStruct rankInfo : this.component.getRankList()) {\n/* 107 */ if (playerId == rankInfo.playerId) {\n/* 108 */ rankInfo.point = point;\n/* 109 */ this.component.setUpdate(\"rankList\");\n/* 110 */ this.component.saveToDB();\n/* 111 */ this.component.sortRank();\n/* */ \n/* */ return;\n/* */ } \n/* */ } \n/* 116 */ MentalRankStruct struct = new MentalRankStruct();\n/* 117 */ struct.playerId = playerId;\n/* 118 */ struct.playerName = playerName;\n/* 119 */ struct.point = point;\n/* */ \n/* 121 */ this.component.getRankList().add(struct);\n/* 122 */ this.component.setUpdate(\"rankList\");\n/* 123 */ this.component.saveToDB();\n/* */ \n/* 125 */ this.component.sortRank();\n/* */ }", "@Test\n public void testSaveUpdatedDatasetsSkipped() throws Exception {\n Endpoint dwca = new Endpoint();\n dwca.setKey(100);\n dwca.setType(EndpointType.DWC_ARCHIVE);\n dwca.setUrl(URI.create(\"http://ipt.gbif.org/archive.do?r=test\"));\n dataset.getEndpoints().add(dwca);\n\n // generate SyncResult, including a single updated Dataset\n SyncResult syncResult = synchroniser.syncInstallation(installation, Lists.newArrayList(dataset));\n\n // update Dataset in Registry\n updater.saveUpdatedDatasets(syncResult);\n\n // update dataset was skipped - service was called 0 times!\n verify(updater.getDatasetService(), times(0)).update(any(Dataset.class));\n }", "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 }", "public ExternalId getMarketDataId() {\n return _marketDataId;\n }", "private synchronized void syncData() {\n try {\n // pulling data from server\n pullData();\n\n // pushing local changes to server\n// recordStatus=2\n pushData();\n// recordStatus=1\n// pushData1();\n } catch (Throwable throwable) {\n Log.d(TAG, \"doWork: \" + throwable.getMessage());\n }\n // Toast.makeText(getApplicationContext(), \".\", Toast.LENGTH_SHORT).show();\n }", "public TransferMarket() {\n }", "private void getDataFromCustomerDataUpdate(Map<String, Object> cusData, CustomerDataTypeDTO data,\n List<FileInfosDTO> listFiles, String formatDate) throws JsonProcessingException {\n if (FieldTypeEnum.FILE.getCode().equals(data.getFieldType())) {\n if (listFiles != null) {\n List<BaseFileInfosDTO> listSaveDb = new ArrayList<>();\n listFiles.forEach(file -> {\n BaseFileInfosDTO fileSaveDb = new BaseFileInfosDTO();\n fileSaveDb.setFileName(file.getFileName());\n fileSaveDb.setFilePath(file.getFilePath());\n listSaveDb.add(fileSaveDb);\n });\n cusData.put(data.getKey(), objectMapper.writeValueAsString(listSaveDb));\n } else {\n cusData.put(data.getKey(), STRING_ARRAY_EMPTY);\n }\n } else if (FieldTypeEnum.MULTIPLE_PULLDOWN.getCode().equals(data.getFieldType())\n || FieldTypeEnum.CHECKBOX.getCode().equals(data.getFieldType())\n || FieldTypeEnum.RELATION.getCode().equals(data.getFieldType())) {\n List<Long> fValue = null;\n try {\n TypeReference<ArrayList<Long>> typeRef = new TypeReference<ArrayList<Long>>() {\n };\n fValue = objectMapper.readValue(data.getValue(), typeRef);\n } catch (IOException e) {\n log.error(e.getLocalizedMessage());\n }\n cusData.put(data.getKey(), fValue);\n } else if (FieldTypeEnum.PULLDOWN.getCode().equals(data.getFieldType())\n || FieldTypeEnum.RADIO.getCode().equals(data.getFieldType())\n || FieldTypeEnum.NUMBER.getCode().equals(data.getFieldType())) {\n if (StringUtils.isBlank(data.getValue())) {\n if (cusData.containsKey(data.getKey())) {\n cusData.remove(data.getKey());\n }\n } else {\n if (CheckUtil.isNumeric(data.getValue())) {\n cusData.put(data.getKey(), Long.valueOf(data.getValue()));\n } else {\n cusData.put(data.getKey(), Double.valueOf(data.getValue()));\n }\n }\n } else if (FieldTypeEnum.DATE.getCode().equals(data.getFieldType())) {\n getSystemDate(cusData, formatDate, data.getValue(), data.getKey(), null);\n } else if (FieldTypeEnum.TIME.getCode().equals(data.getFieldType())) {\n getSystemTime(cusData, DateUtil.FORMAT_HOUR_MINUTE, data.getValue(), data.getKey());\n } else if (FieldTypeEnum.DATETIME.getCode().equals(data.getFieldType())) {\n String date = StringUtils.isNotBlank(data.getValue()) ? data.getValue().substring(0, formatDate.length())\n : \"\";\n String hour = StringUtils.isNotBlank(data.getValue()) ? data.getValue().substring(formatDate.length()) : \"\";\n getSystemDate(cusData, formatDate, date, data.getKey(), hour);\n } else if (FieldTypeEnum.SELECT_ORGANIZATION.getCode().equals(data.getFieldType())) {\n List<Object> fValue = null;\n try {\n TypeReference<ArrayList<Object>> typeRef = new TypeReference<ArrayList<Object>>() {\n };\n fValue = objectMapper.readValue(data.getValue(), typeRef);\n } catch (IOException e) {\n log.error(e.getLocalizedMessage());\n }\n cusData.put(data.getKey(), fValue);\n } else if (FieldTypeEnum.LINK.getCode().equals(data.getFieldType())) {\n Map<String, String> fValue = new HashMap<>();\n try {\n TypeReference<Map<String, String>> typeRef = new TypeReference<Map<String, String>>() {\n };\n fValue = objectMapper.readValue(data.getValue(), typeRef);\n cusData.put(data.getKey(), fValue);\n } catch (Exception e) {\n log.error(e.getLocalizedMessage());\n }\n } else {\n cusData.put(data.getKey(), data.getValue());\n }\n }", "private void saveFields() {\r\n\t\tfinal String user_type;\r\n\t\tif (getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"StoreOwner_PointOfSale\")) { // for store_owner module header initialisation\r\n\t\t\tmUserID = getIntent().getExtras().getString(\"user_id\");\r\n\t\t\tuser_type = \"Customer\";\r\n\t\t} else {\r\n\t\t\tmUserID = UserDetails.mServiceUserId;\r\n\t\t\tuser_type = AccountLoginFlag.accountUserTypeflag;\r\n\t\t}\r\n\t\tmProgressDialog.show();\r\n\t\tfinal Thread syncThread = new Thread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tString mGetResponse = null;\r\n\t\t\t\tMessage msg_response = new Message();\r\n\t\t\t\tBundle bundle_pin = new Bundle();\r\n\t\t\t\tMessage msg_pin = new Message();\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (mConnectionAvailabilityChecking.ConnectivityCheck(getApplicationContext())) {\r\n\t\t\t\t\t\tString CardName = \"\";\r\n\t\t\t\t\t\tString UserName = \"\";\r\n\t\t\t\t\t\tString CardNumber = mCardNoValue1.getText().toString().trim()+ mCardNoValue2.getText().toString().trim()+ mCardNoValue3.getText().toString().trim()+ mCardNoValue4.getText().toString().trim();\r\n\t\t\t\t\t\tString ZipCode = mZipCodeValue.getText().toString().trim();\r\n\t\t\t\t\t\tString StreetAddress = mStreetNumberValue.getText().toString().trim();\r\n\t\t\t\t\t\tString CvvNumber = mCVVNoValue.getText().toString().trim();\r\n\t\t\t\t\t\tmChoosedMonth = Integer.parseInt(mExpirationDateValue.getText().toString().substring(0, 2));\r\n\t\t\t\t\t\tString Month = String.format(\"%02d\", mChoosedMonth);\r\n\t\t\t\t\t\tString Year = mExpirationDateValue.getText().toString().substring(mExpirationDateValue.getText().length()-2, mExpirationDateValue.getText().length());\r\n\t\t\t\t\t\tif(getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"StoreOwner_Billing\")){\r\n\t\t\t\t\t\t\tSharedPreferences mPrefs = getSharedPreferences(\"StoreDetailsPrefences\", Context.MODE_PRIVATE);\r\n\t\t\t\t\t\t\tString mStoreId = mPrefs.getString(\"store_id\", \"\");\r\n\t\t\t\t\t\t\tmGetResponse = mZouponswebservice.Getfirst_data_global_payment(mUserID, UserName, CardNumber, CvvNumber, Month, Year, StreetAddress, ZipCode, CardName, user_type,mStoreId,true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tmGetResponse = mZouponswebservice.Getfirst_data_global_payment(mUserID, UserName, CardNumber, CvvNumber, Month, Year, StreetAddress, ZipCode, CardName, user_type,\"\",false);\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!mGetResponse.equals(\"failure\") && !mGetResponse.equals(\"noresponse\")) {\r\n\t\t\t\t\t\t\tString mParsingResponse = mParsingclass.parsefirstdataglobalpayment(mGetResponse);\r\n\t\t\t\t\t\t\tif (mParsingResponse.equalsIgnoreCase(\"success\")) {\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < WebServiceStaticArrays.mFirstDataGlobalPaymentList.size(); i++) {\r\n\t\t\t\t\t\t\t\t\tFirstDataGlobalpayment_ClassVariables parsedobjectvalues = (FirstDataGlobalpayment_ClassVariables) WebServiceStaticArrays.mFirstDataGlobalPaymentList.get(i);\r\n\t\t\t\t\t\t\t\t\tmMessage = parsedobjectvalues.mMessage;\r\n\t\t\t\t\t\t\t\t\tif (parsedobjectvalues.mPin.equalsIgnoreCase(\"Yes\")) {\r\n\t\t\t\t\t\t\t\t\t\tbundle_pin.putString(\"updateui\", \"yes\");\r\n\t\t\t\t\t\t\t\t\t\tmsg_pin.setData(bundle_pin);\r\n\t\t\t\t\t\t\t\t\t\thandler_updateUI.sendMessage(msg_pin);\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\tupdateHandler(bundle, msg_response, mMessage);\r\n\t\t\t\t\t\t\t} else if (mParsingResponse.equalsIgnoreCase(\"failure\")) {\r\n\t\t\t\t\t\t\t\tupdateHandler(bundle, msg_response, mParsingResponse); // send update to handler\r\n\t\t\t\t\t\t\t} else if (mParsingResponse.equalsIgnoreCase(\"norecords\")) {\r\n\t\t\t\t\t\t\t\tupdateHandler(bundle, msg_response, mParsingResponse); // send update to handler\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tupdateHandler(bundle, msg_response, mGetResponse); // send update to handler about emailid validation response\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"No Network Connection\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tmProgressDialog.setProgress(100);\r\n\t\t\t\tmProgressDialog.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\tsyncThread.start();\r\n\t}", "public String getMarket() {\r\n return market;\r\n }", "void loadWeather() {\n\n // existing station's weather records are never updated.\n // why not?????\n\n// if (!\"\".equals(stationId) && !stationIgnore) {\n if (!stationExists && !weather.isNullRecord()) {\n\n if (!weatherIsLoaded) {\n\n // is there a weather record?\n// int count = weather.getRecCnt(\n// MrnWeather.STATION_ID + \"=\" + stationId);\n\n// if (count == 0) {\n\n // insert weather record\n weather.setStationId(stationId);\n if (dbg3) System.out.println(\"<br>loadWeather: put weather = \" + weather);\n try {\n weather.put();\n } catch(Exception e) {\n System.err.println(\"loadWeather: put weather = \" + weather);\n System.err.println(\"loadWeather: put sql = \" + weather.getInsStr());\n e.printStackTrace();\n } // try-catch\n\n weatherCount++;\n\n// } else {\n//\n// // update weather record\n// MrnWeather whereWeather = new MrnWeather(stationId);\n// whereWeather.upd(weather);\n//\n// } // if (weatherRecordCount == 0)\n//\n weatherIsLoaded = true;\n } // if (!weather.isNullRecord())\n\n } // if (!stationExists && !weather.isNullRecord())\n// } // if (!\"\".equals(stationId) && !stationIgnore)\n\n weather = new MrnWeather();\n\n }", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\n\tpublic void saveOrUpdate(Contract entity) {\n\t\tif(UtilFuns.isEmpty(entity.getId())){ // 判断修改或者新增\n\t\t\t//设置默认值\n\t\t\tentity.setState(0); //0:草稿 1:已上报 2:已报运\n\t\t\tentity.setTotalAmount(0.0); //务必设置默认值否则新增货物,分散计算的时候会出先null + xxxx\n\t\t}else{\n\t\t\t\n\t\t}\n\t\t\n\t\tcontractDao.save(entity);\n\t}", "public interface PremiumManager {\r\n /**\r\n * Retrieves all premium information\r\n *\r\n * @param policyHeader policy header\r\n * @param inputRecord input Record\r\n * @return RecordSet\r\n */\r\n RecordSet loadAllPremium(PolicyHeader policyHeader, Record inputRecord);\r\n\r\n /**\r\n * Retrieves all rating log information\r\n *\r\n * @param policyHeader policy header\r\n * @param inputRecord input Record\r\n * @return RecordSet\r\n */\r\n RecordSet loadAllRatingLog(PolicyHeader policyHeader, Record inputRecord);\r\n\r\n /**\r\n * Retrieves all member contribution info\r\n *\r\n * @param inputRecord (transactionId and riskId and termId)\r\n * @return RecordSet\r\n */\r\n RecordSet loadAllMemberContribution (Record inputRecord);\r\n\r\n /**\r\n * Retrieves all layer detail info\r\n *\r\n * @param inputRecord (transactionId and coverageId and termId)\r\n * @return RecordSet\r\n */\r\n RecordSet loadAllLayerDetail(Record inputRecord);\r\n \r\n /**\r\n * Retrieves all fund information\r\n *\r\n * @param policyHeader policy header\r\n * @param inputRecord input Record\r\n * @return RecordSet\r\n */\r\n RecordSet loadAllFund(PolicyHeader policyHeader, Record inputRecord);\r\n\r\n /**\r\n * Retrieves all payment information\r\n *\r\n * @param policyHeader policy header\r\n * @return RecordSet\r\n */\r\n RecordSet loadAllPayment(PolicyHeader policyHeader);\r\n\r\n /**\r\n * Validate if the term base id is the current term base id and whether the data is empty.\r\n *\r\n * @param inputRecord inputRecord\r\n * @param conn live JDBC Connection\r\n * @return boolean\r\n */\r\n void validateTransactionForPremiumWorksheet(Record inputRecord, Connection conn);\r\n\r\n /**\r\n * Get the default values for premium accounting date fields\r\n *\r\n * @param inputRecord input Record\r\n * @return RecordSet\r\n */\r\n RecordSet getInitialValuesForPremiumAccounting(Record inputRecord);\r\n\r\n /**\r\n * Generate the premium accounting data for selected transaction\r\n *\r\n * @param inputRecord input Record\r\n * @return RecordSet\r\n */\r\n RecordSet generatePremiumAccounting(Record inputRecord);\r\n}", "@Override\n\tpublic String approveLeaveByLeaveRequestIdTemp(String leaveRequestId, String leaveApproveReason,\n\t\t\tString changeLeaveType,final float mpcl,final float mpel,final float mplwp) {\n\t\t//String moveRowIntoHistory=\"INSERT INTO emp_leave_history select * from emp_leave_requests_tbl where requestId = '\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(moveRowIntoHistory);\n\t\t//String deleteRowByEmpid=\"delete from emp_leave_requests_tbl where requestId='\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(deleteRowByEmpid);\n\t\t//String squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_history as lh where lh.requestId=?\";\n\t\tString squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.cel,lh.ccl,lh.inAccount,lh.leaveDays,lh.leaveDates from emp_leave_requests_tbl as lh where lh.requestId=?\";\n\t FaculityLeaveMasterEntity faculityLeaveMasterEntity = super.getJdbcTemplate().queryForObject(squery,new Object[] {leaveRequestId},new BeanPropertyRowMapper<FaculityLeaveMasterEntity>(FaculityLeaveMasterEntity.class));\n\t\t\n\t List<String> leaveTypes=new ArrayList<String>();\n\t leaveTypes.add(\"CL\");\n\t leaveTypes.add(\"EL\");\n\t leaveTypes.add(\"LWP\");\n\t \n\t\tif(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType) && !leaveTypes.contains(faculityLeaveMasterEntity.getLeaveType()) && mplwp>0) {\n\t\t\tString leaveDates=faculityLeaveMasterEntity.getLeaveDates();\t\n\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),mplwp,dateTokensList.get(1)};\n\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t}\n\t\telse if(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t LeaveBalanceEntity leaveBalanceEntity=findLeaveCurrentLeaveBalanceByEmpId(faculityLeaveMasterEntity.getEmpid()+\"\");\n\t\t\t\t//finding total leaves applied and checking whether mcl is less than available cls\n\t\t\t\tfloat totalAvailableCls=leaveBalanceEntity.getCl();\n\t\t\t\tString totalClLeavesDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\tint totalClLeavesCountDays=0;\n\t\t\t\tif(totalClLeavesDays!=null && totalClLeavesDays.length()>0) {\n\t\t\t\t\tString totalDaysTokens[]=totalClLeavesDays.split(\",\");\n\t\t\t\t\ttotalClLeavesCountDays=totalDaysTokens.length;\n\t\t\t\t\t\tfor(String str:totalDaysTokens) {\n\t\t\t\t\t\t\tfloat cp=Float.parseFloat(str.substring(str.indexOf(\"(\")+1,str.indexOf(\")\")));\n\t\t\t\t\t\t\ttotalAvailableCls=totalAvailableCls+cp;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if modified cl is less than available CL of the employee\n\t\t\t\t//04(1),05(0.75),\n\t\t\t\tString totalDbClDays=\"\";\n\t\t\t\tif(mpcl<totalAvailableCls) {\n\t\t\t\t\t //float remainingCl=totalAvailableCls -mpcl; //1.75 ->>.25\n\t\t\t\t\t String totalDaysTokens[]=totalClLeavesDays.split(\",\");\n\t\t\t\t\t if(totalClLeavesCountDays==1) {\n\t\t\t\t\t\t \t//current computated cl into applied leaves request tables\n\t\t\t\t\t\t \tfloat ccl=Float.parseFloat(totalDaysTokens[0].substring(totalDaysTokens[0].indexOf(\"(\")+1,totalDaysTokens[0].indexOf(\")\")));\n\t\t\t\t\t\t \tif((ccl-mpcl) >0) {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDaysTokens[0].substring(0,2)+\"(\"+(ccl-mpcl)+\")\";\n\t\t\t\t\t\t \t}\n\t\t\t\t\t }else{\n\t\t\t\t\t\t int mpclcount=(int) Math.ceil(mpcl);\n\t\t\t\t\t\t float tmpcl=mpcl;\n\t\t\t\t\t\t for(int i=0;i<mpclcount;i++) {\n\t\t\t\t\t\t \t if(tmpcl>=1) {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDbClDays+\",\"+totalDaysTokens[i]; \n\t\t\t\t\t\t \t }\t \n\t\t\t\t\t\t \t else {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDbClDays+\",\"+ totalDaysTokens[i].substring(0, 2)+\"(\"+tmpcl+\")\"; \n\t\t\t\t\t\t \t }\t\t \n\t\t\t\t\t\t \t tmpcl=tmpcl-1;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t} //end of CL computation\n\t\t\t\t\n\t\t\t\t//compute total leaves dd from dates\n\t\t\t\t//2016-07-04,2016-07-05,2016-07-06\n\t\t\t\tString leaveDates=faculityLeaveMasterEntity.getLeaveDates();\n\t\t\t\tString ddDates=\"\";\n\t\t\t\tString leaveDatesTokens[]=leaveDates.split(\",\");\n\t\t\t\tfor(String dddate:leaveDatesTokens) {\n\t\t\t\t\t\tString dddateTokens[]=dddate.split(\"-\");\n\t\t\t\t\t\tString dd=dddateTokens[2];\n\t\t\t\t\t\tddDates=ddDates+dd+\",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Case 1 when all CL ,EL,LWP is not zero\n\t\t\t\tif(mpcl>0 && mpel>0 && mplwp>0) {\n\t\t\t\t\t\t\t\tString cldates=ddDates+\"-> (\"+mpcl+\")\";\n\t\t\t\t\t\t\t\tString eldates=ddDates+\"-> (\"+mpel+\")\";\n\t\t\t\t\t\t\t\tString lwpdates=ddDates+\"-> (\"+mplwp+\")\";\n\t\t\t\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t\t\tObject[] pdata=new Object[]{mpcl,cldates,mplwp,lwpdates,mpel,eldates};\n\t\t\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl>0 && mplwp>0 && mpel==0) {\n\t\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),mplwp,dateTokensList.get(1),0,\"\"};\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl>0 && mpel>0 && mplwp==0) {\n\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mpel, dateTokensList);\n\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),0,\"\",mpel,dateTokensList.get(1)};\n\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl==0 && mpel>0 && mplwp>0) {\n\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\tObject[] pdata=new Object[]{0,\"\",mplwp,dateTokensList.get(1),mpel,dateTokensList.get(0)};\n\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tLeavesModifiedEntity leavesModifiedEntity=findModifiedLeaveByRequestId(leaveRequestId);\n\t\t\t\tfloat clbalanceDiff=leavesModifiedEntity.getCl()-mpcl;\n\t\t\t\tfloat elbalanceDiff=leavesModifiedEntity.getEl()-mpel;\n\t\t\t\tString updateLeaveBalance=\"\";\n\t\t\t\tif(clbalanceDiff>0 && elbalanceDiff>0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL+\"+clbalanceDiff+\", EL=EL+\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}else if(clbalanceDiff<=0 && elbalanceDiff<=0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL-\"+clbalanceDiff+\", EL=EL-\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}else if(clbalanceDiff<=0 && elbalanceDiff>0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL-\"+clbalanceDiff+\", EL=EL+\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t} if(clbalanceDiff>0 && elbalanceDiff<=0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL+\"+clbalanceDiff+\", EL=EL-\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}\n\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveBalance);\n\t}\n\t\t\n\t\t//end of no change\n\t\t//Approving the status of Management and moving record from leave_request_tbl into leave_history_tbl\n\t\tapproveLeaveByManagementRequestId(leaveRequestId,leaveApproveReason);\n\t\t//update Leave Balance Table\n\t\t\n\t/*\tString updateLeaveStatus=\"update emp_leave_requests_tbl set description=?,hrApproval=?,dom=? where requestId='\"+leaveRequestId+\"'\";\n\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{leaveApproveReason,LeaveStatus.APPROVED_STATUS,DateUtils.getCurrentTimestatmp()});*/\n\t\treturn BaoConstants.SUCCESS;\n\t}", "public static void setSiteForecastedDataInCache(Map<String,String> forecastedMap,String siteKey){\n \tString key=MEDIA_PLAN_SITE_FORECAST_DATA_KEY+\"_\"+siteKey;\n\t\tlog.info(\"setSiteForecastedDataInCache : memcache key:\"+key);\t\t\t\n\t\tif(memcache !=null && memcache.contains(MEDIA_PLAN_COMPANY_KEY)){\n \t\tmemcache.delete(MEDIA_PLAN_COMPANY_KEY);\n \t}\n \tmemcache.put(MEDIA_PLAN_COMPANY_KEY, forecastedMap);\n\t}", "public static MarketSnapshot generateFromStockMarket(StockMarket market, Date dateTime) {\n ArrayList<String> companyNames = new ArrayList<>();\n ArrayList<Integer> companyValues = new ArrayList<>();\n\n //Get all the companies from all the exchanges and then get their name and\n //current net worth\n for (Exchange e : market.getExchanges()) {\n for (Company c : e.getTradedCompanies()) {\n companyNames.add(c.getName());\n companyValues.add(c.getNetWorth());\n }\n }\n\n ArrayList<String> clientNames = new ArrayList<>();\n ArrayList<Integer> clientValues = new ArrayList<>();\n\n //Get the portfolio of each of the clients and then gets the clients name\n //and their current net worth\n for (Trader t : market.getTraders()) {\n Portfolio p = t.getClient().getPortfolio();\n clientNames.add(t.getClient().getName());\n clientValues.add(p.getNetWorth());\n }\n\n ArrayList<String> exchangeNames = new ArrayList<>();\n ArrayList<Integer> exchangeIndicies = new ArrayList<>();\n\n //Gets each exchange and their name and the current index\n for (Exchange e : market.getExchanges()) {\n exchangeNames.add(e.getType().name());\n exchangeIndicies.add(e.getExchangeIndex());\n }\n\n //Built a snapshot\n MarketSnapshot snapshot = new MarketSnapshot();\n snapshot.companyNames = companyNames.toArray(new String[companyNames.size()]);\n snapshot.companyValues = companyValues.toArray(new Integer[companyValues.size()]);\n\n snapshot.clientNames = clientNames.toArray(new String[clientNames.size()]);\n snapshot.clientValues = clientValues.toArray(new Integer[clientValues.size()]);\n\n snapshot.exchangeNames = exchangeNames.toArray(new String[exchangeNames.size()]);\n snapshot.exchangeIndicies = exchangeIndicies.toArray(new Integer[exchangeIndicies.size()]);\n\n snapshot.marketState = market.getMarketState();\n snapshot.dateTime = dateTime;\n\n return snapshot;\n }", "public void create__customers( String qualificationId, Map<String, ? extends Object> data, final ObjectCallback<Customer> callback){\n\n /**\n Call the onBefore event\n */\n callback.onBefore();\n\n\n //Definging hashMap for data conversion\n Map<String, Object> hashMapObject = new HashMap<>();\n //Now add the arguments...\n \n hashMapObject.put(\"qualificationId\", qualificationId);\n \n hashMapObject.putAll(data);\n \n\n \n\n\n \n \n \n invokeStaticMethod(\"prototype.__create__customers\", hashMapObject, new Adapter.JsonObjectCallback() {\n \n @Override\n public void onError(Throwable t) {\n callback.onError(t);\n //Call the finally method..\n callback.onFinally();\n }\n\n @Override\n public void onSuccess(JSONObject response) {\n \n if(response != null){\n CustomerRepository customerRepo = getRestAdapter().createRepository(CustomerRepository.class);\n if(context != null){\n try {\n Method method = customerRepo.getClass().getMethod(\"addStorage\", Context.class);\n method.invoke(customerRepo, context);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n //customerRepo.addStorage(context);\n }\n Map<String, Object> result = Util.fromJson(response);\n Customer customer = customerRepo.createObject(result);\n\n //Add to database if persistent storage required..\n if(isSTORE_LOCALLY()){\n //http://stackoverflow.com/questions/160970/how-do-i-invoke-a-java-method-when-given-the-method-name-as-a-string\n try {\n Method method = customer.getClass().getMethod(\"save__db\");\n method.invoke(customer);\n\n } catch (Exception e) {\n Log.e(\"Database Error\", e.toString());\n }\n\n }\n\n callback.onSuccess(customer);\n }else{\n callback.onSuccess(null);\n }\n \n //Call the finally method..\n callback.onFinally();\n }\n });\n \n\n \n\n }", "private static void northstarSync(Connection con, InputStreamReader isr, String club) {\n\n PreparedStatement pstmt1 = null;\n PreparedStatement pstmt2 = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n\n // Values from NStar records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String mNum = \"\";\n String u_hndcp = \"\";\n String c_hndcp = \"\";\n String mship = \"\";\n String mtype = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String mobile = \"\";\n String primary = \"\";\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n\n // Values from ForeTees records\n //\n String fname_old = \"\";\n String lname_old = \"\";\n String mi_old = \"\";\n String mship_old = \"\";\n String mtype_old = \"\";\n String email_old = \"\";\n String mNum_old = \"\";\n String ghin_old = \"\";\n String bag_old = \"\";\n String posid_old = \"\";\n String email2_old = \"\";\n String phone_old = \"\";\n String phone2_old = \"\";\n String suffix_old = \"\";\n\n float u_hcap_old = 0;\n float c_hcap_old = 0;\n int birth_old = 0;\n\n // Values for New ForeTees records\n //\n String fname_new = \"\";\n String lname_new = \"\";\n String mi_new = \"\";\n String mship_new = \"\";\n String mtype_new = \"\";\n String email_new = \"\";\n String mNum_new = \"\";\n String ghin_new = \"\";\n String bag_new = \"\";\n String posid_new = \"\";\n String email2_new = \"\";\n String phone_new = \"\";\n String phone2_new = \"\";\n String suffix_new = \"\";\n\n float u_hcap_new = 0;\n float c_hcap_new = 0;\n int birth_new = 0;\n int rcount = 0;\n\n String errorMsg = \"Error in Common_sync.northStarSync: \";\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean headerFound = false;\n boolean found = false;\n\n\n try {\n\n BufferedReader br = new BufferedReader(isr);\n\n // format of each line in the file:\n //\n // memid, mNum, fname, mi, lname, suffix, mship, mtype, gender, email, email2,\n // phone, phone2, bag, hndcp#, uhndcp, chndcp, birth, posid, primary\n //\n //\n while (true) {\n\n line = br.readLine();\n\n if (line == null) {\n break;\n }\n\n // Skip the 1st row (header row)\n\n if (headerFound == false) {\n\n headerFound = true;\n\n } else {\n\n // Remove the dbl quotes and check for embedded commas\n\n line = cleanRecord( line );\n\n rcount++; // count the records\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() > 19 ) { // enough data ?\n\n memid = tok.nextToken();\n mNum = tok.nextToken();\n fname = tok.nextToken();\n mi = tok.nextToken();\n lname = tok.nextToken();\n suffix = tok.nextToken();\n mship = tok.nextToken();\n mtype = tok.nextToken();\n gender = tok.nextToken();\n email = tok.nextToken();\n email2 = tok.nextToken();\n phone = tok.nextToken();\n phone2 = tok.nextToken();\n bag = tok.nextToken();\n ghin = tok.nextToken();\n u_hndcp = tok.nextToken();\n c_hndcp = tok.nextToken();\n temp = tok.nextToken();\n posid = tok.nextToken();\n primary = tok.nextToken();\n\n //\n // Check for ? (not provided)\n //\n if (memid.equals( \"?\" )) {\n\n memid = \"\";\n }\n if (mNum.equals( \"?\" )) {\n\n mNum = \"\";\n }\n if (fname.equals( \"?\" )) {\n\n fname = \"\";\n }\n if (mi.equals( \"?\" )) {\n\n mi = \"\";\n }\n if (lname.equals( \"?\" )) {\n\n lname = \"\";\n }\n if (suffix.equals( \"?\" )) {\n\n suffix = \"\";\n }\n if (mship.equals( \"?\" )) {\n\n mship = \"\";\n }\n if (mtype.equals( \"?\" )) {\n\n mtype = \"\";\n }\n if (gender.equals( \"?\" )) {\n\n gender = \"\";\n }\n if (email.equals( \"?\" )) {\n\n email = \"\";\n }\n if (email2.equals( \"?\" )) {\n\n email2 = \"\";\n }\n if (phone.equals( \"?\" )) {\n\n phone = \"\";\n }\n if (phone2.equals( \"?\" )) {\n\n phone2 = \"\";\n }\n if (bag.equals( \"?\" )) {\n\n bag = \"\";\n }\n if (ghin.equals( \"?\" )) {\n\n ghin = \"\";\n }\n if (u_hndcp.equals( \"?\" )) {\n\n u_hndcp = \"\";\n }\n if (c_hndcp.equals( \"?\" )) {\n\n c_hndcp = \"\";\n }\n if (temp.equals( \"?\" ) || temp.equals( \"0\" )) {\n\n temp = \"\";\n }\n if (posid.equals( \"?\" )) {\n\n posid = \"\";\n }\n if (primary.equals( \"?\" )) {\n\n primary = \"\";\n }\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!memid.equals( \"\" ) && !mNum.equals( \"\" ) && !lname.equals( \"\" ) && !fname.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 ) {\n\n mi = tok.nextToken(); // over-write mi if already there\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n\n lname = tok.nextToken(); // remove suffix and spaces\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n lname = lname + \"_\" + suffix; // append suffix to last name\n\n } else { // sufix after last name ?\n\n if ( tok.countTokens() > 0 ) {\n\n suffix = tok.nextToken();\n lname = lname + \"_\" + suffix; // append suffix to last name\n }\n }\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n if (!u_hndcp.equals( \"\" ) && !u_hndcp.equalsIgnoreCase(\"NH\") && !u_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n u_hndcp = u_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n u_hndcp = u_hndcp.replace('H', ' '); // or 'H' if present\n u_hndcp = u_hndcp.replace('N', ' '); // or 'N' if present\n u_hndcp = u_hndcp.replace('J', ' '); // or 'J' if present\n u_hndcp = u_hndcp.replace('R', ' '); // or 'R' if present\n u_hndcp = u_hndcp.trim();\n\n u_hcap = Float.parseFloat(u_hndcp); // usga handicap\n\n if ((!u_hndcp.startsWith(\"+\")) && (!u_hndcp.startsWith(\"-\"))) {\n\n u_hcap = 0 - u_hcap; // make it a negative hndcp (normal)\n }\n }\n\n if (!c_hndcp.equals( \"\" ) && !c_hndcp.equalsIgnoreCase(\"NH\") && !c_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n c_hndcp = c_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n c_hndcp = c_hndcp.replace('H', ' '); // or 'H' if present\n c_hndcp = c_hndcp.replace('N', ' '); // or 'N' if present\n c_hndcp = c_hndcp.replace('J', ' '); // or 'J' if present\n c_hndcp = c_hndcp.replace('R', ' '); // or 'R' if present\n c_hndcp = c_hndcp.trim();\n\n c_hcap = Float.parseFloat(c_hndcp); // usga handicap\n\n if ((!c_hndcp.startsWith(\"+\")) && (!c_hndcp.startsWith(\"-\"))) {\n\n c_hcap = 0 - c_hcap; // make it a negative hndcp (normal)\n }\n }\n\n //\n // convert birth date (yyyy-mm-dd to yyyymmdd)\n //\n if (!temp.equals( \"\" )) {\n\n tok = new StringTokenizer( temp, \"/-\" ); // delimiters are / & -\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n int yy = Integer.parseInt(b1);\n int mm = Integer.parseInt(b2);\n int dd = Integer.parseInt(b3);\n\n birth = (yy * 10000) + (mm * 100) + dd; // yyyymmdd\n\n if (yy < 1900) { // check for invalid date\n\n birth = 0;\n }\n\n } else {\n\n birth = 0;\n }\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n\n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n skip = false;\n found = false; // default to club NOT found\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n if (club.equals( \"brooklawn\" )) { // Grapevine Web Site Provider - NorthStar Roster Sync\n\n found = true; // club found\n\n //\n // Determine if we should process this record (per Judy Barbagallo)\n //\n if (!mtype.equals( \"\" ) && !mship.equals( \"\" ) && !mship.startsWith( \"Special\" ) &&\n !mship.startsWith( \"Other\" ) && !mship.startsWith( \"Resign\" ) &&\n !mship.startsWith( \"Transitional\" ) && !mship.startsWith( \"Senior Plus\" )) {\n\n\n // clean up mNum\n if (!mNum.equals(\"\")) {\n\n mNum = mNum.toUpperCase();\n\n if (mNum.length() > 2 && (mNum.endsWith(\"S1\") || mNum.endsWith(\"C1\") || mNum.endsWith(\"C2\") || mNum.endsWith(\"C3\") || mNum.endsWith(\"C4\") ||\n mNum.endsWith(\"C5\") || mNum.endsWith(\"C6\") || mNum.endsWith(\"C7\") || mNum.endsWith(\"C8\") || mNum.endsWith(\"C9\"))) {\n\n mNum = mNum.substring(0, mNum.length() - 2);\n\n } else if (mNum.length() > 1 && mNum.endsWith(\"S\")) {\n\n mNum = mNum.substring(0, mNum.length() - 1);\n }\n }\n\n //\n // set defaults\n //\n if (gender.equalsIgnoreCase( \"female\" )) {\n\n gender = \"F\"; // Female\n\n } else {\n\n gender = \"M\"; // default to Male\n }\n\n suffix = \"\"; // done with suffix for now\n\n //\n // Set the Member Type\n //\n if (mtype.equalsIgnoreCase( \"primary\" )) {\n\n mtype = \"Primary Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Primary Female\";\n }\n\n } else if (mtype.equalsIgnoreCase( \"spouse\" )) {\n\n mtype = \"Spouse Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Spouse Female\";\n }\n\n } else if (!mtype.equalsIgnoreCase(\"maid\") && !mtype.equalsIgnoreCase(\"other\")) {\n\n mtype = \"Dependent\";\n\n } else {\n\n skip = true;\n }\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 24; // backup 24 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (mtype.equals(\"Dependent\") && birth > 0 && birth < oldDate) {\n\n skip = true;\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club = brooklawn\n\n\n if (club.equals( \"bellevuecc\" )) { // Bellevue CC\n\n found = true; // club found\n\n //\n // Determine if we should process this record - skip 'House', 'House/Pool' and 'Country Clubs' (do this below!!)\n //\n if (!mtype.equals( \"\" ) && !mship.equals( \"\" )) {\n\n //\n // Strip any leading zeros from username\n //\n if (memid.startsWith( \"0\" )) {\n\n memid = remZeroS( memid );\n }\n if (memid.startsWith( \"0\" )) { // in case there are 2 zeros\n\n memid = remZeroS( memid );\n }\n\n //\n // Set the Membership Type\n //\n if (mship.startsWith( \"Assoc\" )) { // if Associate...\n\n mship = \"Associate\";\n }\n\n if (mship.startsWith( \"Junior\" )) { // if Junior...\n\n mship = \"Junior\";\n }\n\n if (mship.equalsIgnoreCase(\"House\") || mship.equalsIgnoreCase(\"House/Pool\") || mship.equalsIgnoreCase(\"Country Clubs\")) {\n skip = true;\n }\n //\n // set defaults\n //\n if (gender.equalsIgnoreCase( \"female\" )) {\n\n gender = \"F\"; // Female\n\n } else {\n\n gender = \"M\"; // default to Male\n }\n\n suffix = \"\"; // done with suffix for now\n\n //\n // Set the Member Type\n //\n if (mtype.equalsIgnoreCase( \"primary\" )) {\n\n mtype = \"Primary Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Primary Female\";\n }\n\n } else {\n\n if (mtype.equalsIgnoreCase( \"spouse\" )) {\n\n mtype = \"Spouse Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Spouse Female\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n // Search or primary and use their mship\n try {\n String tempmNum = mNum;\n\n while (tempmNum.startsWith(\"0\")) {\n tempmNum = tempmNum.substring(1);\n }\n\n PreparedStatement belstmt = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n belstmt.clearParameters();\n belstmt.setString(1, tempmNum);\n\n ResultSet belrs = belstmt.executeQuery();\n\n if (belrs.next()) {\n mship = belrs.getString(\"m_ship\");\n } else {\n skip = true;\n }\n\n belstmt.close();\n\n } catch (Exception exc) {\n skip = true;\n }\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club = ??\n\n if (club.equals( \"greenacrescountryclub\" )) { // Green Acres CC\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mtype.equals( \"\" ) && !mship.equals( \"\" )) {\n\n //\n // Strip any leading zeros from username and member number\n //\n while (memid.startsWith(\"0\")) {\n memid = memid.substring(1);\n }\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n //\n // Set the Membership Type\n //\n if (mship.equalsIgnoreCase(\"Regular\") || mship.startsWith(\"Female Regular\") || mship.equalsIgnoreCase(\"Honorairium\") ||\n mship.equalsIgnoreCase(\"Male Hnr\") || mship.startsWith(\"Male Regular\") || mship.equalsIgnoreCase(\"Spec Male Hnr 85/25\") ||\n mship.equalsIgnoreCase(\"Social 85/50 Years Mbrshp +\") || mship.startsWith(\"Male 3\") || mship.startsWith(\"Female 3\")) {\n\n mship = \"Regular\";\n\n } else if (mship.equalsIgnoreCase(\"Female Junior\") || mship.equalsIgnoreCase(\"Female Young Jr 21-24\") || mship.equalsIgnoreCase(\"Male Junior\") ||\n mship.equalsIgnoreCase(\"Male Limited Jr 28-29\") || mship.equalsIgnoreCase(\"Male Young Jr 21-24\") || mship.equalsIgnoreCase(\"Male Young Junior 25-27\") ||\n mship.startsWith(\"Male Jr\")) {\n\n mship = \"Junior\";\n\n } else if (mship.startsWith(\"Social Female\") || mship.startsWith(\"Social Male\") || mship.startsWith(\"Social Junior\") ||\n mship.startsWith(\"Social Jr\")) {\n\n mship = \"Social\";\n\n } else if (mship.startsWith(\"Loa Soc\")) {\n\n mship = \"LOA Social\";\n\n } else if (mship.startsWith(\"Loa Junior\") || mship.startsWith(\"Loa Jr\") || mship.startsWith(\"Loa Ltd Jr\") ||\n mship.startsWith(\"Loa Jr\") || mship.equalsIgnoreCase(\"Loa Male 37\")) {\n\n mship = \"LOA Junior\";\n\n } else if (mship.equalsIgnoreCase(\"Loa Regular Male\")) {\n\n mship = \"LOA Regular\";\n\n } else if (mship.equalsIgnoreCase(\"Significant Other\") || mship.equalsIgnoreCase(\"Spouse\") || mship.equalsIgnoreCase(\"Child\")) {\n\n try {\n pstmt2 = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum);\n\n rs = pstmt2.executeQuery();\n\n if (rs.next()) {\n mship = rs.getString(\"m_ship\");\n } else {\n mship = \"No Primary Found - \" + mship;\n }\n\n pstmt2.close();\n\n } catch (Exception exc) {\n\n mship = \"Error Finding Primary - \" + mship;\n\n }\n\n } else if (mship.startsWith(\"Pool & Tennis\")) {\n\n mship = \"Pool & Tennis\";\n\n }\n\n else if (!mship.equalsIgnoreCase(\"Two Week Usage\")) {\n\n skip = true; // Skip all others\n\n }\n\n\n // set defaults\n if (gender.equalsIgnoreCase( \"Female\" )) {\n gender = \"F\"; // Female\n } else {\n gender = \"M\"; // default to Male\n }\n\n // Set mtype\n if (mtype.equalsIgnoreCase(\"Primary\") || mtype.equalsIgnoreCase(\"Spouse\") || mtype.equalsIgnoreCase(\"Signi Other\")) {\n if (gender.equals(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n } else if (mtype.equalsIgnoreCase(\"Child\")) {\n mtype = \"Qualified Child\";\n }\n\n suffix = \"\"; // done with suffix for now\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club = greenacrescountryclub\n\n //\n // Ritz Carlotn CC\n //\n/*\n if (club.equals( \"ritzcarlton\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n ??? if (!mtype.equals( \"\" ) && !mship.equals( \"\" ) && !mship.startsWith( \"????\" ) &&\n !mship.startsWith( \"???\" ) && !mship.startsWith( \"???\" )) {\n\n //\n // set defaults\n //\n if (gender.equalsIgnoreCase( \"female\" )) {\n\n gender = \"F\"; // Female\n\n } else {\n\n gender = \"M\"; // default to Male\n }\n\n suffix = \"\"; // done with suffix for now\n\n //\n // Set the Member Type\n //\n if (mtype.equalsIgnoreCase( \"primary\" )) {\n\n mtype = \"Primary Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Primary Female\";\n }\n\n } else {\n\n if (mtype.equalsIgnoreCase( \"spouse\" )) {\n\n mtype = \"Spouse Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Spouse Female\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n }\n\n //\n // *** TEMP *** currently the birth dates are invalid for all members\n //\n birth = 0;\n\n //\n // Verify the member id's\n //\n if (mtype.equalsIgnoreCase( \"spouse\" )) {\n\n if (!memid.endsWith( \"s\" ) && !memid.endsWith( \"S\" ) && !memid.endsWith( \"s1\" ) && !memid.endsWith( \"S1\" )) {\n\n skip = true; // skip this record\n }\n\n } else {\n\n if (mtype.equalsIgnoreCase( \"dependent\" )) {\n\n if (!memid.endsWith( \"C1\" ) && !memid.endsWith( \"C2\" ) && !memid.endsWith( \"C3\" ) && !memid.endsWith( \"C4\" ) &&\n !memid.endsWith( \"C5\" ) && !memid.endsWith( \"C6\" ) && !memid.endsWith( \"C7\" ) && !memid.endsWith( \"C8\" )) {\n\n skip = true; // skip this record\n }\n }\n }\n\n } else {\n\n skip = true; // skip this record\n }\n } // end of IF club = ritzcarlton\n*/\n\n\n //\n //******************************************************************\n // Common processing - add or update the member record\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n fname_old = \"\";\n lname_old = \"\";\n mi_old = \"\";\n mship_old = \"\";\n mtype_old = \"\";\n email_old = \"\";\n mNum_old = \"\";\n ghin_old = \"\";\n bag_old = \"\";\n posid_old = \"\";\n email2_old = \"\";\n phone_old = \"\";\n phone2_old = \"\";\n suffix_old = \"\";\n u_hcap_old = 0;\n c_hcap_old = 0;\n birth_old = 0;\n\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!phone2.equals( \"\" )) {\n\n phone2 = truncate(phone2, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if(rs.next()) {\n\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n }\n pstmt2.close(); // close the stmt\n\n if (!fname_old.equals( \"\" )) { // if member found\n\n changed = false; // init change indicator\n\n lname_new = lname_old;\n\n if (!lname.equals( \"\" ) && !lname_old.equals( lname )) {\n\n lname_new = lname; // set value from NStar record\n changed = true;\n }\n\n fname_new = fname_old;\n\n fname = fname_old; // DO NOT change the first names\n\n/*\n if (!fname.equals( \"\" ) && !fname_old.equals( fname )) {\n\n fname_new = fname; // set value from NStar record\n changed = true;\n }\n*/\n\n mi_new = mi_old;\n\n if (!mi.equals( \"\" ) && !mi_old.equals( mi )) {\n\n mi_new = mi; // set value from NStar record\n changed = true;\n }\n\n mship_new = mship_old;\n\n if (!mship.equals( \"\" ) && !mship_old.equals( mship )) {\n\n mship_new = mship; // set value from NStar record\n changed = true;\n }\n\n mtype_new = mtype_old;\n\n if (!club.equals( \"ritzcarlton\" ) && !club.equals( \"brooklawn\" )) { // do not change mtypes for dependents\n\n if (!mtype.equals( \"\" ) && !mtype.equals( \"Dependent\" ) && !mtype_old.equals( mtype )) {\n\n mtype_new = mtype; // set value from NStar record\n changed = true;\n }\n }\n\n birth_new = birth_old;\n\n if (!club.equals( \"ritzcarlton\" )) { // do not change birthdates\n\n if (birth > 0 && birth != birth_old) {\n\n birth_new = birth; // set value from NStar record\n changed = true;\n }\n }\n\n ghin_new = ghin_old;\n\n if (!ghin.equals( \"\" ) && !ghin_old.equals( ghin )) {\n\n ghin_new = ghin; // set value from NStar record\n changed = true;\n }\n\n bag_new = bag_old;\n\n if (!bag.equals( \"\" ) && !bag_old.equals( bag )) {\n\n bag_new = bag; // set value from NStar record\n changed = true;\n }\n\n posid_new = posid_old;\n\n if (!posid.equals( \"\" ) && !posid_old.equals( posid )) {\n\n posid_new = posid; // set value from NStar record\n changed = true;\n }\n\n phone_new = phone_old;\n\n if (!phone.equals( \"\" ) && !phone_old.equals( phone )) {\n\n phone_new = phone; // set value from NStar record\n changed = true;\n }\n\n phone2_new = phone2_old;\n\n if (!phone2.equals( \"\" ) && !phone2_old.equals( phone2 )) {\n\n phone2_new = phone2; // set value from NStar record\n changed = true;\n }\n\n suffix_new = suffix_old;\n\n if (!suffix.equals( \"\" ) && !suffix_old.equals( suffix )) {\n\n suffix_new = suffix; // set value from NStar record\n changed = true;\n }\n\n email_new = email_old; // do not change emails\n email2_new = email2_old;\n\n //\n // update emails if Brooklawn\n //\n if (club.equals( \"brooklawn\" )) {\n\n if (!email.equals( \"\" )) { // if email provided\n\n email_new = email; // set value from NStar record\n }\n\n if (!email2.equals( \"\" )) { // if email provided\n\n email2_new = email2; // set value from NStar record\n }\n }\n\n\n\n // don't allow both emails to be the same\n if (email_new.equalsIgnoreCase(email2_new)) email2_new = \"\";\n\n\n mNum_new = mNum_old; // do not change mNums\n\n if (club.equals(\"brooklawn\")) { // update member numbers if brooklawn\n if (!mNum.equals( \"\" ) && !mNum_old.equals( mNum )) {\n\n mNum_new = mNum; // set value from NStar record\n changed = true;\n }\n }\n\n\n //\n // Update our record if something has changed\n //\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, ghin = ?, bag = ?, birth = ?, posid = ?, email2 = ?, phone1 = ?, \" +\n \"phone2 = ?, name_suf = ?, inact = 0, last_sync_date = now(), gender = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, lname_new);\n pstmt2.setString(2, fname_new);\n pstmt2.setString(3, mi_new);\n pstmt2.setString(4, mship_new);\n pstmt2.setString(5, mtype_new);\n pstmt2.setString(6, email_new);\n pstmt2.setString(7, mNum_new);\n pstmt2.setString(8, ghin_new);\n pstmt2.setString(9, bag_new);\n pstmt2.setInt(10, birth_new);\n pstmt2.setString(11, posid_new);\n pstmt2.setString(12, email2_new);\n pstmt2.setString(13, phone_new);\n pstmt2.setString(14, phone2_new);\n pstmt2.setString(15, suffix_new);\n pstmt2.setString(16, gender);\n pstmt2.setString(17, memid);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n } else {\n\n //\n // New member - first check if name already exists\n //\n boolean dup = false;\n\n pstmt2 = con.prepareStatement (\n \"SELECT username FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n dup = true;\n }\n pstmt2.close(); // close the stmt\n\n if (dup == false) {\n\n //\n // New member - add it\n //\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, \" +\n \"webid, last_sync_date, gender) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,'',?,?,?,'',?,'',now(),?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, email2);\n pstmt2.setString(17, phone);\n pstmt2.setString(18, phone2);\n pstmt2.setString(19, suffix);\n pstmt2.setString(20, gender);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n }\n }\n\n } // end of IF skip\n\n } // end of IF minimum requirements\n\n } // end of IF tokens\n\n } // end of IF header row\n\n } // end of WHILE records in file\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n \n \n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n }\n\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster (record #\" +rcount+ \") for \" +club+ \", line = \" +line+ \": \" + e3.getMessage(); // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.northStarSync: \"; // reset the msg\n }\n\n\n //\n // Bellevue - now change the mship types of all spouses and dependents to match the primary, then remove the unwanted mships\n //\n /*\n if (club.equals( \"bellevuecc\" )) { // Bellevue CC\n\n try {\n\n //\n // get all primary members\n //\n String mtype1 = \"Primary Male\";\n String mtype2 = \"Primary Female\";\n\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship, memNum FROM member2b WHERE m_type = ? OR m_type = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, mtype1);\n pstmt2.setString(2, mtype2);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n while(rs.next()) {\n\n mship = rs.getString(\"m_ship\");\n mNum = rs.getString(\"memNum\");\n\n //\n // Set mship in all members with matching mNum\n //\n pstmt1 = con.prepareStatement (\n \"UPDATE member2b SET m_ship = ? \" +\n \"WHERE memNum = ?\");\n\n pstmt1.clearParameters(); // clear the parms\n pstmt1.setString(1, mship);\n pstmt1.setString(2, mNum);\n pstmt1.executeUpdate();\n\n pstmt1.close(); // close the stmt\n\n } // end of WHILE primary members\n\n pstmt2.close(); // close the stmt\n\n\n String mship1 = \"House\";\n String mship2 = \"House/Pool\";\n String mship3 = \"Country Clubs\";\n\n //\n // Remove the 'House', 'House/Pool' and 'Country Clubs' mship types\n //\n pstmt1 = con.prepareStatement (\n \"DELETE FROM member2b \" +\n \"WHERE m_ship = ? OR m_ship = ? OR m_ship = ?\");\n\n pstmt1.clearParameters(); // clear the parms\n pstmt1.setString(1, mship1);\n pstmt1.setString(2, mship2);\n pstmt1.setString(3, mship3);\n pstmt1.executeUpdate();\n\n pstmt1.close(); // close the stmt\n\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster for \" +club+ \", setting mship values: \" + e3.getMessage(); // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.northStarSync: \"; // reset the msg\n }\n\n } // end of IF Bellevue\n*/\n \n }", "public DataMaster(MasterType type) {\n\t\t_type = type;\n\t\tbookMap = new ConcurrentHashMap<>();\n\t\t_cumulativeVolumeTable = new ConcurrentHashMap<>();\n\t\tquoteMap = new ConcurrentHashMap<>();\n\t\tunrecoginzedSymbols = new ConcurrentHashMap<>();\n\t}", "public WebMarket getMarket() {\r\n return market;\r\n }", "public AssetTradeDetail(AssetTradeDetail other) {\n __isset_bitfield = other.__isset_bitfield;\n this.execTradeId = other.execTradeId;\n this.subAccountId = other.subAccountId;\n this.sledContractId = other.sledContractId;\n this.execOrderId = other.execOrderId;\n this.tradePrice = other.tradePrice;\n this.tradeVolume = other.tradeVolume;\n if (other.isSetExecTradeDirection()) {\n this.execTradeDirection = other.execTradeDirection;\n }\n this.createTimestampMs = other.createTimestampMs;\n this.lastmodifyTimestampMs = other.lastmodifyTimestampMs;\n this.sledCommodityId = other.sledCommodityId;\n if (other.isSetConfig()) {\n this.config = new AssetCalculateConfig(other.config);\n }\n this.orderTotalVolume = other.orderTotalVolume;\n this.limitPrice = other.limitPrice;\n if (other.isSetSource()) {\n this.source = other.source;\n }\n this.tradeAccountId = other.tradeAccountId;\n this.tradeTimestampMs = other.tradeTimestampMs;\n this.assetTradeDetailId = other.assetTradeDetailId;\n this.subUserId = other.subUserId;\n if (other.isSetSledOrderId()) {\n this.sledOrderId = other.sledOrderId;\n }\n }", "private LCSRevisableEntity updateRevisableEntry(String reventityVR, String sourceVersion,\n\t\t\tString costsheetVersion,String specVersion, String nrfCode,\n\t\t\tString materialDescription, String source, String costsheet,\n\t\t\tString specName, String IBTINSTOREMONTH, String styleNumber,Collection bomMOAStringColl) throws WTException ,\n\t\t\tWTPropertyVetoException \n\t\t\t{\n\t\t\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry(), this is a Existing entry\");\n\t\n\t\tLCSRevisableEntity existingIBTMaterialRevObj = null;\n\t\tLCSRevisableEntityLogic revisableEntityLogic = new LCSRevisableEntityLogic();\n\n\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry -- >existing Revisable entity Id is found\");\n\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry(),,reventityVR -- \" + reventityVR);\n\n\t\t// get the existing revisable entity object\n\t\texistingIBTMaterialRevObj = (LCSRevisableEntity) LCSQuery\n\t\t\t\t.findObjectById(\"VR:com.lcs.wc.foundation.LCSRevisableEntity:\"\n\t\t\t\t\t\t+ reventityVR);\n\t\t// create a new client model object and load the revisable entity\n\t\t//LCSRevisableEntityClientModel existingentryModel = new LCSRevisableEntityClientModel();\n\t\t// load\n\t\t//existingentryModel.load(FormatHelper.getObjectId(existingentry));\n\t\t//LCSLog.debug(\"existingentry : --\" + existingentry.getValue(\"name\"));\n\t\t// set the value of sourcing config version ID\n\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSOURCINGCONFIG,\n\t\t\t\tsourceVersion);\n\t\t// set the value of costsheet version\n\t\tif (FormatHelper.hasContent(costsheetVersion)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTCOSTSHEET,\n\t\t\t\tcostsheetVersion);\n\t\t}\n\t\t//added for 7.6\n\t\t\n\t\t/*if(strActivity.equalsIgnoreCase(\"PERSIST\")){\n\t\texistingentryModel.setValue(\"lfIBTComments\",\n\t\t\t\t\"PERSIST\");\t\n\t\t}else{\n\t\texistingentryModel.setValue(\"lfIBTComments\",\n\t\t\t\t\"COSTSHEET\");\t*/\n\t\t//if (FormatHelper.hasContent(LFIBTConstants.IBTMATERIALSTATUS)) {\n\t\t//existingentryModel.setValue(LFIBTConstants.IBTMATERIALSTATUS,\n\t\t//\t\t\"Update\");\n\t\t//}\n\t\t//}\n\t\t//added for 7.6\n\t \t//Create BOM MOA Rows..\n\t\t//LFIBTUtil.setBOMMOARows(existingentryModel, \"lfIBTBOMDetails\", bomMOAStringColl, \"update\");\n\t\t\n\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSPECIFICATION, specVersion);\n\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.STAGINSPECNAME, specName);\t\t\n\t\t// set the value of nrf code att\n\t\tif (FormatHelper.hasContent(nrfCode)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTNRFCODE, nrfCode);\n\t\t}\n\n\t\t// update the material description\n\t\tif (FormatHelper.hasContent(materialDescription)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALDESC,\n\t\t\t\t\tmaterialDescription);\n\t\t}\n\t\t// update the source name\n\t\tif (FormatHelper.hasContent(source)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGSOURCENAME,\n\t\t\t\t\tsource);\n\t\t}\n\t\t// update the costsheet name\n\t\tif (FormatHelper.hasContent(costsheet)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGCOSTSHEETNAME,\n\t\t\t\t\tcostsheet);\n\t\t}\n\t\t// Update the In store Month\n\t\tif (FormatHelper.hasContent(IBTINSTOREMONTH)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTINSTOREMONTH,\n\t\t\t\t\tIBTINSTOREMONTH);\n\t\t}\n\n\t\t// Update Style Number\n\t\tif (FormatHelper.hasContent(styleNumber)) {\n\t\t\texistingIBTMaterialRevObj.setValue(LFIBTConstants.IBTSTYLENUMBER,\n\t\t\t\t\tstyleNumber);\n\t\t}\n\n\t\t// update the check box\n\t\t//existingentryModel\n\t\t//\t\t.setValue(LFIBTConstants.IBTUPDATECHECK, Boolean.TRUE);\n\t\t\n\t\tLCSRevisableEntity ibtMaterialRev = (LCSRevisableEntity)revisableEntityLogic.saveRevisableEntity(existingIBTMaterialRevObj);\n\t\t\n\t\tLCSLog.debug(CLASSNAME+\"updateRevisableEntry(), Calling setBOMMOARows()\");\n\t\t\n\t\n\t\tLFIBTUtil.setBOMMOARows(ibtMaterialRev, \"lfIBTBOMDetails\", bomMOAStringColl, \"update\");\n return ibtMaterialRev;\n\t}", "public List<MarketMini> getMarketsList() throws NoSnapshotsInDatabaseException {\n //I don't really like how verbose and ugly this is. Could probably be done better with lambdas maybe?\n //It works and is not expensive in terms of querying the database though, so sticking with it for now.\n Snapshot current = snapshotService.getLatestSnapshot();\n\n List<MarketMini> marketMinis = new ArrayList<>();\n List<ContractMini> contractMinis;\n\n for (int i = 0; i < current.getMarkets().size(); i++) {\n contractMinis = new ArrayList<>();\n for (int j = 0; j < current.getMarkets().get(i).getContracts().size(); j++) {\n ContractMini contractMini = new ContractMini(\n current.getMarkets().get(i).getContracts().get(j).getName(),\n current.getMarkets().get(i).getContracts().get(j).getId());\n contractMinis.add(contractMini);\n }//contractMini list creation loop\n MarketMini marketMini = new MarketMini(\n current.getMarkets().get(i).getName(),\n current.getMarkets().get(i).getId(),\n \"/api/markets/\" + current.getMarkets().get(i).getId(),\n contractMinis\n );\n marketMinis.add(marketMini);\n }//marketMini list creation loop\n return marketMinis;\n }", "public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }", "public void setMarketPrice(BigDecimal marketPrice) {\n this.marketPrice = marketPrice;\n }", "public Market() {\n }", "private void addDownloadJob(TvDataUpdateManager dataBase, Mirror mirror, Date date,\r\n String level, Channel channel, String country,\r\n DayProgramReceiveDH receiveDH, DayProgramUpdateDH updateDH,\r\n SummaryFile remoteSummary, SummaryFile localSummary)\r\n {\n if (remoteSummary == null) {\r\n return;\r\n }\r\n String completeFileName = DayProgramFile.getProgramFileName(date,\r\n country, channel.getId(), level);\r\n File completeFile = null;\r\n\r\n int levelIdx = DayProgramFile.getLevelIndexForId(level);\r\n\r\n\r\n boolean downloadTheWholeDayProgram;\r\n // Check whether we already have data for this day\r\n downloadTheWholeDayProgram = !(dataBase.isDayProgramAvailable(date, channel) && (completeFile = new File(mDataDir, completeFileName)).exists());\r\n if (!downloadTheWholeDayProgram) {\r\n // We have data -> Check whether the mirror has an update\r\n\r\n // Get the version of the file\r\n int localVersion;\r\n try {\r\n localVersion = localSummary.getDayProgramVersion(date, country, channel.getId(), levelIdx);\r\n if (localVersion == -1) {\r\n //not found, look into file itself\r\n if (completeFile == null) {\r\n completeFile = new File(mDataDir, completeFileName);\r\n }\r\n localVersion = DayProgramFile.readVersionFromFile(completeFile);\r\n //directly add it\r\n localSummary.setDayProgramVersion(date, country, channel.getId(), levelIdx, localVersion);\r\n //getChannelGroupById(channel.getGroup().getId()).saveLocalSummary();\r\n }\r\n \r\n if (localVersion == 255) {\r\n downloadTheWholeDayProgram = true;\r\n } else {\r\n\r\n\r\n // Check whether the mirror has a newer version\r\n boolean needsUpdate;\r\n int mirrorVersion = remoteSummary.getDayProgramVersion(date, country,\r\n channel.getId(), levelIdx);\r\n needsUpdate = (mirrorVersion > localVersion);\r\n\r\n\r\n if (needsUpdate) {\r\n // We need an update -> Add an update job\r\n String updateFileName = DayProgramFile.getProgramFileName(date,\r\n country, channel.getId(), level, localVersion);\r\n mDownloadManager.addDownloadJob(mirror.getUrl(),updateFileName, updateDH);\r\n }\r\n }\r\n\r\n } catch (Exception exc) {\r\n// // don't throw an exception; try to download the file again\r\n// throw new TvBrowserException(getClass(), \"error.5\",\r\n// \"Reading version of TV data file failed: {0}\",\r\n// completeFile.getAbsolutePath(), exc);\r\n downloadTheWholeDayProgram = true;\r\n }\r\n\r\n }\r\n\r\n if (downloadTheWholeDayProgram)\r\n {\r\n // We have no data -> Check whether the mirror has\r\n boolean needsUpdate;\r\n int mirrorVersion = remoteSummary.getDayProgramVersion(date, country,\r\n channel.getId(), levelIdx);\r\n needsUpdate = (mirrorVersion != -1);\r\n\r\n if (needsUpdate) {\r\n // We need an receive -> Add a download job\r\n mDownloadManager.addDownloadJob(mirror.getUrl(),completeFileName, receiveDH);\r\n }\r\n }\r\n }", "public void setStatus(MarketStatus status){\n this.status = status;\n }", "public int shareupp(Long comp_id, Long no_share)throws Exception {\n\tint i,j = 0,k = 0;\r\n\tjava.util.Date d=new java.util.Date();\r\n\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\tString s1=sd.format(d);\r\n\ti=DbConnect.getStatement().executeUpdate(\"update share_details set no_share=no_share+\"+no_share+\" where comp_id=\"+comp_id+\" and DATEOFTRANS='\"+s1+\"'\");\r\n\trs=DbConnect.getStatement().executeQuery(\"select * from moreshare where types='bought' and DATEOFTRANS='\"+s1+\"'\");\r\n\tif(rs.next()==true)\r\n\t{\r\n\t\tk=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=no_share+\"+no_share+\" where COMP_ID=\"+comp_id+\" and types='bought' and DATEOFTRANS='\"+s1+\"'\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\tj=DbConnect.getStatement().executeUpdate(\"insert into moreshare values(\"+comp_id+\",\"+no_share+\",'bought','\"+s1+\"')\");\t\r\n\t}\r\n\t\r\n\tSystem.out.println(\"k value\"+k+\"and j value\"+j);\r\nreturn i;\r\n}", "public static void addShare(){\r\n\tMap<String, ShareMarket> allShareDetails = ShareMarketHashMap.getShareMarket();\r\n\tShareMarket addUniqueShare = new ShareMarket();\r\n\tdisplayMap(allShareDetails);\r\n\tSystem.out.println(\"Enter Share Name : \");\r\n\tString shareName = input.next();\r\n\tif(allShareDetails.containsKey(shareName))\t{\r\n\tSystem.out.println(\"This Share is already available, try to add different Share :( .You will be returned to main menu\" +'\\n');\r\n\treturn;\r\n\t}\r\n\telse if(isNumber(shareName)){\r\n\t\tSystem.out.println(\"Share should be alphabets only :( .You will be returned to main menu\" +'\\n');\r\n\t\treturn;\r\n\t}\r\n\tSystem.out.println(\"Enter Share Quantity : \");\r\n\tif(!input.hasNextInt()) {\r\n\t\tSystem.out.println(\"Quantity entered in invalid, it should be a postive number.You will be returned to main menu\" +'\\n');\r\n\t\treturn;\r\n\t}\t\r\n\tint shareQuantity = input.nextInt();\r\n\tSystem.out.println(\"Enter Share Price : \");\r\n\tif(!input.hasNextInt()) {\r\n\t\tSystem.out.println(\"Price entered in invalid, it should be a postive number.You will be returned to main menu\" +'\\n');\r\n\t\treturn;\r\n\t}\t\r\n\tint sharePrice = input.nextInt();\r\n\r\n\taddUniqueShare.setShareName(shareName.trim());\r\n\taddUniqueShare.setShareQuantity(shareQuantity);\r\n\taddUniqueShare.setSharePrice(sharePrice);\r\n\tShareMarketHashMap.addShare(addUniqueShare);\r\n\tMap<String, ShareMarket> shareAfterAdding = ShareMarketHashMap.getShareMarket();\r\n\tSystem.out.println(\"Share Name :\" + shareAfterAdding.get(shareName).getShareName() + ',' + \" Share Price:\" + shareAfterAdding.get(shareName).getSharePrice() + ',' + \" Share Quantity: \" + shareAfterAdding.get(shareName).getShareQuantity());\r\n\tSystem.out.println(\"Successfully added the share\" + '\\n');\r\n}", "public void setData(){\n\t\tif(companyId != null){\t\t\t\n\t\t\tSystemProperty systemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"BUSINESS_TYPE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tbusinessType = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"MAX_INVALID_LOGIN\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tinvalidloginMax = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SKU_GENFLAG\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tautomaticItemCode = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SKU_GENFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tformatItemCode = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"DO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tdeliveryItemNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"STO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tstockOpnameNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"RN_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\treceiptItemNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PLU_GENFLAG\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tautomaticProdCode = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PLU_FORMAT_TYPE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tprodCodeFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tsalesNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SOINV_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tinvoiceNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SORCPT_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\treceiptNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"DEFAULT_TAX_TYPE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tsalesTax = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"DELIVERY_COST\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tdeliveryCost = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tpurchaceNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PINV_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tpurchaceInvoiceNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PAYMENT_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tpaymentNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"TAX_VALUE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\ttaxValue = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t} else {\n\t\t\tbusinessType = null;\n\t\t\tinvalidloginMax = null;\n\t\t\tautomaticItemCode = null;\n\t\t\tformatItemCode = null;\n\t\t\tdeliveryItemNoFormat = null;\n\t\t\tstockOpnameNoFormat = null;\n\t\t\treceiptItemNoFormat = null;\n\t\t\tautomaticProdCode = null;\n\t\t\tprodCodeFormat = null;\n\t\t\tsalesNoFormat = null;\n\t\t\tinvoiceNoFormat = null;\n\t\t\treceiptNoFormat = null;\n\t\t\tsalesTax = null;\n\t\t\tdeliveryCost = null;\n\t\t\tpurchaceNoFormat = null;\n\t\t\tpurchaceInvoiceNoFormat = null;\n\t\t\tpaymentNoFormat = null;\n\t\t\ttaxValue = null;\n\t\t}\n\t}" ]
[ "0.67470956", "0.55073917", "0.54815155", "0.54601693", "0.53475463", "0.5342307", "0.5338234", "0.53290933", "0.5315256", "0.5275719", "0.5253187", "0.5169907", "0.51559716", "0.5096532", "0.5070953", "0.50559354", "0.5042407", "0.503963", "0.5036644", "0.5014479", "0.49994004", "0.49771512", "0.49573657", "0.493835", "0.4934031", "0.49282706", "0.48517406", "0.48448834", "0.48436156", "0.4840608", "0.48318008", "0.48244107", "0.4813472", "0.4773135", "0.4766518", "0.47522414", "0.47405058", "0.4739856", "0.47371837", "0.47319704", "0.47260875", "0.47250304", "0.47130135", "0.46833843", "0.46515968", "0.46427318", "0.4642595", "0.46363282", "0.46349177", "0.4625405", "0.4611976", "0.46115956", "0.46074313", "0.46059415", "0.45975342", "0.45927688", "0.45879495", "0.4585941", "0.45854625", "0.45848894", "0.4578899", "0.45772892", "0.45743376", "0.45664263", "0.45626262", "0.45616794", "0.45596594", "0.45590225", "0.4537747", "0.45188972", "0.4516596", "0.45029098", "0.4497737", "0.44944006", "0.44933236", "0.44925547", "0.44922468", "0.44922453", "0.44909972", "0.44909972", "0.44868836", "0.44835645", "0.44817963", "0.44769818", "0.44760847", "0.4472143", "0.44690323", "0.4459806", "0.44521114", "0.44502473", "0.44463608", "0.44457346", "0.44415364", "0.4439054", "0.4436749", "0.4428783", "0.44267595", "0.4416831", "0.44145545", "0.4393196" ]
0.7115166
0
copyFrom() Accessors and Mutators
public Map<String, MarketData> getMarketData() {return marketData;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Prototype makeCopy();", "Model copy();", "@Override\n public FieldEntity copy()\n {\n return state.copy();\n }", "public void copy() {\n\n\t}", "T copy();", "public abstract INodo copy();", "@Override\n\tprotected void copy(Object source, Object dest) {\n\t\t\n\t}", "public abstract B copy();", "Object clone();", "Object clone();", "Field getCopy();", "static void setCopying(){isCopying=true;}", "public CMObject copyOf();", "public void copy(DataRequest original){\n\t\t//potential problems with object sharing\n\t\tfilters = \toriginal.get_filters();\n\t\tsort_by = \toriginal.get_sort_by();\n\t\tcount = \toriginal.get_count();\n\t\tstart = \toriginal.get_start();\n\t\tsource = \toriginal.get_source();\n\t\tfieldset =\toriginal.get_fieldset();\n\t\trelation = \toriginal.get_relation();\n\t}", "public Object cloner() {\n return cloner((Sommet)origine.cloner(), (Sommet)destination.cloner());\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public Object copy_from(Object src) {\n \n\n TMasterToArms typedSrc = (TMasterToArms) src;\n TMasterToArms typedDst = this;\n\n typedDst.servoId = typedSrc.servoId;\n \n typedDst.servoPositon = typedSrc.servoPositon;\n \n typedDst.servoSpeed = typedSrc.servoSpeed;\n \n return this;\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public Function clone();", "@Override\n public LocalStore<V> copy() {\n return this;\n }", "public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}", "static void setNotCopying(){isCopying=false;}", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public abstract Player freshCopy();", "public void copyFrom(IExportView orig)\n {\n this.copyFrom((SAUAL50S_OA) orig);\n }", "IGLProperty clone();", "public Object copy_from(Object src) {\n\n GuestScienceData typedSrc = (GuestScienceData) src;\n GuestScienceData typedDst = this;\n super.copy_from(typedSrc);\n /** Full name of apk */\n typedDst.apkName = typedSrc.apkName;\n /** Type of data being sent */\n typedDst.type = (rapid.ext.astrobee.GuestScienceDataType) typedDst.type.copy_from(typedSrc.type);\n /** String to classify the kind of data */\n typedDst.topic = typedSrc.topic;\n /** Data from the apk */\n typedDst.data = (rapid.OctetSequence2K) typedDst.data.copy_from(typedSrc.data);\n\n return this;\n }", "public abstract Node copy();", "@Override\n public RawStore copy() {\n return new RawStore(this.toRawCopy2D(), myNumberOfColumns);\n }", "@Override\n public TopicObject copy() {\n return new TopicObject(this);\n }", "public abstract Object clone();", "@Override\r\n\tpublic void copy(Property p) {\n\t\t\r\n\t}", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "Builder copyValues(PropertyBox source);", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException { // semi-copy\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "Buffer copy();", "public static void copyConstructor(){\n\t}", "public void copyFrom(IExportView orig)\n {\n this.copyFrom((SRSLF04S_OA) orig);\n }", "public Object copy_from(Object src) {\n\n BatterySlot typedSrc = (BatterySlot) src;\n BatterySlot typedDst = this;\n\n typedDst.present = typedSrc.present;\n typedDst.charging = typedSrc.charging;\n typedDst.supplyingPower = typedSrc.supplyingPower;\n typedDst.chargePowerPresent = typedSrc.chargePowerPresent;\n typedDst.powerNoGood = typedSrc.powerNoGood;\n typedDst.chargeInhibited = typedSrc.chargeInhibited;\n\n return this;\n }", "Component deepClone();", "public Object clone() {\n return this.copy();\n }", "public O copy() {\n return value();\n }", "public Game copy();", "public void _shallowCopyInternal(SL_Obj fromObjArg) {\n SATableReadCapabilityAttributesExtension fromObj = (SATableReadCapabilityAttributesExtension)fromObjArg;\n super._shallowCopyInternal((SL_Obj)fromObj);\n\n setPreSQL(fromObj.getPreSQL());\n\n setPostSQL(fromObj.getPostSQL());\n\n setRowOffSet(fromObj.getRowOffSet());\n\n setRowLimit(fromObj.getRowLimit());\n }", "public Card copy(){\n return new Card(Suits, Value);\n }", "public abstract Object clone() ;", "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public abstract SoftwareLight copy();", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "public SceneLabelObjectState copy(){\n\n\t\t//get a copy of the generic data from the supertype\n\t\tSceneDivObjectState genericCopy = super.copy(); \n\n\t\t//then generate a copy of this specific data using it (which is easier then specifying all the fields\n\t\t//Separately like we used too)\n\t\tSceneLabelObjectState newObject = new SceneLabelObjectState(\n\t\t\t\tgenericCopy,\n\t\t\t\tObjectsCurrentText,\t\t\n\t\t\t\tCSSname,\n\t\t\t\tcursorVisible,\n\t\t\t\tTypedText,\n\t\t\t\tCustom_Key_Beep,\n\t\t\t\tCustom_Space_Beep);\n\n\t\treturn newObject;\n\n\n\t}", "@Override\n public UserProfile copy() {\n UserProfile userProfile = new UserProfile();\n copyTo(userProfile);\n return userProfile;\n }", "public abstract Pessoa clone();", "IUnit copy();", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "protected Shingle copy() {\n return new Shingle(this);\n }", "@Override\r\n\tpublic Buffer copy() {\n\t\t\r\n\t\treturn null;\r\n\t}", "public HttpParams copy() {\n/* 268 */ return (HttpParams)this;\n/* */ }", "public void copyFrom(final T input) {\n mGx = input.mGx;\n mGy = input.mGy;\n mGz = input.mGz;\n }", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "@Override\r\n\tpublic LogicalValue copy() {\r\n\t\treturn new Pointer(target);\r\n\t}", "public Field copy()\n {\n return new Field(name, type, vis);\n }", "@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n\n return super.clone();\n }", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }", "@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}", "@Override\r\npublic void setNumcopy(int numcopy) {\n\tsuper.setNumcopy(numcopy);\r\n}", "public ProcessedDynamicData deepCopy( ) {\r\n\r\n ProcessedDynamicData copy = new ProcessedDynamicData( this.channelId );\r\n\r\n copy.channelId = this.channelId;\r\n copy.dateTimeStamp = new java.util.Date( this.dateTimeStamp.getTime() );\r\n copy.samplingRate = this.samplingRate;\r\n copy.eu = this.eu;\r\n\r\n copy.min = this.min;\r\n copy.max = this.max;\r\n\r\n copy.measurementType = this.measurementType;\r\n copy.measurementUnit = this.measurementUnit;\r\n\r\n // data and labels\r\n List<Double> dataCopy = new Vector<Double>();\r\n for( int i = 0; i < this.data.size(); i++ ) {\r\n dataCopy.add( new Double( this.data.get( i ) ) );\r\n }\r\n copy.setData( dataCopy );\r\n\r\n List<Double> dataLabels = new Vector<Double>();\r\n for( int i = 0; i < this.dataLabels.size(); i++ ) {\r\n dataLabels.add( new Double( this.dataLabels.get( i ) ) );\r\n }\r\n copy.setDataLabels( dataLabels );\r\n\r\n // create a deep copy of overalls\r\n if( overalls != null ) {\r\n copy.overalls = new OverallLevels( this.overalls.getChannelId() );\r\n copy.overalls.setDateTimeStampMillis( this.getDateTimeStampMillis() );\r\n Vector<String> overallKeys = this.overalls.getKeys();\r\n for( int i = 0; i < overallKeys.size(); i++ ) {\r\n copy.overalls.addOverall( new String( overallKeys.elementAt( i ) ),\r\n new Double( this.overalls.getOverall( overallKeys.elementAt( i ) ) ) );\r\n }\r\n }\r\n\r\n copy.xEUnit = this.xEUnit;\r\n copy.yEUnit = this.yEUnit;\r\n\r\n copy.xSymbol = this.xSymbol;\r\n copy.ySymbol = this.ySymbol;\r\n copy.xPhysDomain = this.xPhysDomain;\r\n copy.yPhysDomain = this.yPhysDomain;\r\n \r\n copy.noOfAppendedZeros = this.noOfAppendedZeros;\r\n\r\n return copy;\r\n }", "public User copy() {\r\n try {\r\n return (User) BeanUtils.cloneBean(this);\r\n } catch (Exception e) {\r\n throw new IllegalStateException(\"Error while copying \" + this, e);\r\n }\r\n }", "@Test\n public void test_Copy() {\n //This tests the method with default values.\n System.out.println(\"Testing MeasuredRatioModel's copy()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n MeasuredRatioModel expectedResult = instance;\n MeasuredRatioModel result = instance.copy();\n assertEquals(expectedResult, result);\n\n //This tests the method with specified values.\n instance=new MeasuredRatioModel(\"hello\",new BigDecimal(\"3.87695\"),\"ABS\",new BigDecimal(\"1.25\"),false,true);\n expectedResult = instance;\n result = instance.copy();\n assertEquals(expectedResult, result);\n }", "public Punch getShallowCopy(){\n Punch p = new Punch();\n p.id = id;\n p.time = time;\n //p.taskId = punchTask.getID();\n return p;\n }", "default <S, D> D copy(S src, D dist) {\n BeanUtils.copyProperties(src, dist);\n return dist;\n }", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\n public void copyValues(final fr.jmmc.oiexplorer.core.model.OIBase other) {\n final View view = (View) other;\n\n // copy type, subsetDefinition (reference):\n this.type = view.getType();\n this.subsetDefinition = view.getSubsetDefinition();\n }", "public abstract Pattern copy();", "public JsonMember copy() {\n return new JsonMember(name, value.copy());\n }", "private ImmutablePerson(ImmutablePerson other) {\n firstName = other.firstName;\n middleName = other.middleName;\n lastName = other.lastName;\n nickNames = new ArrayList<>(other.nickNames);\n }", "public Card makeCopy(){\n return new Card(vimage);\n }", "protected T copy() {\n\n // Initialize.\n T copy = null;\n\n try {\n\n // Create an instance of this entity class.\n copy = this.entityClass.newInstance();\n\n // Create a copy.\n copy.setCreateTime(this.getCreateTime());\n copy.setId(this.getId());\n copy.setModifyTime(this.getModifyTime());\n }\n catch (IllegalAccessException e) {\n // Ignore.\n }\n catch (InstantiationException e) {\n // Ignore.\n }\n\n return copy;\n }", "Nda<V> shallowCopy();", "protected AbstractChartModel copy(AbstractChartModel aCopy) {\n aCopy.title = title;\n aCopy.xAxisTitle = xAxisTitle;\n aCopy.yAxisTitle = yAxisTitle;\n aCopy.xRangeMax = xRangeMax;\n aCopy.xRangeMin = xRangeMin;\n aCopy.xRangeIncr = xRangeIncr;\n aCopy.yRangeMax = yRangeMax;\n aCopy.yRangeMin = yRangeMin;\n aCopy.yRangeIncr = yRangeIncr;\n aCopy.simModel = simModel;\n ArrayList list = new ArrayList();\n for (int i = 0, n = dataSources.size(); i < n; i++) {\n GuiChartDataSource ds = (GuiChartDataSource) dataSources.get(i);\n list.add(ds.copy());\n }\n aCopy.dataSources = list;\n\n return aCopy;\n }", "@Override\n\tpublic Object deepCopy() {\n\t\tfinal UIAnimationMutable clone = new UIAnimationMutable(getName(), events.size(), controllers.size());\n\t\tfor (int i = 0, len = controllers.size(); i < len; ++i) {\n\t\t\tclone.controllers.add((UIController) controllers.get(i).deepCopy());\n\t\t}\n\t\tfor (int i = 0, len = events.size(); i < len; ++i) {\n\t\t\tfinal UIAttribute p = events.get(i);\n\t\t\tclone.events.add((UIAttribute) p.deepCopy());\n\t\t}\n\t\tclone.nextEventsAdditionShouldOverride = nextEventsAdditionShouldOverride;\n\t\tif (driver != null) {\n\t\t\tclone.driver = (UIAttribute) driver.deepCopy();\n\t\t}\n\t\treturn clone;\n\t}", "public Object copy_from(Object src) {\n\n PositionConfig typedSrc = (PositionConfig) src;\n PositionConfig typedDst = this;\n super.copy_from(typedSrc);\n /** Denotes the frame that position is given in. This frame should exist in the frame store. */\n /** Denotes the frame of the position. This frame should exist in the frame store. */\n typedDst.frameName = typedSrc.frameName;\n /**\n * Specifies the interpretation of the rotation field in PositionSample.pose\n * @see RotationEncoding\n */\n typedDst.poseEncoding = (rapid.RotationEncoding) typedDst.poseEncoding.copy_from(typedSrc.poseEncoding);\n /**\n * Specifies the interpretation of the rotation field in PositionSample.velocity\n * @see RotationEncoding\n */\n typedDst.velocityEncoding = (rapid.RotationEncoding) typedDst.velocityEncoding.copy_from(typedSrc.velocityEncoding);\n /** Holds extra Agent-specific information about position samples. */\n typedDst.valueKeys = (rapid.KeyTypeValueSequence64) typedDst.valueKeys.copy_from(typedSrc.valueKeys);\n\n return this;\n }", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "public abstract State clone();", "@Override\n public User clone(){\n return new User(this);\n }", "DataSource clone();", "@Override\n\tpublic SecuredRDFList copy();", "@Override\n public ChatReceivePacket copy() {\n return new ChatReceivePacket(this);\n }", "@Override\n protected Currency clone() {\n final Currency currency = new Currency();\n if (data != null) {\n currency.data = data.clone();\n }\n return currency;\n\n }", "@Override\n public weighted_graph copy() {\n weighted_graph copy = new WGraph_DS(this.ga);//create the copy graph via copy constructor\n return copy;\n }", "Nda<V> deepCopy();", "public INodo copy(){\n INodo copia = new FuncionMultiplicacion(getRaiz(), getNHijos());\n copia.setEtiqueta(getEtiqueta());\n for (INodo aux : getDescendientes()){\n copia.incluirDescendiente(aux.copy());\n }\n return copia;\n }" ]
[ "0.74207103", "0.7096784", "0.7094994", "0.70768625", "0.6974787", "0.69090015", "0.6875966", "0.6820104", "0.67882955", "0.67882955", "0.6777552", "0.6743169", "0.6724414", "0.66738826", "0.66270244", "0.658274", "0.6580536", "0.6558434", "0.6532793", "0.64858705", "0.6478879", "0.64359915", "0.6429506", "0.6410173", "0.64029545", "0.64029545", "0.64029545", "0.64029545", "0.639981", "0.6381276", "0.6377266", "0.6376383", "0.63521403", "0.6328647", "0.63083917", "0.629025", "0.6285359", "0.62827", "0.6279868", "0.62574273", "0.62516314", "0.6248889", "0.62380594", "0.6234983", "0.6234649", "0.6232062", "0.6225728", "0.62151504", "0.62151194", "0.62087405", "0.6205436", "0.6199994", "0.6192071", "0.6191035", "0.616366", "0.6162435", "0.6153199", "0.6152492", "0.61478525", "0.61458135", "0.6140814", "0.6133677", "0.61249024", "0.6122268", "0.6112145", "0.6098358", "0.6096785", "0.60925704", "0.6086327", "0.6084954", "0.606889", "0.6057551", "0.60557634", "0.60500956", "0.6048865", "0.6046813", "0.6045497", "0.6043156", "0.6042325", "0.6042325", "0.6042325", "0.6030332", "0.60232776", "0.6011078", "0.60103893", "0.60047436", "0.5998917", "0.5994379", "0.5993865", "0.5989604", "0.5989587", "0.5987697", "0.598263", "0.59800035", "0.5974296", "0.5971812", "0.59686345", "0.59586054", "0.59542185", "0.5950873", "0.59502536" ]
0.0
-1
Returns the current score.
public int getScore() { return score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCurrentScore() {\n return currentScore;\n }", "public int getScore() {\n return currentScore;\n }", "public int getScore()\n {\n return currentScore;\n }", "public int score() {\n return score;\n }", "public static int getScore()\n {\n return score;\n }", "public static int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public static int getScore()\n\t{\n\t\treturn score;\n\t}", "public int getScore() {\n return getStat(score);\n }", "public int getScore() {\n\t\treturn (score);\n\t}", "public final int getScore() {\n\t\treturn score;\n\t}", "public java.lang.Integer getScore () {\r\n\t\treturn score;\r\n\t}", "public long getScore() {\n return score_;\n }", "public long getScore() {\n return score_;\n }", "public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public double getScore() {\n\t\t\treturn this.score;\n\t\t}", "public long getScore() {\n return score_;\n }", "public long getScore() {\n return score_;\n }", "public double getScore() {\r\n return score;\r\n }", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\n return score;\n }", "public int getScore() {\n return score;\n }", "public int getScore() {\n return score;\n }", "@Override\r\n\tpublic double getScore() {\n\t\treturn score;\r\n\t}", "public double getScore() {\r\n return mScore;\r\n }", "public static int getScore(){\n return score;\n }", "public float getScore() {\r\n\t\treturn score;\r\n\t}", "public int getScore() {\r\n \treturn score;\r\n }", "public Integer getScore() {\n return score;\n }", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public float getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n return this.score;\n }", "public float getScore() {\n return score;\n }", "public Integer getScore() {\r\n return score;\r\n }", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public int getScore ()\r\n {\r\n\treturn score;\r\n }", "public int getScore(){\n\t\treturn score;\n\t}", "public int getScore(){\n\t\treturn score;\n\t}", "public int getScore()\n\t{\n\t\treturn this.score;\n\t}", "Float getScore();", "public Double getScore() {\n return this.score;\n }", "public Double getScore() {\n return this.score;\n }", "@Override\r\n\tpublic double getScore() \r\n\t{\r\n\t\treturn this._totalScore;\r\n\t}", "public int getScore()\n {\n return score;\n }", "public int getScore(){\n\t\treturn this.score;\n\t}", "public int getScore(){\n\t\treturn this.score;\n\t}", "public int getScore() {\n\t\treturn this.ScoreValue;\n\t}", "float getScore();", "float getScore();", "@Override\n public int getScore() {\n return totalScore;\n }", "public Score getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn this.score;\n\t}", "@Override\n public int getScore() {\n return score;\n }", "public int getScore()\n {\n int score;\n if (this.isFinal())\n score = 1;\n else\n score = 0;\n return score;\n }", "public int getScore () {\n return mScore;\n }", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "public int getScore() { return score; }", "int getScore();", "public Float getScore() {\n return score;\n }", "public java.lang.Float getScore () {\n\t\treturn score;\n\t}", "public Long getScore() {\n return score;\n }", "public int getTotalScore() {\r\n return totalScore;\r\n }", "int getScore() {\n return score;\n }", "int getScoreValue();", "public int getScore() {return score;}", "public Double getTotalScore() {\n return totalScore;\n }", "public abstract float getScore();", "public int totalScore() {\n return 0;\n }", "public int getScore(){\n\t\treturn playerScore;\n\t}", "public int getScore()\n\t{\n\t\tif (containsAce() && score < 11)\n\t\t\treturn score + 10;\n\t\t\t\n\t\treturn score;\n\t}", "@Override\n\tpublic double getTotalScore() {\n\t\treturn score;\n\t}", "public int score() {\n return hand.handVal(0);\n }", "public int getTotalScore(){\r\n return totalScore;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getScore();", "public int getScore()\n {\n // put your code here\n return score;\n }", "public int getScore()\n {\n return points + extras;\n }", "public int getTotalScore(){\n return totalScore;\n }", "public double getScore() {\n return score - penalty;\n }", "public int getScore(){\n \treturn 100;\n }", "public double getTotalScore() {\n\t return this.totalScore;\n\t }", "public int getScoreInt() {\n return scoreInt;\n }", "public int getScore(){\n return this.score;\n }", "public Score getScore()\r\n { \r\n return theScore;\r\n }", "public int getScore() {\r\n\t\treturn deck.getScore() + extraVictory;\r\n\t}", "public int getRoundScore() {\n return score;\n }", "public int score()\n {\n if (this.score != Integer.MIN_VALUE)\n return this.score;\n\n this.score = 0;\n if (!this.safe)\n return 0;\n\n // End game bonus\n int bonus = this.d.size() * Math.max(0, (this.L - 3 * this.b.shots)) * 3;\n this.score = (this.d.size() * 100) + ((this.NE - this.e.size()) * 10) + (this.e.size() == 0 ? bonus : 0);\n\n // value:\n return this.score;\n }", "public int getPlayerScore();", "public String getScore() {\n String scoreMessage;\n if (noWinner() && !(isDeuce())) {\n scoreMessage = (isTie()) ? gameTie() : currentScore();\n }else if (isDeuce()){\n scoreMessage = \"Deuce\";\n }else {\n scoreMessage = advanceGame();\n }\n return scoreMessage;\n }" ]
[ "0.89262706", "0.8732439", "0.8681102", "0.84959424", "0.84630144", "0.84338367", "0.8414644", "0.8379818", "0.83346415", "0.83278596", "0.83115244", "0.82886237", "0.82886237", "0.82763505", "0.82763505", "0.8275038", "0.82474995", "0.82474995", "0.823886", "0.8230509", "0.8230509", "0.8230509", "0.82230854", "0.82230854", "0.82156456", "0.8203388", "0.8179823", "0.81719375", "0.8167877", "0.81677145", "0.8163043", "0.8153625", "0.8153625", "0.8153625", "0.8153625", "0.8153625", "0.8153625", "0.81527203", "0.81514364", "0.8146572", "0.8145284", "0.8142912", "0.8142912", "0.8131674", "0.81262827", "0.81262827", "0.8110285", "0.80961555", "0.809468", "0.809468", "0.8090944", "0.80871326", "0.80860716", "0.80860716", "0.8074366", "0.80603224", "0.80603224", "0.80594075", "0.8053287", "0.8053131", "0.8048368", "0.80368817", "0.8028753", "0.7988735", "0.7988735", "0.7988735", "0.7988735", "0.7972308", "0.79659516", "0.79639006", "0.79560226", "0.79088527", "0.78913707", "0.78841466", "0.7845201", "0.78098935", "0.7792257", "0.7775655", "0.7774534", "0.7772449", "0.7754224", "0.7730364", "0.7729", "0.7720956", "0.77028257", "0.7691461", "0.768508", "0.7669862", "0.764548", "0.7643793", "0.7619824", "0.7614454", "0.76132774", "0.75698495", "0.75380236", "0.750987", "0.74788797", "0.7475283", "0.7460685" ]
0.820525
26
Returns whether or not the game is finished.
public boolean getGameFinished() { return gameFinished; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isFinished() {\n\t\tif (gameSituation == UNFINISHED) {\n\t\t\treturn false;\n\t\t} // Of if\n\n\t\treturn true;\n\t}", "public boolean isGameFinished() {\r\n return gameFinished;\r\n }", "public boolean isGameFinished() {\n if (listaJogadores.size() - listaJogadoresFalidos.size() == 1) {\n return true;\n } else {\n return false;\n }\n\n }", "protected abstract boolean isGameFinished();", "protected boolean isFinished() {\n\t\treturn isFinished;\n\t}", "boolean isGameComplete();", "boolean isFinished() {\n\t\tif (this.currentRoom.isExit() && this.currentRoom.getMonsters().isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n \t}else {\n \t\t\n \t\treturn false;\n \t}\n }", "public boolean hasEnded(){\r\n\t\treturn state == GameState.FINISHED;\r\n\t}", "protected boolean isFinished() {\n return finished;\n }", "protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }", "protected boolean isFinished() {\r\n if (state == STATE_SUCCESS) {\r\n // Success\r\n return true;\r\n }\r\n if (state == STATE_FAILURE) {\r\n // Failure\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean isFinished() { \n // Check how much time has passed\n int passedTime = millis()- savedTime;\n if (passedTime > totalTime) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isFinished() {\n\t\treturn (finished);\n\t}", "protected boolean isFinished() {\n if (waitForMovement) return (timeSinceInitialized() > Robot.intake.HOPPER_DELAY);\n return true;\n }", "protected boolean isFinished() {\n return isFinished;\n }", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\tif (_timesRumbled == 40) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean isFinished()\n\t{\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }", "protected boolean isFinished() {\n return (timeRunning>timeStarted+5 || RobotMap.inPosition.get()!=OI.shooterArmed);\n }", "public boolean isFinished() {\n return true;\n }", "public static boolean isGameFinished() {\n return mafiaIsWinner() || citizenIsWinner();\n }", "protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }", "public boolean isFinished() {\n\t\treturn finished;\n\t}", "public boolean isFinished() {\n\t\treturn finished;\n\t}", "protected boolean isFinished() {\n return System.currentTimeMillis() - timeStarted >= timeToGo;\n }", "protected boolean isFinished() {\r\n\t \treturn (timeSinceInitialized() > .25) && (Math.abs(RobotMap.armarm_talon.getClosedLoopError()) < ARM_END_COMMAND_DIFFERENCE_VALUE); //TODO:\r\n\t }", "@Override\r\n\tpublic boolean isFinished() {\n\t\treturn finish;\r\n\t}", "public boolean isFinished(){\n return animation.isAnimationFinished(stateTime);\n }", "protected boolean isFinished() {\n \tif(timeSinceInitialized() >= 1.75){\n \t\treturn true;\n \t}\n return false;\n }", "public boolean finished() {\n \t\treturn isFinished;\n \t}", "public boolean isFinished() {\r\n\t\t\treturn tIsFinished;\r\n\t\t}", "public boolean isFinished() {\n return finished;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "@Override\n\tpublic boolean isFinished() {\n\t\treturn (this.timeRemaining == 0);\n\t}", "public boolean isFinished() {\n return isFinished;\n }", "@Override\n\tpublic boolean isFinished() {\n\t\treturn finished;\n\t}", "public boolean isFinished() {\n\t\tif (getRemaining() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn pid.onTarget();\n\t}", "public boolean isFinished(){\n return true;\n }", "protected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n return (System.currentTimeMillis() - startTime) >= time;\n \t//return false;\n }", "public boolean isFinished();", "protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}", "Boolean isFinished();", "protected boolean isFinished() {\n \t//ends \n \treturn isTimedOut();\n }", "public boolean isFinished() {\r\n\t\treturn this.finished;\r\n\t}", "@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}", "protected boolean isFinished() {\n\t\treturn false;\r\n\t}", "public void finishGame() {\r\n gameFinished = true;\r\n }", "public boolean gameEnd(){\r\n return !hasMovements(model.getCurrentPlayer().getColor());\r\n }", "protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }", "@Override\n public boolean isCompleted() {\n return time.secondsPassed==finishLevel;\n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn (System.currentTimeMillis() > Endtime);\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn Robot.elevator.isInPosition(newPosition, direction);\n\t}", "protected boolean isFinished() {\n return Robot.claw.isRetracted();\n }", "private void gameFinished() {\n\n\t\tisFinished = true;\n\t\touter: for (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\tif (!(tileArr[x][y].isOpened() || (tileArr[x][y].hasBomb() && tileArr[x][y]\n\t\t\t\t\t\t.hasFlag()))) {\n\t\t\t\t\tisFinished = false;\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean isFinished() {\n\t\t\n\t\treturn drivetrain.angleReachedTarget();\n\n\t}", "protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }", "public boolean isFinished() {\n\t\tif ((player1_moves | player2_moves) == COMPLETE) {\n\t\t\tfinished = true;\n\t\t\tcurrentPlayer = '\\0';\n\t\t}\n\t\tfor (int i : winning_cases) {\n\t\t\tif ((player1_moves & i) == i) {\n\t\t\t\twinner = 'X';\n\t\t\t\tfinished = true;\n\t\t\t} else if ((player2_moves & i) == i) {\n\t\t\t\twinner = 'O';\n\t\t\t\tfinished = true;\n\t\t\t}\n\t\t}\n\t\treturn finished;\n\t}", "protected boolean isFinished() {\n \tif(Robot.oi.btnIdle.get()) {\n \t\treturn CommandUtils.stateChange(this, new Idle());\n \t}\n\n \tif( Robot.oi.btnShoot.get()) {\n \t\treturn CommandUtils.stateChange(this, new Shooting()); \n \t}\n \t\n \tif(Robot.oi.btnUnjam.get()){\n \t\treturn CommandUtils.stateChange(this, new Unjam());\n \t}\n return false;\n }", "public boolean wasFinished()\n {\n return this.isFinished;\n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn done; \n\t}", "public boolean hasFinished()\r\n {\r\n return (timer.hasTimePassed());\r\n }", "public final boolean isFinish() {\n return finish;\n }", "protected boolean isFinished()\n\t{\n\t\treturn !Robot.oi.respoolWinch.get();\n\t}", "boolean isFinished();", "protected boolean isFinished() {\n \tif (moving) return Robot.armPiston.getMajor() != PistonPositions.Moving; /* && Robot.armPiston.getMinor() != PistonPositions.Moving; */\n \treturn true;\n }", "protected boolean isFinished(){\r\n return true;\r\n }", "protected boolean isFinished() {\n\treturn this.isDone;\n }", "protected boolean isFinished() {\n //return !RobotMap.TOTE_SWITCH.get();\n \treturn false;\n }", "public boolean isfinished() {\n\t\treturn isFinished;\n\t}", "protected boolean isFinished() {\n\t\treturn isTimedOut();\n\t}", "public boolean isFinished(){\n return this.finished;\n }", "protected boolean isFinished() {\n //\tif(OI.joystickOne.getPOV() == 180){\n \t\t//return true;\n \t//\n \t\t\t\n return false;\n }", "protected boolean isFinished() {\n \t//System.out.println(\"FINISHED\");\n \tif(sizeArray.length>0)\n \t\treturn sizeArray[0]>targetSize;\n else\n \treturn noBubbles;\n \t\n \t\n }", "public final boolean isFinish() {\n return finish;\n }", "protected boolean isFinished() {\n\t\t// get the current angle from the gyro\n\t\tdouble currentAngle = Robot.gyroSubsystem.GyroPosition();\n\n\t\t// see if we are within 2 degrees of the target angle (90 degrees)\n\t\tif (Math.abs(currentAngle - 90) <= 2) {\n\t\t\t// we have hit our goal of 90, end auto program\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// we are not quite there yet, keep going\n\t\t\treturn false;\n\t\t}\n\n\t}", "public boolean isFinished() {\n Figure[] figures = this.getFigures();\n for (Figure figure : figures) {\n if (this.map.isFigureInHome(figure) == -1) {\n return false;\n }\n }\n\n return true;\n }", "protected boolean isFinished() {\n \t// wait for a time out\n return false;\n }", "protected boolean isFinished() {\n return Robot.m_elevator.onTarget();\n }", "protected boolean isFinished() {\n\t\treturn Robot.oi.ds.isAutonomous();\n\t}", "public boolean isDone() {\r\n\t\tint count = 0;\r\n\t\t//Checks the movieGuess array for '_' characters. If there are none we can safely assume the player has finished.\r\n\t\tfor(int x = 0; x < movieGuess.length; x++) {\r\n\t\t\tif(movieGuess[x] == '_')\t{\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//used a counter to avoid premature (i.e., before finishing the array traversal) true or false.\r\n\t\tif(count > 0)\r\n\t\t\treturn false;\t\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "protected boolean isFinished() {\n return false;\n \n }", "@Override\n public boolean isFinished() {\n if (numBalls == -1) {\n return false;\n } else {\n return ballsShot >= numBalls;\n }\n }", "public boolean isFinished() {\n\t\t// the word is guessed out only when the unrevealedSlots is 0\n\t\tif (this.unrevealedSlots == 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.86862504", "0.85610694", "0.8257651", "0.8185926", "0.8135071", "0.8127423", "0.81132734", "0.8109238", "0.8092172", "0.8081357", "0.80795246", "0.80674946", "0.80422056", "0.7989312", "0.7980698", "0.7974845", "0.797147", "0.797147", "0.797147", "0.7969829", "0.7964003", "0.7956793", "0.7941105", "0.79394466", "0.7939211", "0.79336065", "0.7932115", "0.7932115", "0.7917862", "0.7908219", "0.7903833", "0.78768003", "0.786407", "0.7860636", "0.7849273", "0.7844092", "0.78417736", "0.78417736", "0.78417736", "0.78417736", "0.78417736", "0.78417736", "0.7841766", "0.7828493", "0.782245", "0.78187776", "0.7813206", "0.7808297", "0.78054357", "0.7796316", "0.77864033", "0.7784473", "0.77499574", "0.77470946", "0.7743203", "0.7741577", "0.7738622", "0.7734307", "0.77287203", "0.77283096", "0.7727638", "0.7725036", "0.7724488", "0.7724488", "0.7724488", "0.7724488", "0.7724488", "0.7724488", "0.7721903", "0.7719638", "0.771896", "0.7705923", "0.77020186", "0.7682214", "0.76814353", "0.7679167", "0.7670515", "0.7669728", "0.7646454", "0.7645453", "0.7644784", "0.76442146", "0.764352", "0.76369", "0.7635825", "0.7632733", "0.76314557", "0.7629374", "0.7626448", "0.7620377", "0.7618403", "0.761581", "0.76122487", "0.76055545", "0.7605291", "0.75858384", "0.7580463", "0.7580143", "0.7577249", "0.7570009" ]
0.8167034
4
Toggles the state of the game being finished or not.
public void toggleGameFinished() { setGameFinished(!gameFinished); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "public void finishGame() {\r\n gameFinished = true;\r\n }", "public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }", "protected boolean isFinished() {\n \tif(Robot.oi.btnIdle.get()) {\n \t\treturn CommandUtils.stateChange(this, new Idle());\n \t}\n\n \tif( Robot.oi.btnShoot.get()) {\n \t\treturn CommandUtils.stateChange(this, new Shooting()); \n \t}\n \t\n \tif(Robot.oi.btnUnjam.get()){\n \t\treturn CommandUtils.stateChange(this, new Unjam());\n \t}\n return false;\n }", "protected abstract boolean isGameFinished();", "protected boolean isFinished() {\n //return !RobotMap.TOTE_SWITCH.get();\n \treturn false;\n }", "private void gameFinished() {\n\n\t\tisFinished = true;\n\t\touter: for (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\tif (!(tileArr[x][y].isOpened() || (tileArr[x][y].hasBomb() && tileArr[x][y]\n\t\t\t\t\t\t.hasFlag()))) {\n\t\t\t\t\tisFinished = false;\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void lose() {\n status.setText(\"You're finished\");\n gamegoing = false;\n }", "boolean isGameComplete();", "public boolean isFinished() {\n\t\tif (gameSituation == UNFINISHED) {\n\t\t\treturn false;\n\t\t} // Of if\n\n\t\treturn true;\n\t}", "public void toggleDone() {\n this.done = !this.done;\n }", "public void finish(){\n\t\tnotfinish = false;\n\t}", "void finishSwitching();", "public void setIsCompletingGame(boolean state)\r\n {\r\n this.isCompletingGame= state; \r\n }", "public void setEndOfGame(boolean state) {\n this.endOfGame = state;\n }", "protected boolean isFinished() {\n return false;\n \n }", "protected boolean isFinished(){\r\n return true;\r\n }", "public synchronized void setEndGame() {\n this.endGame = true;\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "protected boolean isFinished() {\n\t\tif(switchSide) {\n\t\t\treturn !launchCubeSwitch.isRunning() && state == 4;\n\t\t}\n\t\telse if(scaleSide) {\n\t\t\treturn !launchCubeScale.isRunning() && state == 4;\n\t\t}\n\t\telse {\n\t\t\treturn !crossLine.isRunning() && timer.get() > 1;\n\t\t}\n\t}", "protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n \t}else {\n \t\t\n \t\treturn false;\n \t}\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "public boolean isGameFinished() {\r\n return gameFinished;\r\n }", "private void gameTimerOnFinish() {\n if (currentScreenGameState == GameState.PLAYING) {\n stopGame();\n }\n }", "public boolean isFinished(){\n return animation.isAnimationFinished(stateTime);\n }", "public void pauseToggle() {\r\n if(gameState == 1) {\r\n gameState = 0;\r\n }\r\n else gameState = 1;\r\n }", "public boolean hasEnded(){\r\n\t\treturn state == GameState.FINISHED;\r\n\t}", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n\t\treturn Robot.gearIntake.getPegSwitch();\n\t}", "protected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\n public void setFinished() {\n if (finished > 0) {\n return;\n }\n\n // A mine has been opened (lose game)\n int openMines = (int) cells.stream().flatMap(Collection::stream)\n .filter(c -> c.isOpen() && c.isMine()).count();\n if (openMines > 0) {\n finished = 2;\n alertListeners(GameChangeType.LOSE);\n return;\n }\n\n // The board has been revealed (win game)\n int openCells = (int) cells.stream().flatMap(Collection::stream)\n .filter(c -> c.isOpen() && !c.isMine() && c.getCellState() != CellState.MINE3).count();\n if (openCells == (dims.getX() * dims.getY() - numMines)) {\n finished = 1;\n alertListeners(GameChangeType.WIN);\n return;\n }\n\n // Nothing so far, not finished\n finished = 0;\n }", "public boolean actionCompleted() {\n return !mAttacking;\n }", "protected boolean isFinished() {\r\n\treturn false;\r\n }", "void gameFinished();", "public boolean isFinished () {\n return false;\n }", "protected boolean isFinished() {\n return System.currentTimeMillis() - timeStarted >= timeToGo;\n }", "boolean endOfGame() {\n return false;\n }", "protected boolean isFinished() {\n //\tif(OI.joystickOne.getPOV() == 180){\n \t\t//return true;\n \t//\n \t\t\t\n return false;\n }", "boolean CanFinishTurn();", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }", "public boolean isFinished(){\n return true;\n }", "void finishTurn();", "public void startGame() {\n status = Status.COMPLETE;\n }", "protected boolean isFinished() {\n //return controller.onTarget();\n return true;\n }", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "@Override\n public boolean isCompleted() {\n return time.secondsPassed==finishLevel;\n }", "public static void end() {\n\t\tif(firstTime)\r\n\t\t\tfirstTime=false;\r\n\t\tif (over) {\r\n\t\t\treset();\r\n\t\t\tover = false;\r\n\t\t}\r\n\t\tGUI.panel.changeGame();\r\n\t}", "protected boolean isFinished() {\r\n \tif (manipulator.isHighSwitchPressed() && speed > 0 ||\r\n \t\tmanipulator.isLowSwitchPressed() && speed < 0)\r\n \t\treturn true;\r\n \t\r\n \treturn isTimedOut();\r\n \t\r\n// \tif (targetHeight > startHeight) {\r\n// \t\treturn manipulator.getAverageElevatorHeight() >= targetHeight;\r\n// \t} else {\r\n// \t\treturn manipulator.getAverageElevatorHeight() <= targetHeight;\r\n// \t}\r\n }", "@Override\n protected boolean isFinished() {\n SmartDashboard.putNumber(\"TurnCommand Current Heading\", Robot.m_drivetrain.getAngle());\n SmartDashboard.putNumber(\"TurnCommand Target\", Start + TurnGoal);\n if (IsLeft) {\n return Robot.m_drivetrain.getAngle() <= Start + TurnGoal;\n } else {\n return Robot.m_drivetrain.getAngle() >= Start + TurnGoal;\n }\n }", "protected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "public boolean gameEnd(){\r\n return !hasMovements(model.getCurrentPlayer().getColor());\r\n }", "protected boolean isFinished()\n\t{\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean isFinished() {\n\t\treturn finish;\r\n\t}", "public void finish(boolean b) {\n\t\tisFinished = b;\n\t}", "@Override\n protected boolean isFinished() {\n return isFinished;\n }", "protected boolean isFinished() {\n return shooterWheel.shooterWheelSpeedControllerAft.isEnabled() == false;\n }", "protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }" ]
[ "0.7543381", "0.75397056", "0.710677", "0.7085921", "0.70179963", "0.6974518", "0.6898763", "0.68950063", "0.6871232", "0.6828326", "0.6797904", "0.67830825", "0.66943175", "0.66917294", "0.6691255", "0.66737443", "0.66712093", "0.6647206", "0.6637403", "0.6637403", "0.66323787", "0.66231245", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.6603757", "0.65905046", "0.6585074", "0.6570314", "0.65571874", "0.6554615", "0.65503156", "0.65503156", "0.65503156", "0.65503156", "0.65503156", "0.65503156", "0.6533958", "0.6519655", "0.65095854", "0.6508625", "0.6508578", "0.64959776", "0.6495169", "0.64854765", "0.6485391", "0.6476966", "0.64685994", "0.64682597", "0.64682597", "0.64682597", "0.64682597", "0.64682597", "0.64682597", "0.64662373", "0.64657897", "0.645312", "0.6437268", "0.6432334", "0.6425312", "0.6425312", "0.6425312", "0.6421955", "0.6421363", "0.64157826", "0.63919073", "0.638692", "0.6378602", "0.6376105", "0.63752556", "0.63729036", "0.6369484", "0.636925", "0.6368665" ]
0.8606925
0
iv_left = (RelativeLayout) findViewById(R.id.iv_left);
private void initViews() { root = (LinearLayout) findViewById(R.id.root); ll = (LinearLayout) findViewById(R.id.ll); View view = View.inflate(this, R.layout.head_city_list, null); mGridView = (GridView) view.findViewById(R.id.id_gv_remen); gvAdapter = new MyGridViewAdapter(this, mReMenCitys); mGridView.setAdapter(gvAdapter); mGridView.setSelector(new ColorDrawable(Color.TRANSPARENT)); //实例化汉字转拼音类 characterParser = CharacterParser.getInstance(); pinyinComparator = new PinyinComparator(); sideBar = (SideBar) findViewById(R.id.sidrbar); dialog = (TextView) findViewById(R.id.dialog); sideBar.setTextView(dialog); toolbar = (Toolbar) findViewById(R.id.toolbar); initToolBar(toolbar); setTitle("车站选择"); //设置右侧触摸监听 sideBar.setOnTouchingLetterChangedListener(s -> { //该字母首次出现的位置 int position = adapter.getPositionForSection(s.charAt(0)); if (position != -1) { sortListView.setSelection(position); } }); sortListView = (ListView) findViewById(R.id.country_lvcountry); sortListView.addHeaderView(view); sortListView.setOnItemClickListener((parent, view1, position, id) -> { //Log.w("haha",id+""); //这里要利用adapter.getItem(position)来获取当前position所对应的对象 //Toast.makeText(getApplication(), ((SortModel)adapter.getItem(position-1)).getName(), Toast.LENGTH_SHORT).show(); hideSoftInput(mClearEditText.getWindowToken()); String cityName = ((SortModel) adapter.getItem(position - 1)).getName(); RxBus.getDefault().post(new addressEvent(cityName, isFrom)); /*Intent data = new Intent(); data.putExtra("cityName", ((SortModel)adapter.getItem(position-1)).getName());*/ // setResult(1110, data); CitySelecterActivity.this.finish(); //Log.w("haha",((SortModel)adapter.getItem(position-1)).getName()); }); // SourceDateList = filledData(getResources().getStringArray(R.array.date)); SourceDateList = filledData(provinceList); // 根据a-z进行排序源数据 Collections.sort(SourceDateList, pinyinComparator); adapter = new SortAdapter(this, SourceDateList); sortListView.setAdapter(adapter); mClearEditText = (ClearEditText) findViewById(R.id.filter_edit); //根据输入框输入值的改变来过滤搜索 mClearEditText.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { //当输入框里面的值为空,更新为原来的列表,否则为过滤数据列表 filterData(s.toString()); } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void afterTextChanged(Editable s) { } }); /*iv_left.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { hideSoftInput(mClearEditText.getWindowToken()); CitySelecterActivity.this.finish(); } });*/ mGridView.setOnItemClickListener((parent, view12, position, id) -> { String cityName = mReMenCitys.get(position).getName(); hideSoftInput(mClearEditText.getWindowToken()); RxBus.getDefault().post(new addressEvent(cityName, isFrom)); this.finish(); // String cityName = mReMenCitys.get(position).getName(); // hideSoftInput(mClearEditText.getWindowToken()); // Intent data = new Intent(); // data.putExtra("cityName", cityName); // setResult(1110, data); // CitySelecterActivity.this.finish(); }); sortListView.setOnScrollListener(new AbsListView.OnScrollListener() { @Override public void onScrollStateChanged(AbsListView absListView, int i) { hideSoftInput(mClearEditText.getWindowToken()); } @Override public void onScroll(AbsListView absListView, int i, int i1, int i2) { } }); hideSoftInput(mClearEditText.getWindowToken()); ll.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { @Override public boolean onPreDraw() { ll.getViewTreeObserver().removeOnPreDrawListener(this); Animator animator = AnimationUtil.getCircularReveal(ll, 2, 600); animator.start(); return true; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void findViewById() {\n ivGraffit = (ImageView) findView(R.id.ivGraffit);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_intro, container, false);\n\n next = view.findViewById(R.id.txtPrevious);\n\n parentFrameLayout = getActivity().findViewById(R.id.main_framelayout);\n\n\n\n\n return view;\n }", "private void findView() {\n\t\tibtn_trigger = (ImageButton) findViewById(R.id.ibtn_right_menu);\n\t}", "public void initViews(){\n layout_health = (RelativeLayout) findViewById(R.id.layout_health);\n layout_msg = (RelativeLayout) findViewById(R.id.layout_msg);\n layout_usercenter = (RelativeLayout) findViewById(R.id.layout_usercenter);\n\n// img_home = (ImageView) findViewById(R.id.img_home);\n img_health = (ImageView) findViewById(R.id.img_health);\n img_msg = (ImageView) findViewById(R.id.img_msg);\n img_usercenter = (ImageView) findViewById(R.id.img_usercenter);\n\n// tv_home = (TextView) findViewById(R.id.tv_home);\n tv_health = (TextView) findViewById(R.id.tv_health);\n tv_msg = (TextView) findViewById(R.id.tv_msg);\n tv_usercenter = (TextView) findViewById(R.id.tv_usercenter);\n\n }", "private void m22265Oj() {\n this.dLm = (LinearLayout) findViewById(R.id.dot_container);\n this.f3556yH = (ViewPager) findViewById(R.id.viewPager);\n azI();\n }", "private void initParentView() {\n//\r\n\t\tbase_activity_title_notice = (TextView) findViewById(R.id.base_activity_title_left);\r\n\t\tivBack = (ImageView) findViewById(R.id.base_activity_title_backicon);\r\n//\t\tivBack_close = (ImageView) findViewById(R.id.base_activity_title_close);\r\n\t\trlTitlePrent = (RelativeLayout) findViewById(R.id.base_activity_title_parent);\r\n//\t\ttvTitleName_linear = (LinearLayout) findViewById(R.id.linear_titlename);\r\n//\t\ttvTitleName = (TextView) findViewById(R.id.base_activity_title_titlename);\r\n\t\tivTitleLeft = (ImageView) findViewById(R.id.base_activity_title_right_lefticon);\r\n//\t\tivTitledownIcon = (ImageView) findViewById(R.id.base_activity_title_downicon);\r\n\t\tivTitleMiddle = (ImageView) findViewById(R.id.base_activity_title_right_middleicon);\r\n//\t\tivTitleArrow = (ImageView) findViewById(R.id.base_activity_title_titleIcon);\r\n\t\tivTitleRight = (ImageView) findViewById(R.id.base_activity_title_right_righticon);\r\n\t\ttvRight = (TextView) findViewById(R.id.base_activity_title_right_righttv);\r\n//\t\trlReload = (RelativeLayout) findViewById(R.id.base_activity_load_fail_reload);\r\n//\t\tlinear_back = (LinearLayout) findViewById(R.id.linear_back);\r\n//\t\tbase_menu = (RelativeLayout) findViewById(R.id.base_menu);\r\n//\t\ttvNoDataContent = (TextView) findViewById(R.id.base_activity_no_data_content);\r\n//\t\tbase_tel_main = (ImageView) findViewById(R.id.base_tal_main);\r\n//\t\tbutton_hidded = (ImageView) findViewById(R.id.button_hidded);\r\n//\t\tiv_order = (ImageView) findViewById(R.id.iv_order);\r\n//\t\timageView_one = (ImageView) findViewById(R.id.imageView_one);\r\n//\t\tbase_shopping_mian = (ImageView) findViewById(R.id.base_shopping_mian);\r\n//\t\tmenu_shoppingnum = (TextView)findViewById(R.id.menu_shoppingNum);\r\n//\t\tlinear_menu = (LinearLayout) findViewById(R.id.linear_menu);\r\n//\t\tbutton_hidded_linear = (LinearLayout) findViewById(R.id.button_hidded_linear);\r\n//\r\n\r\n\r\n//\t\t// 添加地址\r\n//\t\ttvAddAddress = (TextView) findViewById(R.id.base_activity_no_address_add);\r\n//\t\tviewNoDrinksDemand = findViewById(R.id.base_activity_no_drink_demand);\r\n//\t\tNoMenu();\r\n//\t\tNoTelMenu();\r\n//\r\n////\t\tobjectAnimator = ObjectAnimator.ofFloat(base_tel_main,\"rotation\",-30,0,30);\r\n////\t\tobjectAnimator.setInterpolator(new LinearInterpolator());\r\n////\t\tobjectAnimator.setRepeatMode(ValueAnimator.REVERSE);\r\n////\t\tobjectAnimator.setDuration(1000);\r\n////\t\tobjectAnimator.setRepeatCount(ValueAnimator.INFINITE);\r\n////\t\tobjectAnimator.start();\r\n\t}", "private ListView findViewById(int leftListview) {\n\t\treturn null;\r\n\t}", "void leftView() \n\t\t{ \n\t\t\tleftViewUtil(root, 1); \n\t\t}", "void leftView()\n {\n leftViewUtil(root, 1);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_day_week, container, false);\n unbinder = ButterKnife.bind(this, view);\n ((StepsActivity)getActivity()).setDayWeekListener(this);\n\n imgLeft.setOnClickListener(this);\n imgRight.setOnClickListener(this);\n return view;\n }", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_one, container, false);\n iv=view.findViewById(R.id.iv);\n iv.setBackgroundResource(R.drawable.what_2);\n return view;\n }", "private void setupView() {\n\t\timg=(ImageView) findViewById(R.id.imageView1);\n\t}", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n tv_slider_icon = (TextView) findViewById(R.id.slider_icon);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_app_intro, container, false);\n TextView titleText = (TextView) view.findViewById(R.id.app_intro_tv_title);\n TextView bodyText = (TextView)view.findViewById(R.id.app_intro_tv_body);\n ImageView imgView = (ImageView)view.findViewById(R.id.app_intro_img);\n View main = view.findViewById(R.id.app_intro_v_main);\n\n titleText.setText(title);\n bodyText.setText(body);\n imgView.setImageDrawable(ContextCompat.getDrawable(getContext(),drawableId));\n main.setBackgroundColor(backgroundColor);\n\n\n return view;\n }", "private void initView() {\n\n main_ll_rl = (LinearLayout) findViewById(R.id.main_ll_rili);\n main_ll_xw = (LinearLayout) findViewById(R.id.main_ll_xw);\n main_ll_wode = (LinearLayout) findViewById(R.id.main_ll_wd);\n main_ll_self = (LinearLayout) findViewById(R.id.main_ll_self);\n main_ll_hq = (LinearLayout) findViewById(R.id.main_ll_hq);\n main_zt_color = (LinearLayout) findViewById(R.id.main_zt_color);\n\n main_zt_color.setBackgroundColor(Color.parseColor(\"#e9e9ea\"));\n\n imgrl = (ImageView) findViewById(R.id.imgrili);\n imgxw = (ImageView) findViewById(R.id.imgxw);\n imgwd = (ImageView) findViewById(R.id.imgwd);\n imggr = (ImageView) findViewById(R.id.imgself);\n imghq = (ImageView) findViewById(R.id.imghq);\n\n main_rl_tv = (TextView) findViewById(R.id.main_rl_tv);\n main_xw_tv = (TextView) findViewById(R.id.main_xw_tv);\n main_wd_tv = (TextView) findViewById(R.id.main_wd_tv);\n main_gr_tv = (TextView) findViewById(R.id.main_self_tv);\n main_hq_tv = (TextView) findViewById(R.id.main_hq_tv);\n\n main_ll_rl.setOnClickListener(this);\n main_ll_xw.setOnClickListener(this);\n main_ll_wode.setOnClickListener(this);\n main_ll_hq.setOnClickListener(this);\n main_ll_self.setOnClickListener(this);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstance){\n View rootView = inflater.inflate(R.layout.fragement_body_layout,container,false);\n // get the reference to imageView in the fragment layout\n ImageView imageView = (ImageView) rootView.findViewById(R.id.body_part_image_view);\n //set the image view to daisplay\n imageView.setImageResource(AndroidImageAssets.getHeads().get(0));\n\n return rootView;\n }", "@SuppressWarnings(\"deprecation\")\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.activity_guide);\n\n\t\tmViewPager = (ViewPager) findViewById(R.id.vp_pager);\n\n\t\tllContainer = (LinearLayout) findViewById(R.id.ll_container_guide);\n\n\t\tivRedPoint=(ImageView)findViewById(R.id.iv_red_point);\n\n\t\tbtn_start=(Button) findViewById(R.id.btn_start);\n\t\tbtn_start.setOnClickListener(this);\n\n\t\t\n\t\t// 在此处初始化ImageView可以减少初始化的次数,防止每次都进行初始化.以后使用只要从集合中取即可。\n\t\tmImageViewList = new ArrayList<ImageView>();\n\t\tfor (int i = 0; i < mImageIds.length; i++) {\n\t\t\tImageView view = new ImageView(this);\n\t\t\tview.setBackgroundResource(mImageIds[i]);\n\t\t\tmImageViewList.add(view);\n\n\t\t\t// 初始化圆点\n\t\t\tImageView pointView = new ImageView(this);\n\t\t\tpointView.setImageResource(R.drawable.shape_circle_default);\n\n\t\t\t//初始化布局参数\n\t\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n\t\t\t\t\tLinearLayout.LayoutParams.WRAP_CONTENT,\n\t\t\t\t\tLinearLayout.LayoutParams.WRAP_CONTENT);\n\t\t\t//从第二个点开始设置边距\n\t\t\tif(i>0){\n\t\t\t\tparams.leftMargin=10;\n\t\t\t}\n\n\t\t\tpointView.setLayoutParams(params);\n\t\t\t\n\t\t\tllContainer.addView(pointView);\n\n\t\t}\n\n\t\tmViewPager.setAdapter(new MyAdapter());\n\t\t\n\t\t//页面绘制结束之后,计算两个原点的间距\n\t\t//视图树\n\t\tivRedPoint.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {\n\t\n\n\t\t\t//layout方法执行结束(位置确定)\n\t\t\t@Override\n\t\t\tpublic void onGlobalLayout() {\n\t\t\t\t//移除监听\n\t\t\t\tivRedPoint.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n\t\t\t\tmPointWidth=llContainer.getChildAt(1).getLeft()-llContainer.getChildAt(0).getLeft();\n\t\t\t\tLog.i(\"test_log\", \"width=\"+mPointWidth);\n\t\t\t}\n\t\t});\n\t\t\n\t\n\t\t\n\t\t\n\t\t//设置监听滑动事件 (小红点随着页面滑动而变换位置)\n\t\tmViewPager.setOnPageChangeListener(new OnPageChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onPageSelected(int position) {\n\t\t\t\tif(position==mImageIds.length-1){\n\t\t\t\t\tbtn_start.setVisibility(View.VISIBLE);\n\t\t\t\t}else{\n\t\t\t\t\tbtn_start.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//页面滑动过程中不断回调该方法\n\t\t\t@Override\n\t\t\tpublic void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLog.i(\"test_log\", \"当前位置:\"+position);\n\t\t\t\tLog.i(\"test_log\",\"偏移百分比:\"+positionOffset);\n\t\t\t\tLog.i(\"test_log\", \"偏移像素:\"+positionOffsetPixels);\n\t\t\t\t//计算当前小红点的左边距\n\t\t\t\tint leftMargin=(int) (mPointWidth * positionOffset+position*mPointWidth);\n\t\t\t\tRelativeLayout.LayoutParams params_lo_red=(LayoutParams) ivRedPoint.getLayoutParams();\n\t\t\t\tparams_lo_red.leftMargin=leftMargin;\n\t\t\t\tivRedPoint.setLayoutParams(params_lo_red);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onPageScrollStateChanged(int state) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void setContentView(int layoutResID) {\n super.setContentView(layoutResID);\n titleTextView = (TextView) findViewById(R.id.common_title_tv);\n backImg = (ImageView) findViewById(R.id.common_left_btn);\n mBgLayout = (RelativeLayout) findViewById(R.id.common_bg_layout);\n\n\n backImg.setOnClickListener(v -> finish());\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n Log.d(TAG, \"onCreateView: \");\n return inflater.inflate(R.layout.fragment_left, container, false);\n }", "@Override\n protected int layoutId() {\n return R.layout.activity_appraise_imageshow;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n Intent playerIntent = getActivity().getIntent();\n bundle = getArguments();\n Player player = (Player) bundle.getSerializable(\"player\");\n type = bundle.getString(\"type\");\n illuminatiCard = player.getIlluminatiCard();\n views = new ArrayList<ImageView>();\n\n //set up the layouts to fit their parents\n ViewGroup.LayoutParams p = new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT\n );\n\n //ViewGroup.LayoutParams p = new ViewGroup.LayoutParams(1000,1000);\n\n ScrollView sc = new ScrollView(getActivity()); //let the activity scroll vertically\n\n HorizontalScrollView sv = new HorizontalScrollView(getActivity()); //let the activity scroll horizontally\n\n ll = new RelativeLayout(getActivity()); //instantiate main layout\n\n sc.setLayoutParams(p); //make fill parent\n sv.setLayoutParams(p); //make fill parent\n ll.setLayoutParams(p); //make fill parent\n\n ImageView backGround = new ImageView(getActivity());\n backGround.setId(View.generateViewId());\n ImageView illCard = new ImageView(getActivity()); //create image for illuminati card\n //illCard.setImageResource(R.drawable.card); //set it to the feminist pic (only one we have so far)\n illCard.setImageResource(getResources().getIdentifier(illuminatiCard.getCardName().toLowerCase(), \"drawable\", getActivity().getPackageName()));\n illCard.setId(View.generateViewId()); //for the layout to work, each imageview needs an ID,\n //this generates a random ID for the view and set it to it\n //the actual ID doesn't matter since we'll always use the getID() method\n\n Display display = getActivity().getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n\n// layout for center card\n// RelativeLayout.LayoutParams rp = new RelativeLayout.LayoutParams(\n// RelativeLayout.LayoutParams.WRAP_CONTENT,\n// RelativeLayout.LayoutParams.WRAP_CONTENT);\n RelativeLayout.LayoutParams rp = new RelativeLayout.LayoutParams(cardWidth,cardHeight);\n rp.addRule(RelativeLayout.ALIGN_RIGHT, backGround.getId());\n rp.addRule(RelativeLayout.ALIGN_BOTTOM, backGround.getId());\n\n // rp.addRule(RelativeLayout.CENTER_VERTICAL); //put card in center (buggy)\n // rp.addRule(RelativeLayout.CENTER_HORIZONTAL);\n illCard.setLayoutParams(rp); //picture for illuminati card\n views.add(backGround);\n views.add(illCard);\n //ll.addView(illCard);\n //ll.addView(illCard);\n attach(illuminatiCard, illCard, new Point(0,0)); //run sequence to make board\n RelativeLayout.LayoutParams bg = new RelativeLayout.LayoutParams((xPad+2)/2*cardWidth, (yPad+2)/2*cardHeight);\n bg.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);\n bg.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);\n backGround.setLayoutParams(bg);\n for(ImageView iv : views)\n {\n ll.addView(iv);\n }\n //ll.addView(backGround);\n //ll.addView(illCard); //add card to relative layout\n\n\n\n //finish creating other views\n sv.addView(ll); //add layout to the scroll\n sc.addView(sv); //add scrolls together\n view_a = sc; //view to make view\n\n if(type != null) {\n if(type.equals(\"transfer_money\")){\n Context context = getActivity().getApplicationContext();\n CharSequence text = \"Choose receiving group\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n } else if(type.equals(\"drop_group\")) {\n Context context = getActivity().getApplicationContext();\n CharSequence text = \"Choose group to drop\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n } else if(type.equals(\"move_group\")) {\n Context context = getActivity().getApplicationContext();\n CharSequence text = \"Choose group to move\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n }\n\n return view_a; //send main view out\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Override\n\tprotected void findViewById() {\n\t\t\t\n\t\tmIndicator = (SimpleViewPagerIndicator) findViewById(R.id.id_stickynavlayout_indicator);\n\t\tmViewPager = (ViewPager) findViewById(R.id.id_stickynavlayout_viewpager);\n\t\t\n\t\tstickyNavLayout = (StickyNavLayout) findViewById(R.id.stickynavlayout);\n\t\t\n\t\tiv_user_logo = (ImageView) findViewById(R.id.iv_user_logo);\n\t\ttv_main_title = (TextView) findViewById(R.id.tv_main_title);\n\t\ttv_subtitle = (TextView) findViewById(R.id.tv_subtitle);\n\t\ttv_look_num = (TextView) findViewById(R.id.tv_look_num);\n\t\ttv_status = (TextView) findViewById(R.id.tv_status);\n\t\t\n\t\tiv_shuohua = (ImageView) findViewById(R.id.iv_shuohua);\n\t\tiv_operate = (ImageView) findViewById(R.id.iv_operate);\n\t}", "private void init(){\n\t\tmIV = new ImageView(mContext);\r\n\t\tFrameLayout.LayoutParams param1 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n\t\tmIV.setLayoutParams(param1);\r\n\t\tmIV.setScaleType(ScaleType.FIT_XY);\r\n//\t\tmIVs[0] = iv1;\r\n\t\tthis.addView(mIV);\r\n//\t\tImageView iv2 = new ImageView(mContext);\r\n//\t\tFrameLayout.LayoutParams param2 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n//\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n//\t\tiv2.setLayoutParams(param2);\r\n//\t\tiv2.setScaleType(ScaleType.CENTER_CROP);\r\n//\t\tmIVs[1] = iv2;\r\n//\t\tthis.addView(iv2);\r\n\t\tthis.mHandler = new Handler();\r\n\t}", "@Override\n int getLayout() {\n return R.layout.activity_main;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_verplaats_manier, container, false);\n\n ImageButton ibFiets = v.findViewById(R.id.imageButtonFiets);\n ibFiets.setOnClickListener(this);\n\n ImageButton ibBus = v.findViewById(R.id.imageButtonBus);\n ibBus.setOnClickListener(this);\n\n ImageButton ibTrein = v.findViewById(R.id.imageButtonTrein);\n ibTrein.setOnClickListener(this);\n\n ImageButton ibVoet = v.findViewById(R.id.imageButtonVoet);\n ibVoet.setOnClickListener(this);\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate( R.layout.fragment_inicio, container, false );\n tb = (ImageView)v.findViewById( R.id.btn_basico );\n tc = (ImageView)v.findViewById( R.id.btncompleto );\n tb.setOnClickListener( this );\n tc.setOnClickListener( this );\n return v;\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n Log.v(\"MeInfoEdit\",\"onCreateView\");\n if(view==null){\n view =inflater.inflate(R.layout.fragment_me_info_edit, container, false);\n }\n ((MainActivity)getActivity()).unBindDrawer();\n ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);\n swipLayout=new SwipLayout(getContext());\n swipLayout.setLayoutParams(params);\n swipLayout.setBackgroundColor(Color.TRANSPARENT);\n swipLayout.removeAllViews();\n swipLayout.addView(view);\n if(CoreApplication.newInstance().getRoot()!=null){\n Log.v(\"MeinfoEdit\",\"rootView not null\");\n }\n swipLayout.setParentView(getTargetFragment().getView()).setFragment(MeInfoEdit.this);\n return swipLayout;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_slider_item, container, false);\r\n }", "@Override\r public void onCreate(Bundle savedInstanceState) {\r super.onCreate(savedInstanceState);\r setContentView(R.layout.mypage_left);\r mContext = this;\r showIndeterDialog();\r }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_options, container, false);\n\n //Find the +1 button\n //mPlusOneButton = (PlusOneButton) view.findViewById(R.id.plus_one_button1);\n\n //\n // find the buttons and set the proper height to them\n _butSet = (ImageButton)view.findViewById(R.id.settings);\n _butSearch = (ImageButton)view.findViewById(R.id.search);\n _butLod = (ImageButton)view.findViewById(R.id.lod);\n _butVB = (ImageButton)view.findViewById(R.id.viewbox);\n _butCam = (ImageButton)view.findViewById(R.id.camera);\n\n view.findViewById(R.id.icons_parent).addOnLayoutChangeListener(new BtnLayout());\n\n /*\n _butSet.addOnLayoutChangeListener(new BtnLayout());\n _butSearch.addOnLayoutChangeListener(new BtnLayout());\n _butLod.addOnLayoutChangeListener(new BtnLayout());\n _butVB.addOnLayoutChangeListener(new BtnLayout());\n _butCam.addOnLayoutChangeListener(new BtnLayout());*/\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.activity_home, container, false);\n RelativeLayout tourBtn = (RelativeLayout) view.findViewById(R.id.tourBtn);\n RelativeLayout eatingBtn = (RelativeLayout) view.findViewById(R.id.eatingBtn);\n RelativeLayout accomoBtn = (RelativeLayout) view.findViewById(R.id.accomoBtn);\n RelativeLayout introBtn = (RelativeLayout) view.findViewById(R.id.introBtn);\n tourBtn.setOnClickListener(this);\n eatingBtn.setOnClickListener(this);\n accomoBtn.setOnClickListener(this);\n introBtn.setOnClickListener(this);\n return view;\n\n }", "@Override\r\n\tprotected void findViewById() {\n\r\n\t}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n ImageView imgView = new ImageView(getActivity());\n imgView.setImageResource(R.drawable.img1);\n return imgView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmRoot = inflater.inflate(R.layout.mouse_layout, container, false); \n\t\tinitializeUI();\n\t\treturn mRoot; \n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_recipe_slider, container, false);\n\n mSectionsPagerAdapter = new SectionsPagerAdapter(getActivity().getSupportFragmentManager());\n zero = (ImageView) rootView.findViewById(R.id.intro_indicator_0);\n one = (ImageView) rootView.findViewById(R.id.intro_indicator_1);\n two = (ImageView) rootView.findViewById(R.id.intro_indicator_2);\n\n indicators = new ImageView[]{zero, one, two};\n\n // Set up the ViewPager with the sections adapter.\n mViewPager = (ViewPager) rootView.findViewById(R.id.recipe_slider);\n mViewPager.setAdapter(mSectionsPagerAdapter);\n\n mViewPager.setCurrentItem(page);\n updateIndicators(page);\n\n final ArgbEvaluator evaluator = new ArgbEvaluator();\n\n mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {\n @Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n }\n\n @Override\n public void onPageSelected(int position) {\n\n page = position;\n\n updateIndicators(page);\n }\n\n @Override\n public void onPageScrollStateChanged(int state) {\n\n }\n });\n return rootView;\n }", "@Override\n public void onSwipeLeft() {\n resultText.setText(\"Swiped Left\");\n rootLayout.setBackgroundColor(getResources().getColor(R.color.colorLeft));\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "private int setLayoutResId(){\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_profile, container, false);\n nameTv = view.findViewById(R.id.nameTv);\n mailTv = view.findViewById(R.id.mailTv);\n imageView = view.findViewById(R.id.image);\n\n\n userId = 1;\n setContent(userId);\n\n ImageButton userDecrease = view.findViewById(R.id.user1);\n ImageButton userIncrease = view.findViewById(R.id.user2);\n\n userDecrease.setOnClickListener(this);\n userIncrease.setOnClickListener(this);\n return view;\n }", "@Override\n\tprotected void findViewById() {\n\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_home, container, false);\n\n\n\n\n sliderView = view . findViewById(R.id.imageSlider);\n adapter = new SliderAdapter(getContext());\n sliderView.setSliderAdapter(adapter);\n\n sliderView.setIndicatorAnimation(IndicatorAnimationType.WORM); //set indicator animation by using IndicatorAnimationType. :WORM or THIN_WORM or COLOR or DROP or FILL or NONE or SCALE or SCALE_DOWN or SLIDE and SWAP!!\n sliderView.setSliderTransformAnimation(SliderAnimations.SIMPLETRANSFORMATION);\n sliderView.setAutoCycleDirection(SliderView.AUTO_CYCLE_DIRECTION_BACK_AND_FORTH);\n sliderView.setIndicatorSelectedColor(Color.WHITE);\n sliderView.setIndicatorUnselectedColor(Color.GRAY);\n sliderView.setScrollTimeInSec(4); //set scroll delay in seconds :\n sliderView.startAutoCycle();\n\n postIV = view.findViewById(R.id.postRequestCIV);\n postIV.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n FrameLayout frameLayout = view.findViewById(R.id.homeFrameLayout);\n frameLayout.setVisibility(View.VISIBLE);\n LinearLayout campainLayout = view.findViewById(R.id.campainLayout);\n campainLayout.setVisibility(View.INVISIBLE);\n CardView sliderCardView = view.findViewById(R.id.sliderCV);\n sliderCardView.setVisibility(View.INVISIBLE);\n TextView menuTV = view.findViewById(R.id.menuTV);\n menuTV.setVisibility(View.INVISIBLE);\n LinearLayout menuLayout = view.findViewById(R.id.menuItemLayout);\n menuLayout.setVisibility(View.INVISIBLE);\n TextView requestTV = view.findViewById(R.id.requestTV);\n requestTV.setVisibility(View.INVISIBLE);\n LinearLayout requestLayout = view.findViewById(R.id.requestLayout);\n requestLayout.setVisibility(View.INVISIBLE);\n TextView statisticTV = view.findViewById(R.id.statisticTV);\n statisticTV.setVisibility(View.INVISIBLE);\n TextView statisticNewTV = view.findViewById(R.id.statisticNewTV);\n statisticNewTV.setVisibility(View.INVISIBLE);\n ImageView statisticIV = view.findViewById(R.id.statisticIV);\n statisticIV.setVisibility(View.INVISIBLE);\n FragmentManager fragmentManager1 = getChildFragmentManager();\n FragmentTransaction fragmentTransaction1 = fragmentManager1.beginTransaction();\n fragmentTransaction1.replace(R.id.homeFrameLayout,new PostFragment());\n fragmentTransaction1.commit();\n }\n });\n\n bookIV = view.findViewById(R.id.bookCIV);\n bookIV.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FrameLayout frameLayout = view.findViewById(R.id.homeFrameLayout);\n frameLayout.setVisibility(View.VISIBLE);\n LinearLayout campainLayout = view.findViewById(R.id.campainLayout);\n campainLayout.setVisibility(View.INVISIBLE);\n CardView sliderCardView = view.findViewById(R.id.sliderCV);\n sliderCardView.setVisibility(View.INVISIBLE);\n TextView menuTV = view.findViewById(R.id.menuTV);\n menuTV.setVisibility(View.INVISIBLE);\n LinearLayout menuLayout = view.findViewById(R.id.menuItemLayout);\n menuLayout.setVisibility(View.INVISIBLE);\n TextView requestTV = view.findViewById(R.id.requestTV);\n requestTV.setVisibility(View.INVISIBLE);\n LinearLayout requestLayout = view.findViewById(R.id.requestLayout);\n requestLayout.setVisibility(View.INVISIBLE);\n TextView statisticTV = view.findViewById(R.id.statisticTV);\n statisticTV.setVisibility(View.INVISIBLE);\n TextView statisticNewTV = view.findViewById(R.id.statisticNewTV);\n statisticNewTV.setVisibility(View.INVISIBLE);\n ImageView statisticIV = view.findViewById(R.id.statisticIV);\n statisticIV.setVisibility(View.INVISIBLE);\n FragmentManager fragmentManager1 = getChildFragmentManager();\n FragmentTransaction fragmentTransaction1 = fragmentManager1.beginTransaction();\n fragmentTransaction1.replace(R.id.homeFrameLayout,new MapFragment());\n fragmentTransaction1.commit();\n }\n });\n\n donarsIV = view.findViewById(R.id.donorsCIV);\n donarsIV.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FrameLayout frameLayout = view.findViewById(R.id.homeFrameLayout);\n frameLayout.setVisibility(View.VISIBLE);\n LinearLayout campainLayout = view.findViewById(R.id.campainLayout);\n campainLayout.setVisibility(View.INVISIBLE);\n CardView sliderCardView = view.findViewById(R.id.sliderCV);\n sliderCardView.setVisibility(View.INVISIBLE);\n TextView menuTV = view.findViewById(R.id.menuTV);\n menuTV.setVisibility(View.INVISIBLE);\n LinearLayout menuLayout = view.findViewById(R.id.menuItemLayout);\n menuLayout.setVisibility(View.INVISIBLE);\n TextView requestTV = view.findViewById(R.id.requestTV);\n requestTV.setVisibility(View.INVISIBLE);\n LinearLayout requestLayout = view.findViewById(R.id.requestLayout);\n requestLayout.setVisibility(View.INVISIBLE);\n TextView statisticTV = view.findViewById(R.id.statisticTV);\n statisticTV.setVisibility(View.INVISIBLE);\n TextView statisticNewTV = view.findViewById(R.id.statisticNewTV);\n statisticNewTV.setVisibility(View.INVISIBLE);\n ImageView statisticIV = view.findViewById(R.id.statisticIV);\n statisticIV.setVisibility(View.INVISIBLE);\n FragmentManager fragmentManager1 = getChildFragmentManager();\n FragmentTransaction fragmentTransaction1 = fragmentManager1.beginTransaction();\n fragmentTransaction1.replace(R.id.homeFrameLayout,new MapFragment());\n fragmentTransaction1.commit();\n\n }\n });\n\n List<SliderItem> sliderItemList = new ArrayList<>();\n //dummy data\n for (int i = 0; i < 5; i++) {\n SliderItem sliderItem = new SliderItem();\n sliderItem.setDescription(\"Slider Item \" + i);\n if (i % 2 != 0) {\n // sliderItem.toString();\n sliderItem.setImageUrl(\"https://images.pexels.com/photos/929778/pexels-photo-929778.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260\");\n } else {\n sliderItem.setImageUrl(\"https://images.pexels.com/photos/747964/pexels-photo-747964.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260\");\n }\n sliderItemList.add(sliderItem);\n }\n adapter.renewItems(sliderItemList);\n\n return view;\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n this.mIconView = (ImageView) findViewById(R.id.icon);\n this.mTitleView = (TextView) findViewById(R.id.title);\n this.mSummaryView = (TextView) findViewById(R.id.summary);\n this.mSlidingButton = findViewById(R.id.sliding_button);\n }", "@Override\n public View onCreateView(LayoutInflater inflater,\n ViewGroup container, Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.profile,\n container, false);\n\n profilePicture = rootView.findViewById(R.id.profileImage);\n\n\n\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main_ctrl, container, false);\n\n Button upButton = (Button) view.findViewById(R.id.button_up);\n upButton.setOnClickListener(this);\n Button downButton = (Button) view.findViewById(R.id.button_down);\n downButton.setOnClickListener(this);\n Button stopButton = (Button) view.findViewById(R.id.button_stop);\n stopButton.setOnClickListener(this);\n Button upRightButton = (Button) view.findViewById(R.id.button_up_right);\n upRightButton.setOnClickListener(this);\n Button upLeftButton = (Button) view.findViewById(R.id.button_up_left);\n upLeftButton.setOnClickListener(this);\n Button downRightButton = (Button) view.findViewById(R.id.button_down_right);\n downRightButton.setOnClickListener(this);\n Button downLeftButton = (Button) view.findViewById(R.id.button_down_left);\n downLeftButton.setOnClickListener(this);\n Button roundRightButton = (Button) view.findViewById(R.id.button_round_r);\n roundRightButton.setOnClickListener(this);\n Button roundLeftButton = (Button) view.findViewById(R.id.button_round_l);\n roundLeftButton.setOnClickListener(this);\n followerButton = (Button) view.findViewById(R.id.line_follower_button);\n followerButton.setOnClickListener(this);\n\n armSeekBar = (SeekBar) view.findViewById(R.id.seekBar_arm);\n armSeekBar.setMax(100);\n\n armSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n ((MainActivity) getActivity()).sendToDevice(Command.arm(armSeekBar.getProgress()));\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n\n }\n });\n\n return view;\n }", "@Override\r\n\tprotected void findViewById() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void findViewById() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void findViewById() {\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.circle2, container, false);\n\n TextView flash_header = (TextView) view.findViewById(R.id.flash_header);\n flash_header.setText(\"Identify all the objects which are in the shape of a circle in the living room\");\n\n RelativeLayout flash_question = (RelativeLayout) view.findViewById(R.id.flash_question);\n flash_question.setBackgroundColor(getResources().getColor(R.color.colorPrimaryDark));\n\n ImageView speaker = (ImageView) view.findViewById(R.id.speaker);\n speaker.setOnClickListener(this);\n\n tv_stand = (ImageView) view.findViewById(R.id.tv_stand);\n wall_clock = (ImageView) view.findViewById(R.id.wall_clock);\n mirror = (ImageView) view.findViewById(R.id.mirror);\n cuboard = (ImageView) view.findViewById(R.id.cuboard);\n television = (ImageView) view.findViewById(R.id.television);\n frame = (ImageView) view.findViewById(R.id.frame);\n ivLamp = (ImageView) view.findViewById(R.id.ivLamp);\n chair = (ImageView) view.findViewById(R.id.chair);\n image1 = (ImageView) view.findViewById(R.id.image1);\n image2 = (ImageView) view.findViewById(R.id.image2);\n image3 = (ImageView) view.findViewById(R.id.image3);\n\n tv_stand.setOnClickListener(this);\n wall_clock.setOnClickListener(this);\n mirror.setOnClickListener(this);\n cuboard.setOnClickListener(this);\n television.setOnClickListener(this);\n frame.setOnClickListener(this);\n ivLamp.setOnClickListener(this);\n chair.setOnClickListener(this);\n\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tRelativeLayout v = new RelativeLayout(getActivity());\n\t\t\n\t\tRelativeLayout.LayoutParams btnParam= new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\tbtnParam.addRule(RelativeLayout.CENTER_IN_PARENT);\n\t\t\n\t\tmImageBG= new ImageView(mContext);\n\t\tmImageBG.setImageResource(R.drawable.sample);\n\t\t\n\t\tv.addView(v, btnParam);\n\t\t//v.setBackgroundColor(color);\n\t\t//v.setBackgroundResource(R.drawable.sample);\n\t\treturn v;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_personage_risterg, container, false);\n getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n ViewUtils.inject(this,view);\n inti();\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.content_welcome_dua, container, false);\n Button btnCategory = view.findViewById(R.id.btn_next);\n btnCategory.setOnClickListener(this);\n\n ImageView iv1 = view.findViewById(R.id.iv_gbr1);\n ImageView iv2 = view.findViewById(R.id.iv_gbr2);\n\n DrawableImageViewTarget imageViewTarget = new DrawableImageViewTarget(iv1);\n Glide.with(this).load(R.raw.superman).into(imageViewTarget);\n\n imageViewTarget = new DrawableImageViewTarget(iv2);\n Glide.with(this).load(R.raw.angel_and_devil_jadi).into(imageViewTarget);\n\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\t\r\n\t\tmRoot = inflater.inflate(R.layout.frag_assign, null);\r\n\t\t\r\n\t\tviewlin = (LinearLayout)mRoot.findViewById(R.id.lin1);\r\n\t\tgradelin = (LinearLayout)mRoot.findViewById(R.id.lin2);\r\n\t\t\r\n\t\tviewlin.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stubFr\r\n\t\t\t\tmActivity.pushFragments(AppConstants.FRAG_ASSIGN, new FragViewAssign(), true, true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tgradelin.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tmActivity.pushFragments(AppConstants.FRAG_ASSIGN, new FragViewAssign(), true, true);\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn mRoot;\r\n\t}", "@Override\n public void onGlobalLayout() {\n if (right == 0) {\n imgStepsLast.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n right = imgStepsLast.getRight();\n }\n showHelpView(layoutInflater);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_trangchu, container, false);\n recyclerview_douong_124= (RecyclerView)view.findViewById(R.id.listview);\n progressBar_124=view.findViewById(R.id.progressBar);\n\n return view; }", "private void initUI() {\n\t\timageview = (ImageView) v.findViewById(R.id.shezhi);\r\n\t\timageview.setOnClickListener(this);\r\n\r\n\t\tmytaobao = (ImageView) v.findViewById(R.id.taobao_go);\r\n\t\tmytaobao.setOnClickListener(this);\r\n\r\n\t\twuliu = (ImageView) v.findViewById(R.id.wuliu);\r\n\t\twuliu.setOnClickListener(this);\r\n\r\n\t\tgouwuche = (ImageView) v.findViewById(R.id.gouwuche);\r\n\t\tgouwuche.setOnClickListener(this);\r\n\r\n\t\tchadingdan = (ImageView) v.findViewById(R.id.dingdan);\r\n\t\tchadingdan.setOnClickListener(this);\r\n\r\n\t\tshoucang = (ImageView) v.findViewById(R.id.shoucang);\r\n\t\tshoucang.setOnClickListener(this);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.dummy_home, container, false);\n img_user_menu = ((MainActivity) getActivity()).findViewById(R.id.img_user_menu);\n img_credits = ((MainActivity) getActivity()).findViewById(R.id.img_credits);\n txt_share = ((MainActivity) getActivity()).findViewById(R.id.txt_share);\n toolBarTitle = ((MainActivity) getActivity()).findViewById(R.id.toolBarTitle);\n txt_credits = ((MainActivity) getActivity()).findViewById(R.id.txt_credits);\n text_view_v = ((MainActivity) getActivity()).findViewById(R.id.text_view_credits_v);\n text_view_wallet_amount = ((MainActivity) getActivity()).findViewById(R.id.text_view_wallet_amount);\n\n img_veezee = ((MainActivity)getActivity()).findViewById(R.id.img_veezee);\n img_veezee.setVisibility(View.VISIBLE);\n\n Toolbar toolbar = ((MainActivity) getActivity()).findViewById(R.id.toolBar);\n toolbar.setVisibility(View.VISIBLE);\n\n ((AppCompatActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(false);\n img_credits.setVisibility(View.GONE);\n img_user_menu.setVisibility(View.VISIBLE);\n toolBarTitle.setVisibility(View.INVISIBLE);\n txt_credits.setVisibility(View.GONE);\n img_credits.setImageResource(R.drawable.ic_credits);\n txt_share.setVisibility(View.GONE);\n //toolBarTitle.setText(\"VeeZee\");\n text_view_v.setVisibility(View.VISIBLE);\n\n (getActivity()).findViewById(R.id.text_view_wallet_amount).setVisibility(View.VISIBLE);\n (getActivity()).findViewById(R.id.image_view_coin).setVisibility(View.VISIBLE);\n\n toolBarTitle.setTextColor(getResources().getColor(R.color.colorAccent));\n toolBarTitle.setGravity(Gravity.CENTER);\n initComponents();\n mViewGrop = container;\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){\n\n View view = inflater.inflate(R.layout.fragment_courselist_view, container, false);\n\n mRecyclerView = (RecyclerView)view.findViewById(R.id.course_list_view);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n\n emptyView = view.findViewById(R.id.empty_list_view);\n arrowPointer = (ImageView)view.findViewById(R.id.empty_arrow_pointer);\n\n mselectButton = (Button)view.findViewById(R.id.select_button);\n mSelectedText = (TextView)view.findViewById(R.id.selected_term_text);\n manAddButton = (ImageButton)view.findViewById(R.id.list_man_add_button);\n\n setButtonClickListener();\n\n updateUI();\n\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.thirdfragment, container, false);\r\n\r\n sendD = (Button) view.findViewById(R.id.sendd);\r\n sendZ = (Button) view.findViewById(R.id.sendz);\r\n sendClear = (Button) view.findViewById(R.id.sendrclear);\r\n sendCloud = (Button) view.findViewById(R.id.sendrcloud);\r\n sendRain = (Button) view.findViewById(R.id.sendrrain);\r\n sendCloud2 = (Button) view.findViewById(R.id.sendrcloud2);\r\n\r\n\r\n sendD.setOnClickListener(this);\r\n sendZ.setOnClickListener(this);\r\n sendClear.setOnClickListener(this);\r\n sendCloud.setOnClickListener(this);\r\n sendRain.setOnClickListener(this);\r\n sendCloud2.setOnClickListener(this);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public void run() {\n\r\n leftMenuView.setVisibility(View.VISIBLE);\r\n }", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\tsuper.onCreate(arg0);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.base_activity_layout);\n\t\tcontainer = (FrameLayout) findViewById(R.id.act_container);\n\t\trightButton = (ImageButton) findViewById(R.id.btn_right_control);\n\t\tleftButton = (ImageButton) findViewById(R.id.btn_left_control);\n\t\tactivity_title = (TextView) findViewById(R.id.headerTitle);\n\t\tTypeface tf = Typeface.createFromAsset(getAssets(),\n\t\t\t\t\"fonts/DroidKufi-Bold.ttf\");\n\t\tactivity_title.setTypeface(tf);\n\t\tDisplayMetrics metrics = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(metrics);\n\t\tmetrics.toString();\n\t\twidth = metrics.widthPixels;\n\t\thight = metrics.heightPixels;\n\t\tleftButton.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tDoLFunction();\n\t\t\t}\n\t\t});\n\n\t\trightButton.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tDoRFunction();\n\t\t\t}\n\t\t});\n\t}", "private void initViews() {\n\t\t// TODO Auto-generated method stub\n\t\t// venuePager = (ViewPager)findViewById(R.id.pager);\n\n\t\tmyGallery = (LinearLayout) findViewById(R.id.horizontalScrollItems);\n\n\t\tvenueImageLarge = (ImageView) findViewById(R.id.imageVenueLarge);\n\n\t\tinfoImageView = (ImageView) findViewById(R.id.imageInfo);\n\n\t\tcloseBtn = (ImageView) findViewById(R.id.imageclose);\n\n\t\tvenueCapacity = (TextView) findViewById(R.id.venueCapacity);\n\n\t\tvenueDes = (TextView) findViewById(R.id.venueDes);\n\n\t\tvenueName = (TextView) findViewById(R.id.venueName);\n\n\t\tvenueRelative = (RelativeLayout) findViewById(R.id.venue_relative);\n\n\t\tviewAnimator = (ViewAnimator) this.findViewById(R.id.viewFlipper_venue);\n\n\t\tvenueFullname = (TextView) findViewById(R.id.venueFullnameValue);\n\n\t\tvenueCity = (TextView) findViewById(R.id.venueCityValue);\n\n\t\tvenueOwner = (TextView) findViewById(R.id.venueOwnerValue);\n\n\t\tvenueOpened = (TextView) findViewById(R.id.venueOpenedValue);\n\n\t\tvenueSurface = (TextView) findViewById(R.id.venueSurfaceValue);\n\n\t\tvenueWebsite = (TextView) findViewById(R.id.venueWebsiteValue);\n\n\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ViewGroup rootView = (ViewGroup) inflater.inflate(\n R.layout.fragment_chu_de_page, container, false);\n\n imgHinh = (ImageView) rootView.findViewById(R.id.imgHinh);\n txt_nameWord = (TextView) rootView.findViewById(R.id.txt_nameWord);\n txt_phatamWord = (TextView) rootView.findViewById(R.id.txt_phatamWord);\n txt_nghiaWord = (TextView) rootView.findViewById(R.id.txt_nghiaWord);\n btnLoa = (ImageView) rootView.findViewById(R.id.btnLoa);\n\n return rootView;\n }", "private void initializeViews(Context context) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n inflater.inflate(R.layout.progressive_next_view_layout, this);\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\r\n\t\tWindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();\r\n\t\tlayoutParams.flags = WindowManager.LayoutParams.FLAG_DIM_BEHIND;\r\n\t\tlayoutParams.dimAmount = 0.7f;\r\n\t\tgetWindow().setAttributes(layoutParams);\r\n\r\n\t\tsetContentView(R.layout.activity_stageonelearnpopupthree);\r\n\t\t\r\n\t\tnextBtn = (ImageButton) findViewById(R.id.stage1_learn_popup3_next_btn);\r\n\t\tnextBtn.setOnClickListener(this);\r\n\r\n\t\twrongLayout = (RelativeLayout) findViewById(R.id.stage1_learn_popup3_wrong_layout);\r\n\t\twrongLayout.setVisibility(View.INVISIBLE);\r\n\t\tconfirmBtn = (ImageButton) findViewById(R.id.stage1_learn_popup3_wrong_confirm_btn);\r\n\t\tconfirmBtn.setOnClickListener(this);\r\n\t\t\r\n\t\tplv = (PointLinkerView) findViewById(R.id.stage1_learn_popup3_pointLinkerView);\r\n\t}", "private void findViewById(){\n\t mDeleteBtn = (Button) findViewById(R.id.poster_delete_btn);\n\t mClearBtn = (Button) findViewById(R.id.poster_clear_btn);\n\t posterGridView = (GridView) findViewById(R.id.file_list_view);\n\t noPoster = (TextView)findViewById(R.id.no_poster);\n }", "protected int layoutChildHorizontal(View v, int left, LoopLayoutParams lp){\n\t\tint l,t,r,b;\n\t\t\n\t\tswitch(lp.position){\n\t\tcase LoopLayoutParams.TOP:\n\t\t\tl = left + lp.leftMargin;\n\t t = lp.topMargin;\n\t r = l + v.getMeasuredWidth();\n\t b = t + v.getMeasuredHeight();\n\t\t\tbreak;\n\t\tcase LoopLayoutParams.BOTTOM:\n\t\t\tb = getHeight() - lp.bottomMargin;\n\t\t\tt = b - v.getMeasuredHeight();\n\t\t\tl = left + lp.leftMargin; \n\t r = l + v.getMeasuredWidth();\n\t\t\tbreak;\n\t\tcase LoopLayoutParams.CENTER:\n\t\t\tl = left + lp.leftMargin; \n\t r = l + v.getMeasuredWidth();\n\t final int x = (getHeight() - v.getMeasuredHeight())/2;\n\t t = x;\n\t b = t + v.getMeasuredHeight();\n\t\t\tbreak;\n\t\tdefault:\t\t\t\n\t\t\tthrow new RuntimeException(\"Only TOP,BOTTOM,CENTER are alowed in horizontal orientation\");\n\t\t}\n\t\t\n \n v.layout(l, t, r, b);\n return r + lp.rightMargin;\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_main, container, false);\r\n\r\n // FindViewByIds\r\n tvLogin = v.findViewById(R.id.tvLogin);\r\n bnvMenu = v.findViewById(R.id.bnvMenu);\r\n\r\n return v;\r\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_one,container,false);\n view.findViewById(R.id.lay1);\n TxtViw1=(TextView)view.findViewById(R.id.lay1);\n String string=\"The director has put a lot of efforts in giving Baadshaho a period film look\" +\n \"The vehicles and props have been designed as per the need of the narration.\" +\n \"However, it is yet to be seen whether Baadshaho works as a complete package or not.\";\n TxtViw1.setText(string);\n return view;\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n Log.d(TAG, \"onCreate\");\n \n mBtn1 = (Button) findViewById(R.id.button1);\n mBtn1.setOnClickListener(this);\n mBtn2 = (Button) findViewById(R.id.button2);\n mBtn2.setOnClickListener(this);\n mImg1 = (ImageView) findViewById(R.id.imageView1);\n }", "private void initView(Context context) {\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0);\n\t\tmContainer = (LinearLayout)LayoutInflater.from(context).inflate(R.layout.pullable_refresh, null);\n\t\taddView(mContainer, params);\n\t\tsetGravity(Gravity.BOTTOM);\n\t\t\n\t\trefreshArrowView = (ImageView)findViewById(R.id.pull_down_arrow);\n\t\trefreshingView = (ImageView)findViewById(R.id.pull_down_refreshing_view);\n\t\trefreshStateTextView = (TextView)findViewById(R.id.pull_down_state_text);\n\t\t\n\t\trotateAnimation = (RotateAnimation)AnimationUtils.loadAnimation(context, R.anim.reverse_anim);\n\t\trefreshingAnimation = (RotateAnimation)AnimationUtils.loadAnimation(context, R.anim.rotating);\n\t\tLinearInterpolator lir = new LinearInterpolator();\n\t\trotateAnimation.setInterpolator(lir);\n\t\trefreshingAnimation.setInterpolator(lir);\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState){\n\t\tView view = inflater.inflate(R.layout.fragment_01, null);\n\t\tmmobileRx = (TextView) view.findViewById(R.id.mobileRx);\n\t\tmmobileTx = (TextView) view.findViewById(R.id.mobileTx);\n\t\tmwifiRx = (TextView) view.findViewById(R.id.wifiRx);\n\t\tmwifiTx = (TextView) view.findViewById(R.id.wifiTx);\n\t\tmStart=(Button)view.findViewById(R.id.startMonitor);\n\t\tmStop=(Button)view.findViewById(R.id.stopMonitor);\n\t\treturn view;\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.main_u_test, null);\r\n ViewUtils.inject(this, view);\r\n\r\n btnOne.setOnClickListener(this);\r\n btnTwo.setOnClickListener(this);\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_admin_menu, container, false);\n\n LinearLayout optionMonitor = (LinearLayout) view.findViewById(R.id.option_monitoring);\n LinearLayout optionExit = (LinearLayout) view.findViewById(R.id.option_exit);\n\n optionMonitor.setOnClickListener(this);\n optionExit.setOnClickListener(this);\n\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.fragment_slider, null);\n\t\tinitUi(view);\n\t\tsetListener();\n\t\treturn view;\n\t}", "private void init(Context context) {\n getViewTreeObserver().addOnGlobalLayoutListener(this);\n inflate(context, R.layout.new_rp_resultview, this);\n mMainPanel = (ViewAnimator) findViewById(R.id.viewanimator);\n mInfoPanel = (ViewAnimator) findViewById(R.id.va_text);\n \n \n mInfoPanelText1 = (TextView) mInfoPanel.findViewById(R.id.tv1);\n mMainPanel.setDisplayedChild(0);\n\t}", "@Override\n protected void findView() {\n title = (TextView) findViewById(R.id.title_text);\n title.setText(\"消息\");\n alert = (TextView) findViewById(R.id.alert);\n next_button = (Button) findViewById(R.id.next_button);\n next_button.setVisibility(View.GONE);\n layout = (XtomRefreshLoadmoreLayout) findViewById(R.id.refreshLoadmoreLayout);\n left = (ImageButton) findViewById(R.id.back_button);\n mListView = (SwipeMenuListView) findViewById(R.id.listView);\n }", "@Override \n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.article_reader_layout, container, false);\n textView = (TextView)view.findViewById(R.id.text) ;\n return view;\n\t}", "int getActivityLayoutId();", "@Override\n protected int getLayoutId() {\n return R.layout.activity_main;\n }", "private void inicComponent() {\n\n\t\tprogres = (LinearLayout) findViewById(R.id.linearLayoutProgres);\n\t\t\n\t\tbuttonKategorije = (Button) findViewById(R.id.buttonKategorije);\n\t\t\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tab, container, false);\n\n Drawable myDrawable = getResources().getDrawable(R.drawable.youtube_boton);\n\n Imagen = (ImageView) view.findViewById(R.id.Imagen1);\n Imagen.setImageDrawable(myDrawable);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View myView = inflater.inflate(R.layout.fragment_first, container, false);\n ImageView bck = (ImageView)myView.findViewById(R.id.imgWal);\n int[] rse = new int[] {R.drawable.princi18,R.drawable.homescreen1,R.drawable.coleg,R.drawable.back,R.drawable.bck,R.drawable.screen,R.drawable.volleymen,R.drawable.balsir2,R.drawable.balsir3,R.drawable.colgevent};\n Random rnd = new Random();\n int r = rnd.nextInt(rse.length);\n bck.setImageDrawable(getResources().getDrawable(rse[r]));\n\n return myView;\n\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState)\r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\r\n\t\tsetContentView(R.layout.aty_swp_circle_layout);\r\n\r\n\t\tfm = getSupportFragmentManager();\r\n\t\ttransaction = fm.beginTransaction();\r\n\r\n\t\tmyApp = (myApplication) getApplicationContext();\r\n\r\n\t\tFindView();\r\n\t\tInitView();\r\n\r\n\r\n\t\tInitSWP(mHandler);\r\n\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.activity_click_product_layout, container, false);\n\n ivList=view.findViewById(R.id.iv_list);\n txtProductDescription=view.findViewById(R.id.txt_productDescription);\n txtShowOfeerPrice=view.findViewById(R.id.txt_showOfferPrice);\n txtShowPrice=view.findViewById(R.id.txt_showPrice);\n txtTitleName=view.findViewById(R.id.tv_list_name);\n edtEnterPinCode=view.findViewById(R.id.edt_enterPinCode);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_main_menu_fragment, container, false);\n menuRecyclerView =(RecyclerView) v.findViewById(R.id.recycler_main_menu);\n //menuRecyclerView.addItemDecoration(new );\n\n menuAdapter = new MainMenuAdapter(menuItems,(MainMenuAdapter.OnMenuItemClickListener) getActivity());\n\n menuRecyclerView.setAdapter(menuAdapter);\n menuRecyclerView.addItemDecoration(new SpacingDecorator(30,SpacingDecorator.SPACE_DECORATOR_ORIENTATION_HORIZONTAL));\n\n LinearLayoutManager man = new LinearLayoutManager(getContext());\n man.setOrientation(LinearLayoutManager.HORIZONTAL);\n menuRecyclerView.setLayoutManager(man);\n\n\n\n\n holderLeft = (CardView)v.findViewById(R.id.holder_left);\n holderLeft.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n listener.onSmallIconClicked(left);\n }\n });\n holderRight = (CardView)v.findViewById(R.id.holder_right);\n holderRight.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n listener.onSmallIconClicked(right);\n }\n });\n\n leftHolderTitle = (TextView) holderLeft.findViewById(R.id.menu_item_title);\n leftHolderTitle.setText(left.getTitle());\n rightHolderTitle = (TextView) holderRight.findViewById(R.id.menu_item_title);\n rightHolderTitle.setText(right.getTitle());\n\n ImageView leftHolderImage = (ImageView)holderLeft.findViewById(R.id.menu_item_image);\n leftHolderImage.setImageResource(left.getDrawableImage());\n ImageView rightHolderImage = (ImageView)holderRight.findViewById(R.id.menu_item_image);\n rightHolderImage.setImageResource(right.getDrawableImage());\n\n\n\n\n\n return v;\n }", "@Override\r\n public void onResume() {\r\n super.onResume();\r\n Log.i(TAG, \"Displaying \"+TAG+\" view\");\r\n\r\n progressControlContainer = (LinearLayout)findViewById(R.id.progressControlContainer);\r\n initialiseView();\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View myView = inflater.inflate(R.layout.fragment_challenges_screen, container, false);\n testView = (TextView) myView.findViewById(R.id.testtext);\n\n\n return inflater.inflate(R.layout.fragment_challenges_screen, container, false);\n }", "private void intviews() {\n\t\tyanzhengmall=(LinearLayout) findViewById(R.id.yanzhengma);\r\n\t\tphonell=(LinearLayout) findViewById(R.id.phone);\r\n\t\tzhucell=(LinearLayout) findViewById(R.id.zhuce);\r\n\t\tbtn=(Button) findViewById(R.id.button1);\r\n\t\tbtn1=(Button) findViewById(R.id.yanzhengmabutton);\r\n\t\tgetcodebtn=(Button) findViewById(R.id.getcodebtn);\r\n\t\tphoneet=(EditText) findViewById(R.id.phoneet);\r\n\t\tphonetv=(TextView) findViewById(R.id.phonetv);\r\n\t\tyanzhengmatv=(TextView) findViewById(R.id.yanzhengmatv);\r\n\t\tpasswordtv=(TextView) findViewById(R.id.passwordtv);\r\n\t\tbackimageview=(ImageView) findViewById(R.id.backimageview);\r\n\t\tcodeedittext=(EditText) findViewById(R.id.yanzhengmaEditText);\r\n\t\tpasswordet=(EditText) findViewById(R.id.passwordEditText);\r\n\t\tquerenpasswordet=(EditText) findViewById(R.id.passwordquerenEditText);\r\n\t\tregisterbtn=(Button) findViewById(R.id.zhucebutton);\r\n\t}", "@Override\n\tpublic void findViews() {\n\t\tet1 = (TextView) findViewById(R.id.et1);\n\t\tet2 = (TextView) findViewById(R.id.et2);\n\t\tet3 = (TextView) findViewById(R.id.et3);\n\t\tet4 = (TextView) findViewById(R.id.et4);\n\t\tet5 = (TextView) findViewById(R.id.et5);\n\t\tet6 = (TextView) findViewById(R.id.et6);\n\t\tet7 = (TextView) findViewById(R.id.et7);\n\t\tet8 = (TextView) findViewById(R.id.et8);\n\t\tet9 = (TextView) findViewById(R.id.et9);\n\t\tet10 = (TextView) findViewById(R.id.et10);\n\t\tet11 = (TextView) findViewById(R.id.et11);\n\t\tet12 = (TextView) findViewById(R.id.et12);\n\t\tet13 = (TextView) findViewById(R.id.et13);\n\t\tet14 = (TextView) findViewById(R.id.et14);\n\t\ttv_total1 = findViewById(R.id.tv_total1);\n\t\ttv_total2 = findViewById(R.id.tv_total2);\n\t\tiv1 = findViewById(R.id.im1);\n\t\tiv2 = findViewById(R.id.im2);\n\t\tiv3 = findViewById(R.id.im3);\n\t\tiv4 = findViewById(R.id.im4);\n\t\tiv5 = findViewById(R.id.im5);\n\t\tiv6 = findViewById(R.id.im6);\n\t\tiv7 = findViewById(R.id.im7);\n\t\tiv8 = findViewById(R.id.im8);\n\t\tiv9 = findViewById(R.id.im9);\n\t\tiv10 = findViewById(R.id.im10);\n\t\tiv11 = findViewById(R.id.im11);\n\t\tiv12 = findViewById(R.id.im12);\n\t\tiv13 = findViewById(R.id.im13);\n\t\tiv14 = findViewById(R.id.im14);\n\t\ttv_title1 = (TextView) findViewById(R.id.tv_title1);\n\t\ttv_title2 = (TextView) findViewById(R.id.tv_title2);\n\t\ttv_title3 = (TextView) findViewById(R.id.tv_title3);\n\t\ttv_title4 = (TextView) findViewById(R.id.tv_title4);\n\t\ttv_title5 = (TextView) findViewById(R.id.tv_title5);\n\t\ttv_title6 = (TextView) findViewById(R.id.tv_title6);\n\t\ttv_title7 = (TextView) findViewById(R.id.tv_title7);\n\t\tll_progress = (LinearLayout) findViewById(R.id.ll_progress);\n\t\tll_progress.setVisibility(View.VISIBLE);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_difficulty, container, false);\n\n view.findViewById(R.id.btn_Easy).setOnClickListener(this);\n view.findViewById(R.id.btn_Medium).setOnClickListener(this);\n view.findViewById(R.id.btn_Hard).setOnClickListener(this);\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_shouye, container, false);\n banner = view.findViewById(R.id.fly_banner);\n recy = view.findViewById(R.id.recy_view);\n return view;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n// if (findViewById(R.id.step_info_container) != null) {\n// mTWO_PANE = true;\n// }\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main, container, false);\n activity = getActivity();\n llmoni = view.findViewById(R.id.llmoni);\n imgsuiji=view.findViewById(R.id.imgsuiji);\n llshunxu = view.findViewById(R.id.llshunxu);\n llshunxu.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(activity, ShunxuActivity.class);\n startActivity(intent);\n }\n });\n imgsuiji.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(activity, SuijiAcitivity.class);\n startActivity(intent);\n }\n });\n llmoni.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(activity, MoniActivity.class);\n startActivity(intent);\n }\n });\n\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n titleTextView = (TextView)rootView.findViewById(R.id.textview_doodle_title);\n imageView = (ImageView)rootView.findViewById(R.id.image_doodle_full);\n\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\tView rootView = inflater.inflate(R.layout.fragment_exploredetails,\n\t\t\t\tcontainer, false);\n\n\t\tWindowManager wm = (WindowManager) getActivity().getSystemService(\n\t\t\t\tContext.WINDOW_SERVICE);\n\t\tDisplay display = wm.getDefaultDisplay();\n\t\tPoint size = new Point();\n\t\tdisplay.getSize(size);\n\t\tscreenWidth = size.x;\n\t\tscreenHeight = size.y / 2;\n\n\t\tplace_title = (TextView) rootView.findViewById(R.id.place_title);\n\t\ttext_walk = (TextView) rootView.findViewById(R.id.text_walk);\n\t\ttext_duration = (TextView) rootView.findViewById(R.id.text_duration);\n\t\ttext_accessible = (TextView) rootView.findViewById(R.id.text_);\n\t\ttxt_eventdetails = (TextView) rootView\n\t\t\t\t.findViewById(R.id.txt_eventdetails);\n\t\timg_imagedetls = (ImageView) rootView.findViewById(R.id.img_imagedetls);\n\t\ttext_time = (TextView) rootView.findViewById(R.id.text_time);\n\t\tdynamic_innerlayout = (RelativeLayout) rootView\n\t\t\t\t.findViewById(R.id.dynamic_innerlayout);\n\t\ttvStartTheTrail = (TextView) rootView\n\t\t\t\t.findViewById(R.id.tvStartTheTrail);\n\t\trlBannerImage = (RelativeLayout) rootView\n\t\t\t\t.findViewById(R.id.rlBannerImage);\n\t\tpageTitle = (String) getActivity().getIntent().getExtras()\n\t\t\t\t.get(\"PAGETITLE\");\n\n\t\tif (pageTitle.equals(\"Facilities\")) {\n\t\t\ttext_time.setVisibility(View.VISIBLE);\n\t\t\tdynamic_innerlayout.setVisibility(View.GONE);\n\t\t} else {\n\t\t\ttext_time.setVisibility(View.GONE);\n\t\t\tdynamic_innerlayout.setVisibility(View.VISIBLE);\n\t\t}\n\n\t\tif (LLDCApplication.selectedModel.getModelType() == LLDCApplication.TRAILS) {\n\t\t\t/*\n\t\t\t * if (LLDCApplication.isInsideThePark || LLDCApplication.isDebug) {\n\t\t\t * tvStartTheTrail.setVisibility(View.VISIBLE); } else {\n\t\t\t * tvStartTheTrail.setVisibility(View.GONE); }\n\t\t\t */\n\t\t\ttvStartTheTrail.setVisibility(View.VISIBLE);\n\t\t\tmExploreDetailsFragHandler.sendEmptyMessageDelayed(1101, 300000);\n\t\t} else {\n\t\t\ttvStartTheTrail.setVisibility(View.GONE);\n\t\t}\n\n\t\timg_imagedetls.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\tif (pageTitle.equals(\"Trails\")) {\n\t\t\t\t\tif (!LLDCApplication.isInsideThePark\n\t\t\t\t\t\t\t&& !LLDCApplication.isDebug) {\n\t\t\t\t\t\tLLDCApplication\n\t\t\t\t\t\t\t\t.onShowToastMesssage(\n\t\t\t\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\t\t\t\t\"Navigation will not function as it appears you are outside of the park or your GPS is not active.\");\n\t\t\t\t\t} else if (LLDCApplication.selectedModel.getWyapoitnList()\n\t\t\t\t\t\t\t.size() > 0) {\n\t\t\t\t\t\tIntent intent = new Intent(getActivity(),\n\t\t\t\t\t\t\t\tMapNavigationActivity.class);\n\t\t\t\t\t\tintent.putExtra(\"PAGETITLE\", \"Trails\");\n\t\t\t\t\t\tgetActivity().startActivity(intent);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLLDCApplication.onShowToastMesssage(getActivity(),\n\t\t\t\t\t\t\t\t\"Trail data is not present.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tonLoadData();\n\t\treturn rootView;\n\t}", "protected LayoutInflater getInflater(){\n return getActivity().getLayoutInflater();\n }", "int getItemViewLayoutId();" ]
[ "0.63010347", "0.62842643", "0.6209636", "0.61223084", "0.61133486", "0.60151666", "0.5975938", "0.5931326", "0.59307134", "0.5900017", "0.5873526", "0.5849583", "0.5842162", "0.5837948", "0.5835936", "0.58274657", "0.5808183", "0.5807042", "0.5793249", "0.5771531", "0.5765367", "0.57587296", "0.5745892", "0.57124203", "0.57008946", "0.5700627", "0.5697573", "0.5697144", "0.56922436", "0.56850445", "0.5672564", "0.5668991", "0.56634575", "0.56434745", "0.5636478", "0.56315166", "0.5619237", "0.5605001", "0.5603846", "0.55936056", "0.5593162", "0.5592695", "0.5583338", "0.5580055", "0.55778503", "0.557608", "0.5573439", "0.5573439", "0.5573439", "0.5567904", "0.55627257", "0.55569965", "0.5554968", "0.55362415", "0.5535617", "0.551345", "0.5511721", "0.55052274", "0.5503524", "0.5503262", "0.5502509", "0.550152", "0.5494684", "0.5493248", "0.54857576", "0.54849744", "0.5482276", "0.5482151", "0.5473042", "0.5470908", "0.5469575", "0.54685706", "0.5460792", "0.5460715", "0.546016", "0.54530936", "0.5451414", "0.54506654", "0.54504746", "0.5448905", "0.54487026", "0.5448615", "0.5442015", "0.54377675", "0.54366976", "0.5436261", "0.5434636", "0.5431481", "0.542894", "0.54284275", "0.54231006", "0.5422633", "0.5415776", "0.5414035", "0.5412109", "0.541087", "0.5408539", "0.54083234", "0.54072076", "0.5405207", "0.5404467" ]
0.0
-1
TODO Autogenerated method stub Integer i = new Integer(null) ; // number format exception
public static void main(String[] args) { Integer a = new Integer(1) ; String s = new String("null") ; System.out.println( " " + a + " " + s); // 1 null }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ARXInteger(String format){\r\n if (format == null || format.equals(\"Default\")){\r\n this.format = null;\r\n this.string = null; \r\n this.locale = null;\r\n } else {\r\n this.format = new DecimalFormat(format);\r\n this.string = format;\r\n this.locale = null;\r\n }\r\n }", "public static int nullToZero(Integer i)\n {\n if(i == null)\n {\n return 0;\n }\n else\n {\n return i.intValue();\n }\n }", "private static int unbox(Integer i) {\n\t\treturn (i == null) ? 0 : i;\n\t}", "public MyInteger(){\n //initialize to 0\n Integer myint = new Integer(0);\n }", "public Int() {\n super(Expression.X_IS_UNDEFINED);\n this.value = 0;\n }", "public Value(int i) {\n integer = i;\n itemClass = Integer.class;\n type = DataType.INT;\n }", "private ARXInteger(String format, Locale locale){\r\n if (format == null || format.equals(\"Default\")){\r\n this.format = null;\r\n this.string = null;\r\n this.locale = locale;\r\n } else {\r\n this.format = new DecimalFormat(format, new DecimalFormatSymbols(locale));\r\n this.string = format;\r\n this.locale = locale;\r\n }\r\n }", "public final void mINT() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = INT;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:317:5: ( '0' | ( NONNULL ( NUMBER )* ) )\n\t\t\tint alt4=2;\n\t\t\tint LA4_0 = input.LA(1);\n\t\t\tif ( (LA4_0=='0') ) {\n\t\t\t\talt4=1;\n\t\t\t}\n\t\t\telse if ( ((LA4_0 >= '1' && LA4_0 <= '9')) ) {\n\t\t\t\talt4=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 4, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt4) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:317:7: '0'\n\t\t\t\t\t{\n\t\t\t\t\tmatch('0'); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:317:13: ( NONNULL ( NUMBER )* )\n\t\t\t\t\t{\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:317:13: ( NONNULL ( NUMBER )* )\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:317:15: NONNULL ( NUMBER )*\n\t\t\t\t\t{\n\t\t\t\t\tmNONNULL(); \n\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:317:23: ( NUMBER )*\n\t\t\t\t\tloop3:\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tint alt3=2;\n\t\t\t\t\t\tint LA3_0 = input.LA(1);\n\t\t\t\t\t\tif ( ((LA3_0 >= '0' && LA3_0 <= '9')) ) {\n\t\t\t\t\t\t\talt3=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (alt3) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\t\t\t\t\trecover(mse);\n\t\t\t\t\t\t\t\tthrow mse;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\tbreak loop3;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public void testConvertStringLocaleNull() {\n Object result = null;\n try {\n result = LocaleConvertUtils.convert(\"123\", Integer.class, null, \"#,###\");\n } catch (final Exception e) {\n e.printStackTrace();\n fail(\"Threw: \" + e);\n }\n assertNotNull(\"Null Result\", result);\n assertEquals(\"Integer Type\", Integer.class, result.getClass());\n assertEquals(\"Integer Value\", Integer.valueOf(123), result);\n }", "public static Integer toInteger(java.lang.Object o)\n {\n\t if(o == null)\n\t {\n\t return 0;\n\t }\n\t else if(o.toString().equals(\"\"))\n\t {\n\t return 0;\n\t }\n\telse\n\t{\n\t return Integer.valueOf(o.toString());\n\t}\n }", "public static int toInt(java.lang.Object o)\n {\n if(o == null)\n {\n return 0;\n }\n else if(o.toString().equals(\"\"))\n {\n return 0;\n }\n else\n {\n return Integer.parseInt(o.toString());\n }\n }", "public IntegerField() {\r this(3, 0, 0, 0);\r }", "public static void main(String[] args) {\n\t\tint i = 100;\r\n\t\tInteger ii = new Integer(i);\r\n\t\tSystem.out.println(ii);\r\n\r\n\t\tString s = \"100\";\r\n\t\t// String s = \"abc\";//NumberFormatException\r\n\t\tInteger iii = new Integer(s);\r\n\t\tSystem.out.println(iii);\r\n\t}", "public MyInteger( )\n {\n this( 0 );\n }", "public TumpukanInteger(){\r\n this(KAPASITAS_DEFAULT);\r\n }", "public IntegerEditor() {\r\n\t super();\r\n\t}", "public InfiniteInteger(int anInteger)\n\t{\n\t\t// TO DO: Constructor\n\t\tString s = Integer.toString(anInteger);\n\t\t\n\t\tif(s.charAt(0) == '-')\n\t\t{\t\t\t\n\t\t\tthis.isNeg = true;\n\t\t\ts = s.substring(1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.isNeg = false;\n\t\t}\n\t\t\n\t\twhile(s.charAt(0) == '0')\n\t\t{\n\t\t\tif(s.length() == 1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\t\t\n\t\t\ts = s.substring(1);\n\t\t}\n\t\t\n\t\tinfNumber = new int[s.length()];\t\t\n\t\t\n\t\tfor(int i = 0; i < s.length(); i++)\n\t\t{\n\t\t\tinfNumber[i] = Character.getNumericValue(s.charAt(i));\n\t\t}\n\t}", "public void mo4637a(int i) {\n this.f2766a.bindNull(i);\n }", "private String feelZero(Integer i){\n if( i < 10 ){\n return \"0\"+i;\n }else{\n return Integer.toString(i);\n }\n }", "public NoDigitException(){\r\n\r\n\t}", "public IntegerLiteral(Integer number)\n {\n this.literal = number; \n }", "public InfiniteInteger(String s)\n\t{\n\t\t// TO DO: Constructor\t\t\t\t\t\t\t\t\n\t\tif(s.charAt(0) == '-')\n\t\t{\t\t\t\n\t\t\tthis.isNeg = true;\n\t\t\ts = s.substring(1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.isNeg = false;\n\t\t}\n\t\t\n\t\t\n\t\twhile(s.charAt(0) == '0')\n\t\t{\n\t\t\tif(s.length() == 1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\t\t\n\t\t\ts = s.substring(1);\n\t\t}\n\t\t\n\t\tinfNumber = new int[s.length()];\t\t\n\t\t\n\t\tfor(int i = 0; i < s.length(); i++)\n\t\t{\n\t\t\tinfNumber[i] = Character.getNumericValue(s.charAt(i));\n\t\t}\t\t\t\n\t}", "IntegerValue createIntegerValue();", "IntegerValue createIntegerValue();", "public static String prepareEmptyInt(Object object) {\n return (object == null ? \"-1\" : object.toString());\n }", "@Override\n\tpublic Object visitIntLiteral(IntLiteral literal) {\n\t\treturn null;\n\t}", "public IntegerValidator() {\r\n }", "public IntegerParserTest() {\n super(new IntegerParser());\n }", "public Int(int value) {\n super(Expression.X_IS_UNDEFINED);\n this.value = value;\n }", "public final Integer _parseInteger(JsonParser jVar, DeserializationContext gVar) throws IOException {\n int m = jVar.mo29329m();\n if (m == 3) {\n return (Integer) _deserializeFromArray(jVar, gVar);\n }\n if (m == 11) {\n return (Integer) _coerceNullToken(gVar, this._primitive);\n }\n switch (m) {\n case 6:\n String trim = jVar.mo29334t().trim();\n int length = trim.length();\n if (length == 0) {\n return (Integer) _coerceEmptyString(gVar, this._primitive);\n }\n if (_hasTextualNull(trim)) {\n return (Integer) _coerceTextualNull(gVar, this._primitive);\n }\n _verifyStringForScalarCoercion(gVar, trim);\n if (length <= 9) {\n return Integer.valueOf(NumberInput.m23779a(trim));\n }\n try {\n long parseLong = Long.parseLong(trim);\n if (!_intOverflow(parseLong)) {\n return Integer.valueOf((int) parseLong);\n }\n return (Integer) gVar.mo31517b(this._valueClass, trim, String.format(\"Overflow: numeric value (%s) out of range of Integer (%d - %d)\", trim, Integer.MIN_VALUE, Integer.MAX_VALUE), new Object[0]);\n } catch (IllegalArgumentException unused) {\n return (Integer) gVar.mo31517b(this._valueClass, trim, \"not a valid Integer value\", new Object[0]);\n }\n case 7:\n return Integer.valueOf(jVar.mo29247C());\n case 8:\n if (!gVar.mo31509a(DeserializationFeature.ACCEPT_FLOAT_AS_INT)) {\n _failDoubleToIntCoercion(jVar, gVar, \"Integer\");\n }\n return Integer.valueOf(jVar.mo29296K());\n default:\n return (Integer) gVar.mo31493a(this._valueClass, jVar);\n }\n }", "public Int() {\n this(0);\n }", "@Override\n public JsonParser.NumberType numberType() {\n // most types non-numeric, so:\n return null;\n }", "@Override\n public String visit(IntegerLiteralExpr n, Object arg) {\n return null;\n }", "@Test\n public void parseReturnsNullIfNotInteger() {\n assertNull(InputProcessing.tryParse(\"assdf\"));\n }", "@Test(expected = NullPointerException.class)\n public void formatLongNullInputTest(){\n Long number = null;\n Format.formatLong(number);\n }", "public T caseInteger(sensorDeploymentLanguage.Integer object) {\n\t\treturn null;\n\t}", "@RepeatedTest(20)\n void transformtoIntTest() {\n assertEquals(bi.transformtoInt(), new Int(bi.toInt(binary)));\n assertEquals(i.transformtoInt(),i);\n\n //Nulls\n assertEquals(f.transformtoInt(),Null);\n assertEquals(st.transformtoInt(),Null);\n assertEquals(bot.transformtoInt(),Null);\n assertEquals(bof.transformtoInt(),Null);\n assertEquals(Null.transformtoInt(),Null);\n }", "public static Integer parseInt(Object s) {\n\t\tif (s == null)\n\t\t\treturn 0;\n\t\tif (s != null && s.toString().isEmpty())\n\t\t\t;\n\t\treturn Integer.parseInt(s.toString());\n\t}", "@Override\n public int intValue(int numId) {\n return 0;\n }", "@Test(expected = NullPointerException.class)\n\tpublic void criaContatoNumeroNulo() {\n\t\tcontato = new Contato(\"Jardely\", \"Maris\", null);\n\t}", "public DataInt(Integer b) {\n this.i = b;\n }", "public boolean isInteger() {\n return false;\n }", "public DataInt() {\n }", "public T caseIntegerValue(IntegerValue object) {\n\t\treturn null;\n\t}", "public IntHolder() {\r\n\t}", "default int asInt() {\n\t\tthrow new EvaluatorException(\"Expecting an integer value\");\n\t}", "int toInteger(String value) {\n value = value.trim();\n if (\"9999\".equals(value)) value = \"\";\n return (!\"\".equals(value)\n ? new Integer(value).intValue()\n : Tables.INTNULL);\n }", "public FormatInteger blankFill(){\n fillCharacter = BLANK_CHAR;\n return this;\n }", "private static int parseIntWithDefault(String p_78862_0_, int p_78862_1_) {\n/* */ try {\n/* 108 */ return Integer.parseInt(p_78862_0_.trim());\n/* */ }\n/* 110 */ catch (Exception var3) {\n/* */ \n/* 112 */ return p_78862_1_;\n/* */ } \n/* */ }", "public GeneralTreeOfInteger() {\n root = null;\n count = 0;\n }", "public negativeNumberException (String info )\r\n\t {\r\n\t super(info);\r\n\t }", "public T caseNumber(org.uis.lenguajegrafico.lenguajegrafico.Number object)\n {\n return null;\n }", "private FinalIntegerNode() { }", "@Test\n public void intInvalidType() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.INT, new TextNode(\"-13\"));\n assertNull(retVal);\n }", "public BadTrackingNumberFormatException(){\n super(\"That tracking number is not correct.\");\n }", "public Integer getNumberValue()\n\t{\n\t\treturn (number == null) ? null : number.value;\n\t}", "public Snippet visit(CoercionToIntExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t \n\t\t\t_ret.returnTemp = \"(\" + \"int\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Integer();\n\t return _ret;\n\t }", "IntegerLiteralExp createIntegerLiteralExp();", "public static void main(String[] args) {\n\n int a = 5; // premitive data type\n\n Integer ii1 = new Integer(a); // boxing or wrapping\n System.out.println(\"ii1=\"+ii1);\n\n Integer ii2 = new Integer(10);\n System.out.println(\"ii2=\"+ii2);\n\n Integer ii3 = a;\n Integer ii4 = 15; // autoboxing or autowrapping\n System.out.println(\"ii3=\"+ii3);\n System.out.println(\"ii4=\"+ii4);\n\n // Integer ii1 = new Integer(a);\n // converting non premitive into premitive\n int a1 = ii1.intValue();// unboxing or unwrapping\n int a2 = ii1;// autounboxing or autounwrapping\n\n }", "NullSt (int ln) { super (ln); }", "private\tNum(int num) { value = num; }", "@Override\n\tpublic int getNumericCode() {\n\t\treturn 0;\n\t}", "public MutableInteger(String s) throws NumberFormatException {\n m_value = Integer.parseInt(s, 10);\n }", "@Override\n\tpublic void outAIntegerExpr(AIntegerExpr node) {\n\t\til.append(new PUSH(cp, Integer.valueOf(node.getNumber().getText()))); \n\n\t}", "public static Integer castInt(Object o) {\n\t\tif (o instanceof Number) {\n\t\t\treturn ((Number) o).intValue();\n\t\t}\n\n\t\treturn null;\n\t}", "public static Integer toInteger(Object value) {\n if (value instanceof Integer)\n return (Integer)value;\n else if (value instanceof Long)\n return (int)(long)(Long)value;\n else if (value instanceof Double)\n return (int)(double)(Double)value;\n else if (value == null)\n return null;\n else\n throw new RuntimeException(\"Can't convert [\" + value + \"] to Integer\");\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testIllegalArgument() {\n\t\tnew NumberConverter(1242);\n\t}", "public T caseExpression_Integer(Expression_Integer object)\r\n {\r\n return null;\r\n }", "@Override\r\n\tpublic Object visitIntegerLiteralExpression(\r\n\t\t\tIntegerLiteralExpression integerLiteralExpression, Object arg)\r\n\t\t\tthrows Exception {\n\t\tmv.visitLdcInsn(integerLiteralExpression.integerLiteral.getIntVal());\r\n\t\tif(arg != null)\r\n\t\t{\r\n//\t\t mv.visitMethodInsn(INVOKESTATIC, \"java/lang/Integer\", \"valueOf\", \"(I)Ljava/lang/Integer;\");\r\n\t\t}\r\n\t\treturn \"I\";\r\n\t}", "@Test\n public void testParseInt() {\n IntegerSpec integerSpec = new IntegerSpec();\n integerSpec.setDefaultValue(0);\n dataTypeParser.setDataTypeSpec(integerSpec);\n dataTypeParser.parse();\n IntegerSpec parsedIntegerSpec = (IntegerSpec) dataTypeParser.getDataTypeSpec();\n\n assertNull(parsedIntegerSpec.getMinValue());\n assertNull(parsedIntegerSpec.getMaxValue());\n }", "protected Int() {}", "public IntegerDt getNumber() { \n\t\tif (myNumber == null) {\n\t\t\tmyNumber = new IntegerDt();\n\t\t}\n\t\treturn myNumber;\n\t}", "public IntegerDt getNumber() { \n\t\tif (myNumber == null) {\n\t\t\tmyNumber = new IntegerDt();\n\t\t}\n\t\treturn myNumber;\n\t}", "int checkNull(int value) {\n return (value != Tables.INTNULL ? value : 0);\n }", "private static String findNumber() {\n\t\treturn null;\r\n\t}", "public IntegerDt getNumberElement() { \n\t\tif (myNumber == null) {\n\t\t\tmyNumber = new IntegerDt();\n\t\t}\n\t\treturn myNumber;\n\t}", "public IntegerDt getNumberElement() { \n\t\tif (myNumber == null) {\n\t\t\tmyNumber = new IntegerDt();\n\t\t}\n\t\treturn myNumber;\n\t}", "public static String integerToString(Integer i) {\n String ret = \"\";\n if (i!=null)\n ret = i.toString();\n\n return ret;\n }", "public static void main(String[] args) {\n\t\t\n\t\tInteger obj= new Integer(10);\n\t\t\n\t\tint value=obj.intValue();\n\t\t\n\t\tint data=obj; //auto unboxing\n\t\t//int data=obj.intValue();\n\t\t\n\t\tobj=200; //autoboxing\n\t\t//obj=new Integer(200);\n\n\t}", "public NumberP(ErrorTypesNumber error) { Error = error; }", "public T caseIntegerLiteralExpCS(IntegerLiteralExpCS object) {\r\n return null;\r\n }", "public static void main(String[] args) {\n int a=I;\n System.out.println(\"Auto_unboxing\"+a);\n Integer b=new Integer(a);\n System.out.println(\"Auto_boxing\"+b);\n\t}", "public NestedInteger() { }", "public MyInteger(int value)\n\t{\n\t\tthis.value = value;\n\t}", "@Override\r\n\tpublic Integer getValue() {\n\t\treturn null;\r\n\t}", "public T caseIntegerLiteral(IntegerLiteral object)\n {\n return null;\n }", "public Happy_Number()\r\n\t{\r\n\t\tnumberHolder = new int[20];\r\n\t\tfor(int ii = 0; ii < numberHolder.length; ii++)\r\n\t\t{\r\n\t\t\tnumberHolder[ii] = 0;\r\n\t\t}\r\n\t}", "public IntegerLiteral(String number)\n {\n try\n {\n this.literal = Integer.parseInt(number);\n }\n catch(NumberFormatException e)\n {\n throw new IllegalArgumentException(e.getMessage());\n }\n }", "NumberValue createNumberValue();", "public final void mNUMBER() throws RecognitionException {\n\t\ttry {\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:314:17: ( ( '0' | NONNULL ) )\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "private double IntegerParseIn(double Precio) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void setM_Inventory_ID (int M_Inventory_ID)\n{\nif (M_Inventory_ID <= 0) set_Value (\"M_Inventory_ID\", null);\n else \nset_Value (\"M_Inventory_ID\", new Integer(M_Inventory_ID));\n}", "public int getIntegerValue() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an integer.\");\n }", "public negativeNumberException() {\r\n\t \t \r\n\t }", "public void putInteger (JSONObject target , String key , Integer value){\r\n\t\tif ( value==null){\r\n\t\t\ttarget.put(key, JSONNull.getInstance());\r\n\t\t\treturn ; \r\n\t\t}\r\n\t\ttarget.put(key, new JSONNumber(value));\r\n\t}", "public Number(int v)\n {\n val = v;\n }", "@Test\n public void test098() throws Throwable {\n NumberInput numberInput0 = new NumberInput((Component) null, \"\", \"m\", \"m\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.param((CharSequence) \"m\", (CharSequence) \"\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public static void generator(String nro){\n Integer.parseInt(nro);\r\n }", "public MutableInt() {}", "<C> IntegerLiteralExp<C> createIntegerLiteralExp();" ]
[ "0.695061", "0.6707158", "0.63750976", "0.635199", "0.6282564", "0.6268034", "0.6251218", "0.62187797", "0.6141613", "0.6050991", "0.6005393", "0.59638786", "0.59618896", "0.5921569", "0.591775", "0.5904899", "0.5904357", "0.58864784", "0.58833086", "0.5882443", "0.58460903", "0.5788813", "0.5758677", "0.5758677", "0.57570386", "0.5741417", "0.5733434", "0.57321477", "0.57310987", "0.57303643", "0.57272047", "0.5727107", "0.5709996", "0.57075495", "0.56931597", "0.5649117", "0.5645872", "0.5636069", "0.5635909", "0.561362", "0.55962753", "0.5581226", "0.5580367", "0.5579956", "0.5578356", "0.55734015", "0.5567198", "0.5551629", "0.5527266", "0.55255073", "0.5517735", "0.5516666", "0.5509684", "0.5500902", "0.5467489", "0.54670185", "0.54635185", "0.54617196", "0.545872", "0.54579556", "0.5453043", "0.54526085", "0.54483664", "0.5445034", "0.5444224", "0.54364944", "0.5431866", "0.5431039", "0.54308736", "0.54224366", "0.54157573", "0.54118055", "0.54118055", "0.53945065", "0.5386019", "0.53642964", "0.53642964", "0.53553104", "0.5350096", "0.53499234", "0.53487855", "0.5347914", "0.53360796", "0.5334188", "0.53334606", "0.5333135", "0.5331997", "0.53296477", "0.53293204", "0.53247094", "0.5322074", "0.5309232", "0.5308198", "0.5299221", "0.52975476", "0.52958477", "0.5280461", "0.5279574", "0.52763367", "0.52672744" ]
0.55250764
50
Empty constructor that doesn't initialize the matrix. Subclasses are responsible for initializing instances of this class that are built using this constructor.
protected ConfusionMatrix(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected SimpleMatrix() {}", "public Matrix33() {\r\n // empty\r\n }", "public Matrix() {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "public Matrix() {\n\tmatrix = new Object[DEFAULT_SIZE][DEFAULT_SIZE];\n }", "Matrix()\n {\n x = new Vector();\n y = new Vector();\n z = new Vector();\n }", "public Matrix(){\r\n\t\t\r\n\t\t//dim = dimension; for now, only 3-dim. matrices are being handled\r\n\t\tmat = new int[dim][dim];\r\n\t\t\r\n\t\tfor(int rowi = 0; rowi < dim; rowi++ )\r\n\t\t\tfor (int coli = 0; coli < dim; coli++)\r\n\t\t\t\tmat[rowi][coli]=0;\r\n\t}", "protected DenseMatrix()\n\t{\n\t}", "Matrix(){\n matrixVar = new double[1][1];\n rows = 1;\n columns = 1;\n }", "Matrix(int rows, int columns) {\n try {\n if (rows < 1 || columns < 1) {\n throw zeroSize;\n }\n this.rows = rows;\n this.columns = columns;\n matrix = new int[rows][columns];\n\n for (int rw = 0; rw < rows; rw++) {\n for (int col = 0; col < columns; col++) {\n matrix[rw][col] = (int) Math.floor(Math.random() * 100);\n }\n }\n }\n catch (Throwable zeroSize) {\n zeroSize.printStackTrace();\n }\n\n }", "public BinaryMatrixNew() {\n\t\t\tsuper(Matrixes.<R, C>newValidating(PredicateUtils.inBetween(0d, 1d)));\n\t\t}", "public Matrix4f() {\n setIdentity();\n }", "public Matrix(int rows, int cols) {\n this.rows = rows;\n this.cols = cols;\n data = new double[rows][cols];\n }", "public Matrix(int x, int y) {\n\t\tnrow=x;\n\t\tncol=y;\n\t\tmat = new int[x][y];\n\t\t\n\n\t}", "public Matrix(int rows, int columns) {\n\t\tthis.rows = rows;\n\t\tthis.columns = columns;\n\t\tthis.matrix = new double[rows][columns];\n\t}", "public DoubleMatrixDataset() {\r\n }", "public TransformationMatrix() {\n\t\ta11 = 1; a12 = 0; a13 = 0; a14 = 0;\n\t\ta21 = 0; a22 = 1; a23 = 0; a24 = 0;\n\t\ta31 = 0; a32 = 0; a33 = 1; a34 = 0;\n\t}", "public DenseMatrix( int rows , int columns )\n\t{\n\t\tsuper( rows , columns );\n\n\t\tmatrixData\t\t= new double[ rows ][ columns ];\n\t}", "public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }", "public Matrix3f() {\n\t\n \tthis.setZero();\n }", "public Matrix(int rowSize, int columnSize) {\n if (rowSize < 1 || columnSize < 1) {\n matrix = new double[DEFAULT_SIZE][DEFAULT_SIZE];\n } else {\n matrix = new double[rowSize][columnSize];\n }\n }", "public Sudoku() {\n\t\tgrid = new Variable[ROWS][COLUMNS];\n\t}", "public Matrix(int n) {\n\t\tsize = n;\n\t\tm = new int[size][size];\n\t}", "protected AbstractMatrix3D() {}", "public Matrix(int rowCount, int columnCount) {\n this.rowCount = rowCount;\n this.columnCount = columnCount;\n data = new double[rowCount][columnCount];\n }", "public Matrix(int nrow, int ncol){\r\n\t\tthis.nrow = nrow;\r\n\t\tthis.ncol = ncol;\r\n\t \tthis.matrix = new double[nrow][ncol];\r\n\t\tthis.index = new int[nrow];\r\n for(int i=0;i<nrow;i++)this.index[i]=i;\r\n }", "public Matrix(double[][] data) {\n M = data.length;\n N = data[0].length;\n this.data = new double[M][N];\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n this.data[i][j] = data[i][j];\n }", "public Complex() {\n this(0);\n }", "public Matrix(int nrOfRows, int nrOfCols) {\n this.nrOfRows = nrOfRows;\n this.nrOfCols = nrOfCols;\n inner = new BigInteger[nrOfRows][nrOfCols];\n }", "public Map(){\n this.matrix = new int[10][10];\n }", "public Matrix(int n) {\n\t\tif (n < 1) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tthis.n = n;\n\t\tthis.content = new double[n][n];\n\t\tthis.hash = hashCode();\n\t}", "public Board() {\n\t\tfor(int i = 0; i < board.length; i++){\n\t\t\tfor(int j = 0; j < board[i].length; j++){\n\t\t\t\tboard[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}", "public Matrix(int m, int n) {\n this.m = m;\n this.n = n;\n data = new double[m][n];\n }", "public JTensor() {\n this(TH.THTensor_(new)());\n }", "public Sudoku() {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tthis.initialState[i][j] = this.currentState[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}", "public Complex(){\r\n\t this(0,0);\r\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Matrix(int M, int N) {\n this.M = M;\n this.N = N;\n data = new double[M][N];\n }", "public Matrix(double[] data) {\n m = data.length;\n n = 1;\n this.data = new double[m][n];\n for (int i = 0; i < m; i++)\n {\n for (int j = 0; j < n; j++)\n {\n \tthis.data[i][j] = data[i];\n }\n }\n }", "public Board() {\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n this.grid[row][col] = 0;\n }\n }\n }", "public Mesh() {\n this(DEFAULT_COORDS);\n }", "public Matrix(double[][] data) {\n rowCount = data.length;\n columnCount = data[0].length;\n this.data = new double[rowCount][columnCount];\n for (int i = 0; i < rowCount; i++)\n for (int j = 0; j < columnCount; j++)\n this.data[i][j] = data[i][j];\n }", "protected GamaMatrix(final IScope scope, final List objects, final ILocation preferredSize, final IType contentsType) {\r\n\t\tif ( preferredSize != null ) {\r\n\t\t\tnumRows = (int) preferredSize.getY();\r\n\t\t\tnumCols = (int) preferredSize.getX();\r\n\t\t} else if ( objects == null || objects.isEmpty() ) {\r\n\t\t\tnumRows = 1;\r\n\t\t\tnumCols = 1;\r\n\t\t} else if ( GamaMatrix.isFlat(objects) ) {\r\n\t\t\tnumRows = 1;\r\n\t\t\tnumCols = objects.size();\r\n\t\t} else {\r\n\t\t\tnumCols = objects.size();\r\n\t\t\tnumRows = ((List) objects.get(0)).size();\r\n\t\t}\r\n\t\tthis.type = Types.MATRIX.of(contentsType);\r\n\t}", "public Matrix(double[][] now) {\n\t\tmatrix = now;\n\t}", "public Matrix(Matrix bb){\r\n\t\tthis.nrow = bb.nrow;\r\n\t\tthis.ncol = bb.ncol;\r\n\t\tthis.matrix = bb.matrix;\r\n\t\tthis.index = bb.index;\r\n this.dswap = bb.dswap;\r\n \t}", "public static Matrix Zero(int n) {\n return new Matrix(get2DListOfSize(n));\n }", "public JCudaMatrix(int rows) {\n this(rows, 1);\n }", "public Matrix(int[][] array)\n {\n matrix = array;\n }", "public Cell()\n\t{\n\t}", "public Board()\r\n\t{\r\n\t\tsuper(8, 8);\r\n\t}", "public Matrix(double[][] matrix) {\r\n this.matrix = matrix;\r\n }", "Matrix(double[][] input) {\n matrixVar = input;\n columns = matrixVar[0].length;\n rows = matrixVar.length;\n }", "public Matrix(ComplexNumber[][] rows) {\n\t\tROWS = rows;\n\t\tM = rows.length;\n\t\tN = rows[0].length;\n\t\tfor (int row = 0; row < M; row++) {\n\t\t\tif (rows[row].length != N) {\n\t\t\t\tthrow new RuntimeException(\"Non-Rectangular Matrix!\");\n\t\t\t}\n\t\t}\n\t}", "public Matrix P0 ();", "public Table() {\n // <editor-fold desc=\"Initialize Cells\" defaultstate=\"collapsed\">\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n if (cells[row][column] == null) {\n cells[row][column] = new Cell(row, column);\n }\n }\n }\n // </editor-fold>\n }", "public TriangleSolitaireModelImpl(int emptyRow, int emptyCol) throws IllegalArgumentException {\r\n super(new TriangleBoard(emptyRow, emptyCol));\r\n }", "public Matrix(double[][] array) {\n this.array = array; // note: danger!\n }", "public RegularGrid() {\r\n }", "public Board()\r\n\t{\r\n\t\treset();\r\n\t}", "public Sudoku() {\n this.board = new int[size][size];\n }", "@Test\n public void testConstructor() {\n final Matrix33d m = new Matrix33d();\n double a[] = m.getA();\n for (int i = 0; i < a.length; i++) {\n assertEquals(a[i], 0D);\n }\n }", "public Board() {\n initialize(3, null);\n }", "public Matrix(double[][] data) {\n rows = data.length;\n cols = data[0].length;\n this.data = new double[rows][cols];\n for (int i = 0; i < data.length; i++) {\n System.arraycopy(data[i], 0, this.data[i], 0, data[i].length);\n }\n }", "public Triangle() {\n this(0,0,0,0,0);\n }", "Matrix(int r,int c)\n {\n this.r=r;\n this.c=c;\n arr=new int[r][c];\n }", "public Matrix(double[][] A, int m, int n) {\n this.data = A;\n this.m = m;\n this.n = n;\n }", "public Square () {\r\n super();\r\n \r\n }", "public Matrix(double[][] array) {\n this.matrix = array;\n }", "public TwoClassConfusionMatrix() {\n\t}", "public Classroom()\n { \n // Create a new world with 10x6 cells with a cell size of 130x130 pixels.\n super(10, 6, 130); \n prepare();\n }", "public Board()\n\t{\n\t\tcols = DEFAULT_WIDTH;\n\t\trows = DEFAULT_HEIGHT;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = -1;\n\t\t}\n\t}", "public Board() {\n this.x = 0;\n this.o = 0;\n }", "private Row() {\n }", "public Board() {\n\n for(int row = 0; row < size; row++) {\n for(int col = 0; col < size; col++) {\n\n grid[row][col] = \"-\";\n\n }\n }\n\n }", "public MrnWoatlas5() {\n clearVars();\n if (dbg) System.out.println (\"<br>in MrnWoatlas5 constructor 1\"); // debug\n }", "public static Matrix makeZero(int rows, int columns) {\n\t\treturn new Matrix(rows, columns);\n\t}", "public SimpleMatrix( int numRows, int numCols, MatrixType type ) {\n switch (type) {\n case DDRM:\n setMatrix(new DMatrixRMaj(numRows, numCols));\n break;\n case FDRM:\n setMatrix(new FMatrixRMaj(numRows, numCols));\n break;\n case ZDRM:\n setMatrix(new ZMatrixRMaj(numRows, numCols));\n break;\n case CDRM:\n setMatrix(new CMatrixRMaj(numRows, numCols));\n break;\n case DSCC:\n setMatrix(new DMatrixSparseCSC(numRows, numCols));\n break;\n case FSCC:\n setMatrix(new FMatrixSparseCSC(numRows, numCols));\n break;\n default:\n throw new RuntimeException(\"Unknown matrix type\");\n }\n }", "public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}", "public XL() {\n Reporter.log(\"New XL ctor\", true);\n }", "public BitBoardImpl() {\n\tinitialPosition();\n }", "public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}", "public PersonalBoard(){\n this(0);\n }", "public Cell(){}", "public Board() {\n\t\tintializeBoard(_RowCountDefault, _ColumnCountDefault, _CountToWinDefault);\n\t}", "public Celula() {\n this(null);\n }", "public void SetMatrixToZeros() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 0;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 0;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 0;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 0;\t\n \n }", "private Board() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// A private board constructor to ensure only one is created\n\t\tsuper();\n\t}", "public Transform(Transform transform){\n System.arraycopy(transform.matrix, 0, matrix, 0, 16); \n }", "private Environment(int rows, int columns)\r\n\t{\r\n\t\tthis.rows = rows;\r\n\t\tthis.columns = columns;\r\n\t\tcells = new Cell[rows][columns];\r\n\t\tfor (int i = 0; i < rows; i++)\r\n\t\t\tfor (int j = 0; j < columns; j++)\r\n\t\t\t\tcells[i][j] = new Cell();\r\n\t}", "public Board() {\n\t\tdimension = 9;\n\t\tpuzzle = new int[dimension][dimension];\n\t}", "public JCudaMatrix(int rows, int cols) {\n this.rows = rows;\n this.cols = cols;\n disposers.entrySet().stream().filter(e -> !e.getKey().keep).collect(Collectors.toList())\n .forEach(e -> disposers.remove(e.getKey()).run());\n createPointersNoBackingArray();\n disposers.put(this, this::dispose);\n }", "protected SimpleHeatmapNodeModel() {\r\n\t\tsuper(1, 0);\r\n\t}", "public JumbleBoard()\n {\n }", "public DiscMesh() {\n this(1f, 25);\n }", "public CircularGrid() {\r\n\t\tthis(0, false, false);\r\n\t}", "public void clear() {\n rows = cols = 0;\n matrix.clear();\n }", "public LifeSimulator(int numRows, int numColumns) throws Exception {\n\t\t_numRows = numRows;\n\t\t_numColumns = numColumns;\n\t\t_matrix = new LifeMatrix(numRows, numColumns);\n\t\tinitMatrix();\n\t}", "public Layout() {\n\n //nao precisa colocar externo, apenas referencia com a linha 0\n for (int i = 0; i < 4; i++) {\n matrix[0][i] = Estados.EXTERNO;\n }\n for (int i = 0; i < 4; i++) {\n matrix[1][i] = Estados.ROOM;\n }\n\n matrix[2][1] = Estados.ROOM_EMPTY;\n matrix[2][2] = Estados.ROOM_EMPTY2;\n\n matrix[2][0] = Estados.ACESSO_EXTERNO;\n matrix[2][3] = Estados.ACESSO_INTERNO;\n\n for (int i = 0; i < 4; i++) {\n matrix[3][i] = Estados.ROOM;\n }\n\n for (int i = 0; i < 4; i++) {\n matrix[4][i] = Estados.EXTERNO2;\n }\n\n }", "public Matrix asMatrix() {\n Matrix result;\n try {\n result = new Matrix(COMPONENTS, 1);\n asMatrix(result);\n } catch (final WrongSizeException ignore) {\n // never happens\n result = null;\n }\n return result;\n }", "public Square()\r\n {\r\n super();\r\n }", "public Grid() {\n }" ]
[ "0.850015", "0.81484514", "0.814495", "0.8107121", "0.7901633", "0.77527416", "0.7656882", "0.7420843", "0.6919608", "0.6892805", "0.6884626", "0.68137306", "0.68110317", "0.680601", "0.67479926", "0.673448", "0.6724301", "0.6700168", "0.6688182", "0.66591996", "0.664964", "0.65947187", "0.65900594", "0.6511133", "0.64747405", "0.6462087", "0.6459732", "0.64564353", "0.64552426", "0.6455234", "0.64503986", "0.64431506", "0.6426949", "0.64240825", "0.64174545", "0.64172554", "0.6415907", "0.6404327", "0.6394338", "0.6366304", "0.63482845", "0.63270235", "0.6321662", "0.63210684", "0.63147277", "0.6309643", "0.6308056", "0.6297809", "0.62811756", "0.62743825", "0.6269751", "0.6266468", "0.626219", "0.62492293", "0.61931235", "0.61870337", "0.6166202", "0.6164379", "0.6164326", "0.6153006", "0.6149444", "0.61487913", "0.6143561", "0.6139536", "0.6138397", "0.6137569", "0.61307955", "0.6109792", "0.61056435", "0.6099267", "0.609126", "0.60741013", "0.6072056", "0.60559475", "0.60512346", "0.605076", "0.60503614", "0.60436845", "0.60435927", "0.6042742", "0.60402817", "0.6032072", "0.6026385", "0.60208803", "0.60154206", "0.60135037", "0.6010571", "0.60046756", "0.60000855", "0.59937006", "0.5991447", "0.5990758", "0.5990504", "0.59883064", "0.5982097", "0.59789264", "0.5970863", "0.59633005", "0.5958551", "0.5957842" ]
0.6152321
60
returns number of rows and columns.
public int size(){ return labels==null ? 0 : labels.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int getNumColumns();", "public abstract int numColumns();", "int getColumnsCount();", "int getColumnsCount();", "public int columnCount() {\n\t\treturn n_;\n\t}", "int getCellsCount();", "int colCount();", "private int size() {\n\treturn matrix.length; //# of rows\n }", "public Integer getN_COLS() {\n return n_COLS;\n }", "public int getSize() {\n return rows * cols;\n }", "public int obtenerNumeroColumnas() {\n\t\treturn matriz.get(0).size();\n\t}", "public abstract int getNumberOfColumnsInCurrentRow();", "public int getNumCols() { return numCols; }", "public int getNumColumns() {\n\t\treturn numColumns; \n\t}", "public int getNumColumns() { return columns.length; }", "public int numberOfColumns()\n {\n // TODO: get the number of columns\n return matrix[0].length;\n }", "public int getNumberOfColumns(){\n\t\treturn number_columns;\n\t}", "@Override\r\n\tpublic int getColumnsCount() {\r\n\t\tint result = 0;\r\n\t\tITableRow headerRow = this.getHeaderRow();\r\n\t\tif (null != headerRow) {\r\n\t\t\t// It is usually consistent that both the columns of table header and table cell\r\n\t\t\tresult = headerRow.getColumnsCount();\r\n\t\t}\r\n\t\telse if (this.hasBodyRow()) {\r\n\t\t\t// Gets the first line, with the number of columns of the first row as number of columns of the table\r\n\t\t\tITableRow row = this.getBodyRow(0);\r\n\t\t\tresult = row.getColumnsCount();\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public int getnCols() {\n return nCols;\n }", "public int getNumColumns() {\n\t\treturn numColumns;\n\t}", "public static int size() {\n return cells.size();\n }", "private int numCols(){\n return attrTable.getModel().getColumnCount();\n }", "public int getNumCols() {\n\t\treturn NUM_COLS; \n\t}", "public int getNumberOfColumns() {\n\t\tthis.openDataBase();\n\t\tint iColumnCount = 0;\n\t\ttry { \n\t\t\tCursor mcursor = myDataBase.rawQuery(\"Select * from \" + TABLE_POSES, null);\n\t\t iColumnCount = mcursor.getColumnCount();\n\t\t mcursor.close();\n\t\t}\n\t\tcatch (SQLException sqle) {\n\t\t\tLog.d(\"Database Error\", \"Error getting number of columns\");\n\t\t\tLog.d(\"SQL EXception\", sqle.toString());\n\t\t}\n\t\t\n\t\tthis.close();\n return iColumnCount;\n\t}", "int getRowsCount();", "public int getNumRows() { return numRows; }", "int getColumnCount();", "int getColumnCount();", "public static int findDimensions()\n {\n int dimension = 0;\n In in = new In(\"matrix_1.txt\");\n while(!in.isEmpty())\n {\n dimension++;\n in.readLine();\n }\n return dimension;\n }", "public abstract int getNumOfRows();", "public int getNumElements() {\n return mat.getNumCols()*mat.getNumRows();\n }", "public abstract int getNumRows();", "public int getNumRows() {\n\t\treturn NUM_ROWS; \n\t}", "public int getNumColumns() {\n return mNumColumns;\n }", "public int getNumCols() {\n return numCols;\n }", "public int getNumCols() {\n return numCols;\n }", "public int size() {\n\treturn slices*rows*columns;\n}", "public int numRows() {\n return mat.getNumRows();\n }", "private int numberOfColumns() {\n DisplayMetrics displayMetrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n int width = displayMetrics.widthPixels;\n int nColumns = width / imageWidth;\n if (nColumns < 2) return 2; //to keep the grid aspect\n return nColumns;\n }", "public int getNcol(){\r\n \treturn this.ncol;\r\n \t}", "public int columns( )\n {\n int col = 0;\n\n if( table != null )\n {\n col = table[0].length;\n } //end\n return (col);\n }", "public int getNumRows() {\n\t\treturn numRows;\n\t}", "int getColumns();", "int getColumns();", "int numberOfDimensions();", "public int getNumberOfCols() {\n return this.numberOfCols;\n }", "public int numCols() {\n\t /*return the number of columns in the field*/\n return col; \n }", "public int getNumRows() {\n return numRows;\n }", "public int getNumRows() {\n return numRows;\n }", "public int numberOfColumns() {\n\t\treturn colCount;\n\t}", "public int getClumns() {\n return this.matrix[0].length;\n }", "public int size() {\r\n return cells.size();\r\n }", "public int getCellsCount() {\n return cells_.size();\n }", "public int getCols();", "public int getNumCols () {\n\t\treturn numcols_;\n\t}", "public int getNumFields() {\n return columns.size();\n }", "public int size() {\n return matrix.length;\n }", "public int getColumnCount();", "public int getNumRows() { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Getter for the number of rows\n\t\treturn numRows; \n\t}", "public int size() {\n return _matrix.length;\n }", "@Override\n public int getNumCols(){ return WIDTH; }", "public int getRows() {\n\t\treturn NUM_OF_ROWS;\n\t}", "public int getColumns() {\n\t\treturn NUM_OF_COLUMNS;\n\t}", "public int getNumRows() {\n\n if (columns.length < 1) {\n return 0;\n }\n\n return columns[0].getNumRows();\n }", "public int getRowCount() {\r\n //return outputs.length;\r\n return NUM_ROW;\r\n }", "public int getCellsCount() {\n if (cellsBuilder_ == null) {\n return cells_.size();\n } else {\n return cellsBuilder_.getCount();\n }\n }", "public int getRowSize() {\n \t\treturn this.rows;\n \t}", "public static int colCount() {\n\treturn sheet.getRow(0).getLastCellNum();\n\t}", "public int numCols() {\n return mat.getNumCols();\n }", "public int getNumberOfCells() {\n return tableCellList.size();\n }", "public int getRowNumber() {\n return cols;\n }", "public int getSize() {\n\t\treturn grid.length;\n\t}", "public abstract int rows();", "public int getNumCol() {\n\t\treturn dc.size();\n\t}", "public int size() {\n return numberOfRows();\n }", "public int getActualRowCount() {\r\n int ret = 0;\r\n if (rows != null) ret = rows.size();\r\n return ret;\r\n }", "public int getRows();", "public int getRows();", "public static byte getRowSize() {\n return ROW_SIZE;\n }", "public abstract int getNbMinColumns( );", "public int rowCount() {\n\t\treturn n_;\n\t}", "public int getRowCount()\n {\n return numRows;\n }", "public int getRows() {\n return this.matrix.length;\n }", "private int numRows(){\n return attrTable.getModel().getRowCount();\n }", "public int getBoardSize(){\n\t\treturn grids.getRows();\n\t}", "public int getxlength(){ \n return numcols*boxsize;\n }", "int columnPairsSize();", "public int rows() {\n\treturn rows;\n}", "@Override\n\tpublic int size() {\n\t\treturn this.nDims;\n\t}", "public int getSize(){\n\treturn Cells.size();\n }", "public int getNumRows () {\n\t\treturn numrows_;\n\t}", "private int getNIdx() {\n return this.colStartOffset + 7;\n }", "public int columns() {\n\treturn columns;\n}", "public int getTupleLength() {\n int size = 0;\n for(TupleDescItem item : columns) {\n size += item.getType().getLen();\n }\n return size;\n }", "public static int rowCount() {\n\t return sheet.getPhysicalNumberOfRows();\n\t}", "public int getRowCount()\r\n {\r\n return height;\r\n }", "public long dimCount()\n\t{\n\t\treturn (long)multimemory.dims.length;\n\t}", "public int getColumnNumber() {\n return rows;\n }", "public int totalRowsCount();", "public int getRowsCount() {\n return rows_.size();\n }", "private int calcNumberOfColumns() {\n\t\tint result = 0;\n\t\tif (fields != null) {\n\t\t\tIterator<FieldEditor> e = fields.iterator();\n\t\t\twhile (e.hasNext()) {\n\t\t\t\tFieldEditor pe = e.next();\n\t\t\t\tresult = Math.max(result, pe.getNumberOfControls());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}" ]
[ "0.78024197", "0.77646434", "0.7752778", "0.7752778", "0.76546156", "0.76311994", "0.7562183", "0.7537164", "0.7483681", "0.74408245", "0.7424997", "0.740351", "0.7391872", "0.7381089", "0.73800826", "0.73649323", "0.73625594", "0.7362221", "0.7341576", "0.731841", "0.73164195", "0.7252751", "0.725167", "0.72406244", "0.7221955", "0.72202915", "0.7215493", "0.7215493", "0.7196082", "0.7189467", "0.71831036", "0.71642536", "0.7143872", "0.71383685", "0.7105133", "0.7105133", "0.7098801", "0.70931137", "0.7090308", "0.7089209", "0.7080914", "0.7072606", "0.70692635", "0.70692635", "0.70513916", "0.70484006", "0.7045267", "0.7031555", "0.7031555", "0.70292395", "0.70197767", "0.7010671", "0.7000036", "0.6990256", "0.6969653", "0.6953812", "0.69513404", "0.6942465", "0.6936406", "0.6930117", "0.6918634", "0.6918628", "0.6917653", "0.6909602", "0.6894306", "0.68935263", "0.6882209", "0.68577003", "0.68524677", "0.6840977", "0.6803124", "0.67889446", "0.6783261", "0.6781542", "0.67794746", "0.6774042", "0.67580104", "0.67580104", "0.6737608", "0.6728403", "0.6727091", "0.6725444", "0.67245966", "0.6723239", "0.6720362", "0.6713285", "0.67110854", "0.6708894", "0.6707324", "0.67023575", "0.669914", "0.6696644", "0.66905135", "0.66880715", "0.66873705", "0.6681452", "0.6679977", "0.6654453", "0.6652815", "0.6646971", "0.66393" ]
0.0
-1
returns index associated to a label
private int resolveIndex(Label l){ if(l == null){ throw new NullPointerException("cannot resolve index of ConfusionMatrix of null label/class (null Label object)"); } String key = l.getValue(); if(l.isEmpty()){ throw new IllegalArgumentException("cannot resolve index of ConfusionMatrix of emtpy label/class value"); } if(!indexMap.containsKey(key)){ throw new IllegalArgumentException("could not resolve ConfusionMatrix index for unknown label: "+key); } return indexMap.get(key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findVertIndex(T vertLabel) {\n ArrayList<T> labelRow = matrix.get(0);\n int vertIndex;\n if ((vertIndex = labelRow.indexOf(vertLabel)) == -1) {\n // System.out.println(\"Error: Vertex '\" + vertLabel + \"' does not exist in the matrix\");\n return -1;\n }\n vertIndex += 1; //Add 1 to account for the label cell\n return vertIndex;\n }", "public static int findStateLabelIndex(ArrayStr labels, String desired) {\n return opensimCommonJNI.TableUtilities_findStateLabelIndex__SWIG_0(ArrayStr.getCPtr(labels), labels, desired);\n }", "public int getIndex();", "public int getIndex();", "public int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "synchronized public int getId(String label) { \n\treturn label2id.get(label).intValue();\n }", "public int findTargetBB(String label) {\n\t\tString targetLB = null;\n\t\tfor (int i = 1; i <= BasicBlocks.size(); i++) {\n\t\t\ttargetLB = BasicBlocks.get(i).get(0);\n\t\t\tint lbLen = 0;\n\t\t\tint j = 0;\n\t\t\twhile (targetLB.charAt(j) != ' ') {\n\t\t\t\tlbLen++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ttargetLB = targetLB.substring(0, lbLen);\n\t\t\tif (targetLB.equals(label)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "private static int getInstanceID (String label)\n {\n\tchar c;\n\tfor (int i = 0; i < label.length (); i++) {\n\t c = label.charAt (i);\n\t if (Character.isDigit (c)) {\n\t\tString id = label.substring (i, label.length ());\n\t\treturn Integer.parseInt (id);\n\t }; // if\n\t}; // for\n\n\treturn 0;\n\n }", "public int getLabel() {\n\t\treturn label;\n\t}", "public int index();", "Label getLabel();", "Label getLabel();", "Label getLabel();", "int index();", "public int getLabel(int stateNum) {\n for (int i = 0; i < nodeOffsets.length; i++) {\r\n if (stateNum < nodeOffsets[i])\r\n return i - 1;\r\n }\r\n return nodeOffsets.length - 1;\r\n }", "Index getIndex(String symbol);", "public int getIndex()\n {\n return getInt(\"Index\");\n }", "int getLabelOffset();", "public int getNodeLabel ();", "public int nameIndex();", "Expression getIndexExpr();", "public abstract int getIndex();", "private int getIndex(T target) {\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] == target) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "private int getLabel(Index3D index) {\n return (int) labelledVolume.intValue(index.i1(), index.i2(), index.i3());\n }", "DatasetLabel getLabel();", "public Label\ngetStartLabel();", "public abstract int indexFor(Object obj);", "public abstract long getIndex();", "Integer getIndexOfGivenValue(String value) {\n Integer index = null;\n for (IndexValuePair indexValuePair : indexValuePairs) {\n if (indexValuePair.getValue().equals(value)) {\n index = indexValuePair.getIndex();\n break;\n }\n }\n return index;\n }", "public int getIndex() {\r\n \t\t\treturn index;\r\n \t\t}", "@VTID(10)\n int getIndex();", "public int getIndex() {\n\t\treturn 0;\n\t}", "public int getIndex() {\n \t\treturn index;\n \t}", "public int indexOf(Object val) {\n Integer idx = hmap.get(val);\n if (idx == null)\n return -1;\n return idx.intValue();\n }", "public int getIndex() {\n\t\treturn index & 0xffff;\n\t}", "public int getIndex(){\r\n \treturn index;\r\n }", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "private int getIndex(int u) {\n int ind = -1;\n for (int i = 0; i < getGraphRep().size(); i++) {\n ArrayList subList = getGraphRep().get(i);\n String temp = (String) subList.get(0);\n int vert = Integer.parseInt(temp);\n if (vert == u) {\n ind = i;\n }\n }\n return ind;\n }", "public int getIndex()\n {\n return index;\n }", "private int getIndexByName(String task) \n\t{\n\t\tfor (int i = 0; i < names.length; i++) \n\t\t{\n\t\t\tif(task.equals(names[i]))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}", "public Example getExample(String label,int i){\n\t\treturn classIndex(label).get(i);\n\t}", "public int hashCode() {\n return (new Integer(label)).hashCode();\n }", "int getIndex() {\n\t\treturn index;\n\t}", "protected int indexFromName(String name) {\n for (int index = 0; index < values.length; index++) {\n if (getNames()[index] == name) {\n return index;\n }\n }\n return -1;\n }", "public int getIndex(byte[] value);", "private int getIndex(String id) {\n for (int i = 0; i < this.container.size(); i++) {\n if (id.equals(this.container.get(i).getId())) {\n return i;\n }\n }\n return -1;\n }", "public int getIndex(\n )\n {return index;}", "public int getIndex() {\n return index;\n }", "Identity get(String label) throws IOException;", "short getKeyIx();", "private int getArrayIndex() {\n\t\tswitch (getId()) {\n\t\tcase 3493:\n\t\t\treturn Recipe_For_Disaster.AGRITH_NA_NA_INDEX;\n\t\tcase 3494:\n\t\t\treturn Recipe_For_Disaster.FLAMBEED_INDEX;\n\t\tcase 3495:\n\t\t\treturn Recipe_For_Disaster.KARAMEL_INDEX;\n\t\tcase 3496:\n\t\t\treturn Recipe_For_Disaster.DESSOURT_INDEX;\n\t\t}\n\t\treturn -1;\n\t}", "public int getIndexOf(K key);", "public int getIndex()\n {\n return index;\n }", "public int getIndex() {\r\n return ordinal();\r\n }", "public int getIndex() {\r\n\t\treturn index;\r\n\t}", "public int getIndex(){\n return index;\n }", "public int getIndex(){\n return index;\n }", "public final int getIndex(){\n return index_;\n }", "@Override\r\n\tpublic int getIndex() {\n\t\treturn index;\r\n\t}", "public int getIndex() {\n\t\treturn index;\n\t}", "public int getIndex() {\n\t\treturn index;\n\t}", "public int getIndex() {\n\t\treturn index;\n\t}", "int getIndex(){\r\n\t\treturn index;\r\n\t}", "synchronized public int getIdAlways(String label) throws BoxerXMLException {\n\tif (label==null) throw new IllegalArgumentException(\"label=null\");\n\tInteger x = label2id.get(label);\n\tif (x != null) return x.intValue();\n\tif (!IDValidation.validateFeatureName(label)) {\n\t throw new BoxerXMLException(\"Can't add feature with the name '\"+label+\"' to the feature dictionary, because this is not a legal name\");\n\t}\n\n\tid2label.add( label );\n\tint z = id2label.size() - 1; // the index of the last element\n\tlabel2id.put(label, new Integer(z));\n\treturn z;\n }", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "public int getIndex() {\r\n return index;\r\n }", "String getLabel();", "String getLabel();", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex() {\n return index;\n }", "public int getIndex(int position);", "public Integer getIndex() {\n return index;\n }", "@Nullable\n abstract Integer getInstanceIndex();", "public String getIndex() {\n\t\treturn index;\n\t}", "public String getIndex() {\n\t\treturn index;\n\t}", "public Integer indexOf(String s){\n\t\tInteger i;\n\t\tif((i=indices.get(s))!=null)\n\t\t\treturn i;\n\t\telse\n\t\t\treturn Integer.valueOf(-1);\n\t}", "public static int getIndex(String s) {\n\t\tint index=-1; \n\t\tfor(int i = 0 ; i < dataList.size() ; i ++ ) {\n\t\t\tif(dataList.get(i).name.equals(s)) {\n\t\t\t\t\n\t\t\t\tindex =i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}", "public int getIndex() { return this.index; }", "public int getRowIndex(Feature f){\n return fc.indexOf(f);\n }", "public String getIndex() {\n return index;\n }", "public Point getLabelPosition();" ]
[ "0.70902765", "0.693661", "0.68347865", "0.68347865", "0.68347865", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.67881167", "0.6711441", "0.6669458", "0.66148317", "0.65306604", "0.65197575", "0.6455486", "0.64107233", "0.64107233", "0.64107233", "0.6368027", "0.63358027", "0.6325108", "0.6297205", "0.62555593", "0.623745", "0.62355715", "0.6235287", "0.62223285", "0.6194663", "0.61830235", "0.61754036", "0.6169588", "0.6129593", "0.6127666", "0.6109419", "0.6064379", "0.60358745", "0.60163826", "0.60132384", "0.60101074", "0.6003039", "0.59994423", "0.5995374", "0.5995374", "0.5995374", "0.5993653", "0.5979577", "0.5974951", "0.5973596", "0.5972979", "0.5970065", "0.5964317", "0.5955457", "0.5937141", "0.5936328", "0.5929305", "0.5928154", "0.59240973", "0.5923482", "0.5918459", "0.5915819", "0.59070116", "0.5898449", "0.589214", "0.589214", "0.58897", "0.58858335", "0.5880615", "0.5880615", "0.5880615", "0.58746195", "0.5870152", "0.5845217", "0.584224", "0.58300024", "0.58300024", "0.5827275", "0.5827275", "0.5827275", "0.5827275", "0.5827275", "0.58233523", "0.58130324", "0.5807178", "0.5801414", "0.5801414", "0.57986504", "0.57876235", "0.57862145", "0.5783127", "0.5780446", "0.5778393" ]
0.7281066
0
Retreives the integer object associated to the given label pair The integer returned represents the frequency that such a pair occured.
public Integer getFrequency(Label prediction, Label real){ int rowIx = resolveIndex(prediction); int colIx = resolveIndex(real); return matrix.get(rowIx).get(colIx); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "synchronized public int getId(String label) { \n\treturn label2id.get(label).intValue();\n }", "private static int getInstanceID (String label)\n {\n\tchar c;\n\tfor (int i = 0; i < label.length (); i++) {\n\t c = label.charAt (i);\n\t if (Character.isDigit (c)) {\n\t\tString id = label.substring (i, label.length ());\n\t\treturn Integer.parseInt (id);\n\t }; // if\n\t}; // for\n\n\treturn 0;\n\n }", "public int hashCode() {\n return (new Integer(label)).hashCode();\n }", "private int resolveIndex(Label l){\n\t\tif(l == null){\n\t\t\tthrow new NullPointerException(\"cannot resolve index of ConfusionMatrix of null label/class (null Label object)\");\n\t\t}\n\n\t\tString key = l.getValue();\n\n\t\tif(l.isEmpty()){\n\t\t\tthrow new IllegalArgumentException(\"cannot resolve index of ConfusionMatrix of emtpy label/class value\");\n\t\t}\n\n\t\tif(!indexMap.containsKey(key)){\n\t\t\tthrow new IllegalArgumentException(\"could not resolve ConfusionMatrix index for unknown label: \"+key);\n\t\t}\n\t\treturn indexMap.get(key);\n\n\t}", "synchronized public int getIdAlways(String label) throws BoxerXMLException {\n\tif (label==null) throw new IllegalArgumentException(\"label=null\");\n\tInteger x = label2id.get(label);\n\tif (x != null) return x.intValue();\n\tif (!IDValidation.validateFeatureName(label)) {\n\t throw new BoxerXMLException(\"Can't add feature with the name '\"+label+\"' to the feature dictionary, because this is not a legal name\");\n\t}\n\n\tid2label.add( label );\n\tint z = id2label.size() - 1; // the index of the last element\n\tlabel2id.put(label, new Integer(z));\n\treturn z;\n }", "private Pair getLastOccurrence(Object o) {\n\t\tNode p, q = null;\n\t\tint k, qK = -1;\n\n\t\tif (o != null) {\n\n\t\t\tfor (k = 0, p = mHead.next; k < mSize; p = p.next, k++)\n\t\t\t\tif (o.equals(p.data)) {\n\t\t\t\t\tq = p;\n\t\t\t\t\tqK = k;\n\t\t\t\t}\n\t\t} else {\n\t\t\tfor (k = 0, p = mHead.next; k < mSize; p = p.next, k++)\n\t\t\t\tif (o.equals(p.data)) {\n\t\t\t\t\tq = p;\n\t\t\t\t\tqK = k;\n\t\t\t\t}\n\t\t}\n\n\t\treturn new Pair(q, qK);\n\n\t}", "int getFreq();", "public static int getPairNounNum(final Noun noun1, final NounType nounType2) {\r\n\t\tMark mark = noun1.pairs[nounType2.num - 1];\r\n\t\tif (mark == null) return 0;\r\n\t\treturn mark.noun1 == noun1 ? mark.noun2.num : mark.noun1.num;\r\n\t}", "private Pair getFirstOccurrence(Object o) {\n\t\tNode p;\n\t\tint k;\n\n\t\tif (o != null) {\n\t\t\tfor (k = 0, p = mHead.next; k < mSize; p = p.next, k++)\n\t\t\t\tif (o.equals(p.data))\n\t\t\t\t\treturn new Pair(p, k);\n\t\t} else {\n\t\t\tfor (k = 0, p = mHead.next; k < mSize; p = p.next, k++)\n\t\t\t\tif (p.data == null)\n\t\t\t\t\treturn new Pair(p, k);\n\t\t}\n\t\treturn new Pair(null, NOT_FOUND);\n\t}", "private int getAddress(String label) {\n for (int i = 0; i < symbols.length; i++) {\n if (symbols[i].equals(label)) {\n return addresses[i];\n }\n }\n return NO_LABEL;\n }", "io.dstore.values.IntegerValue getCounter();", "public static int method2(int temp[]) {\r\n\r\n\t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\r\n\r\n\t\tfor (int i = 0; i < temp.length; i++) {\r\n\t\t\tif (map.containsKey(temp[i])) {\r\n\t\t\t\tmap.put(temp[i], map.get(temp[i]) + 1);\r\n\t\t\t} else {\r\n\t\t\t\tmap.put(temp[i], 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tIterator<Entry<Integer, Integer>> it = map.entrySet().iterator();\r\n\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tEntry<Integer, Integer> entry = it.next();\r\n\t\t\tint key = entry.getKey();\r\n\t\t\tint count = entry.getValue();\r\n\r\n\t\t\tif ((count % 2) != 0) {\r\n\t\t\t\treturn key;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public int computeTP(Label classLabel){\n\t\treturn getFrequency(classLabel,classLabel);\n\t}", "public static Pair<String, Integer> findFirstOccurence(... )\n\t{\n\t\t // you finish!!!\n\t\t\n\t\t\n\t\t\t// what should it return if it does NOT find a match?\n\t}", "public int cast(int c1, int c2) {\n tmp.first=c1;\n tmp.second=c2;\n Integer res = spair.get(tmp);\n if (res==null) {\n int spair_size = spair.size();\n spair.put(tmp, spair_size);\n spairinv.add(tmp);\n // for use next time\n tmp = new IntegerPair(0,0);\n return spair_size;\n }\n return res;\n }", "public Pair findNumbers_usingCountArray(int[] input) {\r\n\t\tPair p = new Pair();\r\n\t\tint[] temp = new int[input.length + 1]; // temp has 1 more element to accommodate elements from 1 - n\r\n\t\tArrays.fill(temp, 0);\r\n\t\tfor (int i = 0; i < input.length; i++) {\r\n\t\t\tif (temp[input[i]] == 0)\r\n\t\t\t\ttemp[input[i]] = 1;\r\n\t\t\telse if (temp[input[i]] == 1)\r\n\t\t\t\tp.repeating = i;\r\n\t\t}\r\n\t\tfor (int i = 1; i < temp.length; i++) {\r\n\t\t\tif (temp[i] == 0)\r\n\t\t\t\tp.missing = i;\r\n\t\t}\r\n\t\treturn p;\r\n\t}", "public int getLabel() {\n\t\treturn label;\n\t}", "private int pairValue() {\n int pValue = 0;\n \n for (int i = 0; i < combos.length; i++) {\n if (combos[i].length == 2 && combos[i][0].charAt(0) == combos[i][1].charAt(0)) {\n pValue += 2;\n }\n }\n \n return pValue;\n }", "public Object lookup(int par1)\n {\n int j = computeHash(par1);\n\n for (IntHashMapEntry inthashmapentry = this.slots[getSlotIndex(j, this.slots.length)]; inthashmapentry != null; inthashmapentry = inthashmapentry.nextEntry)\n {\n if (inthashmapentry.hashEntry == par1)\n {\n return inthashmapentry.valueEntry;\n }\n }\n\n return null;\n }", "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "public GenericPair<HashMap<Pair, Integer>, HashMap<Integer, Pair>> mapBitextToInt(HashMap<Pair, Integer>sd_count){\n\t\tHashMap<Pair, Integer> index = new HashMap<Pair, Integer>();\n\t\tHashMap<Integer, Pair> biword = new HashMap<Integer, Pair>();\n\t\tint i = 0;\n\t\tfor (Pair pair : sd_count.keySet()){\n\t\t\tindex.put(pair, i);\n\t\t\tbiword.put(i, pair);\n\t\t\ti++;\n\t\t}\n\t\treturn new GenericPair<HashMap<Pair, Integer>, HashMap<Integer, Pair>>(index, biword);\n\t}", "@Override\n\tpublic int compareTo(indexFreqPair o) {\n\t\tif (_freq < o.getFreq()) {\n\t\t\treturn -1;\n\t\t}\n\t\telse if (_freq == o.getFreq()) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn 1;\n\t\t}\n\t}", "public Integer getLoopCounter(Loop lp){\n\t\treturn loopCounter.get(lp);\n\t}", "public int getIDFScore(String term) { \r\n\t\tif (map.containsKey(term) == false)\r\n\t\t\treturn 0;\r\n\t\treturn map.get(term).size();\r\n\t}", "public static Object getLabelValue(String Label) {\n Object labels = new Items();\n\n try {\n Field field = labels.getClass().getField(Label);\n return field.get(labels);\n } catch (Exception e) {\n return \"PARSE_LABEL_ERROR\";\n }\n }", "Identity get(String label) throws IOException;", "io.dstore.values.IntegerValueOrBuilder getCounterOrBuilder();", "public DrawStringObject\ngetNumberLabel()\n{\n\tVector labelList = this.getLabelList();\n\tif (labelList == null)\n\t\treturn (null);\n\tif ((labelList.size() <= 0) || (labelList.size() > 2))\n\t\treturn (null);\n\tDrawObject drwObj0 = null;\n\tDrawObject drwObj1 = null;\n\tdrwObj0 = (DrawObject)labelList.elementAt(0);\n\tif (labelList.size() == 2)\n\t\tdrwObj1 = (DrawObject)labelList.elementAt(1);\n\tif ((drwObj1 == null) && (drwObj0 instanceof DrawLineObject))\n\t\treturn (null);\n\tif (drwObj1 == null)\n\t\treturn (null);\n\tif ((drwObj0 instanceof DrawLineObject) && (drwObj1 instanceof DrawStringObject))\n\t{\n\t\ttry\n\t\t{\n\t\t\tint val = Integer.parseInt(((DrawStringObject)drwObj1).getDrawString());\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\treturn (null);\n\t\t}\n\t\treturn ((DrawStringObject)drwObj1);\n\t}\n\tif ((drwObj1 instanceof DrawLineObject) && (drwObj0 instanceof DrawStringObject))\n\t{\n\t\ttry\n\t\t{\n\t\t\tint val = Integer.parseInt(((DrawStringObject)drwObj0).getDrawString());\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\treturn (null);\n\t\t}\n\t\treturn ((DrawStringObject)drwObj0);\n\t}\n\treturn (null);\n}", "@Override\n\tpublic Map<Label, Integer> getDocumentsCountPerLabel(List<Instance> trainData) {\n\t\t// TODO : Implement\n\t\tint pSize = 0;\n\t\tint nSize = 0;\n\t\tfor(Instance data: trainData) {\n\t\t\tif(data.label.equals(Label.POSITIVE))\n\t\t\t\tpSize++;\n\t\t\telse\n\t\t\t\tnSize++;\n\t\t}\n\t\t\n\t\tdocCount.put(Label.POSITIVE, pSize);\n\t\tdocCount.put(Label.NEGATIVE, nSize);\n\t\treturn docCount;\n\t}", "public static IntPair getObject(List<CoreLabel> tokens,\n\t\t\t\t\t\t\t\t\tSemanticGraph dependency,\n\t\t\t\t\t\t\t\t\tint verbIndex) {\n\t\tif(verbIndex < tokens.size() - 1 &&\n\t\t\t\ttokens.get(verbIndex + 1).lemma().equals(\"he\")) {\n\t\t\treturn new IntPair(verbIndex + 1, verbIndex + 2);\n\t\t}\n\t\tif(verbIndex < tokens.size() - 2 &&\n\t\t\t\ttokens.get(verbIndex + 1).lemma().equals(\"she\") &&\n\t\t\t\t(tokens.get(verbIndex + 2).tag().equals(\"CD\") ||\n\t\t\t\t\t\ttokens.get(verbIndex + 2).tag().equals(\"$\"))) {\n\t\t\treturn new IntPair(verbIndex + 1, verbIndex + 2);\n\t\t}\n\t\tIndexedWord word = dependency.getNodeByIndexSafe(verbIndex+1);\n\t\tif (word == null) return new IntPair(-1, -1);\n//\t\tfor(SemanticGraphEdge edge : dependency.edgeListSorted()) {\n//\t\t\tSystem.out.println(edge.getRelation().getShortName()+\":\"+\n//\t\t\t\t\tedge.getSource()+\"-->\"+edge.getTarget());\n//\t\t}\n\t\tfor(SemanticGraphEdge edge : dependency.getOutEdgesSorted(word)) {\n//\t\t\tSystem.out.println(edge.getRelation().getShortName()+\":\"+\n//\t\t\t\t\tedge.getSource()+\"-->\"+edge.getTarget());\n\t\t\tif(edge.getRelation().getShortName().equals(\"iobj\") ||\n\t\t\t\t\tedge.getRelation().getShortName().equals(\"nmod\") ||\n\t\t\t\t\tedge.getRelation().getShortName().equals(\"prep\")) {\n\t\t\t\tint i = edge.getTarget().index()-1;\n//\t\t\t\tSystem.out.println(\"Returned:\"+\n//\t\t\t\t\t\tArrays.asList(Tools.getMaximalNounPhraseSpan(tokens, i)));\n\t\t\t\treturn Tools.getMaximalNounPhraseSpan(tokens, i);\n\t\t\t}\n\t\t}\n\t\treturn new IntPair(-1, -1);\n\t}", "private int getLabel(Index3D index) {\n return (int) labelledVolume.intValue(index.i1(), index.i2(), index.i3());\n }", "double getLabel();", "public int getFreq(){ return frequency;}", "Label getLabel();", "Label getLabel();", "Label getLabel();", "private static Integer mostCommonElement(List<Integer> list) {\n HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n for(int i=0; i< list.size(); i++) {\n Integer frequency = map.get(list.get(i));\n\n if(frequency == null) {\n map.put(list.get(i), 1);\n } else {\n map.put(list.get(i), frequency+1);\n }\n }\n int mostCommonKey = 0;\n int maxValue = -1;\n for(HashMap.Entry<Integer, Integer> entry: map.entrySet()) {\n if(entry.getValue() > maxValue) {\n mostCommonKey = entry.getKey();\n maxValue = entry.getValue();\n }\n }\n\n return mostCommonKey;\n }", "int getXYPairCount();", "public int ClassLabel(double sample[]) {\n\t\t\n\t\tif(k_closest == null) {\n\t\t\tclass_label = Output(sample);\n\t\t\treturn class_label;\n\t\t}\n\t\t\n\t\tfloat min = Float.MAX_VALUE;\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tmin = Math.min(ptr.s.weight, min);\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tmin = Math.abs(min) + 1;\n\t\t\n\t\tfloat class_count[] = new float[]{0, 0, 0, 0};\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\t\n\t\t\tptr.s.norm_weight = (ptr.s.weight + min);\n\t\t\tSample s = ptr.s;\n\t\t\t\n\t\t\tint out = s.Classify(sample);\n\t\t\t\n\t\t\tswitch(out) {\n\t\t\t\tcase -2: class_count[0] += s.norm_weight; break;\n\t\t\t\tcase -1: class_count[1] += s.norm_weight; break;\n\t\t\t\tcase 1: class_count[2] += s.norm_weight; break;\n\t\t\t\tcase 2: class_count[3] += s.norm_weight; break;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfloat max = 0;\n\t\tint label_set[] = new int[]{-2, -1, 1, 2};\n\t\tclass_label = 0;\n\t\tfor(int i=0; i<4; i++) {\n\t\t\t\n\t\t\tif(class_count[i] > max) {\n\t\t\t\tmax = class_count[i];\n\t\t\t\tclass_label = label_set[i];\n\t\t\t}\n\t\t} \n\t\t\n\t\treturn class_label;\n\t}", "java.lang.String getFrequency();", "public IntPair hint();", "public T caseFrequency(Frequency object) {\r\n\t\treturn null;\r\n\t}", "public int size(String label){\n\t\treturn classIndex(label).size();\n\t}", "protected double[] getPairCounts(Hashtable<Integer, Double> words) {\n\t\tdouble positiveCount = 0;\n\t\tdouble negativeCount = 0;\n\t\tfor(int word1 : words.keySet()){\n\t\t\tfor(int word2 : words.keySet()){\n\t\t\t\tif(word1 != word2){\n\t\t\t\t\tif(relatedPairs[word1].contains(word2)){\n\t\t\t\t\t\tpositiveCount+= words.get(word1) * words.get(word2); //pairs with feature same SG\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnegativeCount+= words.get(word1) * words.get(word2); // pairs with feature different SG\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new double[]{positiveCount, negativeCount};//return both\n\t}", "Pair<Integer, Integer> getPosition();", "public int getEdgeWeight(String srcLabel, String tarLabel) {\n // Implement me!\n int eInt = indexOf(srcLabel + tarLabel, edges);\n if (eInt != -1) {\n return weights[indexOf(srcLabel, vertices)][eInt];\n }\n\n // update return value\n return EDGE_NOT_EXIST;\n }", "Counter getCounter(String counterName);", "private int countOccurrence(Integer valueToCount) {\n int count = 0;\n\n for(Integer currentValue : list) {\n if (currentValue == valueToCount) {\n count++;\n }\n }\n\n return count;\n }", "public static long taskOfPairing(List<Long> freq) {\n // Write your code here\n long pairs = 0;\n boolean isOdd = false;\n boolean hasRemained = false;\n long curNum = 0;\n for (int weight = 1; weight <= freq.size(); weight++) {\n curNum = freq.get(weight - 1);\n pairs += (curNum / 2);\n if (curNum % 2 != 0) {\n if (hasRemained) {\n pairs++;\n hasRemained = false;\n } else {\n hasRemained = true;\n }\n isOdd = true;\n } else {\n if (!isOdd) {\n hasRemained = false;\n }\n isOdd = false;\n }\n\n }\n\n return pairs;\n\n }", "public int getCount(int i){\n int c = 0;\n if(this.counts.size() >= i){\n c = Integer.parseInt(this.counts.get(i));\n }\n return c;\n }", "float getFrequency();", "Integer count();", "Integer count();", "Optional<CoreLabelSequence> getGroupedByFirstLabel(CoreLabel label);", "Pair<Double, Integer> bid();", "@Override\r\n\t\t\t\tpublic Tuple2<String, Integer> call(WordCount t) throws Exception {\n\t\t\t\t\treturn new Tuple2<>(t.getWord() , new Integer(t.getCount()));\r\n\t\t\t\t\t\r\n\t\t\t\t}", "public int hashCode() {\n\t\treturn (label1 == null) ? end : ((label2 == null) ? end\n\t\t\t\t+ label1.hashCode() : end + label1.hashCode()\n\t\t\t\t+ label2.hashCode());\n\t}", "public static int countPairs(List<Integer> arr, long k) {\n arr = arr.stream().sorted().collect(Collectors.toList());\n Map<String, Long> map = new HashMap<>();\n for (Integer i : arr) {\n if (i <= k && i <= (k - i) && arr.contains((int) k - i)) {\n map.put(i + \"_\" + (k - i), (long) (i + (i + 1)));\n }\n }\n return map.size();\n }", "private int scoreIdMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 100;\n \n // Fail for now.\n return 0;\n }", "public Integer getCount(String tag) {\n\t\treturn tagList.get(tag);\n\t}", "com.google.ads.googleads.v6.resources.Label getLabel();", "public synchronized int getFicha(int id){\n\t\treturn counter++;\n\t}", "long countByExample(HuoDongExample example);", "public static HashMap<String,Integer> counter(ArrayList<String> arr){\n\t\tHashMap<String,Integer> map = new HashMap<String,Integer>();\n\t\t\tfor(String s : arr){\n\t\t\t\tif (map.keySet().contains(s)){\n\t\t\t\t\tmap.put(s, map.get(s)+1);\n\t\t\t\t}else{\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn map;\t\n\t}", "private static HashMap<CardRank, Integer>\n getCardMap(ArrayList<CardRank> ranks){\n HashMap<CardRank, Integer> CardMap = new HashMap<>();\n //for every rank in ranks, put this rank into the key\n // and put its frequency into the value\n for(CardRank r :ranks) {\n if (CardMap.containsKey(r)){\n CardMap.put(r, CardMap.get(r) + 1);\n }else{\n CardMap.put(r,1);\n }\n }\n return CardMap;\n }", "public int getFrequency(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.frequency;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }", "int getKey(int i);", "short getKeyIx();", "private int getTraffic(TaskPair pair) {\n int total = 0;\n List<Integer> trafficData = trafficStats.get(pair);\n for (int traffic : trafficData) {\n total += traffic;\n }\n return (int) ((float) total / (trafficData.size() * timeWindowLength)); // tuples/s\n }", "public WordCount2(Integer frequency) {\n emitFrequency = frequency;\n }", "public int getFrequency(){\n return this.frequency;\n }", "public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return kGSuperPopCategory;\n case 1: return kGPopCategory;\n case 2: return chiSquare;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }", "public LabelModel getLabel(LabelUUID aLabelUUID);", "private static Double mklabel(Double label) {\n\t\tDouble _label;\n\t\tif (label == 0) {\n\t\t\t_label = -1.0;\n\t\t} else {\n\t\t\t_label = 1.0;\n\t\t}\n\t\treturn _label;\n\t}", "@Override\r\n\t\t\t\tpublic WordCount call(Tuple2<String, Integer> v1) throws Exception {\n\t\t\t\t\treturn new WordCount(v1._1,v1._2);\r\n\t\t\t\t}", "public static Integer getScoreFor_RollOnTwoPairs(Dice dice) \r\n\t{\r\n\t\tlog.debug(\"Inside method getScoreFor_RollOnTwoPairs\");\r\n\t\t\r\n\t\tInteger score = 0;\r\n\t\tInteger tempScore = 0;\r\n\t\tInteger pairCount = 0;\r\n\t\t\r\n\t\tMap<Integer, Integer> map = dice.getDiceNumberCountMap();\r\n\t\t\r\n\t\tfor ( Integer diceNumber : map.keySet() )\r\n\t\t{\r\n\t\t\t// if we can find a number in pair\r\n\t\t\tif ( map.get(diceNumber) >= 2 ) \r\n\t\t\t{\r\n\t\t\t\tpairCount = pairCount + 1;\r\n\t\t\t\t\r\n\t\t\t\ttempScore = tempScore + diceNumber * 2;\r\n\t\t\t\t\r\n\t\t\t\t// if pair count is 2 then score\r\n\t\t\t\tscore = ( pairCount == 2 ) ? tempScore : score;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn score;\r\n\t}", "public Example getExample(String label,int i){\n\t\treturn classIndex(label).get(i);\n\t}", "private int pairContains(HashMap<Integer,HashSet<Integer>> pairs, int k1, int k2){\n\t\t\n\t\t\n\t\t\tif(pairs.containsKey(k1))\n\t\t\t\tif(pairs.get(k1).contains(k2))\n\t\t\t\t\treturn 2;\n\t\t\t\telse\n\t\t\t\t\treturn 1;\n\t\t\n\t\treturn 0;\n\t}", "public DListNode2 correspondingPair(){\r\n return this.correspondingPair;\r\n }", "Integer countForKey(String key);", "public static int lookup (String name)\n {\n\tInteger result = MAP.get (name.toLowerCase ());\n\n\treturn (result == null) ? -1 : result;\n }", "public Integer getFrequency() {\n return this.frequency;\n }", "private double p_l(Label label) {\n\t\t// TODO : Implement\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tint total = docCount.get(Label.POSITIVE)+docCount.get(Label.NEGATIVE);\n\t\t\n\t\t\n\t\tif(label.equals(Label.POSITIVE))\n\t\t\treturn ((double)(docCount.get(Label.POSITIVE)))/((double)(total));\n\t\telse\n\t\t\treturn ((double)(docCount.get(Label.NEGATIVE)))/((double)(total));\n\t}", "public int indexOf(Object val) {\n Integer idx = hmap.get(val);\n if (idx == null)\n return -1;\n return idx.intValue();\n }", "public int getFrequency()\n {\n return this.frequency;\n }", "private Object keyOfBestUnlabeledInstance(Classifier[] committee){\n\t\tdouble worstAgreement=2.0;\n\t\tObject queryKey=null;\n\t\tfor(Iterator<Double> i=unlabeled.keySet().iterator();i.hasNext();){\n\t\t\tObject key=i.next();\n\t\t\tInstance instance=unlabeled.get(key);\n\t\t\tTObjectDoubleHashMap counts=new TObjectDoubleHashMap();\n\t\t\tdouble biggestCount=0;\n\t\t\tfor(int j=0;j<committee.length;j++){\n\t\t\t\tString best=committee[j].classification(instance).bestClassName();\n\t\t\t\tdouble c=counts.get(best)+1;\n\t\t\t\tcounts.put(best,c);\n\t\t\t\tif(c>biggestCount)\n\t\t\t\t\tbiggestCount=c;\n\t\t\t}\n\t\t\tdouble agreement=biggestCount/committee.length;\n\t\t\tlog.info(\"instance: \"+instance+\" committee: \"+counts+\" agreement: \"+\n\t\t\t\t\tagreement);\n\t\t\tif(agreement<worstAgreement){\n\t\t\t\tworstAgreement=agreement;\n\t\t\t\tqueryKey=key;\n\t\t\t\tlog.debug(\" ==> best\");\n\t\t\t}\n\t\t}\n\t\tlog.info(\"queryInstance is: \"+unlabeled.get(queryKey));\n\t\treturn queryKey;\n\t}", "int getKey();", "int getKey();", "public int findTargetBB(String label) {\n\t\tString targetLB = null;\n\t\tfor (int i = 1; i <= BasicBlocks.size(); i++) {\n\t\t\ttargetLB = BasicBlocks.get(i).get(0);\n\t\t\tint lbLen = 0;\n\t\t\tint j = 0;\n\t\t\twhile (targetLB.charAt(j) != ' ') {\n\t\t\t\tlbLen++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ttargetLB = targetLB.substring(0, lbLen);\n\t\t\tif (targetLB.equals(label)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public int findEntryByKey(@NullableDecl Object obj) {\n return findEntryByKey(obj, Hashing.smearedHash(obj));\n }", "public int getFreq() {\n return freq_;\n }", "int value(String name);", "@Override\n\tpublic double p_l(Label label) {\n\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tdouble ret = 0;\n\t\t\n\t\t// set up m_sports_count and m_business_count\n\t\tdocuments_per_label_count(m_trainingData);\n\n\t\tdouble sum = m_sports_count + m_business_count;\n\n\t\tif (label == Label.SPORTS) {\n\t\t\tret = m_sports_count / sum;\n\t\t} else {\n\t\t\tret = m_business_count / sum;\n\t\t}\n\n\t\treturn ret;\n\t}", "public int getWordOccurrence(String word) {\n MutableInt i = wordsOccurrences.get(word);\n if (i == null) {\n return 0;\n }\n return i.getValue();\n }", "final IntHashMapEntry lookupEntry(int par1)\n {\n int j = computeHash(par1);\n\n for (IntHashMapEntry inthashmapentry = this.slots[getSlotIndex(j, this.slots.length)]; inthashmapentry != null; inthashmapentry = inthashmapentry.nextEntry)\n {\n if (inthashmapentry.hashEntry == par1)\n {\n return inthashmapentry;\n }\n }\n\n return null;\n }", "String getCountInt();", "public static RecordStatusEnum getByLabel(String label) {\n for (RecordStatusEnum type : RecordStatusEnum.values()) {\n if (type.label.equalsIgnoreCase(label)) {\n return type;\n }\n }\n return null;\n }" ]
[ "0.6091408", "0.6029574", "0.572391", "0.5544453", "0.5480224", "0.5323809", "0.5276436", "0.521149", "0.51806515", "0.5149803", "0.5089377", "0.4995901", "0.49679914", "0.49596122", "0.4939189", "0.49260306", "0.49101073", "0.4897755", "0.48638535", "0.4839592", "0.4839592", "0.4839592", "0.4839592", "0.48394597", "0.4838234", "0.4834943", "0.4834767", "0.48315576", "0.4827676", "0.4810622", "0.47839412", "0.47750592", "0.47662705", "0.47648248", "0.47579646", "0.47541806", "0.4739735", "0.4739735", "0.4739735", "0.47365597", "0.4726386", "0.47254643", "0.47244766", "0.46946186", "0.46824867", "0.46745616", "0.4672107", "0.46675432", "0.46607754", "0.46527302", "0.46450716", "0.46415746", "0.46403039", "0.46402222", "0.46322998", "0.46322998", "0.46301827", "0.4629683", "0.46211678", "0.46181598", "0.46166772", "0.46156734", "0.46051815", "0.45929998", "0.4587846", "0.45827156", "0.45743102", "0.4569268", "0.45645085", "0.45536152", "0.45507026", "0.4549677", "0.4548814", "0.45472148", "0.45438766", "0.4543817", "0.4539459", "0.4531809", "0.45281988", "0.4524478", "0.45223677", "0.4520216", "0.4510023", "0.45080006", "0.45058867", "0.45017964", "0.44916245", "0.44870695", "0.44853508", "0.44833845", "0.44833845", "0.44810274", "0.44784734", "0.44764242", "0.4474853", "0.44662055", "0.44588038", "0.44569868", "0.44559792", "0.44550282" ]
0.5575238
3
Increments the appropriate cell in confusion matrix associated to given label pair.
public void incrementCell(Label prediction, Label real){ int rowIx = resolveIndex(prediction); int colIx = resolveIndex(real); Integer cell = matrix.get(rowIx).get(colIx); Integer newValue = cell+1; matrix.get(rowIx).set(colIx, newValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void incrementColumnIndex();", "void incrementColumnIndex();", "public void increase(String nickname) {\n\t\tint oldValue = this.getScore(nickname);\n\t\tscoreboard.replace(nickname, oldValue, oldValue + 1);\n\t}", "private void updateStatus(int row, int col) {\n\t\tCell cell = grid.getGridIndex(row, col);\n\t\tcell.calculateNextState(grid.getNeighbors(row, col));\n\t\tif (cell instanceof Neighbor) {\n\t\t\tNeighbor person = (Neighbor) cell;\n\t\t\tString name = person.getClass().getName();\n\t\t\tif (!cellSizes.containsKey(name)) {\n\t\t\t\tcellSizes.put(name, 0);\n\t\t\t}\n\t\t\tcellSizes.put(name, cellSizes.get(name) + 1);\n\t\t\tif (!person.Satisfied())\n\t\t\t\tupsetNeighbors.add(person);\n\t\t} else {\n\t\t\tavailableSpaces.add(cell);\n\t\t}\n\t}", "@Override\n public MNKGameState markCell(int i, int j) {\n key = nextZobrist(i, j);\n previousValues.push(value);\n double prevValue = eval(i, j);\n MNKGameState result = super.markCell(i, j);\n double newValue = eval(i, j);\n value += newValue - prevValue;\n return result;\n }", "public void renumberCells() {\r\n int num = 1;\r\n for (Cell cell : cells) {\r\n cell.updateCellNum(num);\r\n num++;\r\n }\r\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "public void set_Mine_Count(int row,int col)\n{\n\tif(cell[row][col] != 9)\n\t{\n\t\tcell[row][col] += 1;\n\t}\n}", "public int computeLabel(Cell predecessor) {\n\n\t\t// We have two cells: 1. The cell we are leaving and the cell we are\n\t\t// entering.Lets call them appropiately cellLeave and cellEnter\n\n\t\tDCEL_Edge edge = getConnectingEdge(predecessor);\n\n\t\t// if (edge == null) {\n\t\t// //\n\t\t// System.err.println(\"ERROR: Cells are not neighbors; Should not have happened\");\n\t\t// return;\n\t\t// }\n\n\t\tPoint2 pointInRoot = new Point2(predecessor.dualPoint.posX,\n\t\t\t\tpredecessor.dualPoint.posY);\n\t\tif (edge.reference instanceof Arc2_Sweep) {\n\t\t\tArc2_Sweep arc = (Arc2_Sweep) edge.reference;\n\t\t\t// There is an edge/arc between the two cells\n\t\t\t// We get the midpoint of this arc. Lets call this point:\n\t\t\t// CenterOfArc\n\t\t\tPoint2 centerOfArc = arc.centre;\n\n\t\t\t// And we calculate the distance from the midpoint of the arc to the\n\t\t\t// dualPoint in CellLeave\n\t\t\tfloat dist2 = (float) centerOfArc.distance(pointInRoot);\n\n\t\t\t// if (cellLeave.label == 0) {\n\t\t\t// this.label = 1;\n\t\t\t// }\n\t\t\t// dist1<= dist2 means the arc is bended into the direction we are\n\t\t\t// going to --> entering a new disk\n\t\t\tif (Math.round(arc.radius * 1000) / 1000 <= Math\n\t\t\t\t\t.round(dist2 * 1000) / 1000) {\n\t\t\t\t// System.out.print(\"**Mode: Entering a new Cell +1| CellLeaveLabel: \"+cellLeave.label);\n\t\t\t\t// this.setLabel(cellLeave.label + 1);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t// leaving a disk\n\t\t\telse {\n\t\t\t\t// System.out.print(\"***Mode: Leaving a cell: -1| CellLeaveLabel: \"+cellLeave.label);\n\t\t\t\t// this.setLabel(cellLeave.label - 1);\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t} else if (edge.reference instanceof Circle2) {\n\t\t\t// System.out.print(\"**Mode: CirlceMode Label will be 1\");\n\t\t\t// this.setLabel(1);\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn 0;\n\n\t}", "public void jump(int offset) {\n fInstructionCounter += offset;\n }", "public synchronized void switchCell()\n {\n cellValue = (cellValue == ALIVE) ? DEAD : ALIVE;\n }", "public void increment(int symbol);", "private void incTag() {\n long id = tagId(tag[th()]); // 1\n tag[th()] = newTag(id+1); // 2\n }", "@Override\n public void stepUp(Cell currentCell) {\n if(currentCell.getOldNoOfAliveNeighbours()==3)\n {\n currentCell.setState(new Alive());\n }\n }", "public void activateCluster(){\n for (int row = 0; row < matrix.length; row++) {\n// Cell[] matrix1 = matrix[i];\n for (int col = 0; col < matrix[row].length; col++) {\n Cell cell = matrix[row][col];\n // check every if null it means there is no cell at that position\n // get fist occured cell and meet it with the next one\n // run the loop while\n // while cell.getRow < cell.bestRow && cell.getCol < cell.bestCol\n if(cell != null) {\n while (cell.getRow() <= this.cellBiggestRow && cell.getCol() <= this.cellBiggestCol) {\n\n if (cell.getCol() >= matrix[row].length) {\n if (!(cell.getRow() >= matrix.length)) {\n cell.setRow(cell.getRow() + 1);\n }\n } else {\n cell.setCol(cell.getCol() + 1);\n }\n\n // if cell.getCol + 1 < matrix[row].length && matrix[row] != null\n // get the next cell and do the fight\n }\n }\n }\n }\n\n }", "Integer update(BoardCell cell, int newPlayerId);", "private void add(){\n if((cells[pointer]&0xff) >= 255){\n cells[pointer] = 0;\n } else {\n cells[pointer]++;\n }\n }", "private void updateLabel(JLabel label, int pl) {\n synchronized (label) {\n String val = label.getText();\n int next = Integer.parseInt(val) + pl;\n label.setText(\"\" + next);\n }\n }", "public void setCurrentCell(\n\t\t\tint index )\n\t{\n\t}", "void incrementColumnIndex(int size);", "void incrementColumnIndex(int size);", "String updateLabel(String oldLabel, String newLabel);", "public void incrank() {\n\t\trank++;\n\t}", "public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }", "private void updateManhattanScore(int i, int j) {\n int value = blocks[i][j];\n if (value == 0) {\n // save MatrixIndex of free square\n free = new MatrixIndex(i, j);\n } else {\n // calculate goal position for this value\n int goal_i = (value - 1) / dimension();\n int goal_j = (value - 1) % dimension();\n\n // calculate vertical and horizontal distances\n int distance = Math.abs(i - goal_i) + Math.abs(j - goal_j);\n\n // update manhattan_score\n manhattan_score += distance;\n\n if (verbose) {\n // System.out.println(value + \" from \" + i + \",\" + j + \" to \" + goal_i + \",\" + goal_j + \" = \" + distance);\n }\n }\n }", "public int setCell(int value){\n int newValue;\n if (isHit(value)){\n newValue = HIT;\n }\n else {\n newValue = MISS;\n }\n return newValue;\n }", "public void increment(String head, String word, boolean lookBack) {\n\t\t// System.out.printf(\"+1 \\\"%s\\\", \\\"%s\\\"\\n\", head, word);\n\t\t\n\t\tif (collocationMap.containsKey(head)){\n\t\t\tMap<String, Integer> wordMap = collocationMap.get(head);\n\t\t\t\n\t\t\tif (wordMap.containsKey(word)){\n\t\t\t\twordMap.put(word, wordMap.get(word) + 1);\n\t\t\t} else {\n\t\t\t\twordMap.put(word, 1);\n\t\t\t}\n\t\t} else {\n\t\t\tMap<String, Integer> initMap = new HashMap<String, Integer>();\n\t\t\tinitMap.put(word, 1);\n\t\t\tcollocationMap.put(head, initMap);\n\t\t}\n\t\t\n\t\tif (lookBack) increment(word, head, false);\n\t}", "@Override\n public void update(LabeledText labeledText){\n super.update(labeledText);\n\n /* FILL IN HERE */\n classCounts[labeledText.label]++;\n for (String ng: labeledText.text.ngrams) { \n \tfor (int h=0;h< nbOfHashes;h++) {\n \t\tcounts[labeledText.label][h][hash(ng,h)]++; \n \t}\n \t//System.out.println(\"Hash: \" + hash(ng) + \" Label : \" + labeledText.label + \" Update: \" + counts[labeledText.label][hash(ng)]);\n }\n \n }", "public void setElement(Pair<Integer, Integer> cell, int n){\n\t\tnumbers[cell.getFirst()][cell.getSecond()] = n;\n\t}", "private boolean switchLabel(Scope scope, Vector queue)\r\n {\r\n boolean x;\r\n\r\n if (x = nextSymbol == Keyword.DEFAULTSY)\r\n {\r\n lookAhead();\r\n }\r\n else\r\n {\r\n matchKeyword(Keyword.CASESY);\r\n\r\n Type t = new Type();\r\n t.type = Keyword.INTSY;\r\n\r\n follower.add(Keyword.COLONSY);\r\n castExpression(scope, t, true, queue);\r\n follower.remove(follower.size() - 1);\r\n }\r\n\r\n matchKeyword(Keyword.COLONSY);\r\n\r\n return x;\r\n }", "void updateCellNumbers() {\n cells.stream().forEach(row -> row.stream().filter(cell -> !cell.isMine()).forEach(cell -> {\n int numNeighbouringMines =\n (int) getNeighboursOf(cell).stream().filter(neighbour -> neighbour.isMine()).count();\n cell.setNumber(numNeighbouringMines);\n }));\n }", "public void increase(int row, int column) {\n ImmutablePair<Integer, Integer> from = new ImmutablePair<Integer, Integer>(row, column);\n // Step 2. Generating increase event\n IncreaseChipAction action = new IncreaseChipAction(getPlayer(), from);\n // Step 3. Actually performing action\n perform(action);\n }", "public void inc(){\n this.current += 1;\n }", "public void moveUp()\n\t{\n\t\trow++;\n\t}", "private int resolveIndex(Label l){\n\t\tif(l == null){\n\t\t\tthrow new NullPointerException(\"cannot resolve index of ConfusionMatrix of null label/class (null Label object)\");\n\t\t}\n\n\t\tString key = l.getValue();\n\n\t\tif(l.isEmpty()){\n\t\t\tthrow new IllegalArgumentException(\"cannot resolve index of ConfusionMatrix of emtpy label/class value\");\n\t\t}\n\n\t\tif(!indexMap.containsKey(key)){\n\t\t\tthrow new IllegalArgumentException(\"could not resolve ConfusionMatrix index for unknown label: \"+key);\n\t\t}\n\t\treturn indexMap.get(key);\n\n\t}", "private void updateHammingScore(int i, int j) {\n // if not free cell\n if (!(i == dimension() - 1 && j == dimension() - 1)) {\n // calculate goal value for this cell\n int goal = i * dimension() + j + 1;\n if (blocks[i][j] != goal) {\n hamming_score ++;\n }\n\n if (verbose) {\n // System.out.println(i + \",\" + j + \" \" + block + \" is \" + goal + \"?\" );\n }\n }\n }", "public void punishment(){\n\t\tthis.cell = 0;\n\t}", "@Override\n\tpublic boolean incrementEntry(final int bucket, final int solnIdx, final int choice) {\n\t\tint baseIndex = getEntriesIndex(bucket, solnIdx);\n\t\tentries[baseIndex + choice] += 1;\n\t\tif ( entries[baseIndex + choice] <= 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic void inc(Rule rule, String categoryOrContextProperty,\n\t\t\tString subCategoryOrVocabulary, String counterName, String term,\n\t\t\tlong incrementOffset) throws Exception {\n\t\t\n\t}", "private void setPlus(JButton btn, JLabel lbl) {\n \tbtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (blingCount >= 3) return;\n\t\t\t\tint num = Integer.parseInt(lbl.getText()) + 1;\n\t\t\t\tlbl.setText(String.valueOf(num));\n\t\t\t\tblingCount++;\n\t\t\t}\n \t});\n }", "public void increment() {\n increment(1);\n }", "public void update() {\n\t\t// Complete this method\n\n\t\tint [][]tempTable = new int [numberOfRows()][numberOfColumns()];\n\n\t\tfor ( int r = 0; r < numberOfRows(); r++ ){\n\t\t\tfor (int c = 0; c < numberOfColumns(); c++){\n\t\t\t\tif(neighborCount(r,c) == 3){//if there is exactly three\n\t\t\t\t\tif(gameGrid[r][c] == 0)//cell is born\n\t\t\t\t\t\ttempTable[r][c] = 1;//then you add one to your tempTable\t\n\t\t\t\t}\n\n\t\t\t\tif((neighborCount(r,c) == 2) || (neighborCount(r,c) == 3)){//if there is two or three\n\t\t\t\t\tif(gameGrid[r][c] == 1)//this is your existing cell\n\t\t\t\t\t\ttempTable[r][c] = 1;//then the cell remains\n\t\t\t\t}\n\n\t\t\t\tif((neighborCount(r,c) == 0) || (neighborCount(r,c) == 1)){//if there were two neighbors\n\t\t\t\t\tif(gameGrid[r][c] == 0)//if there is no cell\n\t\t\t\t\t\ttempTable[r][c] = 0;//a cell dies\n\t\t\t\t}\n\n\t\t\t\tif((neighborCount(r,c) > 3)){//if there is more than three\n\t\t\t\t\tif(gameGrid[r][c] == 1)//if there is no cell\n\t\t\t\t\t\ttempTable[r][c] = 0;//a cell dies\n\t\t\t\t}\n\n\t\t\t}//end of column for loop\n\t\t}//end of row for loop\n\t\tgameGrid = tempTable;\n\t}", "public void incrementScore(int val) {\n score += val;\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tint val = Integer.parseInt(jt.getText());\r\n\t\t\tval++;\r\n\t\t\tjt.setText(val+\"\");\r\n\t\t\t\r\n\t\t}", "public void incrementScore(int increment) {\n score = score + increment;\n }", "public void step() {\n\n if (n8) {\n // Your code here\n \n \n //by here, after your code, the cellsNext array should be updated properly\n }\n\n if (!n8) { // neighbours-4\n // your code here\n\n //by here, after your code, the cellsNext array should be updated properly\n }\n\n // Flip the arrays now.\n stepCounter++;\n\ttmp = cellsNow;\n cellsNow = cellsNext;\n\tcellsNext = tmp;\n\n }", "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "public void setNextCell(Cell next)\r\n {\r\n this.next = next;\r\n }", "public void decisionOnCellState(int counter, int row, int column)\r\n {\r\n if (cellGrid[column][row].isAlive())\r\n {\r\n if (counter < 2)\r\n {\r\n cellGrid[column][row].setToBeAlive(false);\r\n }\r\n else if (counter == 2 || counter == 3)\r\n {\r\n cellGrid[column][row].setToBeAlive(true);\r\n }\r\n else if (counter > 3)\r\n {\r\n cellGrid[column][row].setToBeAlive(false);\r\n } // end of if (counter < 2)\r\n }\r\n else\r\n {\r\n if (counter == 3)\r\n {\r\n cellGrid[column][row].setToBeAlive(true);\r\n } // end of if (counter == 3)\r\n } // end of if (cellGrid[column][row].isAlive())\r\n }", "@Override\n public void visitIINC(IINC obj) {\n int v = obj.getIndex();\n int amount = obj.getIncrement();\n ConstantFrame f = getFrame();\n Constant c = f.getValue(v);\n if (c.isConstantInteger())\n f.setValue(v, new Constant(c.getConstantInt() + amount));\n else\n f.setValue(v, Constant.NOT_CONSTANT);\n // System.out.println(\"after iinc: \" + getFrame());\n }", "public void incrementFitnessBy2()\n {\n this.fitness=this.fitness+2;\n }", "public void put(int x, int y, int value) {\r\n table[y - 1][x - 1] = value;\r\n }", "private static int upScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && state.getGrid()[row-1][col] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}", "public abstract void manageCell(int x, int y, int livingNeighbours);", "public abstract void updateLabels();", "public void incOffset( Integer increment ) {\n offset += increment;\n }", "static void increaseAndDisperse(DoubleGrid2D landscape, int originalCellX, int originalCellY, double amount) { // includes dispersal. takes cell, adds amount, and then adds dispersing amount to neighboring cells until it completely disperses (increase <= 0.001\n Double originalValue = landscape.get(originalCellX, originalCellY);\n Double2D originalCell = new Double2D(originalCellX, originalCellY);\n landscape.set(originalCellX, originalCellY, (originalValue + amount));\n Bag previousChanges = new Bag();\n previousChanges.add(originalCell);\n changeNeighbors(landscape, originalCell, originalCell, amount, previousChanges);\n }", "@Override\n\tpublic Integer calculateNewValue(Cell<Integer> cell, Integer value, Grid<Integer> grid, Coordinates coordinates) {\n\t\tint newValue = value;\n\t\tif(value == PREY) {\n\t\t\tnewValue = movePrey((PredatorPreyCell) cell, grid, coordinates);\n\t\t}\n\t\tif(value == PREDATOR) {\n\t\t\tnewValue = movePredator((PredatorPreyCell) cell, grid, coordinates);\n\t\t}\n\t\treturn newValue;\n\t}", "private int manhattanMoves(int val,int curr_row,int curr_col)\n\t{\n\t\tint correct_row = (int)Math.ceil((double) val/(double)this.dimension)-1;\n\t\tint mod_val = val%this.dimension;\n\t\tint correct_col = 0;\n\t\t// make corrections\n\t\tif (mod_val == 0)\n\t\t\tcorrect_col = this.dimension -1;\n\t\telse\n\t\t\tcorrect_col = mod_val -1;\n\t\tint vertical_moves = Math.abs(correct_row - curr_row);\n\t\tint horizontal_moves = Math.abs(correct_col - curr_col);\n\t\t\n\t\treturn vertical_moves+horizontal_moves;\n\t}", "public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }", "public void increment() {\r\n\t\tcurrentSheeps++;\r\n\t}", "int increaseScoreThisJump() {\n if (myScoreThisJump == 0) {\n myScoreThisJump++;\n } else {\n myScoreThisJump *= 2;\n }\n return (myScoreThisJump);\n }", "public void increment() {\n mNewNotificationCount.setValue(mNewNotificationCount.getValue() + 1);\n }", "public void assignment()\n\t{\n\t\tint[] zerosRow = new int[n];\n\t\tint[] zerosColumn = new int[n];\n\t\tassignCounter=0;\n\t\t\n\t\t//obtains the number of zeroes in each row\n\t\tzerosRow = countRowZeroes();\n\t\t\n\t\t//Initialize all the row labels and column labels to 9999\n\t\tfor(int k=0;k<n;k++)\n\t\t{\n\t\t\trowLabel[k]=9999;\n\t\t\tcolumnLabel[k]=9999;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif(zerosRow[i]==1)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(cost[i][j]==0 && columnLabel[j]==9999)\n\t\t\t\t\t{\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tcolumnLabel[j]=i;\n\t\t\t\t\t\tassignCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//obtains the number of zeroes in each column\n\t\tzerosColumn = countColumnZeroes();\t\t\n\t\t\n\t\tfor(int j=0;j<n;j++)\n\t\t{\n\t\t\tif(zerosColumn[j]==1)\n\t\t\t{\n\t\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(cost[i][j]==0 && columnLabel[j]==9999 && rowLabel[i]==9999)\n\t\t\t\t\t{\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tcolumnLabel[j]=i;\n\t\t\t\t\t\tassignCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t\t\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tfor(int j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]==0 && rowLabel[i]==9999 && columnLabel[j]==9999)\n\t\t\t\t{\n\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\tcolumnLabel[j]=i;\n\t\t\t\t\tassignCounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void increment (View view)\n {\n numOfCufee++;\n display(numOfCufee);\n }", "@Override\n public void unmarkCell() {\n MNKCell last = MC.getLast();\n super.unmarkCell();\n key = nextZobrist(last.i, last.j);\n value = previousValues.pop();\n }", "public void label() {\n\n /**Iterate through all voxels in the specified volume - This should be done\n * once for making sure all voxels become labelled */\n for (int iX = bX; iX < tX; iX++) {\n for (int iY = bY; iY < tY; iY++) {\n for (int iZ = bZ; iZ < tZ; iZ++) {\n\n // Index3D tempIndex3D = new Index3D(iX, iY, iZ);\n\n /**If an unlabelled voxel is found add it onto the stack */\n if (imageMask.isTrue(iX, iY, iZ) && labelledVolume.intValue(iX, iY, iZ) < startingLabel) {\n voxelStack.push(new Index3D(iX, iY, iZ));\n\n /**Continue to recurse through sub-volumes for label voxels\n * until the queue is empty */\n while (!voxelStack.isEmpty()) {\n Index3D center = voxelStack.pop();\n labelRecursive(center, center);\n }\n\n //Increment the label for the next unlabelled component\n currentLabel = currentLabel + 10;\n diffLabels++;\n }\n }\n }\n }\n\n }", "public void add(ConfusionMatrix other){\n\t\t\n\t\t//the confusion matrix must be of same dimesions\n\t\tif(other.size() != this.size()){\n\t\t\tthrow new IllegalArgumentException(\"cannot add confusino matrix's together. The other confusion matrix is of different dimensions\");\n\t\t}\n\t\t\n\t\t//make sure the labels match\n\t\tfor(int i = 0; i < this.size(); i++){\n\t\t\tLabel lable = this.labels.get(i);\n\t\t\tLabel otherLabel = other.labels.get(i);\n\t\t\t\n\t\t\tif(!lable.equals(otherLabel)){\n\t\t\t\tthrow new IllegalArgumentException(\"cannot add confusino matrix's together. The other confusion matrix has different labels\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t//iterate the labels and add the cells\n\t\tfor(Label row : this.labels){\n\t\t\tfor(Label col : this.labels){\n\t\t\t\tint rowIx = resolveIndex(row);\n\t\t\t\tint colIx = resolveIndex(col);\n\n\t\t\t\tInteger cell = matrix.get(rowIx).get(colIx);\n\t\t\t\tInteger otherCell = other.matrix.get(rowIx).get(colIx);\n\t\t\t\t\n\t\t\t\tInteger newValue = cell+otherCell;\n\t\t\t\tmatrix.get(rowIx).set(colIx, newValue);\n\t\t\t}\t\n\t\t}//end iterate labels\n\t\t\t\n\t}", "public void incrementLoopCounter() throws EndTaskException {\n\t\tgoToBeeperStock();\n\t\tpickBeeper();\n\t\tgoToLoopCounter();\n\t\tputBeeper();\n\t}", "private int cell(int j) \r\n\t{\n\t\tint i=1,sum=0;\r\n\t\tfor(i=1;i<=j;i++)\r\n\t\t{\r\n\t\t\tsum=sum+i;\r\n\t\t\t}\r\n\t\treturn sum;\r\n\t}", "void incrementCount();", "private void increaseFreeCells(int r, int c) {\n\t\tint[] rSet = new int[] {-1, -1, -1, 0, 1, 1, 1, 0};\n\t\tint[] cSet = new int[] {-1, 0, 1, 1, 1, 0, -1, -1};\n\t\t\n\t\tfor (int i = 0; i < rSet.length; i++) {\n\t\t\tif (r - rSet[i] >= 0 && c - cSet[i] >= 0 && r - rSet[i] < rows && c - cSet[i] < columns) {\n\t\t\t\tboard[r - rSet[i]][c - cSet[i]] += 1;\n\t\t\t}\n\t\t}\n\t}", "public abstract void setCellValue(int cellValue, int row, int col);", "public void setCellState(int i, int j, CellState value) {\n switch (value) {\n case ZERO_CELL: {\n int ZERO_MARK = -1;\n field[i][j] = ZERO_MARK;\n break;\n }\n case CROSS_CELL: {\n int CROSS_MARK = 1;\n field[i][j] = CROSS_MARK;\n break;\n }\n case EMPTY_CELL: {\n field[i][j] = EMPTY_MARK;\n break;\n }\n }\n }", "public void increment() {\n\t\tif (m_bYear) {\n\t\t\tm_value++;\n\t\t\tif (m_value > 9999)\n\t\t\t\tm_value = 0;\n\t\t} else {\n\t\t\tm_value++;\n\t\t\tif (m_value > 11)\n\t\t\t\tm_value = 0;\n\n\t\t}\n\t\trepaint();\n\t}", "protected void setCellCount(int count) {\n this.cellCountStack.addLast(count);\n }", "private int rowChange ( int direction ) {\n\t\tswitch ( direction ) {\n\n\t\tcase Direction.NORTH:\n\t\tcase Direction.NE:\n\t\tcase Direction.NW:\n\t\t\treturn -1;\n\n\t\tcase Direction.SOUTH:\n\t\tcase Direction.SE:\n\t\tcase Direction.SW:\n\t\t\treturn 1;\n\n\t\tdefault:\n\t\t\treturn 0;\n\t\t}\n\t}", "public void increment(int bin) {\n this.increment(bin, 1);\n }", "public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "@Override\n\tpublic void cellLabelChanged(Object cell, Object value, boolean autoSize) {\n\t\tmodel.beginUpdate();\n\t\ttry {\n\t\t\tSpot spot = cellToVertexMap.get(cell);\n\t\t\tif (null == spot)\n\t\t\t\treturn;\n\t\t\tString str = (String) value;\n\t\t\tspot.setName(str);\n\t\t\tgetModel().setValue(cell, str);\n\n\t\t\tif (autoSize) {\n\t\t\t\tcellSizeUpdated(cell, false);\n\t\t\t}\n\t\t} finally {\n\t\t\tmodel.endUpdate();\n\t\t}\n\t}", "public void updateDataCell();", "@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\n\t\t\t}", "public void incrementBranchCount() {\n this.branchCount++;\n }", "public void inc() {\n inc(1);\n }", "public void increment(int index) {\n // int prevVal = registers.get(index);\n int prevVal = this.registers[index];\n if (prevVal == 255) {\n // this.registers.set(index, 0);\n this.registers[index] = 0;\n } else {\n // this.registers.set(index, prevVal + 1);\n this.registers[index]++;\n }\n }", "public void updateCell(Cell cell)\r\n {\r\n if (cell.isBomb() == false && cell.active)\r\n {\r\n if (cell.getBombsNearby() > 0)\r\n {\r\n cell.setText(\"\" + cell.getBombsNearby());\r\n cell.setDisable(true);\r\n }\r\n else\r\n {\r\n cell.setDisable(true);\r\n activateNearby(cell.getX(), cell.getY());\r\n }\r\n gameBoard.emptyRemaining--;\r\n }\r\n System.out.println(\"update cell: \" + gameBoard.emptyRemaining);\r\n if (gameBoard.emptyRemaining == 0)\r\n {\r\n endGame();\r\n }\r\n }", "public static boolean incrementCell(final ILogger aLogger,\r\n final String aTableName,\r\n final String aColumnName,\r\n final String aWhere,\r\n final int aIncrement,\r\n final Connection aConnection) {\r\n if (aIncrement==0) return true;\r\n if (aConnection==null) return false;\r\n Statement stm= getStatement(aLogger, aConnection);\r\n boolean r= incrementCell(aLogger, aTableName, aColumnName, aWhere, aIncrement, stm);\r\n close(aLogger, stm);\r\n return r;\r\n }", "public int stepTwo(int step)\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tfor(int j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]==0 && rowLabelMultiple[i]==0 && columnLabelMultiple[j]==0)\n\t\t\t\t{\n\t\t\t\t\tmatrix[i][j]=1;\n\t\t\t\t\trowLabelMultiple[i]=1;\n\t\t\t\t\tcolumnLabelMultiple[j]=1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int k=0;k<n;k++)\n\t\t{\n\t\t\trowLabelMultiple[k]=0;\n\t\t\tcolumnLabelMultiple[k]=0;\n\t\t}\n\t\tstep=3;\n\t\treturn step;\n\t}", "private static void markMonster(int[][] tracker, int row, int col) {\n\t\ttracker[row][col]++;\n\t\ttracker[row+1][col+1]++;\n\t\ttracker[row+1][col+4]++;\n\t\ttracker[row][col+5]++;\n\t\ttracker[row][col+6]++;\n\t\ttracker[row+1][col+7]++;\n\t\ttracker[row+1][col+10]++;\n\t\ttracker[row][col+11]++;\n\t\ttracker[row][col+12]++;\n\t\ttracker[row+1][col+13]++;\n\t\ttracker[row+1][col+16]++;\n\t\ttracker[row][col+17]++;\n\t\ttracker[row][col+18]++;\n\t\ttracker[row-1][col+18]++;\n\t\ttracker[row][col+19]++;\n\t}", "@Override\n\tpublic void updateLabels() {\n\n\t}", "public void update(){\n \n // ADD YOU CODE HERE\n\n // Updating the number of steps label\n nbreOfStepsLabel.setText(\"Number of steps: \" + Integer.toString(gameModel.getNumberOfSteps()));\n \n // Updating the icons\n for (int i=0; i<gameModel.getHeigth(); i++) {\n\n for (int j=0; j<gameModel.getWidth(); j++) {\n\n board[i][j].setIconNumber(getIcon(j,i));\n \n } \n }\n\n pack();\n }", "private void setCellVisited(Cell cell) {\n\n\t\tif (!isIn(cell))\n\t\t\treturn;\n\n\t\tint r = cell.r;\n\t\tint c = cell.c;\n\t\tif (maze.type == HEX) {\n\t\t\tc = c - (r + 1) / 2;\n\t\t}\n\t\ttry {\n\t\t\tvisited[r][c] = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void increment(){\n value+=1;\n }", "public void growCellAt(int row, int col) {\n\t\t// Complete this method\n\t\tgameGrid[row][col] = 1;\n\t}", "public void addOneToScore() {\r\n score++;\r\n }", "public native static int MFCL_Increment(long hr,long ht,byte blkAddr,int val);", "public void change(double increment)\n\t{\n\t\tthis.accumulation += increment;\n\t}" ]
[ "0.551688", "0.551688", "0.5501566", "0.5398652", "0.5368959", "0.536145", "0.53415376", "0.53213084", "0.5161221", "0.5143338", "0.511962", "0.5098391", "0.50814915", "0.50344425", "0.5014625", "0.49587756", "0.49509996", "0.49504387", "0.49392405", "0.4922346", "0.4922346", "0.4917621", "0.49158147", "0.48881182", "0.4862614", "0.48520368", "0.48333797", "0.4826615", "0.48218748", "0.48074552", "0.47982216", "0.4790947", "0.47844067", "0.47786984", "0.4758144", "0.4729747", "0.4723977", "0.4717485", "0.47126833", "0.4705492", "0.4702877", "0.4700465", "0.46953604", "0.46926242", "0.4690882", "0.4689967", "0.4675343", "0.46643475", "0.46521157", "0.4646546", "0.4639841", "0.46392316", "0.46363795", "0.46363452", "0.4624689", "0.46171418", "0.46083382", "0.46031752", "0.45975095", "0.4596117", "0.45951667", "0.45944795", "0.4588678", "0.45880085", "0.45877764", "0.45877096", "0.45789102", "0.45777616", "0.457256", "0.45715618", "0.4570642", "0.4565482", "0.45566344", "0.45554537", "0.45495436", "0.45482478", "0.4546228", "0.45305374", "0.4527142", "0.45230854", "0.4521826", "0.45203516", "0.45137036", "0.45136872", "0.45136872", "0.45110512", "0.45072138", "0.4506945", "0.450434", "0.45035946", "0.45028213", "0.44921234", "0.4489948", "0.4489746", "0.4480272", "0.44799426", "0.44797882", "0.4475038", "0.447357", "0.4472095" ]
0.7023178
0
Computes the sum of all frequencies in a specified column
protected int sumColumn(Label l){ int sum = 0; int colIx = resolveIndex(l); //iterate all cells in the column for(int i = 0;i<size();i++){ Integer cell = matrix.get(i).get(colIx); sum+=cell; } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double sumOfFrequencies() {\r\n\t\tdouble output = 0.0;\r\n\t\tfor(int i=0; i<this.treeNodes.length; i++) {\r\n\t\t\toutput += this.treeNodes[i].getFrequency();\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "static int columnLengthSum(String col, Map<Integer, Map<String, Object>> dict){\n\t\tint sum = 0;\n\t\t\n\t\tfor(Integer key : dict.keySet()){\n\t\t\tsum += ((String) dict.get(key).get(col)).length();\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "private double getColmunSum(TableColumn<Component, String> column) {\r\n double sum = 0;\r\n for (Component component : components) {\r\n sum += Double.parseDouble(column.getCellData(component).replace(',', '.'));\r\n }\r\n return sum;\r\n }", "static double sum(Map<Integer, Map<String, Object>> dict, String col){\n\t\tdouble sum = 0;\n\t\t\n\t\tfor(Integer key : dict.keySet()){\n\t\t\tsum += (double) dict.get(key).get(col);\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "private int getSum(int[] freq, int i, int j) {\n int sum = 0;\n for (int x = i; x <= j; x++) {\n sum += freq[x];\n }\n return sum;\n }", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "protected abstract double computeColumnScore(Column column);", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public static double[] sumEachColumn(double[][] a) {\n \n double[] out = new double[a[0].length];\n for (int r = 0; r < a.length; ++r) {\n for (int c = 0; c < a[r].length; ++c) {\n out[c] += a[r][c];\n }\n }\n \n return out;\n }", "public static int getColumnTotal(int[][] numbers, int a) {\n int total = 0;\n for (int i = 0; i < numbers.length; i++) {\n total += numbers[i][0];\n }\n return total;\n }", "public static double sumColumn(double[][] m, int columnIndex) {\n\t\t\n\t\tdouble sum = 0;\n\t\t\n\t\tfor (int i=0; i < m.length; i++) {\n\t\t\tsum += m[i][columnIndex]; \n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public int[] findFrequentTreeSum(TreeNode root) {\n\t\tif (root == null) {\n\t\t\treturn new int[0];\n\t\t}\n\t\tmap = new HashMap<>();\n\t\tmaxFreqCount = 0;\n\t\tdfs(root);\n\t\tList<Integer> list = new ArrayList<>();\n\t\tfor (Map.Entry<Integer, Integer> entry : map.entrySet()) {\n\t\t\tif (entry.getValue() == maxFreqCount) {\n\t\t\t\tlist.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\tint[] res = new int[list.size()];\n\t\tint i = 0;\n\t\tfor (int sum : list) {\n\t\t\tres[i++] = sum;\n\t\t}\n\t\treturn res;\n\t}", "public int total() {\n int summation = 0;\n for ( int value : map.values() ) {\n summation += value;\n }\n return summation;\n }", "public String sumatoria(String columna) {\r\n\t\ttry {\r\n\t\t\tdouble total = 0;\r\n\t\t\tDouble cAux = new Double(total);\r\n\t\t\tString totalChar = \"\";\r\n\t\t\tString valchar = \"\";\r\n\t\t\tfor (int i = 1; i <= this.elemVS.size(); i++) {\r\n\t\t\t\tvalchar = (getObject(i, columna)).toString();\r\n\t\t\t\ttotal = total + (Double.valueOf(valchar)).doubleValue();\r\n\t\t\t}\r\n\t\t\ttotalChar = Double.toString(total);\r\n\t\t\treturn totalChar;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\treturn \"&nbsp;\" + elemVS.size();\r\n\t\t}\r\n\t}", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "int nnzInColumnSum(int[] colIds) {\n // Give a guess to the size of the union\n int totalSize = 0;\n for (int colId : colIds) {\n totalSize += this.getColumn(colId).size();\n }\n // Take union\n IntSet colIdUnion = new IntOpenHashSet(totalSize, 0.99F);\n for (int colId : colIds) {\n synchronized (this.getColumn(colId)) {\n colIdUnion.addAll(this.getColumn(colId));\n }\n }\n return colIdUnion.size();\n }", "float getFrequency();", "public int getFrequency(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.frequency;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "@Override\n\tpublic void computeColSums(double[] c, int nRows) {\n\t\tsuper.computeColSums(c, nRows);\n\t\t// and add reference multiplied with number of rows.\n\t\tfor(int i = 0; i < _colIndexes.length; i++)\n\t\t\tc[_colIndexes[i]] += _reference[i] * nRows;\n\t}", "public String sumatoria(int columna) {\r\n\t\ttry {\r\n\t\t\tdouble total = 0;\r\n\t\t\tDouble cAux = new Double(total);\r\n\t\t\tString totalChar = \"\";\r\n\t\t\tString valchar = \"\";\r\n\t\t\tfor (int i = 1; i <= this.elemVS.size(); i++) {\r\n\t\t\t\tvalchar = (getObject(i, columna)).toString();\r\n\t\t\t\ttotal = total + (Double.valueOf(valchar)).doubleValue();\r\n\t\t\t}\r\n\t\t\ttotalChar = Double.toString(total);\r\n\t\t\treturn totalChar;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\treturn \"&nbsp;\";\r\n\t\t}\r\n\t}", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "protected int sumRow(Label l){\n\t\tint sum = 0;\n\n\t\tint rowIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(rowIx).get(i);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "@Override\r\n\tpublic Integer getAllCount(String column, String keyWord)\r\n\t\t\tthrows SQLException {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Integer getAllCount(String column, String keyWord)\r\n\t\t\tthrows SQLException {\n\t\treturn null;\r\n\t}", "public void popFrequency(int height);", "public static double[][] calAlleleFrequency(GenotypeMatrix G) {\n\t\tdouble[][] allelefreq = new double[G.getNumMarker()][3];\n\t\tfor (int i = 0; i < G.getGRow(); i++) {\n\t\t\tfor (int j = 0; j < G.getNumMarker(); j++) {\n\t\t\t\tint[] c = G.getBiAlleleGenotype(i, j);\n\t\t\t\tallelefreq[j][c[0]]++;\n\t\t\t\tallelefreq[j][c[1]]++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < G.getNumMarker(); i++) {\n\t\t\tdouble wa = allelefreq[i][0] + allelefreq[i][1];\n\t\t\tdouble a = allelefreq[i][0] + allelefreq[i][1] + allelefreq[i][2];\n\t\t\tif (wa > 0) {\n\t\t\t\tfor (int j = 0; j < allelefreq[i].length - 1; j++) {\n\t\t\t\t\tallelefreq[i][j] /= wa;\n\t\t\t\t}\n\t\t\t\tallelefreq[i][2] /= a;\n\t\t\t} else {\n\t\t\t\tallelefreq[i][0] = Double.NaN;\n\t\t\t\tallelefreq[i][0] = Double.NaN;\n\t\t\t\tallelefreq[i][2] = 1;\n\t\t\t}\n\t\t}\n\n\t\treturn allelefreq;\n\t}", "@Override\n\tpublic IDoubleVector sumColumns() {\n\t\treturn null;\n\t}", "public double sum()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += c;\r\n\r\n return sum;\r\n }", "public static void getFreq(){\n\t\t\tint mutTotalcounter=0;\n\t\t\t\n\t\t\tfor(int i=0; i<numOfMutations.length-1; i++){\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]==numOfMutations[i+1]){\n\t\t\t\t\tfrequency[mutTotalcounter]+=1; //if number of mutation is repeated in original array, frequency is incremented\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]!=numOfMutations[i+1])\n\t\t\t\t{\n\t\t\t\t\tmutTotal[mutTotalcounter++]=numOfMutations[i]; //if number is not repeated in array, the next element in array\n\t\t\t\t\t//becomes the next number of mutations that occurred\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((i+1)==numOfMutations.length-1){\n\t\t\t\t\t//used to get the last element in original array since for loop will go out of bounds\n\t\t\t\t\tmutTotal[mutTotalcounter]=numOfMutations[i+1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"XMut : YFreq\");\n\t\t\t//console display of mutation and frequency values\n\t\t\tfor (int i=0; i<=mutTotal.length-1;i++){\n\t\t\t\tif(mutTotal[i]==0 && frequency[i]==0) continue;\n\t\t\t\tfrequency[i]+=1;\n\t\t\t\tSystem.out.print(mutTotal[i]+\" : \");\n\t\t\t\tSystem.out.print(frequency[i]);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}", "private double getLossTotal(Frequency totalRowFreq)\n {\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n List<MoneyLoss> losses = bbd.getLosses();\n double total = BudgetSetActivity.getBudgetItemTotal(this, totalRowFreq);\n for (MoneyLoss currLoss : losses)\n {\n //Exclude OT frequencies\n if (currLoss.lossFrequency() != Frequency.oneTime)\n {\n total += Prediction.toggle(currLoss.lossAmount(), currLoss.lossFrequency(), totalRowFreq);\n }\n }\n\n return total;\n }", "public int getFrequency(int height);", "@Override\n\tpublic int showFrequency(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn hashArray[hashVal].frequency;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public Integer getFrequency(Label prediction, Label real){\n\n\t\tint rowIx = resolveIndex(prediction);\n\t\tint colIx = resolveIndex(real);\n\n\n\t\treturn matrix.get(rowIx).get(colIx);\n\t}", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "int totalColumns(){\n return column;\n }", "int getFreq();", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "private Double CPLXCalculateWeightedSUM(int numTerms) {\n Double result = 0.0;\r\n\r\n for (int counter = 0; counter < numTerms; counter++) \r\n {\r\n result += CPLXCalculateWeightedSUMTerm(counter);\r\n }\r\n\r\n return result;\r\n }", "static int getFitness(double[][] matrix, Chromosome ch){\n int fitness = 0,\n tmpInd = 0;\n\n for (int i = 0; i < ch.size(); i++) {\n if (ch.getGene(i) == 1){\n fitness += matrix[tmpInd][i];\n tmpInd = i;\n }\n }\n return fitness;\n }", "static void zerosumarr(long[] arr) {\r\n\t \t // Write your code here\r\n\t\t HashMap<Long,Long> map = new HashMap<>();\r\n\t\t int count=0;\r\n\t\t Long psum=(long) 0;\r\n\t\t map.put(psum,(long)1);\r\n\t\t for(int i=0;i<arr.length;i++) {\r\n\t\t\t psum+=arr[i];\r\n\t\t\t if(map.containsKey(psum)) {\r\n\t\t\t\t count+=map.get(psum);\r\n\t\t\t\t map.put(psum,map.get(psum)+1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t map.put(psum, (long)1);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\t System.out.println(count);\r\n\t }", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "public int countFeatures(boolean distinct, String column,\n BoundingBox boundingBox) {\n return countFeatures(distinct, column, boundingBox.buildEnvelope());\n }", "public void makeColumnStochastic() {\n \n for(T col : getSecondDimension()) {\n \n double sum = 0.0;\n \n // sum all values of the current column\n for(T row : getFirstDimension()) {\n \n sum += get(row, col);\n \n }\n \n // divide each value by the sum\n for(T row : getFirstDimension()) {\n \n set(row, col, get(row, col) / sum);\n \n }\n }\n \n }", "public int[] countColumnZeroes()\n\t{\n\t\tint[] zeros = new int[n];\n\t\tfor(int j=0;j<n;j++)\n\t\t{\n\t\t\tzeros[j]=0;\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]==0)\n\t\t\t\t{\n\t\t\t\t\tzeros[j]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn zeros;\n\t}", "public static int sumRow2(int r, int[][] m)\t//same concept as above but with FOREACH loop\n {\n\t int sum = 0;\n\n\t for ( int i : m[r]) {\n\n\t\t sum += i;\n\n\t }\n\n\t return sum;\n }", "public static ArrayList<Integer> sumMostFreqNum(int[] arr) { \n\t\tArrayList<Integer> mostFreqNumSum = new ArrayList<Integer>();\n\t\t//First I need to sort the array in ascending order\n\t\t//The method offers O(n*log(n)) performance.\n\t\tArrays.sort(arr);\n\t\t\n\t\t//the index of the most frequency number in the array\n\t\tint mostFreqNumIdx = 0;\n\t\t// the count of the most frequency number \n\t\tint count = 0;\n\t\t\n\t\t// the started index of the new type element. \n\t\t// Because we sort the array firstly, so the same elements just stay nearly.\n\t\t// It looks they are just in the different types.\n\t\tint tmpNumIdx = 0;\n\t\tint newCount = 0;\n\t\t\n\t\t//additional, a linear comparison here to put the sum of the most frequency integer(s) to an array.\n\t\t//actually maybe more than one integer are most common in the array.\n\t\t//it offers O(n) performance.\n\t\t\n\t\tfor(int i = 0; i < arr.length + 1; i++) {\n\t\t\tif(i == arr.length /*meet the end of the array*/ || \n\t\t\t arr[tmpNumIdx] != arr[i] /*if a new type if found*/) {\n\t\t\t\t//calculate the count of elements in a specific type\n\t\t\t\tnewCount = i - tmpNumIdx;\n\t\t\t\t\n\t\t\t\t//if count of the elements of the new type is greater than or equals to the old one. \n\t\t\t\tif(newCount >= count) {\n\t\t\t\t\tmostFreqNumIdx = tmpNumIdx;\n\t\t\t\t\tif(newCount > count) {\n\t\t\t\t\t\t//update the count of the most frequency number\n\t\t\t\t\t\tcount = newCount;\n\t\t\t\t\t\t//find the best candidate , then drop others\n\t\t\t\t\t\tmostFreqNumSum.clear(); \n\t\t\t\t\t}\n\t\t\t\t\t//add it to the result list\n\t\t\t\t\tmostFreqNumSum.add(arr[mostFreqNumIdx] * count);\n\t\t\t\t} \n\t\t\t\t// the started index of the new type \n\t\t\t\ttmpNumIdx = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mostFreqNumSum;\n\t}", "public int countFeatures(String column, GeometryEnvelope envelope) {\n return featureDao.countIn(column, queryIdsSQL(envelope));\n }", "static void solutionDay1Part1() {\n List<Integer> integerList = new ArrayList<Integer>(); // Defining an integer Array List\n Scanner myFile = null;\n int sum = 0;\n\n try {\n myFile = new Scanner(new FileReader(\"src/main/java/weekone/input01.txt\"));\n while (myFile.hasNext()) {\n integerList.add(myFile.nextInt());\n }\n for (int integer : integerList) {\n sum += integer;\n //System.out.println(sum);\n }\n System.out.println(\"Day 1 Part1 - The resulting frequency is: \" + sum);\n //Might be also possible using: System.out.println(IntStream.of(integerList).sum());\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (myFile != null) {\n myFile.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "Integer calculate(String columnValue);", "boolean hasFrequency();", "@Override\r\n\t\tpublic int calculAnomaly(int total, int freq) {\n\t\t\treturn (int) Math.round(Math.log((double)total/(double)freq));\r\n\r\n\r\n\t\t}", "public double[] histogram() {\n int[][] data = toArray();\n double[] ans = new double[256];\n int totalSize = data.length * data[0].length;\n\n for (int i = 0; i < data.length; i++) {\n for (int j = 0; j < data[i].length; j++) {\n ans[data[i][j]]++;\n }\n }\n for (int i = 0; i < ans.length; i++) {\n ans[i] = ans[i] / totalSize;\n }\n return ans;\n }", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "public int countFeatures(String column, BoundingBox boundingBox) {\n return countFeatures(false, column, boundingBox);\n }", "public static int colSum(int[][] a, int colIndex) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (j == colIndex) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "boolean hasFreq();", "public double reduce(String numberColumnName, NumericAggregateFunction function) {\n NumericColumn<?> column = table.numberColumn(numberColumnName);\n if (hasSelection()) {\n return function.summarize(column.where(selection));\n }\n return function.summarize(column);\n }", "static List<Integer> freqQuery(List<int[]> queries) {\n HashMap<Integer, Integer> data = new HashMap<>();\n int[] counters = new int[queries.size()+1];\n ArrayList<Integer> answer = new ArrayList<>();\n for (int[] cmd : queries) {\n Integer cmdType = cmd[0];\n Integer cmdValue = cmd[1];\n\n switch (cmdType) {\n case 1:\n int previousCount = data.getOrDefault(cmdValue, 0);\n data.put(cmdValue, data.getOrDefault(cmdValue, 0) + 1);\n counters[data.get(cmdValue)]+=1;\n counters[previousCount]-=1;\n break;\n case 2:\n if (data.containsKey(cmdValue) && data.get(cmdValue) != 0) {\n int currentCounter = data.get(cmdValue);\n data.put(cmdValue, currentCounter - 1);\n counters[currentCounter]-=1;\n counters[currentCounter-1]+=1;\n }\n break;\n case 3:\n if (cmdValue < queries.size() && counters[cmdValue] > 0) {\n answer.add(1);\n } else {\n answer.add(0);\n }\n break;\n }\n }\n return answer;\n }", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "private void calculateIdf(){\r\n\t\tIdf = new HashMap<>();\r\n\t\tOcc = new HashMap<>();\r\n\t\t\r\n\t\tfor (Entry<String, Document> doc : Docs.entrySet()){\r\n\t\t\tdoc.getValue().wordSet.forEach(word -> {\r\n\t\t\t\tdouble count = Idf.containsKey(word) ? Idf.get(word) : 0;\r\n \tIdf.put(word, count+1);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tdoc.getValue().words.forEach((w, o) -> words.add(w));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tfor (Entry<String, Double> e : new HashMap<>(Idf).entrySet()){\r\n\t\t\tIdf.put(e.getKey(),\r\n\t\t\t\t\tMath.log(Idf.keySet().size() / e.getValue()));\r\n\t\t}\r\n\t}", "private int totalCount(Piece side) {\n int sum = 0;\n for (int i = 0; i < M; i++) {\n for (int j = 0; j < M; j++) {\n if (boardArr[i][j].abbrev().equals(sideAbbrev)) {\n sum++;\n }\n }\n }\n return sum;\n }", "public int countFeatures(boolean distinct, String column,\n GeometryEnvelope envelope) {\n return featureDao.countIn(distinct, column, queryIdsSQL(envelope));\n }", "static long countTriplets(List<Long> arr, long r) {\n\n long count=0;\n long l = arr.size();\n \n Map <Long,Integer> m = new HashMap<Long,Integer>();\n \n for(int i=0;i<arr.size();i++)\n {\n //Map with Uniqe numbers and their frequency.\n if(m.containsValue(arr.get(i)))\n m.put(arr.get(i), m.get(arr.get(i)) + 1);\n else\n m.put(arr.get(i),1);\n }\n \n \n long n = arr.size();\n if(r==1)\n {\n for(Map.Entry<Long,Integer> entry : m.entrySet())\n {\n long k1 = entry.getKey();\n long val = entry.getValue();\n if(val>2)\n {\n count = count + val*(val-1)*(val-2)/6;\n }\n }\n }\n else\n {\n for(Map.Entry<Long,Integer> entry : m.entrySet())\n {\n long k1 = entry.getKey();\n long val = entry.getValue();\n long k2 = k1*r;\n long k3 = k1*r*r;\n if(m.containsKey(k2) && m.containsKey(k3))\n {\n count = count + val*m.get(k2)*m.get(k3);\n }\n }\n }\n\n return count;\n }", "public static void main(String[] args) {\n\r\n\t\tint arr[]={2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};\r\n\t\tMap<Integer,Data> map = new HashMap<>();\r\n\t\tfor(int a :arr)\r\n\t\t{\r\n\t\t\tif(map.containsKey(a))\r\n\t\t\t{\r\n\t\t\t\tmap.get(a).incrementFrequency();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(a, new Data(a));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSet<Data> sortedData = new TreeSet<>(map.values());\r\n\t\tList<Integer> result = new ArrayList<>();\r\n\t\tfor(Data d : sortedData)\r\n\t\t{\r\n\t\t\tfor(int i=0;i<d.frequency;i++)\r\n\t\t\t\tresult.add(d.number);\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}", "public int count(){\r\n\t\tint sum = 0;\r\n for(Integer value: words.values()){\r\n sum += value;\r\n }\r\n return sum;\r\n\t}", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "@Override\n public double asum(INDArray x) {\n return NativeBlas.sasum(x.length(), x.data(), x.offset(), 1);\n }", "public int countFeatures(String column, GeometryEnvelope envelope,\n Map<String, Object> fieldValues) {\n return featureDao.countIn(column, queryIdsSQL(envelope), fieldValues);\n }", "private Double calculateTotalFitness() {\n double totalFitnessScore = 0;\n\n IgniteCache<Long, Chromosome> cache = ignite.cache(GAGridConstants.POPULATION_CACHE);\n\n SqlFieldsQuery sql = new SqlFieldsQuery(\"select SUM(FITNESSSCORE) from Chromosome\");\n\n // Iterate over the result set.\n try (QueryCursor<List<?>> cursor = cache.query(sql)) {\n for (List<?> row : cursor)\n totalFitnessScore = (Double)row.get(0);\n }\n\n return totalFitnessScore;\n }", "public double sum() {\n/* 196 */ return this.mean * this.count;\n/* */ }", "static void sortByFreq(int arr[], int n)\r\n {\n int[] hash = new int[61];\r\n for (int x : arr) {\r\n hash[x]++;\r\n }\r\n HashMap<Integer, ArrayList<Integer>> valueHash = new HashMap<Integer, ArrayList<Integer>>();\r\n \r\n for (int i = 0; i<hash.length; i++) {\r\n int x = hash[i];\r\n if (x != 0) {\r\n if (valueHash.containsKey(x)) {\r\n valueHash.get(x).add(i);\r\n } else {\r\n ArrayList<Integer> list = new ArrayList<>();\r\n list.add(i);\r\n valueHash.put(x, list);\r\n }\r\n }\r\n }\r\n Set<Integer> keys = valueHash.keySet();\r\n List<Integer> list = new ArrayList<Integer>(keys); \r\n Collections.sort(list, new Comparator<Integer>()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2)\r\n\t\t\t{\r\n\t\t\t\tif (o1 > o2) return -1;\r\n\t\t\t\t\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t});\r\n StringBuffer buff = new StringBuffer();\r\n for (int x : list) {\r\n \tArrayList<Integer> numList = valueHash.get(x);\r\n \tCollections.sort(numList);\r\n \tfor (int num : numList) {\r\n \t\tint y = x;\r\n \t\twhile (y > 0) {\r\n \t\t\tbuff.append(num + \" \");\r\n \t\t\ty--;\r\n \t\t}\r\n \t}\r\n }\r\n System.out.print(buff);\r\n }", "private static int sum(List<Integer> counts) {\n int total = 0;\n for (int count : counts) {\n total += count;\n }\n return total;\n }", "public int sumOfEvenNumbers()\n {\n // TODO: Return the sum of all the numbers which are even\n int sum = 0;\n for (int i =0; i< matrix.length; i++){\n for (int j = 0; j< matrix[0].length; j++){\n if(matrix[i][j]%2==0){\n sum+= matrix[i][j];\n }\n }\n }\n return sum;\n }", "int colCount();", "public void calculateArray() {\n\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n }", "public double getTotal(){\n double total = 0;\n for(int i=0;i<array.length; i++){\n total += array[i].doubleValue();\n }\n return total;\n }", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "public int getTotal() {\n int value = 0;\n for (Map.Entry<Integer, Integer> entry : gramma.entrySet()) {\n value += entry.getKey() * entry.getValue();\n }\n return value;\n }", "public int calculateSumOfHouse() {\n int sum = 0;\n for (int i = 0; i < pointsHistory.size(); i++) {\n sum += pointsHistory.get(i);\n }\n return sum;\n }", "public static int sumRow2(int r, int[][] m)\n {\n int sum = 0; //initialize sum\n for ( int i : m[r]) { //for each value of a certain row of m...\n\t sum += m[r][i]; //set sum as the addition of the previous sum and\n\t //the point in question\n }\n return sum; //return the sum\n }", "void collectLeastFrequent(FrequencyTable fq);", "public long select(byte[][] columns){\t\n\t\tlong sum = 0;\n\t\tfor(String skey: searchBufs.keySet()){\n\t\t\t//String skey = \"1\";\n\t\n \t//System.out.println(skey);\n\t\t String[] keys = skey.split(\"\\\\s+\"); //separted by any white space\n \tint[] selectFields = new int[keys.length];\n\t\t\tboolean containColumn = false;\n\n\t\t\tfor(int i = 0; i < keys.length; i++){\n\t\t\t\tselectFields[i] = 0;\n\t\t\t\tString columnKey = keys[i];\n\t\t\t\tfor(int j = 0; j < columns.length; j++){\n\t \t\t\t\tif(Arrays.equals(columnKey.getBytes(), columns[j])==true){\n\t\t\t\t\t\tselectFields[i] = 1;\n\t\t\t\t\t\tcontainColumn = true; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(containColumn == false){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t ByteBuffer buf = searchBufs.get(skey);\n\t\t\tint bound = buf.position();\n ByteBuffer readBuf = buf.asReadOnlyBuffer();\n readBuf.position(0);\n long longnum = 0;\n \t\n \twhile(readBuf.position()<bound){\n\t\t\t\treadBuf.position((readBuf.position() + 4));\n\t\t\t\tfor(int i = 0 ; i < keys.length; i++){\n\t\t\t\t\t//longnum = readBuf.getLong();\n\t\t\t\t\tif(selectFields[i] == 1){\n\t\t\t\t\t\tlongnum = readBuf.getLong();\n\t\t\t\t\t\tsum += longnum;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tint oldpos = readBuf.position();\n\t\t\t\t\t\tint newpos = oldpos + 8; //one long\n\t\t\t\t\t\treadBuf.position(newpos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "public int countFeatures(boolean distinct, String column,\n BoundingBox boundingBox, Projection projection) {\n BoundingBox featureBoundingBox = projectBoundingBox(boundingBox,\n projection);\n return countFeatures(distinct, column, featureBoundingBox);\n }", "public int countFeatures(boolean distinct, String column,\n GeometryEnvelope envelope, Map<String, Object> fieldValues) {\n return featureDao.countIn(distinct, column, queryIdsSQL(envelope),\n fieldValues);\n }", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "private float getTotal(HashMap<Integer, Integer> distances){\n float result = 0.0f;\n Iterator it = distances.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry pair = (Map.Entry)it.next();\n result += (1/(Math.pow(2, (Integer)pair.getKey()))) * (Integer)pair.getValue();\n }\n return result;\n }", "public int[] getFrequencies(SortOrder sortBy) {\n int[] result = new int[wordFrequency.size()];\n ArrayList<Map.Entry<String, MutableInteger>> entries =\n new ArrayList<Map.Entry<String, MutableInteger>>(wordFrequency.entrySet());\n if (sortBy == SortOrder.ALPHABETICALLY_ASCENDING) {\n Collections.sort(entries, SORT_ALPHABETICALLY_ASCENDING);\n } else {\n Collections.sort(entries, SORT_BY_FREQUENCY_ASCENDING);\n }\n\n //... Add words to the String array.\n int i = 0;\n for (Map.Entry<String, MutableInteger> ent : entries) {\n result[i++] = ent.getValue().getValue();\n }\n return result;\n }", "java.lang.String getFrequency();", "static double calculateArraySum(double... value) {\n double sum = 0;\n for (double i : value) {\n sum += i;\n }\n return sum;\n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public abstract double samplingFrequency();", "private double calculateTotal(){\r\n double total = 0;\r\n\r\n for(Restaurant restaurant: restaurantMap.getRestaurantMap().values()){\r\n total += restaurant.getRevenue();\r\n }\r\n\r\n return total;\r\n }", "public void add(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] += skalar;\r\n }\r\n }\r\n }", "public int diceSum(Die[] dice) {\n int sum = 0;\n for (Die d : dice) {\n sum += d.getFace();\n }\n return sum;\n }", "public static int sum(int[] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tsum += a[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public int countFeatures(boolean distinct, String column,\n BoundingBox boundingBox, Map<String, Object> fieldValues) {\n return countFeatures(distinct, column, boundingBox.buildEnvelope(),\n fieldValues);\n }", "private double countWordFrequencyScore(Page page, String[] queryWords) {\n double score = 0;\n for (String word : queryWords) {\n int wordId = this.pb.getIdForWord(word);\n for (double pageWordId : page.getWords()) {\n if (wordId == pageWordId) score++;\n }\n }\n\n return score;\n }" ]
[ "0.59070885", "0.58721966", "0.5766845", "0.5720405", "0.5555721", "0.5548378", "0.53355044", "0.5334678", "0.5300483", "0.5255901", "0.52037185", "0.51396", "0.507119", "0.5037591", "0.50037485", "0.4982704", "0.49188572", "0.49088272", "0.48285583", "0.4816344", "0.48068368", "0.48001415", "0.4791636", "0.4780143", "0.4780143", "0.47787985", "0.47732973", "0.47686774", "0.47647932", "0.47646546", "0.47562355", "0.47487593", "0.473845", "0.47375053", "0.47306046", "0.47301215", "0.4726283", "0.47245422", "0.47184432", "0.47060448", "0.47059253", "0.47027287", "0.46974656", "0.4678472", "0.4663319", "0.46553054", "0.46447125", "0.46370846", "0.46363395", "0.46357372", "0.4633462", "0.46136686", "0.46097836", "0.4608616", "0.45939305", "0.45870125", "0.45865077", "0.45839164", "0.45829654", "0.45811668", "0.45788926", "0.45478272", "0.4541519", "0.45411065", "0.4537584", "0.4530559", "0.45270273", "0.4525699", "0.4516728", "0.45119503", "0.4510815", "0.45099047", "0.45078593", "0.4507272", "0.44992074", "0.44935483", "0.44927657", "0.44861293", "0.44851696", "0.4484835", "0.44749668", "0.4469362", "0.44588816", "0.4452456", "0.44518998", "0.44506288", "0.44492677", "0.4445669", "0.44414106", "0.44369155", "0.44336486", "0.44311994", "0.44186884", "0.44064075", "0.44039506", "0.44006178", "0.43946344", "0.43915766", "0.43902668", "0.43889365" ]
0.5829937
2
Computes the sum of all frequencies in a specified row
protected int sumRow(Label l){ int sum = 0; int rowIx = resolveIndex(l); //iterate all cells in the column for(int i = 0;i<size();i++){ Integer cell = matrix.get(rowIx).get(i); sum+=cell; } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getSum(int[] freq, int i, int j) {\n int sum = 0;\n for (int x = i; x <= j; x++) {\n sum += freq[x];\n }\n return sum;\n }", "public static int sumRow( int r, int[][] a )\n {\n int sum = 0; //initialize sum\n for (int i = 0; i < a[r].length; i++) { //for the width of an array...\n\t sum += a[r][i]; //add the point to the sum\n }\n return sum; //return sum, an int\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public static int sumRow1( int r, int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t//initialize variable to store sum of a row\n\n\t for ( int i = 0; i < a[r].length; i++) {\t//loop through the specific \"row\" (array) given\n\n\t\t\tsum += a[r][i];\t\t\t\t\t\t//add each value to our sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t//return the sum variable\n }", "public static int sumRow2(int r, int[][] m)\t//same concept as above but with FOREACH loop\n {\n\t int sum = 0;\n\n\t for ( int i : m[r]) {\n\n\t\t sum += i;\n\n\t }\n\n\t return sum;\n }", "public static int sumRow2(int r, int[][] m)\n {\n int sum = 0; //initialize sum\n for ( int i : m[r]) { //for each value of a certain row of m...\n\t sum += m[r][i]; //set sum as the addition of the previous sum and\n\t //the point in question\n }\n return sum; //return the sum\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "protected int sumColumn(Label l){\n\t\tint sum = 0;\n\n\t\tint colIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(i).get(colIx);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "public static int sum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tsum += a[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public double sumOfFrequencies() {\r\n\t\tdouble output = 0.0;\r\n\t\tfor(int i=0; i<this.treeNodes.length; i++) {\r\n\t\t\toutput += this.treeNodes[i].getFrequency();\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "static long countTriplets(List<Long> arr, long r) {\n\n long count=0;\n long l = arr.size();\n \n Map <Long,Integer> m = new HashMap<Long,Integer>();\n \n for(int i=0;i<arr.size();i++)\n {\n //Map with Uniqe numbers and their frequency.\n if(m.containsValue(arr.get(i)))\n m.put(arr.get(i), m.get(arr.get(i)) + 1);\n else\n m.put(arr.get(i),1);\n }\n \n \n long n = arr.size();\n if(r==1)\n {\n for(Map.Entry<Long,Integer> entry : m.entrySet())\n {\n long k1 = entry.getKey();\n long val = entry.getValue();\n if(val>2)\n {\n count = count + val*(val-1)*(val-2)/6;\n }\n }\n }\n else\n {\n for(Map.Entry<Long,Integer> entry : m.entrySet())\n {\n long k1 = entry.getKey();\n long val = entry.getValue();\n long k2 = k1*r;\n long k3 = k1*r*r;\n if(m.containsKey(k2) && m.containsKey(k3))\n {\n count = count + val*m.get(k2)*m.get(k3);\n }\n }\n }\n\n return count;\n }", "public static int sum(int[] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tsum += a[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "private int sum(int[] widths) {\n int sum = 0;\n\n for (int width : widths) {\n sum += width;\n }\n\n return sum;\n }", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "public static double[] sumEachColumn(double[][] a) {\n \n double[] out = new double[a[0].length];\n for (int r = 0; r < a.length; ++r) {\n for (int c = 0; c < a[r].length; ++c) {\n out[c] += a[r][c];\n }\n }\n \n return out;\n }", "public static void main(String[] args) {\n int[] row1 = new int[]{3, 5, 1, 1};\n int[] row2 = new int[]{2, 3, 3, 2};\n int[] row3 = new int[]{5, 5};\n int[] row4 = new int[]{4, 4, 2};\n int[] row5 = new int[]{1, 3, 3, 3};\n int[] row6 = new int[]{1, 1, 6, 1, 1};\n\n //create a hashmap to hold keys(sums), and values(number of times the wall has rows that add up to that sum)\n HashMap<Integer, Integer> hashMap = new HashMap<>();\n\n //iterate over a row, each time a sum is reached replace the value at key sum, with an incremented value\n int sum = 0;\n for (int i = 0; i < row1.length - 1; i++) {\n\n sum += row1[i];\n if (hashMap.containsKey(sum)) {\n int var = hashMap.get(sum) + 1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n //print out the contents of the keySet, which sums have been reached, and the values aka how many times each sum has been reached\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n //Do this for every row in the wall\n sum = 0;\n for(int i = 0; i < row2.length-1; i++) {\n\n sum += row2[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row3.length-1; i++) {\n\n sum += row3[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row4.length-1; i++) {\n\n sum += row4[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row5.length-1; i++) {\n\n sum += row5[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row6.length-1; i++) {\n\n sum += row6[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n //now that every row has been covered, the key associated with the highest value will be where you should make your cut\n System.out.println(\"To cut through the least amount of bricks, you should make the cut at: \");\n int max = 0;\n for(int i : hashMap.values()) {\n if(i > max) {\n max = i;\n }\n }\n for(Map.Entry<Integer, Integer> entry : hashMap.entrySet()) {\n if(entry.getValue() == max) {\n System.out.println(entry.getKey());\n }\n }\n //and the # of bricks to cut through will be the amount of rows minus how many times the sum was reached\n System.out.println(\"The least amount of rows to cut through is \");\n System.out.println(6 - max);\n\n }", "private Double CPLXCalculateWeightedSUM(int numTerms) {\n Double result = 0.0;\r\n\r\n for (int counter = 0; counter < numTerms; counter++) \r\n {\r\n result += CPLXCalculateWeightedSUMTerm(counter);\r\n }\r\n\r\n return result;\r\n }", "@Override\n\tpublic void computeColSums(double[] c, int nRows) {\n\t\tsuper.computeColSums(c, nRows);\n\t\t// and add reference multiplied with number of rows.\n\t\tfor(int i = 0; i < _colIndexes.length; i++)\n\t\t\tc[_colIndexes[i]] += _reference[i] * nRows;\n\t}", "static long subArraySum(int[] data) {\n\n long result = 0;\n\n // computing sum of sub array using formula\n int n = data.length;\n for (int i = 0; i < n; i++) {\n // x * (x at first index) + (x at other indices)\n result += (data[i] * (i * (n - i) + (n - i)));\n//\t\t\tresult += (data[i] * (i + 1) * (n - i));\n }\n\n // return all sub array sum\n return result;\n }", "@Override\n\tprotected void computeSumSq(double[] c, int nRows) {\n\t\tc[0] += _dict.sumSqWithReference(getCounts(), _reference);\n\t\tfinal double refSum = FORUtil.refSumSq(_reference);\n\t\t// Square sum of the reference values only for the rows that is not represented in the Offsets.\n\t\tc[0] += refSum * (_numRows - _data.size());\n\t}", "private double getLossTotal(Frequency totalRowFreq)\n {\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n List<MoneyLoss> losses = bbd.getLosses();\n double total = BudgetSetActivity.getBudgetItemTotal(this, totalRowFreq);\n for (MoneyLoss currLoss : losses)\n {\n //Exclude OT frequencies\n if (currLoss.lossFrequency() != Frequency.oneTime)\n {\n total += Prediction.toggle(currLoss.lossAmount(), currLoss.lossFrequency(), totalRowFreq);\n }\n }\n\n return total;\n }", "private static int sum(List<Integer> counts) {\n int total = 0;\n for (int count : counts) {\n total += count;\n }\n return total;\n }", "public int total() {\n int summation = 0;\n for ( int value : map.values() ) {\n summation += value;\n }\n return summation;\n }", "private static void sumArray(String[][] arr) {\n int count = 0;\n\n if (arr.length != 4) {\n throw new MyArraySizeException(\"Array row less than 4\", arr.length);\n }\n for (int i = 0; i < arr.length; i++) {\n if (arr[i].length != 4) {\n throw new MyArraySizeException(\"Array column less than 4\", arr[i].length);\n }\n\n for (int j = 0; j < arr[i].length; j++) {\n System.out.printf(\"%-10s\", arr[i][j]);// print array data for visibility\n\n try {\n int x = Integer.parseInt(arr[i][j]);\n count = count + x;\n } catch (NumberFormatException e) {\n throw new MyArrayDataException(\"Wrong type of element: \", \"[\" + i + \"]\" + \"[\" + j + \"]\");\n }\n }\n System.out.println();\n }\n System.out.println(\"array sum: \" + count);\n\n }", "@Override\n\tprotected void computeSum(double[] c, int nRows) {\n\t\tsuper.computeSum(c, nRows);\n\t\t// and add all sum of reference multiplied with nrows.\n\t\tfinal double refSum = FORUtil.refSum(_reference);\n\t\tc[0] += refSum * nRows;\n\t}", "static void zerosumarr(long[] arr) {\r\n\t \t // Write your code here\r\n\t\t HashMap<Long,Long> map = new HashMap<>();\r\n\t\t int count=0;\r\n\t\t Long psum=(long) 0;\r\n\t\t map.put(psum,(long)1);\r\n\t\t for(int i=0;i<arr.length;i++) {\r\n\t\t\t psum+=arr[i];\r\n\t\t\t if(map.containsKey(psum)) {\r\n\t\t\t\t count+=map.get(psum);\r\n\t\t\t\t map.put(psum,map.get(psum)+1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t map.put(psum, (long)1);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\t System.out.println(count);\r\n\t }", "public static int totalSum(int... result) {\n int score = IntStream.of(result).sum();\n return score;\n }", "public int getSum() {\n int result = 0;\n\n for (Map.Entry<Integer, Integer> entry : this.entrySet()) {\n result += entry.getKey() * entry.getValue();\n }\n\n return result;\n }", "private int getSumD2(int[][] a) {\n int sum = 0;\n\n int jd1 = 0;\n int jd2 = a.length - 1;\n while (jd1 < a.length) {\n sum += a[jd1][jd2];\n jd2--;\n jd1++;\n }\n return sum;\n }", "public static double getAverage(int arr[][], int row) {\t// 算陣列所有數平均值\n\t\t/* Overloading Method */\n\t\tint sum = 0, count = 0;\n\t\tdouble result;\n\t\t\t\n\t\t\tfor (int j = 0; j < arr[row].length; j++) {\n\t\t\t\tsum += arr[row][j];\n\t\t\t\tcount++;\n\t\t\t}\n\t\tresult = (double) sum / count;\n\t\treturn result;\n\t}", "static double sum(Map<Integer, Map<String, Object>> dict, String col){\n\t\tdouble sum = 0;\n\t\t\n\t\tfor(Integer key : dict.keySet()){\n\t\t\tsum += (double) dict.get(key).get(col);\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public int sum()\n\t{\n\t\tint sum = 0;\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tsum += array[index];\n\t\t}\n\t\treturn sum;\n\t}", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "static int getFitness(double[][] matrix, Chromosome ch){\n int fitness = 0,\n tmpInd = 0;\n\n for (int i = 0; i < ch.size(); i++) {\n if (ch.getGene(i) == 1){\n fitness += matrix[tmpInd][i];\n tmpInd = i;\n }\n }\n return fitness;\n }", "static long countTriplets(List<Long> arr, long r) {\n\t\tMap<Long, Long> elementMapWithOccuranceCount = new HashMap<>();\n\t\t//map contains the triplet count for each element\n\t\tMap<Long, Long> elementMapWithTripletCount = new HashMap<>();\n\t\tlong count = 0;\n\t\tfor (int i = 0; i < arr.size(); i++) {\n\t\t\tlong a = arr.get(i);\n\t\t\tlong key = a / r;\n\t\t\t\n\t\t\tif (elementMapWithTripletCount.containsKey(key) && a % r == 0) {\n\t\t\t\t//Have previous count so increment the count\n\t\t\t\tcount += elementMapWithTripletCount.get(key);\n\t\t\t}\n\t\t\t\n\t\t\tif (elementMapWithOccuranceCount.containsKey(key) && a % r == 0) {\n\t\t\t\t//Have a matching member in triplet, check it's count and put that in triplet count, \n\t\t\t\t//that many triplet will be available in the array for this count, only if triplet count available, other wise 0 \n\t\t\t\tlong elementCount = elementMapWithOccuranceCount.get(key);\n\t\t\t\telementMapWithTripletCount.put(a, elementMapWithTripletCount.getOrDefault(a, 0L) + elementCount);\n\t\t\t}\n\t\t\t//By default put it every time we find a new element, this map also keeps count but only for elements\n\t\t\telementMapWithOccuranceCount.put(a, elementMapWithOccuranceCount.getOrDefault(a, 0L) + 1); // Every number can be the start of a triplet.\n\t\t}\n\t\treturn count;\n\t}", "public long FC( int row, int col){\n\treturn (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3);\n}", "public void add(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] += skalar;\r\n }\r\n }\r\n }", "public static int getColumnTotal(int[][] numbers, int a) {\n int total = 0;\n for (int i = 0; i < numbers.length; i++) {\n total += numbers[i][0];\n }\n return total;\n }", "private int getSumH(int[][] a, int jh) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[jh][j];\n }\n return sum;\n }", "public void makeRowStochastic() {\n \n for(T row : getFirstDimension()) {\n \n double sum = 0.0;\n \n // sum all values of the current row\n for(T col : getMatches(row)) {\n \n sum += get(row, col);\n \n }\n \n // divide each value by the sum\n for(T col : getMatches(row)) {\n \n set(row, col, get(row, col) / sum);\n \n }\n }\n \n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public int[] findFrequentTreeSum(TreeNode root) {\n\t\tif (root == null) {\n\t\t\treturn new int[0];\n\t\t}\n\t\tmap = new HashMap<>();\n\t\tmaxFreqCount = 0;\n\t\tdfs(root);\n\t\tList<Integer> list = new ArrayList<>();\n\t\tfor (Map.Entry<Integer, Integer> entry : map.entrySet()) {\n\t\t\tif (entry.getValue() == maxFreqCount) {\n\t\t\t\tlist.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\tint[] res = new int[list.size()];\n\t\tint i = 0;\n\t\tfor (int sum : list) {\n\t\t\tres[i++] = sum;\n\t\t}\n\t\treturn res;\n\t}", "@Override\n public int evaluate(int[] l) {\n int s = 0;\n HashSet<Integer> map = new HashSet<Integer>();\n for (int i = 0; i < l.length; ++i) {\n int elmt = l[i];\n if (map.add(elmt))\n s += this.getValue(elmt);\n if (i != 0)\n s -= neighbourCheck[l[i - 1]][l[i]];\n }\n return s;\n }", "public void update(int row, int col, int val) {\n int n = matrix[0].length;\n \n for(int i = col; i < n; i++){\n rowSums[row][i] = rowSums[row][i] - matrix[row][col] + val;\n }\n\n matrix[row][col] = val;\n }", "static void solutionDay1Part1() {\n List<Integer> integerList = new ArrayList<Integer>(); // Defining an integer Array List\n Scanner myFile = null;\n int sum = 0;\n\n try {\n myFile = new Scanner(new FileReader(\"src/main/java/weekone/input01.txt\"));\n while (myFile.hasNext()) {\n integerList.add(myFile.nextInt());\n }\n for (int integer : integerList) {\n sum += integer;\n //System.out.println(sum);\n }\n System.out.println(\"Day 1 Part1 - The resulting frequency is: \" + sum);\n //Might be also possible using: System.out.println(IntStream.of(integerList).sum());\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (myFile != null) {\n myFile.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "static int columnLengthSum(String col, Map<Integer, Map<String, Object>> dict){\n\t\tint sum = 0;\n\t\t\n\t\tfor(Integer key : dict.keySet()){\n\t\t\tsum += ((String) dict.get(key).get(col)).length();\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public int countTokens(int row)\r\n\t{\r\n\t\tint result = 0;\r\n\r\n\t\tfor(int x=0;x<Column_Size;x++)\r\n\t\t{\r\n\t\t\tif(row<0)\r\n\t\t\t\treturn result;\r\n\t\t\telse\r\n\t\t\t\tif(Layout[row][x]==1)\r\n\t\t\t\t\tresult += 1;\r\n\t\t}\r\n\t\treturn result + countTokens(row-1);\r\n\t}", "public Integer getFrequency(Label prediction, Label real){\n\n\t\tint rowIx = resolveIndex(prediction);\n\t\tint colIx = resolveIndex(real);\n\n\n\t\treturn matrix.get(rowIx).get(colIx);\n\t}", "private float getTotal(HashMap<Integer, Integer> distances){\n float result = 0.0f;\n Iterator it = distances.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry pair = (Map.Entry)it.next();\n result += (1/(Math.pow(2, (Integer)pair.getKey()))) * (Integer)pair.getValue();\n }\n return result;\n }", "static double calculateArraySum(double... value) {\n double sum = 0;\n for (double i : value) {\n sum += i;\n }\n return sum;\n }", "public double sum() {\n/* 196 */ return this.mean * this.count;\n/* */ }", "public static int rowSum(int[][] a, int rowIndex) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == rowIndex) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public void calculateArray() {\n\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n }", "public double[] histogram() {\n int[][] data = toArray();\n double[] ans = new double[256];\n int totalSize = data.length * data[0].length;\n\n for (int i = 0; i < data.length; i++) {\n for (int j = 0; j < data[i].length; j++) {\n ans[data[i][j]]++;\n }\n }\n for (int i = 0; i < ans.length; i++) {\n ans[i] = ans[i] / totalSize;\n }\n return ans;\n }", "public int diceSum(Die[] dice) {\n int sum = 0;\n for (Die d : dice) {\n sum += d.getFace();\n }\n return sum;\n }", "public static int[][] horizontalSums(int[][] a, int sumToFind){\r\n\t\tint [][]b = new int[a.length][a[0].length] ;\r\n\t\tfor (int r=0;r<a.length;r++) {\r\n\t\t\tfor(int c=0;c<a[0].length;c++){\r\n\t\t\tint sum=0;\r\n\t\t\t//int temp=0;\r\n\t\t\tint temp;\r\n\t\t\t\r\n\t\t\t//int column=0;\r\n\t\t\tfor (temp=c; temp<a[r].length && sum!=sumToFind;temp++){\r\n\t\t\t\tsum=sum+a[r][temp] ; \r\n\t\t\t}\r\n\t\t\tif(sum==sumToFind){\r\n\t\t\t\tfor (int i=c; i<temp;i++) {\r\n\t\t\t\t\tb[r][i]=a[r][i] ;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\treturn b ;\r\n\t}", "public static int sumUsingStreams(int []arr)\n{\n //Your code here\n //using stream.sum()\n return Arrays.stream( arr)\n .sum(); \n \n}", "public int sumRegion(int row1, int col1, int row2, int col2) {\n int ret = 0;\n\n for (int j = row1; j <= row2; j++){\n if (col1 == 0) \n ret += rowSums[j][col2];\n else \n ret += rowSums[j][col2] - rowSums[j][col1 - 1];\n }\n\n return ret;\n }", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "public void E11_6() {\n double[] row1 = {7.5, 3.6};\n double[] row2 = {4.2, 9.7};\n double[] row3 = {6.1, 8.0};\n double column1Sum = row1[0] + row2[0] + row3[0];\n double column2Sum = row1[1] + row2[1] + row3[1];\n System.out.println(\"Column 1 average: \" + (column1Sum/3));\n System.out.println(\"Column 2 average: \" + (column2Sum/3));\n }", "private static int getBoardSum(Game2048Board board) {\n int boardSum = 0;\n for (Game2048Tile tile : board.getItems()) {\n boardSum += Math.pow(tile.getValue().VAL, SCORE_SUM_POWER);\n }\n return boardSum;\n }", "public double edgeSum(List<Edge> e) {\n double sum = 0;\n\n sum = e.stream()\n .map((curr)\n -> curr.length()).reduce(sum, (accumulator, _item) -> accumulator + _item);\n\n return sum;\n }", "public static double[][] calAlleleFrequency(GenotypeMatrix G) {\n\t\tdouble[][] allelefreq = new double[G.getNumMarker()][3];\n\t\tfor (int i = 0; i < G.getGRow(); i++) {\n\t\t\tfor (int j = 0; j < G.getNumMarker(); j++) {\n\t\t\t\tint[] c = G.getBiAlleleGenotype(i, j);\n\t\t\t\tallelefreq[j][c[0]]++;\n\t\t\t\tallelefreq[j][c[1]]++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < G.getNumMarker(); i++) {\n\t\t\tdouble wa = allelefreq[i][0] + allelefreq[i][1];\n\t\t\tdouble a = allelefreq[i][0] + allelefreq[i][1] + allelefreq[i][2];\n\t\t\tif (wa > 0) {\n\t\t\t\tfor (int j = 0; j < allelefreq[i].length - 1; j++) {\n\t\t\t\t\tallelefreq[i][j] /= wa;\n\t\t\t\t}\n\t\t\t\tallelefreq[i][2] /= a;\n\t\t\t} else {\n\t\t\t\tallelefreq[i][0] = Double.NaN;\n\t\t\t\tallelefreq[i][0] = Double.NaN;\n\t\t\t\tallelefreq[i][2] = 1;\n\t\t\t}\n\t\t}\n\n\t\treturn allelefreq;\n\t}", "public int totalHammingDistance(int[] nums) {\n int result = 0;\n for(int i = 0; i <= 31; i++){\n int count = 0;\n for(int j = 0; j < nums.length; j++){\n count = count + ((nums[j] >> i) & 1);\n }\n //for each position, it contributes to this many number combinations.\n result += count * (nums.length - count);\n }\n return result;\n }", "public static ArrayList<Integer> sumMostFreqNum(int[] arr) { \n\t\tArrayList<Integer> mostFreqNumSum = new ArrayList<Integer>();\n\t\t//First I need to sort the array in ascending order\n\t\t//The method offers O(n*log(n)) performance.\n\t\tArrays.sort(arr);\n\t\t\n\t\t//the index of the most frequency number in the array\n\t\tint mostFreqNumIdx = 0;\n\t\t// the count of the most frequency number \n\t\tint count = 0;\n\t\t\n\t\t// the started index of the new type element. \n\t\t// Because we sort the array firstly, so the same elements just stay nearly.\n\t\t// It looks they are just in the different types.\n\t\tint tmpNumIdx = 0;\n\t\tint newCount = 0;\n\t\t\n\t\t//additional, a linear comparison here to put the sum of the most frequency integer(s) to an array.\n\t\t//actually maybe more than one integer are most common in the array.\n\t\t//it offers O(n) performance.\n\t\t\n\t\tfor(int i = 0; i < arr.length + 1; i++) {\n\t\t\tif(i == arr.length /*meet the end of the array*/ || \n\t\t\t arr[tmpNumIdx] != arr[i] /*if a new type if found*/) {\n\t\t\t\t//calculate the count of elements in a specific type\n\t\t\t\tnewCount = i - tmpNumIdx;\n\t\t\t\t\n\t\t\t\t//if count of the elements of the new type is greater than or equals to the old one. \n\t\t\t\tif(newCount >= count) {\n\t\t\t\t\tmostFreqNumIdx = tmpNumIdx;\n\t\t\t\t\tif(newCount > count) {\n\t\t\t\t\t\t//update the count of the most frequency number\n\t\t\t\t\t\tcount = newCount;\n\t\t\t\t\t\t//find the best candidate , then drop others\n\t\t\t\t\t\tmostFreqNumSum.clear(); \n\t\t\t\t\t}\n\t\t\t\t\t//add it to the result list\n\t\t\t\t\tmostFreqNumSum.add(arr[mostFreqNumIdx] * count);\n\t\t\t\t} \n\t\t\t\t// the started index of the new type \n\t\t\t\ttmpNumIdx = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mostFreqNumSum;\n\t}", "public static int sumArray(int[] arr)\n\t{\n\t\tint x=0;\n\t\tfor(int y:arr)\n\t\t{\n\t\t\tx+=y;\n\t\t}\n\t\treturn x;\n\t}", "public double sum()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += c;\r\n\r\n return sum;\r\n }", "public int totalHammingDistance(int[] nums) {\n int total = 0, n = nums.length;\n for (int j = 0; j < 32; j++) {\n int bitCount = 0;\n for (int i = 0; i < n; i++)\n bitCount += (nums[i] >> j) & 1;\n total += bitCount * (n - bitCount);\n }\n return total;\n }", "public static long checksum(int[][] m){\n long s = 0;\n for (int i = 0; i < m.length; i++)\n for (int j = 0; j < m[0].length; j++)\n s += m[i][j];\n return s;\n }", "public static int sum(int[] theArray) {\n\n\n //Converts the array to a list\n List<Integer> values = Arrays.stream(theArray).boxed().collect(Collectors.toList());\n\n //Streams through all the values and using lambda sums them up.\n //result is current sum and currentElement is the current element that is being added\n //see javadocs for reduce for more info.\n// int sum = values.stream().reduce(0, (result, currentElement) -> result + currentElement);\n int sum = values.stream().reduce(0, Integer::sum);\n // sum = integers.reduce(0, Integer::sum);\n return sum;\n\n\n ////Alternative code does the same job.\n// int sum = 0;\n// for (int num : theArray) {\n// sum += num;\n// }\n// return sum;\n\n }", "protected static double seqArraySum(final double[] input) {\n double sum = 0;\n\n // Compute sum of reciprocals of array elements\n for (int i = 0; i < input.length; i++) {\n sum += 1 / input[i];\n }\n\n return sum;\n }", "public static double getTotal(int[][] numbers) {\n int totalValue = 0;\n for (int i = 0; i < numbers.length; i++) {\n for (int j = 0; j < numbers[i].length; j++) {\n totalValue = totalValue + numbers[i][j];\n }\n }\n return totalValue;\n }", "public static int getRowTotal(int[][] numbers, int a) {\n int total = 0;\n for (int i = 0; i < numbers[a].length; i++) {\n total += numbers[a][i];\n }\n return total;\n }", "public void testF() {\n\t\tfor (int k = 0; k < usedSS; k++) {\n\t\t\tList<Integer> subStr = vals.subList(k*compSize, (k+1)*compSize);\n\t\t\tint sum = (int) subStr.stream().filter(i -> i != BipartiteMatching.FREE).count();\n\t\t\tfData.add(sum);\t\t\t\n\t\t}\n\t}", "public int sumOddLengthSubarrays1(int[] arr) {\n int total = 0;\n\n for (int window = 1; window <= arr.length; window += 2)\n for (int i = 0; i + window <= arr.length; i++)\n for (int j = i; j < i + window; j++)\n total += arr[j];\n return total;\n }", "private void count( int theR, int theC )\n {\n for( int r = -1; r <= 1; r++ ) \n {\n for( int c = -1; c <= 1; c++ )\n {\n if( isValid( theR + r, theC + c ) )\n theCounts[ theR ][ theC ] += theMines[ theR + r ][ theC + c ];\n }\n } \n }", "static long countTriplets(List<Long> arr, long r) {\n List<List<Long>> candidates;\n List<List<Long>> triplets = new ArrayList<>();\n for (int i = 0; i < arr.size(); i++) {\n long root = arr.get(i);\n candidates = new ArrayList<>();\n\n for (int j = i + 1; j < arr.size(); j++) {\n long value = arr.get(j);\n\n candidates.forEach(candidate -> {\n long current = candidate.get(1);\n if (value / r == current) {\n List<Long> triplet = new ArrayList<>(candidate);\n triplet.add(value);\n triplets.add(triplet);\n }\n });\n\n if (value / r == root) {\n List<Long> candidate = new ArrayList<>();\n candidate.add(root);\n candidate.add(value);\n candidates.add(candidate);\n }\n }\n\n // List<Long> sig = new ArrayList<>();\n // for (int j = 0; j < arr.size(); j++) {\n // sig.set(j, j < i ? arr.get(i) : arr.get(i) / r);\n // }\n }\n\n return triplets.size();\n }", "public double getTotal(){\n double total = 0;\n for(int i=0;i<array.length; i++){\n total += array[i].doubleValue();\n }\n return total;\n }", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "static long countTriplets(List<Long> arr, long r) {\n long result = 0L;\n long size = arr.size();\n\n ArrayList<long[]> duoList = new ArrayList<>();\n\n // triplet 이 될 수 있는 duo를 선발\n for (int i = 0; i < (size - 1); i++) {\n long firstItem = arr.get(i);\n\n for (int j = i + 1; j < size; j++) {\n long secondItem = arr.get(j);\n if (j >= (size - 1)) continue;\n if (secondItem / (float) firstItem == r) {\n long[] tripletAble = {i, j};\n // System.out.println(\"tripletAble : \" + Arrays.toString(tripletAble));\n if (duoList.contains(tripletAble)) {\n continue;\n } else {\n duoList.add(tripletAble);\n }\n }\n }\n }\n\n // duo인 int[] 의 두 번째 item (int[1]) 의 다음 index부터 탐색해서\n // 해당 수가 triplet이 될 수 있다면 result + 1\n // 판단 기준은 thirdItem / secondItem 이 r이 되는 경우\n int listSize = duoList.size();\n for (int k = 0; k < listSize; k++) {\n long[] targetArr = duoList.get(k);\n long secondIdx = targetArr[1];\n for (int l = (int) secondIdx + 1; l < size; l++) {\n\n long secondItem = arr.get((int) targetArr[1]);\n long thirdItem = arr.get(l);\n\n if (thirdItem / (float) secondItem == r) {\n result += 1L;\n }\n }\n }\n\n return result;\n }", "int nnzInColumnSum(int[] colIds) {\n // Give a guess to the size of the union\n int totalSize = 0;\n for (int colId : colIds) {\n totalSize += this.getColumn(colId).size();\n }\n // Take union\n IntSet colIdUnion = new IntOpenHashSet(totalSize, 0.99F);\n for (int colId : colIds) {\n synchronized (this.getColumn(colId)) {\n colIdUnion.addAll(this.getColumn(colId));\n }\n }\n return colIdUnion.size();\n }", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "public static double arrayTotal(int[] array ) throws IOException {\r\n double total = 0;\r\n\r\n for (int i = 0; i != array.length; i++) {\r\n total = total + array[i];\r\n }\r\n return total;\r\n }", "public int getFrequency(int height);", "public static int sum(int[] a) {\n int sum = 0;\n for (int i = 0; i < a.length; i = i + 1) {\n sum = sum + a[i];\n }\n return sum;\n }", "public int sumOfEvenNumbers()\n {\n // TODO: Return the sum of all the numbers which are even\n int sum = 0;\n for (int i =0; i< matrix.length; i++){\n for (int j = 0; j< matrix[0].length; j++){\n if(matrix[i][j]%2==0){\n sum+= matrix[i][j];\n }\n }\n }\n return sum;\n }", "public static void accumulateResults(double[] avgPArr,\n ArrayList<Double> oneRowResultArr) {\n\n int index = 0;\n\n for (double res : oneRowResultArr)\n avgPArr[index++] += res;\n\n }", "private double getColmunSum(TableColumn<Component, String> column) {\r\n double sum = 0;\r\n for (Component component : components) {\r\n sum += Double.parseDouble(column.getCellData(component).replace(',', '.'));\r\n }\r\n return sum;\r\n }", "static long countTriplets(List<Long> arr, long r) {\n\n long triplets = 0;\n\n HashMap<Long, LinkedList<Integer>> powIndexesMap = new HashMap<>();\n for (int i = 0; i < arr.size(); i++) {\n Long number = arr.get(i);\n Long pow = Long.valueOf((long) logb(number, r));\n LinkedList<Integer> indexes;\n if (!powIndexesMap.containsKey(pow)) {\n indexes = new LinkedList<>();\n } else {\n indexes = powIndexesMap.get(pow);\n }\n indexes.add(i);\n powIndexesMap.put(pow, indexes);\n }\n\n for (int i = 0; i < arr.size(); i++) {\n Long number = arr.get(i);\n Long pow = Long.valueOf((long) logb(number, r));\n Long pow2 = pow + 1;\n Long pow3 = pow2 + 1;\n\n if (!powIndexesMap.containsKey(pow2) || !powIndexesMap.containsKey(pow3)) {\n continue;\n }\n Integer countPow2 = powIndexesMap.get(pow2).size();\n Integer countPow3 = powIndexesMap.get(pow3).size();\n\n if (countPow2 > 0 && countPow3 > 0) {\n triplets += (countPow2 * countPow3);\n }\n }\n return triplets;\n }", "public static void LargestSumRow(int[][] array) {\n\n }", "private void addTotalRow(Frequency totalRowFreq)\n {\n double total = getLossTotal(totalRowFreq);\n\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n TableRow row = new TableRow(this);\n\n TextView totalView = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(totalView, getString(R.string.table_total), R.drawable.bordertbl);\n\n final TextView totalAmountView = new TextView(this);\n this.totalAmountView = totalAmountView;\n String totalAmountString = BadBudgetApplication.roundedDoubleBB(total);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(totalAmountView, totalAmountString, R.drawable.bordertbl);\n\n final TextView frequencyView = new TextView(this);\n this.totalFreqView = frequencyView;\n\n frequencyView.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View v)\n {\n Frequency currentToggleFreq = BadBudgetApplication.freqFromShortHand(frequencyView.getText().toString());\n Frequency convertToggleFreq = BadBudgetApplication.getNextToggleFreq(currentToggleFreq);\n double convertTotal = getLossTotal(convertToggleFreq);\n frequencyView.setText(BadBudgetApplication.shortHandFreq(convertToggleFreq));\n totalAmountView.setText(BadBudgetApplication.roundedDoubleBB(convertTotal));\n }\n\n });\n\n String frequencyString = BadBudgetApplication.shortHandFreq(totalRowFreq);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(frequencyView, frequencyString, R.drawable.bordertbl);\n frequencyView.setPaintFlags(frequencyView.getPaintFlags()|Paint.UNDERLINE_TEXT_FLAG);\n\n TextView notAppView = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(notAppView, \"\", R.drawable.borderfull);\n\n row.addView(totalView);\n row.addView(totalAmountView);\n row.addView(frequencyView);\n row.addView(notAppView);\n\n table.addView(row);\n }", "private int totalCount(Piece side) {\n int sum = 0;\n for (int i = 0; i < M; i++) {\n for (int j = 0; j < M; j++) {\n if (boardArr[i][j].abbrev().equals(sideAbbrev)) {\n sum++;\n }\n }\n }\n return sum;\n }" ]
[ "0.60591394", "0.60475457", "0.60376555", "0.6014209", "0.5974741", "0.58634", "0.5811459", "0.57066965", "0.5657757", "0.56487715", "0.56058764", "0.5595634", "0.55882293", "0.55692077", "0.5526969", "0.5521873", "0.54388106", "0.5369569", "0.5352177", "0.5340439", "0.5335292", "0.53176916", "0.5258948", "0.52483904", "0.5234901", "0.52135265", "0.51995987", "0.51866674", "0.518377", "0.51744115", "0.5155821", "0.51556015", "0.5146323", "0.5050104", "0.5046269", "0.5045782", "0.5014173", "0.50119203", "0.50011253", "0.49924603", "0.4988314", "0.4968084", "0.49656975", "0.49539256", "0.49533677", "0.49520394", "0.49462107", "0.49452528", "0.49237195", "0.49230337", "0.4922396", "0.4911164", "0.49060252", "0.4885705", "0.48834747", "0.48802358", "0.48765266", "0.48736313", "0.48643783", "0.48583806", "0.4858197", "0.48534593", "0.48430857", "0.48280182", "0.48274332", "0.48240623", "0.48208052", "0.47954503", "0.47930238", "0.47927344", "0.47915477", "0.47883177", "0.4787338", "0.4779346", "0.47741547", "0.4767917", "0.47497532", "0.47453403", "0.47435257", "0.4733794", "0.47258595", "0.47215283", "0.47210535", "0.47182682", "0.4709731", "0.47050083", "0.4696387", "0.46922022", "0.46902764", "0.46882108", "0.46845353", "0.46834865", "0.46753964", "0.46738964", "0.467082", "0.46674287", "0.46652246", "0.46635464", "0.4662252", "0.46540245" ]
0.6051639
1
Returns the number of true positive readings found by this classifier
public int computeTP(Label classLabel){ return getFrequency(classLabel,classLabel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}", "public double getNumberOfPredictedPositive() {\n\t\treturn numberOfTruePositives + numberOfFalsePositives;\n\t}", "public double getNumberOfCorrectlyClassified() {\n\t\treturn numberOfTruePositives + numberOfTrueNegatives;\n\t}", "public double getNumberOfTruePositives() {\n\t\treturn numberOfTruePositives;\n\t}", "public double getNumberOfPositives() {\n\t\treturn numberOfTruePositives + numberOfFalseNegatives;\n\t}", "public double getNumberOfTrueNegatives() {\n\t\treturn numberOfTrueNegatives;\n\t}", "public int countTrueCheckBox() {\r\n\t\tint ret = 0;\r\n\t\tif(attributs != null) {\r\n\t\t\tfor(AttributDescribe item : attributs) {\r\n\t\t\t\tif(item.getPk() == true) {\r\n\t\t\t\t\tret++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public float getNoOfPositiveReviewsAfinn(){\n return afinnPositive;\n }", "public int getNumPositive() {\n int numPositive = 0;\n for (NucleiSelected n : nucleiSelected) {\n switch (n.getState()) {\n case POSITIVE:\n numPositive++;\n break;\n case NEGATIVE:\n // do nothing\n break;\n }\n }\n return numPositive;\n }", "public double getNumberOfPredictedNegative() {\n\t\treturn numberOfTrueNegatives + numberOfFalseNegatives;\n\t}", "int getDataScansCount();", "protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }", "private int getPositiveCount(){\n return m_PositiveCount;\n }", "int getInterestsCount();", "public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }", "public int getGroundTruthsCount() {\n if (groundTruthsBuilder_ == null) {\n return groundTruths_.size();\n } else {\n return groundTruthsBuilder_.getCount();\n }\n }", "@java.lang.Override\n public int getGroundTruthsCount() {\n return groundTruths_.size();\n }", "@Override\n public int getMinReadings() {\n createInnerEstimatorsIfNeeded();\n\n int result = getNumberOfDimensions();\n if (mRssiInnerEstimator != null &&\n (mTransmittedPowerEstimationEnabled || mPathLossEstimationEnabled)) {\n try {\n mRssiInnerEstimator.setPositionEstimationEnabled(mRssiPositionEnabled);\n mRssiInnerEstimator.setTransmittedPowerEstimationEnabled(\n mTransmittedPowerEstimationEnabled);\n mRssiInnerEstimator.setPathLossEstimationEnabled(\n mPathLossEstimationEnabled);\n } catch (final LockedException e) {\n throw new IllegalStateException(e);\n }\n\n result += mRssiInnerEstimator.getMinReadings();\n } else {\n result++;\n }\n\n return result;\n }", "public Integer getScannedCount() {\n return this.scannedCount;\n }", "int countFeatures();", "int countFeatures();", "public int getProcessedCount()\r\n {\r\n return myFeatureCount;\r\n }", "protected int getNegativeOnes() {\n Rating[] ratingArray = this.ratings;\n int negOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if(ratingArray[i] != null) {\n if(ratingArray[i].getScore() == -1) negOneCount++;\n }\n }\n return negOneCount;\n }", "public boolean haveCount () ;", "public final int getKnownCount()\r\n {\r\n return knownCount;\r\n }", "public double getNumberOfIncorrectClassified() {\n\t\treturn numberOfFalsePositives + numberOfFalseNegatives;\n\t}", "public long numSimilarities();", "public double getNumberOfFalsePositives() {\n\t\treturn numberOfFalsePositives;\n\t}", "@Override\r\n public final int getUselessCount() {\r\n int i;\r\n\r\n i = 0;\r\n for (Rule r : this.m_rules) {\r\n if (r.isUseless())\r\n i++;\r\n }\r\n\r\n return i;\r\n }", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "public double getNumberOfExamples() {\n\t\treturn numberOfTruePositives + numberOfFalsePositives + numberOfFalseNegatives + numberOfTrueNegatives;\n\t}", "public double getNumberOfNegatives() {\n\t\treturn numberOfTrueNegatives + numberOfFalsePositives;\n\t}", "int getDetectionRulesCount();", "int getMissingCount();", "public double getTotalSignalEstBackCount(){\n\t\tdouble total=0;\n\t\tfor(ControlledExperiment r : replicates){\n\t\t\ttotal+=r.getNoiseCount();\n\t\t}\n\t\treturn total;\n\t}", "public int cardinality() {\n\t\tint counter = 0;\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tcounter += wordinbits * localrlw.getRunningLength();\n\t\t\t}\n\t\t\tfor (int j = 0; j < localrlw.getNumberOfLiteralWords(); ++j) {\n\t\t\t\tcounter += Long.bitCount(i.buffer()[i.dirtyWords() + j]);\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "public int getCount()\r\n {\r\n int answer=0;\r\n answer+=recCount(root);\r\n return answer;\r\n }", "int getAcksCount();", "int getAcksCount();", "public int rodCount ();", "public int numberOfOccorrence();", "@Override\n public long getNonNullCount() {\n return nonMissingCount + nanCount + infinityCount;\n }", "boolean isCounting();", "public long count() {\n\t\treturn 0;\n\t}", "public long count() {\n\t\treturn 0;\n\t}", "int getReaultCount();", "public int countToMark() {\n\t\tint count = 0;\n\t\tint i = elementCount - 1;\n\t\twhile (i > 0 && !(elementData[i] instanceof PSMark)) {\n\t\t\ti--;\n\t\t\tcount++;\n\t\t}\n\t\treturn (elementData[i] instanceof PSMark) ? count : -1;\n\t}", "int getFeatureCount();", "public int count() {\n\t\t\tassert wellFormed() : \"invariant false on entry to count()\";\n\n\t\t\tint count = 0;\n\t\t\tfor(Card p = this.first; p != null; p = p.next) {\n\t\t\t\t++count;\n\t\t\t}\n\n\t\t\treturn count; // TODO\n\t\t}", "int getPointsCount();", "public int getDiscrepancyFound() {\n return _discrepancyFound;\n }", "public Boolean getCountable() {\n\t return this.countable;\n\t}", "int cardinality();", "public Integer count() {\n return this.bst.count();\n }", "public int getPredictionsCount() {\n if (predictionsBuilder_ == null) {\n return predictions_.size();\n } else {\n return predictionsBuilder_.getCount();\n }\n }", "public int getTotRuptures();", "int getAoisCount();", "int getFeaturesCount();", "public int totalScore() {\n return 0;\n }", "public long getNumRecordsWithNoMateCigar() {\n enforceClosed();\n return numRecordsWithNoMateCigar;\n }", "public Integer count() {\n\t\tif(cache.nTriples != null)\n\t\t\treturn cache.nTriples;\n\t\treturn TripleCount.count(this);\n\t}", "public long getNumberOfDetectedConcepts() {\n return numberOfDetectedConcepts;\n }", "public int getMinRssiReadings() {\n return getMinReadings();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "boolean hasCount();", "public int count() {\n\t\tint q = 0;\n\t\tfor(int i = 0; i < list.length; i++) if (list[i] != null) q++;\n\t\treturn q;\n\t\t\n\t}", "int getShotAnnotationsCount();", "int getShotAnnotationsCount();", "public int getNumberOfAnnotations() {\n\t\treturn numberOfAnnotations & 0xffff;\n\t}", "public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }", "public int getNumTrials() \n {\n return cumulativeTrials; \n }", "public int countRess()\n {\n int nbRess = 0;\n pw.println(13);\n try\n {\n nbRess = Integer.parseInt(bis.readLine()) ;\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return nbRess ;\n }", "@Override\n\tpublic int size()\n\t{\n\t\tint count = 0;\n\t\tfor (Variable var : FactorGraphIterables.variables(rootGraph()))\n\t\t{\n\t\t\tif (var.getPrior() != null)\n\t\t\t{\n\t\t\t\t++count;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public Output<TInt32> numPresent() {\n return numPresent;\n }", "public int getMasteredSkills() {\r\n int count = 0;\r\n for (int i = 0; i < getTotalSkills(); i++) {\r\n if (getStaticLevel(i) >= 99) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }", "public int count(){\n\tboolean val = false;\n\tint cont = 0;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\t\tcont++;\n\t\t}\n\t\telse{\n\t\t\tval=true;\n\t\t}\n\t}\n\treturn cont;\n}", "public long getRecordWrittern() {\n long count = 0;\n for (OutputStats out : outputs) {\n long rec = out.getNumberRecords();\n if (rec > 0) count += rec;\n }\n return count;\n }", "public int readyCount ()\n\t{\n\t\tint count =0;\n\t\tIterator<Player> it = iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tPlayer p = it.next();\n\t\t\tif(p.available())\n\t\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "public int getFeaturesCount();", "int getLabelAnnotationsCount();", "int getLabelAnnotationsCount();", "public int getOCCURSNR() {\n return occursnr;\n }", "public int numRanked() {\n\t\tint count = 0;\n\t\tfor(int index = 0; index < NUM_DECADES; index++) {\n\t\t\tif(rank.get(index) != UNRANKED) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int getNoOfratings() {\n\treturn noofratings;\n}", "int sizeOfClassificationArray();", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "public int numLikes() {\n return this.likes.size();\n }", "public int getInterestsCount() {\n return interests_.size();\n }", "public int nSamples() {\n return samples.nSamples();\n }", "public int getTotalActivitySwitches() {\n return (int) neurons.stream().filter(n -> n.getValueRange() > 0).count();\n }", "public int getCuteness() {\n \t\treturn cuteness;\n \t}", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "@Override\r\n\tpublic long count() {\n\t\treturn 0;\r\n\t}", "public long getNonMissingCount() {\n return nonMissingCount;\n }", "public float getNoOfNegativeReviewsAfinn(){\n return afinnNegative;\n }", "public double calculateRecall() {\n final long divisor = truePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return truePositive / (double)divisor;\n }\n }", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "int getConditionalResponsesCount();", "int getMetricsCount();" ]
[ "0.72796494", "0.7279609", "0.71069473", "0.6920487", "0.6718627", "0.6666813", "0.6656388", "0.6591807", "0.6556536", "0.65510154", "0.65463644", "0.6534295", "0.6530342", "0.63969713", "0.63795304", "0.63395953", "0.6324189", "0.62835556", "0.62301695", "0.620002", "0.620002", "0.617983", "0.6178005", "0.6174204", "0.6149799", "0.61342347", "0.6116059", "0.6113272", "0.6106733", "0.60970366", "0.6092262", "0.60863614", "0.6084465", "0.6066208", "0.6041745", "0.6040982", "0.60369575", "0.60329884", "0.60329884", "0.6021908", "0.5998691", "0.59966135", "0.59937334", "0.5963421", "0.5963421", "0.59549224", "0.59518313", "0.5938879", "0.5932391", "0.59213746", "0.59193486", "0.5917076", "0.58958465", "0.5893518", "0.5883994", "0.58717126", "0.5867936", "0.5863787", "0.58610934", "0.58351123", "0.58310294", "0.5822044", "0.5807707", "0.5805647", "0.5805647", "0.5803706", "0.5799527", "0.5798857", "0.5798857", "0.5787422", "0.57870924", "0.57786185", "0.5777455", "0.57767844", "0.5776231", "0.5765447", "0.57631516", "0.5761754", "0.5758351", "0.57558024", "0.575304", "0.575304", "0.5744245", "0.573142", "0.57309324", "0.5730927", "0.57301533", "0.57266575", "0.57245475", "0.57216275", "0.5720723", "0.5717845", "0.57178307", "0.57178307", "0.57155967", "0.5712816", "0.57108223", "0.57083946", "0.5704854", "0.5701739", "0.57009536" ]
0.0
-1
Returns the number of false positive readings found by this classifier
public int computeFP(Label classLabel){ int tp = this.computeTP(classLabel); //the total number of predictions that guess 'classLabel' int totalPredictions = this.sumRow(classLabel); return totalPredictions - tp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getNumberOfTrueNegatives() {\n\t\treturn numberOfTrueNegatives;\n\t}", "public double getNumberOfPredictedNegative() {\n\t\treturn numberOfTrueNegatives + numberOfFalseNegatives;\n\t}", "public double getNumberOfFalsePositives() {\n\t\treturn numberOfFalsePositives;\n\t}", "public double getNumberOfPredictedPositive() {\n\t\treturn numberOfTruePositives + numberOfFalsePositives;\n\t}", "public double getNumberOfFalseNegatives() {\n\t\treturn numberOfFalseNegatives;\n\t}", "public double getNumberOfCorrectlyClassified() {\n\t\treturn numberOfTruePositives + numberOfTrueNegatives;\n\t}", "public double getNumberOfNegatives() {\n\t\treturn numberOfTrueNegatives + numberOfFalsePositives;\n\t}", "public double getNumberOfIncorrectClassified() {\n\t\treturn numberOfFalsePositives + numberOfFalseNegatives;\n\t}", "public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}", "public long getNonMissingCount() {\n return nonMissingCount;\n }", "public double getNumberOfPositives() {\n\t\treturn numberOfTruePositives + numberOfFalseNegatives;\n\t}", "int getMissingCount();", "public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }", "public double getNumberOfTruePositives() {\n\t\treturn numberOfTruePositives;\n\t}", "protected int getNegativeOnes() {\n Rating[] ratingArray = this.ratings;\n int negOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if(ratingArray[i] != null) {\n if(ratingArray[i].getScore() == -1) negOneCount++;\n }\n }\n return negOneCount;\n }", "@Override\r\n public final int getUselessCount() {\r\n int i;\r\n\r\n i = 0;\r\n for (Rule r : this.m_rules) {\r\n if (r.isUseless())\r\n i++;\r\n }\r\n\r\n return i;\r\n }", "@java.lang.Override\n public int getGroundTruthsCount() {\n return groundTruths_.size();\n }", "public int getDiscrepancyFound() {\n return _discrepancyFound;\n }", "public float getNoOfPositiveReviewsAfinn(){\n return afinnPositive;\n }", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "public float getNoOfNegativeReviewsAfinn(){\n return afinnNegative;\n }", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "public int getGroundTruthsCount() {\n if (groundTruthsBuilder_ == null) {\n return groundTruths_.size();\n } else {\n return groundTruthsBuilder_.getCount();\n }\n }", "public long getMissingCount() {\n return nullCount + nanCount + infinityCount;\n }", "private int getPositiveCount(){\n return m_PositiveCount;\n }", "public long getNumRecordsWithNoMateCigar() {\n enforceClosed();\n return numRecordsWithNoMateCigar;\n }", "protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }", "public int getNumNegative() {\n int numNegative = 0;\n for (NucleiSelected n : nucleiSelected) {\n switch (n.getState()) {\n case POSITIVE:\n // do nothing\n break;\n case NEGATIVE:\n numNegative++;\n break;\n }\n }\n return numNegative;\n }", "public double getNumberOfExamples() {\n\t\treturn numberOfTruePositives + numberOfFalsePositives + numberOfFalseNegatives + numberOfTrueNegatives;\n\t}", "public int getMissCountNotFound() {\n return missCountNotFound;\n }", "public int getNotYetCount() {\r\n return root.getNotYetCount();\r\n }", "int getDataScansCount();", "@Override\n public long getNonNullCount() {\n return nonMissingCount + nanCount + infinityCount;\n }", "public int GetNMissing();", "public double getTotalSignalEstBackCount(){\n\t\tdouble total=0;\n\t\tfor(ControlledExperiment r : replicates){\n\t\t\ttotal+=r.getNoiseCount();\n\t\t}\n\t\treturn total;\n\t}", "public int getNumPositive() {\n int numPositive = 0;\n for (NucleiSelected n : nucleiSelected) {\n switch (n.getState()) {\n case POSITIVE:\n numPositive++;\n break;\n case NEGATIVE:\n // do nothing\n break;\n }\n }\n return numPositive;\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalsePositives(295);\n assertEquals(0.0, double0, 0.01);\n }", "public int getNumberOfDefeats() {\r\n\t\tint numDefeats = 0;\r\n\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\tfor (int j = 1; j <= 3; j++) {\r\n\t\t\t\tif (militaryVPS[i][j] == -1)\r\n\t\t\t\t\tnumDefeats++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn numDefeats;\r\n\t}", "int getDetectionRulesCount();", "public int countTrueCheckBox() {\r\n\t\tint ret = 0;\r\n\t\tif(attributs != null) {\r\n\t\t\tfor(AttributDescribe item : attributs) {\r\n\t\t\t\tif(item.getPk() == true) {\r\n\t\t\t\t\tret++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public int getNumMissiles(){\n return this.nunMissiles;\n }", "@Override\r\n\tpublic int getEvaluations() {\n\t\treturn 0;\r\n\t}", "public long count() {\n\t\treturn 0;\n\t}", "public long count() {\n\t\treturn 0;\n\t}", "int getUnreachableCount();", "private int getAbsenceCount() {\n\t\treturn 0;\r\n\t}", "int getInterestsCount();", "public final int getKnownCount()\r\n {\r\n return knownCount;\r\n }", "public long numMisses() {\n return numMisses.longValue();\n }", "public double getFalsePositiveRate() {\n\t\treturn falsePositiveRate;\n\t}", "public Integer getScannedCount() {\n return this.scannedCount;\n }", "@Override\n\tpublic int countExam() {\n\t\treturn 0;\n\t}", "public long numSimilarities();", "public String getSuspectedCount() {\n return suspectedCount;\n }", "public boolean haveCount () ;", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "public double calculateRecall() {\n final long divisor = truePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return truePositive / (double)divisor;\n }\n }", "public int rodCount ();", "public int countToMark() {\n\t\tint count = 0;\n\t\tint i = elementCount - 1;\n\t\twhile (i > 0 && !(elementData[i] instanceof PSMark)) {\n\t\t\ti--;\n\t\t\tcount++;\n\t\t}\n\t\treturn (elementData[i] instanceof PSMark) ? count : -1;\n\t}", "@Override\r\n\tpublic int reviewCount() throws Exception {\n\t\treturn 0;\r\n\t}", "public int getProcessedCount()\r\n {\r\n return myFeatureCount;\r\n }", "int getNumberOfInfantry();", "public Integer getNegativecount() {\n return negativecount;\n }", "public java.lang.Integer getNocCheck() {\r\n return nocCheck;\r\n }", "public int getNumberofNonLeaves() {\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE NUMBER OF NON_LEAF NODES IN THE TREE AND RETURN\n */\n return nonleaves;\n }", "public synchronized int getMissed() {\n\t\treturn missedWords.get();\n\t}", "public double getFaultyNodeCount() {\n return (this.getTotalNodeCount() - 1)/3;\n }", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "public int getNoOfratings() {\n\treturn noofratings;\n}", "@Override\r\n\tpublic long count() {\n\t\treturn 0;\r\n\t}", "public int getCuteness() {\n \t\treturn cuteness;\n \t}", "public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}", "int getReaultCount();", "int countFeatures();", "int countFeatures();", "public int getBadCount() {\n return badCount;\n }", "public int getNumProbes()\r\n\t{\r\n\t\treturn numProbes;\r\n\t}", "@Override\n public int getMinReadings() {\n createInnerEstimatorsIfNeeded();\n\n int result = getNumberOfDimensions();\n if (mRssiInnerEstimator != null &&\n (mTransmittedPowerEstimationEnabled || mPathLossEstimationEnabled)) {\n try {\n mRssiInnerEstimator.setPositionEstimationEnabled(mRssiPositionEnabled);\n mRssiInnerEstimator.setTransmittedPowerEstimationEnabled(\n mTransmittedPowerEstimationEnabled);\n mRssiInnerEstimator.setPathLossEstimationEnabled(\n mPathLossEstimationEnabled);\n } catch (final LockedException e) {\n throw new IllegalStateException(e);\n }\n\n result += mRssiInnerEstimator.getMinReadings();\n } else {\n result++;\n }\n\n return result;\n }", "public int incNummerOfMissing() {\n\t\t\treturn numberOfMissings++;\n\t\t}", "public int nUnfilteredSamples() {\n return Math.max(0, nHeaderFields - sampleOffset);\n }", "public int numberOfOccorrence();", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}", "public int totalScore() {\n return 0;\n }", "double countMisclassifications(Matrix features, Matrix labels)\r\n {\r\n if(features.rows() != labels.rows())\r\n throw new IllegalArgumentException(\"Illegal Argument Exception Created!!\");\r\n\tdouble mis = 0;\r\n for(int i = 0; i < features.rows(); i++)\r\n\t{\r\n Vec feat = features.row(i);\r\n Vec pred = predict(feat);\r\n Vec lab = labels.row(i);\r\n\r\n for(int j = 0; j < lab.size(); j++){\r\n \r\n if(pred.get(j) != lab.get(j))\r\n mis++;\r\n }\r\n\t}\r\n // System.out.println(\"mis \" + mis);\r\n // System.out.println(\"rowcol \" + (labels.rows()*labels.cols()));\r\n\r\n double misclassifictionRate = 100.0*(mis/(labels.rows()*labels.cols()));\r\n return misclassifictionRate;\r\n }", "public long getNumberOfInjured() {\n return numberOfInjured;\n }", "public int numRanked() {\n\t\tint count = 0;\n\t\tfor(int index = 0; index < NUM_DECADES; index++) {\n\t\t\tif(rank.get(index) != UNRANKED) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int getPredictionsCount() {\n if (predictionsBuilder_ == null) {\n return predictions_.size();\n } else {\n return predictionsBuilder_.getCount();\n }\n }", "public int getCheckCount() {\r\n return checkResults.size();\r\n }", "public int getNumTrials() \n {\n return cumulativeTrials; \n }", "int getShotAnnotationsCount();" ]
[ "0.71897143", "0.71638525", "0.71626794", "0.70902383", "0.70638496", "0.70526445", "0.6988145", "0.69764817", "0.6854917", "0.65590256", "0.6553129", "0.6549737", "0.6533221", "0.6500105", "0.64953655", "0.6362177", "0.6341253", "0.63379085", "0.6309032", "0.6272606", "0.62507117", "0.6250119", "0.6242218", "0.6196283", "0.61662406", "0.6149565", "0.61395234", "0.6109917", "0.61029553", "0.60960066", "0.60839224", "0.60764116", "0.60471684", "0.6044155", "0.6028209", "0.6017295", "0.5979098", "0.5976391", "0.597306", "0.5954244", "0.59457564", "0.59042954", "0.5900501", "0.5900501", "0.5888569", "0.5883662", "0.5875146", "0.5870349", "0.58633786", "0.5805802", "0.5805472", "0.57976496", "0.57778955", "0.5754548", "0.575083", "0.5743921", "0.573771", "0.57284456", "0.57263416", "0.57141185", "0.57049227", "0.57020223", "0.5689691", "0.5687939", "0.568604", "0.5684637", "0.5683831", "0.5682174", "0.56772166", "0.56772166", "0.56772166", "0.56772166", "0.56686336", "0.56614697", "0.5653262", "0.5653187", "0.56531596", "0.5647979", "0.5647979", "0.56290203", "0.562823", "0.56275904", "0.5623468", "0.5617962", "0.5613404", "0.5609055", "0.5609055", "0.5609055", "0.5609055", "0.5609055", "0.5609055", "0.5609055", "0.5609055", "0.56085783", "0.5607433", "0.5598216", "0.559574", "0.5590432", "0.5589677", "0.5589626", "0.5589465" ]
0.0
-1
Returns the number of false negative readings found by this classifier
public int computeFN(Label classLabel){ int tp = this.computeTP(classLabel); //the total number of real labels of 'classLabel' int totalReal = this.sumColumn(classLabel); return totalReal - tp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getNumberOfPredictedNegative() {\n\t\treturn numberOfTrueNegatives + numberOfFalseNegatives;\n\t}", "public double getNumberOfNegatives() {\n\t\treturn numberOfTrueNegatives + numberOfFalsePositives;\n\t}", "public double getNumberOfFalseNegatives() {\n\t\treturn numberOfFalseNegatives;\n\t}", "public double getNumberOfTrueNegatives() {\n\t\treturn numberOfTrueNegatives;\n\t}", "public double getNumberOfFalsePositives() {\n\t\treturn numberOfFalsePositives;\n\t}", "protected int getNegativeOnes() {\n Rating[] ratingArray = this.ratings;\n int negOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if(ratingArray[i] != null) {\n if(ratingArray[i].getScore() == -1) negOneCount++;\n }\n }\n return negOneCount;\n }", "public double getNumberOfPredictedPositive() {\n\t\treturn numberOfTruePositives + numberOfFalsePositives;\n\t}", "public double getNumberOfIncorrectClassified() {\n\t\treturn numberOfFalsePositives + numberOfFalseNegatives;\n\t}", "public double getNumberOfCorrectlyClassified() {\n\t\treturn numberOfTruePositives + numberOfTrueNegatives;\n\t}", "public int getNumNegative() {\n int numNegative = 0;\n for (NucleiSelected n : nucleiSelected) {\n switch (n.getState()) {\n case POSITIVE:\n // do nothing\n break;\n case NEGATIVE:\n numNegative++;\n break;\n }\n }\n return numNegative;\n }", "public double getNumberOfPositives() {\n\t\treturn numberOfTruePositives + numberOfFalseNegatives;\n\t}", "public float getNoOfNegativeReviewsAfinn(){\n return afinnNegative;\n }", "public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}", "public Integer getNegativecount() {\n return negativecount;\n }", "@Override\r\n public final int getUselessCount() {\r\n int i;\r\n\r\n i = 0;\r\n for (Rule r : this.m_rules) {\r\n if (r.isUseless())\r\n i++;\r\n }\r\n\r\n return i;\r\n }", "public double getNumberOfTruePositives() {\n\t\treturn numberOfTruePositives;\n\t}", "private int getNegativeCount(){\n return m_NegativeCount;\n }", "public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "public long getNonMissingCount() {\n return nonMissingCount;\n }", "int getMissingCount();", "public int getNumberOfDefeats() {\r\n\t\tint numDefeats = 0;\r\n\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\tfor (int j = 1; j <= 3; j++) {\r\n\t\t\t\tif (militaryVPS[i][j] == -1)\r\n\t\t\t\t\tnumDefeats++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn numDefeats;\r\n\t}", "public int getDiscrepancyFound() {\n return _discrepancyFound;\n }", "protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }", "private int getAbsenceCount() {\n\t\treturn 0;\r\n\t}", "public int getMissCountNotFound() {\n return missCountNotFound;\n }", "@java.lang.Override\n public int getGroundTruthsCount() {\n return groundTruths_.size();\n }", "private int getPositiveCount(){\n return m_PositiveCount;\n }", "public long getNumRecordsWithNoMateCigar() {\n enforceClosed();\n return numRecordsWithNoMateCigar;\n }", "public float getNoOfPositiveReviewsAfinn(){\n return afinnPositive;\n }", "int getDetectionRulesCount();", "int getDataScansCount();", "public int getNumPositive() {\n int numPositive = 0;\n for (NucleiSelected n : nucleiSelected) {\n switch (n.getState()) {\n case POSITIVE:\n numPositive++;\n break;\n case NEGATIVE:\n // do nothing\n break;\n }\n }\n return numPositive;\n }", "public double getTotalSignalEstBackCount(){\n\t\tdouble total=0;\n\t\tfor(ControlledExperiment r : replicates){\n\t\t\ttotal+=r.getNoiseCount();\n\t\t}\n\t\treturn total;\n\t}", "public double getNumberOfExamples() {\n\t\treturn numberOfTruePositives + numberOfFalsePositives + numberOfFalseNegatives + numberOfTrueNegatives;\n\t}", "public int getNumMissiles(){\n return this.nunMissiles;\n }", "public double getFalsePositiveRate() {\n\t\treturn falsePositiveRate;\n\t}", "public int getGroundTruthsCount() {\n if (groundTruthsBuilder_ == null) {\n return groundTruths_.size();\n } else {\n return groundTruthsBuilder_.getCount();\n }\n }", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalsePositives(295);\n assertEquals(0.0, double0, 0.01);\n }", "public int countToMark() {\n\t\tint count = 0;\n\t\tint i = elementCount - 1;\n\t\twhile (i > 0 && !(elementData[i] instanceof PSMark)) {\n\t\t\ti--;\n\t\t\tcount++;\n\t\t}\n\t\treturn (elementData[i] instanceof PSMark) ? count : -1;\n\t}", "public int countTrueCheckBox() {\r\n\t\tint ret = 0;\r\n\t\tif(attributs != null) {\r\n\t\t\tfor(AttributDescribe item : attributs) {\r\n\t\t\t\tif(item.getPk() == true) {\r\n\t\t\t\t\tret++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public long getMissingCount() {\n return nullCount + nanCount + infinityCount;\n }", "int getUnreachableCount();", "public double getFaultyNodeCount() {\n return (this.getTotalNodeCount() - 1)/3;\n }", "public int GetNoElises(){\n\t\treturn NoElises;\n\t}", "public int getNotYetCount() {\r\n return root.getNotYetCount();\r\n }", "public int getNumberofNonLeaves() {\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE NUMBER OF NON_LEAF NODES IN THE TREE AND RETURN\n */\n return nonleaves;\n }", "public int getBadCount() {\n return badCount;\n }", "public int getHotOrNotRating() {\r\n if (ratingCount == 0) return 0;\r\n return (rating/ratingCount);\r\n }", "public int fineAmountOfBrokenRules()\n {\n return mBrokenRules.sum();\n }", "public int GetNMissing();", "public synchronized int getMissed() {\n\t\treturn missedWords.get();\n\t}", "public int rodCount ();", "public int cardinality() {\n\t\tint counter = 0;\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tcounter += wordinbits * localrlw.getRunningLength();\n\t\t\t}\n\t\t\tfor (int j = 0; j < localrlw.getNumberOfLiteralWords(); ++j) {\n\t\t\t\tcounter += Long.bitCount(i.buffer()[i.dirtyWords() + j]);\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "public long numSimilarities();", "public double calculateRecall() {\n final long divisor = truePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return truePositive / (double)divisor;\n }\n }", "public long numMisses() {\n return numMisses.longValue();\n }", "public Integer getScannedCount() {\n return this.scannedCount;\n }", "public int getCuteness() {\n \t\treturn cuteness;\n \t}", "@Override\r\n\tpublic int getEvaluations() {\n\t\treturn 0;\r\n\t}", "public int evenCount()\n {\n return 0;\n }", "public java.lang.Integer getNocCheck() {\r\n return nocCheck;\r\n }", "public int getMisses() {\n\t\treturn this.misses;\n\t}", "int getInterestsCount();", "@Override\n public long getNonNullCount() {\n return nonMissingCount + nanCount + infinityCount;\n }", "@Override\n public int getRemainingMines() {\n int numPlacedFlags = cells.stream()\n .mapToInt(b -> (int) b.stream().filter(c -> c.getFlagState() == 1).count()).sum();\n return numMines - numPlacedFlags;\n }", "public long count() {\n\t\treturn 0;\n\t}", "public long count() {\n\t\treturn 0;\n\t}", "public String getSuspectedCount() {\n return suspectedCount;\n }", "int countFeatures();", "int countFeatures();", "int getNotInCount();", "public int getUnderflowCounter() \n\t{\n\treturn fUnderflowCounter;\n\t}", "public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}", "@Override\n\tpublic boolean isCovered() {\n\t\treturn (falseCount > 0) && (trueCount > 0);\n\t}", "public int getTrys() {\n return trys;\n\n }", "int getReaultCount();", "public int discCount() {\n\t\tint countBLACK = discBlackCount();\n\t\tint countWHITE = discWhiteCount();\n\n\t\treturn countBLACK + countWHITE;\n\t\t\n\t}", "public int totalScore() {\n return 0;\n }", "public boolean haveCount () ;", "@Override\n\tpublic int countExam() {\n\t\treturn 0;\n\t}", "public long getDislikes() {\n return dislikes;\n }", "public final int getKnownCount()\r\n {\r\n return knownCount;\r\n }", "public int getCantCalif() {\n\t\tint calificacion = 0;\n\t\tfor (Episodio episodio : this.episodios) {\n\t\t\tif (episodio.isFlag()) {\n\t\t\t\tcalificacion += episodio.getCalificacion();\n\t\t\t}\n\t\t}\n\t\treturn calificacion;\n\t}", "public int getNumberUnplayedRoads() {\n\t\t return playerPieces.getNumberUnplayedRoads();\n\t }", "public int getNumAttacked() {\n return this.numAttacked;\n }", "public int getAbsenceCount() {\n return absenceCount;\n }", "double countMisclassifications(Matrix features, Matrix labels)\r\n {\r\n if(features.rows() != labels.rows())\r\n throw new IllegalArgumentException(\"Illegal Argument Exception Created!!\");\r\n\tdouble mis = 0;\r\n for(int i = 0; i < features.rows(); i++)\r\n\t{\r\n Vec feat = features.row(i);\r\n Vec pred = predict(feat);\r\n Vec lab = labels.row(i);\r\n\r\n for(int j = 0; j < lab.size(); j++){\r\n \r\n if(pred.get(j) != lab.get(j))\r\n mis++;\r\n }\r\n\t}\r\n // System.out.println(\"mis \" + mis);\r\n // System.out.println(\"rowcol \" + (labels.rows()*labels.cols()));\r\n\r\n double misclassifictionRate = 100.0*(mis/(labels.rows()*labels.cols()));\r\n return misclassifictionRate;\r\n }", "int getNumberOfInfantry();", "public Counter getNumberOfLives() {\r\n return this.numberOfLives;\r\n }", "public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }", "@Override\r\n\tpublic int reviewCount() throws Exception {\n\t\treturn 0;\r\n\t}", "public int numRanked() {\n\t\tint count = 0;\n\t\tfor(int index = 0; index < NUM_DECADES; index++) {\n\t\t\tif(rank.get(index) != UNRANKED) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "@Override\n\tpublic int countFlips() {\n\t\treturn 0;\n\t}", "public float getNoOfNegativeReviewsMohan(){\n return mohanNegative;\n }", "public int getHighscoreCount() {\r\n\t\t//TODO\r\n\t\treturn -1;\r\n\t}", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives(2458);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "public Integer getNscan() {\r\n return nscan;\r\n }", "@Override\r\n\tpublic int getMaxEvaluations() {\n\t\treturn 0;\r\n\t}" ]
[ "0.763302", "0.74952114", "0.7462531", "0.7433992", "0.7266197", "0.69359523", "0.6891992", "0.684394", "0.6781949", "0.67767715", "0.6590129", "0.6541536", "0.6474728", "0.6404179", "0.6338703", "0.62980545", "0.6291172", "0.6266974", "0.6240089", "0.62114775", "0.6210673", "0.61193395", "0.6094931", "0.6083164", "0.6013164", "0.5998118", "0.59643084", "0.59496474", "0.5948881", "0.5934151", "0.5931536", "0.5874036", "0.5869375", "0.5851581", "0.58504266", "0.5844351", "0.5838201", "0.58298534", "0.5802282", "0.580194", "0.58016425", "0.5795446", "0.57690096", "0.5730706", "0.5708382", "0.5708073", "0.57051754", "0.5699335", "0.56751645", "0.5669403", "0.5654697", "0.5636683", "0.56293315", "0.5628724", "0.5624124", "0.56108254", "0.5610135", "0.5606557", "0.56063324", "0.5591756", "0.55800205", "0.5579992", "0.5577646", "0.55693185", "0.5566512", "0.5547733", "0.55442846", "0.5538735", "0.5535706", "0.5535706", "0.55318946", "0.5531009", "0.5531009", "0.55283004", "0.55189776", "0.55081916", "0.55069196", "0.550554", "0.5499179", "0.5492571", "0.5492151", "0.5485289", "0.5483798", "0.5483448", "0.54754996", "0.54723984", "0.5465155", "0.54600817", "0.5457886", "0.5456665", "0.5453617", "0.5449319", "0.5443219", "0.5439321", "0.54358655", "0.5428964", "0.54243565", "0.5407545", "0.54042476", "0.54019326", "0.5372077" ]
0.0
-1
Returns the number of true negative readings found by this classifier
public int computeTN(Label classLabel){ /* * TODO: optimize this loggic */ //count the totla number of predictions int total = sumAll(); int tp = this.computeTP(classLabel); int fp = this.computeFP(classLabel); int fn = this.computeFN(classLabel); return total - tp - fp - fn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getNumberOfPredictedNegative() {\n\t\treturn numberOfTrueNegatives + numberOfFalseNegatives;\n\t}", "public double getNumberOfTrueNegatives() {\n\t\treturn numberOfTrueNegatives;\n\t}", "public double getNumberOfNegatives() {\n\t\treturn numberOfTrueNegatives + numberOfFalsePositives;\n\t}", "public double getNumberOfPredictedPositive() {\n\t\treturn numberOfTruePositives + numberOfFalsePositives;\n\t}", "protected int getNegativeOnes() {\n Rating[] ratingArray = this.ratings;\n int negOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if(ratingArray[i] != null) {\n if(ratingArray[i].getScore() == -1) negOneCount++;\n }\n }\n return negOneCount;\n }", "public double getNumberOfFalseNegatives() {\n\t\treturn numberOfFalseNegatives;\n\t}", "public int getNumNegative() {\n int numNegative = 0;\n for (NucleiSelected n : nucleiSelected) {\n switch (n.getState()) {\n case POSITIVE:\n // do nothing\n break;\n case NEGATIVE:\n numNegative++;\n break;\n }\n }\n return numNegative;\n }", "public double getNumberOfFalsePositives() {\n\t\treturn numberOfFalsePositives;\n\t}", "public double getNumberOfPositives() {\n\t\treturn numberOfTruePositives + numberOfFalseNegatives;\n\t}", "public double getNumberOfCorrectlyClassified() {\n\t\treturn numberOfTruePositives + numberOfTrueNegatives;\n\t}", "public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}", "public double getNumberOfTruePositives() {\n\t\treturn numberOfTruePositives;\n\t}", "public float getNoOfNegativeReviewsAfinn(){\n return afinnNegative;\n }", "public double getNumberOfIncorrectClassified() {\n\t\treturn numberOfFalsePositives + numberOfFalseNegatives;\n\t}", "public Integer getNegativecount() {\n return negativecount;\n }", "@Override\r\n public final int getUselessCount() {\r\n int i;\r\n\r\n i = 0;\r\n for (Rule r : this.m_rules) {\r\n if (r.isUseless())\r\n i++;\r\n }\r\n\r\n return i;\r\n }", "private int getNegativeCount(){\n return m_NegativeCount;\n }", "public int getNumPositive() {\n int numPositive = 0;\n for (NucleiSelected n : nucleiSelected) {\n switch (n.getState()) {\n case POSITIVE:\n numPositive++;\n break;\n case NEGATIVE:\n // do nothing\n break;\n }\n }\n return numPositive;\n }", "private int getPositiveCount(){\n return m_PositiveCount;\n }", "protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }", "public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }", "public float getNoOfPositiveReviewsAfinn(){\n return afinnPositive;\n }", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "public int countTrueCheckBox() {\r\n\t\tint ret = 0;\r\n\t\tif(attributs != null) {\r\n\t\t\tfor(AttributDescribe item : attributs) {\r\n\t\t\t\tif(item.getPk() == true) {\r\n\t\t\t\t\tret++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "int getDataScansCount();", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "int getMissingCount();", "private int getAbsenceCount() {\n\t\treturn 0;\r\n\t}", "public double getTotalSignalEstBackCount(){\n\t\tdouble total=0;\n\t\tfor(ControlledExperiment r : replicates){\n\t\t\ttotal+=r.getNoiseCount();\n\t\t}\n\t\treturn total;\n\t}", "public int countToMark() {\n\t\tint count = 0;\n\t\tint i = elementCount - 1;\n\t\twhile (i > 0 && !(elementData[i] instanceof PSMark)) {\n\t\t\ti--;\n\t\t\tcount++;\n\t\t}\n\t\treturn (elementData[i] instanceof PSMark) ? count : -1;\n\t}", "int getDetectionRulesCount();", "public long getNonMissingCount() {\n return nonMissingCount;\n }", "public int getDiscrepancyFound() {\n return _discrepancyFound;\n }", "@java.lang.Override\n public int getGroundTruthsCount() {\n return groundTruths_.size();\n }", "int countFeatures();", "int countFeatures();", "public long getNumRecordsWithNoMateCigar() {\n enforceClosed();\n return numRecordsWithNoMateCigar;\n }", "public int cardinality() {\n\t\tint counter = 0;\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tcounter += wordinbits * localrlw.getRunningLength();\n\t\t\t}\n\t\t\tfor (int j = 0; j < localrlw.getNumberOfLiteralWords(); ++j) {\n\t\t\t\tcounter += Long.bitCount(i.buffer()[i.dirtyWords() + j]);\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "public int getNumberOfDefeats() {\r\n\t\tint numDefeats = 0;\r\n\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\tfor (int j = 1; j <= 3; j++) {\r\n\t\t\t\tif (militaryVPS[i][j] == -1)\r\n\t\t\t\t\tnumDefeats++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn numDefeats;\r\n\t}", "int getInterestsCount();", "public int rodCount ();", "public Integer getScannedCount() {\n return this.scannedCount;\n }", "public int getGroundTruthsCount() {\n if (groundTruthsBuilder_ == null) {\n return groundTruths_.size();\n } else {\n return groundTruthsBuilder_.getCount();\n }\n }", "public double getNumberOfExamples() {\n\t\treturn numberOfTruePositives + numberOfFalsePositives + numberOfFalseNegatives + numberOfTrueNegatives;\n\t}", "public boolean haveCount () ;", "@Override\n public int getRemainingMines() {\n int numPlacedFlags = cells.stream()\n .mapToInt(b -> (int) b.stream().filter(c -> c.getFlagState() == 1).count()).sum();\n return numMines - numPlacedFlags;\n }", "public long numSimilarities();", "int getReaultCount();", "@Override\n public int getMinReadings() {\n createInnerEstimatorsIfNeeded();\n\n int result = getNumberOfDimensions();\n if (mRssiInnerEstimator != null &&\n (mTransmittedPowerEstimationEnabled || mPathLossEstimationEnabled)) {\n try {\n mRssiInnerEstimator.setPositionEstimationEnabled(mRssiPositionEnabled);\n mRssiInnerEstimator.setTransmittedPowerEstimationEnabled(\n mTransmittedPowerEstimationEnabled);\n mRssiInnerEstimator.setPathLossEstimationEnabled(\n mPathLossEstimationEnabled);\n } catch (final LockedException e) {\n throw new IllegalStateException(e);\n }\n\n result += mRssiInnerEstimator.getMinReadings();\n } else {\n result++;\n }\n\n return result;\n }", "public double calculateRecall() {\n final long divisor = truePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return truePositive / (double)divisor;\n }\n }", "int getFeatureCount();", "@Override\n\tpublic boolean isCovered() {\n\t\treturn (falseCount > 0) && (trueCount > 0);\n\t}", "public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }", "public double getFaultyNodeCount() {\n return (this.getTotalNodeCount() - 1)/3;\n }", "@Override\n\tpublic int countFlips() {\n\t\treturn 0;\n\t}", "public int getCuteness() {\n \t\treturn cuteness;\n \t}", "public long getMissingCount() {\n return nullCount + nanCount + infinityCount;\n }", "public int totalScore() {\n return 0;\n }", "public int discCount() {\n\t\tint countBLACK = discBlackCount();\n\t\tint countWHITE = discWhiteCount();\n\n\t\treturn countBLACK + countWHITE;\n\t\t\n\t}", "public int getTotalActivitySwitches() {\n return (int) neurons.stream().filter(n -> n.getValueRange() > 0).count();\n }", "@Override\n public long getNonNullCount() {\n return nonMissingCount + nanCount + infinityCount;\n }", "int getNumberOfInfantry();", "public final int getKnownCount()\r\n {\r\n return knownCount;\r\n }", "public int getMinRssiReadings() {\n return getMinReadings();\n }", "public int getMissCountNotFound() {\n return missCountNotFound;\n }", "public int getHotOrNotRating() {\r\n if (ratingCount == 0) return 0;\r\n return (rating/ratingCount);\r\n }", "boolean isCounting();", "public int getNotYetCount() {\r\n return root.getNotYetCount();\r\n }", "public int getProcessedCount()\r\n {\r\n return myFeatureCount;\r\n }", "public int numRanked() {\n\t\tint count = 0;\n\t\tfor(int index = 0; index < NUM_DECADES; index++) {\n\t\t\tif(rank.get(index) != UNRANKED) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int getNumAttacked() {\n return this.numAttacked;\n }", "public Counter getNumberOfLives() {\r\n return this.numberOfLives;\r\n }", "public int getNumMissiles(){\n return this.nunMissiles;\n }", "public java.lang.Integer getNocCheck() {\r\n return nocCheck;\r\n }", "public long count() {\n\t\treturn 0;\n\t}", "public long count() {\n\t\treturn 0;\n\t}", "public int nUnfilteredSamples() {\n return Math.max(0, nHeaderFields - sampleOffset);\n }", "public int GetNMissing();", "int getFeaturesCount();", "int getLabelAnnotationsCount();", "int getLabelAnnotationsCount();", "int cardinality();", "public int getUnderflowCounter() \n\t{\n\treturn fUnderflowCounter;\n\t}", "int getAcksCount();", "int getAcksCount();", "public int getNumberOfFeatures() {\n return features.size() - 1; // because slot 0 is skipped\n }", "public int getHeuristic(){\n\t\tint count = 0;\n\t\tfor (int i = 0; i < getRows(); i++) {\n\t\t\tfor (int j = 0; j < getColumns(); j++) {\n\t\t\t\tif (cells[i][j].getSand() != getK()) \n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t} \n\t\treturn count;\n\t}", "public int getNumberOfAnnotations() {\n\t\treturn numberOfAnnotations & 0xffff;\n\t}", "int getUnreachableCount();", "@Override\r\n\tpublic int getEvaluations() {\n\t\treturn 0;\r\n\t}", "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "int getRulesCount();", "int getConditionalResponsesCount();", "public static int getNumAlignedBasesCountingSoftClips(final GATKSAMRecord r) {\n int n = 0;\n final Cigar cigar = r.getCigar();\n if (cigar == null) return 0;\n\n for (final CigarElement e : cigar.getCigarElements())\n if (ALIGNED_TO_GENOME_PLUS_SOFTCLIPS.contains(e.getOperator()))\n n += e.getLength();\n\n return n;\n }", "public int GetNoElises(){\n\t\treturn NoElises;\n\t}", "int getAoisCount();", "public int count(){\n\tboolean val = false;\n\tint cont = 0;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\t\tcont++;\n\t\t}\n\t\telse{\n\t\t\tval=true;\n\t\t}\n\t}\n\treturn cont;\n}" ]
[ "0.74530876", "0.7306347", "0.7266565", "0.7016656", "0.7011994", "0.6836216", "0.6765942", "0.6763453", "0.6743484", "0.6729945", "0.6611066", "0.6504266", "0.64982986", "0.6367736", "0.62995875", "0.62964505", "0.62711424", "0.6252488", "0.62331116", "0.6230176", "0.6217913", "0.6163143", "0.6126546", "0.6075605", "0.6069824", "0.6069608", "0.60373265", "0.6024736", "0.60051537", "0.59971803", "0.59682906", "0.59413064", "0.5900153", "0.5890609", "0.5886601", "0.5875299", "0.5875299", "0.58667564", "0.5849649", "0.58375037", "0.5830661", "0.57679915", "0.5765262", "0.5757068", "0.57492894", "0.57397217", "0.57388645", "0.5707387", "0.5699", "0.5694689", "0.5638275", "0.563575", "0.56332326", "0.5623496", "0.56171227", "0.5615332", "0.5605995", "0.5605817", "0.55964196", "0.5590776", "0.55802655", "0.5580122", "0.55768985", "0.5574174", "0.5568548", "0.5566615", "0.55640054", "0.55577546", "0.5547694", "0.5532871", "0.5531377", "0.55242604", "0.5522855", "0.5520594", "0.5511979", "0.5504042", "0.5504042", "0.5483782", "0.54832166", "0.5469448", "0.5468616", "0.5468616", "0.54626286", "0.5460147", "0.5458655", "0.5458655", "0.54564506", "0.5455658", "0.5453462", "0.5449568", "0.5445216", "0.54447705", "0.54447705", "0.54447705", "0.54447705", "0.54388475", "0.5436743", "0.54362404", "0.5434775", "0.5433199", "0.54283917" ]
0.0
-1
summarizes all frequencies found in each cell
protected int sumAll() { int total = 0; //iterate all rows for(int i = 0;i<size();i++){ //itreate all columns for(int j = 0;j<size();j++){ Integer cell = matrix.get(i).get(j); total+=cell; } } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getFrequency(int height);", "public static void main(String[] args) {\n\r\n\t\tint arr[]={2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};\r\n\t\tMap<Integer,Data> map = new HashMap<>();\r\n\t\tfor(int a :arr)\r\n\t\t{\r\n\t\t\tif(map.containsKey(a))\r\n\t\t\t{\r\n\t\t\t\tmap.get(a).incrementFrequency();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(a, new Data(a));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSet<Data> sortedData = new TreeSet<>(map.values());\r\n\t\tList<Integer> result = new ArrayList<>();\r\n\t\tfor(Data d : sortedData)\r\n\t\t{\r\n\t\t\tfor(int i=0;i<d.frequency;i++)\r\n\t\t\t\tresult.add(d.number);\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}", "public double sumOfFrequencies() {\r\n\t\tdouble output = 0.0;\r\n\t\tfor(int i=0; i<this.treeNodes.length; i++) {\r\n\t\t\toutput += this.treeNodes[i].getFrequency();\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "public void findFrequency(int size) {\r\n\t\tfor(i=0;i<size;i++) {\r\n\t\t\tfor (Entry en : dataEntries) {\t\t\r\n\t\t\t\ttemperature.add(en.getTemperature());\r\n\t\t\t\taches.add(en.getAches());\r\n\t\t\t\tcough.add(en.getCough());\r\n\t\t\t\tsoreThroat.add(en.getSoreThroat());\r\n\t\t\t\tdangerZone.add(en.getDangerZone());\r\n\t\t\t\thasCOVID19.add(en.getHasCOVID19());\r\n\t\t\t\t\r\n\t\t\t\tif (en.getHasCOVID19().equals(\"yes\")) {\r\n\t\t\t\t\ttemperatureIfCOVID19.add(en.getTemperature());\r\n\t\t\t\t\tachesIfCOVID19.add(en.getAches());\r\n\t\t\t\t\tcoughIfCOVID19.add(en.getCough());\r\n\t\t\t\t\tsoreThroatIfCOVID19.add(en.getSoreThroat());\r\n\t\t\t\t\tdangerZoneIfCOVID19.add(en.getDangerZone());\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void popFrequency(int height);", "private void determineCounts( )\n {\n for( int r = 0; r < rows; r++ )\n {\n for( int c = 0; c < cols; c++ )\n {\n if( theMines[ r ][ c ] == 1 )\n theCounts[ r ] [ c ] = 9;\n else\n count( r, c );\n }\n }\n }", "private void calculateIdf(){\r\n\t\tIdf = new HashMap<>();\r\n\t\tOcc = new HashMap<>();\r\n\t\t\r\n\t\tfor (Entry<String, Document> doc : Docs.entrySet()){\r\n\t\t\tdoc.getValue().wordSet.forEach(word -> {\r\n\t\t\t\tdouble count = Idf.containsKey(word) ? Idf.get(word) : 0;\r\n \tIdf.put(word, count+1);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tdoc.getValue().words.forEach((w, o) -> words.add(w));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tfor (Entry<String, Double> e : new HashMap<>(Idf).entrySet()){\r\n\t\t\tIdf.put(e.getKey(),\r\n\t\t\t\t\tMath.log(Idf.keySet().size() / e.getValue()));\r\n\t\t}\r\n\t}", "public void getCounts() {\t\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\tfor(int j = 0; j < 3; j++)\r\n\t\t\t\tthecounts[i][j] = 0;\r\n\t\t\r\n\t\tfor(int i=0;i<maps.length-1;i++) {\r\n\t\t\tif(maps.Array1.charAt(i) == 'H' && maps.Array1.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[0][0]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == 'E' && maps.Array1.charAt(i+1) =='-') \r\n\t\t\t\tthecounts[0][1]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[0][2]++;\r\n\t\t\tif(maps.Array2.charAt(i) == 'H' && maps.Array2.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[1][0]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == 'E' && maps.Array2.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[1][1]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == '-' && maps.Array2.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[1][2]++;\r\n\t\t\tif(maps.Array3.charAt(i) == 'H' && maps.Array3.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[2][0]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == 'E' && maps.Array3.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[2][1]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == '-' && maps.Array3.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[2][2]++;\r\n\t\t\tif(maps.Array4.charAt(i) == 'H' && maps.Array4.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[3][0]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == 'E'&&maps.Array4.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[3][1]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[3][2]++;\r\n\t\t}\r\n\t\t\r\n\t\t//Getting transition value between 1 and 0\r\n\t\tfor(int i=0;i<4;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\tthecounts[i][j]/=maps.length;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Displaying the obtained values\r\n\t\tSystem.out.println(\"\\nTRANSITION\");\r\n\t\tSystem.out.println(\"HYDROPHOBICITY: 1->2: \" + thecounts[0][0] + \" 2->3: \" + thecounts[0][1] + \" 3->1: \" + thecounts[0][2]);\r\n\t\tSystem.out.println(\"POLARIZABILITY: 1->2: \" + thecounts[1][0] + \" 2->3: \" + thecounts[1][1] + \" 3-1: \" + thecounts[1][2]);\r\n\t\tSystem.out.println(\"POLARITY: 1->2: \" + thecounts[2][0] + \" 2->3: \" + thecounts[2][1] + \" 3->1: \" + thecounts[2][2]);\r\n\t\tSystem.out.println(\"VAN DER WALLS VOLUME: 1->2: \" + thecounts[3][0] + \" 2->3: \" + thecounts[3][1] + \" 3->1: \" + thecounts[3][2]);\r\n\t\t\r\n\t}", "public void apply(GlobalWindow window, Iterable<String> values, \n Collector<Tuple2<String,Integer>> out) throws Exception {\n \t HashMap <String,Integer> countWord = new HashMap<String,Integer>();\n \n for (String value : values) {\n \t \n \t String[] tokens = value.toLowerCase().split(\"\\\\W+\");\n \t for (String token : tokens)\n \t {\t if (token.length() >0) {\n \t\t if (countWord.get(token) != null)\n { countWord.put(token, countWord.get(token)+1);}\n else\n {countWord.put(token, 1);}\n \t }\n \t\t \n \t }\n }\n \n \n //Comparator to sort in reverse\n \t\t\tComparator<String> comparator = new Comparator<String>() {\n \t\t\t public int compare(String o1, String o2) {\n \t\t\t return countWord.get(o1).compareTo(countWord.get(o2));\n \t\t\t }\n \t\t\t};\n\n \t\t\tArrayList<String> words = new ArrayList<String>();\n \t\t\twords.addAll(countWord.keySet());\n\n \t\t\tCollections.sort(words,comparator);\n \t\t\tCollections.reverse(words);\n \t\t\t\n// System.out.println(Arrays.asList(words));\n \t\t\tSystem.out.println(\"10 most frequent words per stream\");\n System.out.println(\"-----------\");\n \n for(int i = 0; i < 10; i++) {\n \tSystem.out.println(words.get(i) + \" : \" + countWord.get(words.get(i)));\n }\n \n \n System.out.println(\"\\n\");\n \n }", "public static void getFreq(){\n\t\t\tint mutTotalcounter=0;\n\t\t\t\n\t\t\tfor(int i=0; i<numOfMutations.length-1; i++){\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]==numOfMutations[i+1]){\n\t\t\t\t\tfrequency[mutTotalcounter]+=1; //if number of mutation is repeated in original array, frequency is incremented\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]!=numOfMutations[i+1])\n\t\t\t\t{\n\t\t\t\t\tmutTotal[mutTotalcounter++]=numOfMutations[i]; //if number is not repeated in array, the next element in array\n\t\t\t\t\t//becomes the next number of mutations that occurred\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((i+1)==numOfMutations.length-1){\n\t\t\t\t\t//used to get the last element in original array since for loop will go out of bounds\n\t\t\t\t\tmutTotal[mutTotalcounter]=numOfMutations[i+1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"XMut : YFreq\");\n\t\t\t//console display of mutation and frequency values\n\t\t\tfor (int i=0; i<=mutTotal.length-1;i++){\n\t\t\t\tif(mutTotal[i]==0 && frequency[i]==0) continue;\n\t\t\t\tfrequency[i]+=1;\n\t\t\t\tSystem.out.print(mutTotal[i]+\" : \");\n\t\t\t\tSystem.out.print(frequency[i]);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}", "static List<Integer> freqQuery(List<int[]> queries) {\n HashMap<Integer, Integer> data = new HashMap<>();\n int[] counters = new int[queries.size()+1];\n ArrayList<Integer> answer = new ArrayList<>();\n for (int[] cmd : queries) {\n Integer cmdType = cmd[0];\n Integer cmdValue = cmd[1];\n\n switch (cmdType) {\n case 1:\n int previousCount = data.getOrDefault(cmdValue, 0);\n data.put(cmdValue, data.getOrDefault(cmdValue, 0) + 1);\n counters[data.get(cmdValue)]+=1;\n counters[previousCount]-=1;\n break;\n case 2:\n if (data.containsKey(cmdValue) && data.get(cmdValue) != 0) {\n int currentCounter = data.get(cmdValue);\n data.put(cmdValue, currentCounter - 1);\n counters[currentCounter]-=1;\n counters[currentCounter-1]+=1;\n }\n break;\n case 3:\n if (cmdValue < queries.size() && counters[cmdValue] > 0) {\n answer.add(1);\n } else {\n answer.add(0);\n }\n break;\n }\n }\n return answer;\n }", "private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }", "public ComputeTermFrequencies() { super(); }", "public double[] histogram() {\n int[][] data = toArray();\n double[] ans = new double[256];\n int totalSize = data.length * data[0].length;\n\n for (int i = 0; i < data.length; i++) {\n for (int j = 0; j < data[i].length; j++) {\n ans[data[i][j]]++;\n }\n }\n for (int i = 0; i < ans.length; i++) {\n ans[i] = ans[i] / totalSize;\n }\n return ans;\n }", "@Override\n\tpublic int showFrequency(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn hashArray[hashVal].frequency;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "java.lang.String getFrequency();", "private static void findBigramCountsTuring() {\n\n\t\tbigramCountTI= new HashMap<Integer,Double>();\n\t\tdouble value;\n\t\tfor(int i:bucketCountT.keySet()){\n\t\t\tif(i==0)\n\t\t\t\tcontinue;\n\t\t\tvalue= ((i+1)*bucketCountT.getOrDefault(i+1, 0.0))/bucketCountT.get(i);\n\t\t\tbigramCountTI.put(i,value);\n\t\t}\n\t}", "float getFrequency();", "public static Map<String, Integer> getFrequencies() {\n return UNIGRAM;\n }", "int getFreq();", "public void analyze(ArrayList<String> words) throws IOException\n {\n int[] letterOccurences = new int[regularAlphabet.length];\n double[] percentOccurence = new double[letterOccurences.length];\n int numberOfLetters = 0;\n \n //Loops to calculate number of occurences per letter.\n for(int wordCount = 0; wordCount<words.size(); wordCount++)\n {\n for(int letterCount = 0; letterCount<words.get(wordCount).length(); letterCount++)\n {\n for(int alphabetCharacter = 0; alphabetCharacter<regularAlphabet.length; alphabetCharacter++)\n {\n if(regularAlphabet[alphabetCharacter].equalsIgnoreCase(words.get(wordCount).substring(letterCount, letterCount+1)))\n {\n letterOccurences[alphabetCharacter]++;\n numberOfLetters++;\n }\n }\n }\n }\n \n //Loop to calculate percent occurences of letters.\n for(int index = 0; index<percentOccurence.length; index++)\n {\n percentOccurence[index] = (letterOccurences[index]/(double)numberOfLetters)*100;\n }\n \n PrintWriter outFile = new PrintWriter (new File(\"ciphertextfreq.txt\"));\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%6s | %12s | %11s|\",\"Letter\",\"Frequency\",\"Percent\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.printf(\"|%6s | %12s | %11s|\\n\",\"Letter\",\"Frequency\",\"Percent\");\n System.out.println(\"-------------------------------------------\");\n for(int printIndex = 0; printIndex<regularAlphabet.length; printIndex++)\n {\n outFile.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n System.out.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\\n\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n }\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%5s | %10d | %10d%s|\",\"Total\",numberOfLetters,100,\"%\");\n System.out.printf(\"|%5s | %10d | %10d%s|\\n\",\"Total\",numberOfLetters,100,\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.close();\n }", "boolean hasFreq();", "public static void main(String args[]) {\n int a = 0;\r\n int b = 0;\r\n int u = 0;\r\n\r\n //Declaring scanner object\r\n Scanner capture = new Scanner(System.in);\r\n System.out.println(\"How many input values [MAX: 30]?\");\r\n\r\n //Taking input\r\n int x = capture.nextInt();\r\n ArrayList<Integer> Digits = new ArrayList<>();\r\n System.out.println(\"Enter \" + x + \" numbers.\");\r\n\r\n //Declaring and initializing HashMap object\r\n HashMap<Integer, Integer> Occur = new HashMap<>();\r\n\r\n // Initialize Hashmap\r\n for(int i=0;i<10;i++){\r\n Occur.put(i,0);\r\n }\r\n\r\n\r\n\r\n\r\n int tmp = x;\r\n // Initialize ArrayList\r\n while(tmp>0){\r\n Digits.add(capture.nextInt());\r\n tmp--;\r\n }\r\n\r\n\r\n\r\n // ----------------------------\r\n while (b < x) {\r\n if (Occur.get(Digits.get(b)) != null) {\r\n int cnt = Occur.get(Digits.get(b)) + 1;\r\n Occur.put(Digits.get(b), cnt);\r\n }\r\n else {\r\n Occur.put(Digits.get(b), 1);\r\n }\r\n b++;\r\n }\r\n\r\n int height = 0;\r\n System.out.println(\"\\nNumber Occurrence\");\r\n\r\n height = 0;\r\n for(Map.Entry<Integer,Integer> entry : Occur.entrySet()){\r\n if(entry.getValue()>0){\r\n System.out.println(entry.getKey() + \" \" + entry.getValue());\r\n }\r\n if(entry.getValue()>height){\r\n height = entry.getValue();\r\n }\r\n }\r\n\r\n System.out.println(\"================= Vertical bar =================\");\r\n\r\n //Printing histogram\r\n int h = height;\r\n while ( h > 0) {\r\n\r\n System.out.print(\"| \"+h+\" | \");\r\n\r\n int g = 0;\r\n while (g < 10) {\r\n if(Occur.get(g) != null) {\r\n int kallen = Occur.get(g);\r\n if(kallen >= h)\r\n {\r\n System.out.print(\"* \");\r\n }\r\n else\r\n {\r\n System.out.print(\" \");\r\n }\r\n }\r\n else\r\n {\r\n System.out.print(\" \");\r\n }\r\n g++;\r\n }\r\n System.out.print(\"\\n\");\r\n h--;\r\n }\r\n System.out.println(\"================================================\");\r\n System.out.print(\"| N |\");\r\n while ( u < 10 ) {\r\n System.out.print(\" \"+ u );\r\n u++;\r\n }\r\n System.out.println(\"\\n================================================\");\r\n }", "boolean hasFrequency();", "public static void main(String[] args) {\n List<Integer> nums = new ArrayList<>(Arrays.asList(5, 7, 3, 7, 2, 8, 3, 7, 2));\n //Map<Integer, Integer> numCount = countOccurance(nums);\n Map<Integer, Long> numCount = nums.stream().collect(Collectors.groupingBy(num -> num, Collectors.counting()));\n Set<Integer> numSet = new LinkedHashSet<>(nums);\n numSet.forEach(num -> System.out.println(num + \" \" + numCount.get(num)));\n }", "public static void main(String args[]){\r\n\t\t\r\n\t\t\r\n\t\tint arr[] = {2,5,2,8,5,6,8,8};\r\n\t\t\r\n\t\tMap<Integer, Integer> freqMap = new LinkedHashMap<Integer,Integer>();\r\n\t\t\r\n\t\tfor(int i = 0; i< arr.length;i++){\r\n\t\t\tif(freqMap.containsKey(arr[i])){\r\n\t\t\t\tint count = freqMap.get(arr[i]);\r\n\t\t\t\tfreqMap.put(arr[i],count + 1);\r\n\t\t\t}else{\r\n\t\t\t\tfreqMap.put(arr[i], 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//2-2,5-2,6-1,8-3\r\n\t\t\r\n\t\tMap<Integer,ArrayList<Integer>> sortedList = new TreeMap<Integer, ArrayList<Integer>>(new Comparator<Integer>(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Integer arg0, Integer arg1) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn arg1.compareTo(arg0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\tfor(Entry<Integer, Integer> entry : freqMap.entrySet()){\r\n\t\t\tint key = entry.getKey();\r\n\t\t\tint val = entry.getValue();\r\n\t\t\tif(sortedList.containsKey(val)){\r\n\t\t\t\tArrayList<Integer> list = sortedList.get(val);\r\n\t\t\t\tfor(int j = 0; j<val ; j++)\r\n\t\t\t\t\tlist.add(key);\r\n\t\t\t}else{\r\n\t\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\t\t\tfor(int j = 0; j<val ; j++)\r\n\t\t\t\t\tlist.add(key);\r\n\t\t\t\tsortedList.put(val, list);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(sortedList.values());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public Integer getFrequency(Label prediction, Label real){\n\n\t\tint rowIx = resolveIndex(prediction);\n\t\tint colIx = resolveIndex(real);\n\n\n\t\treturn matrix.get(rowIx).get(colIx);\n\t}", "public void getWordFrequency(ArrayList<String> out_words, ArrayList<Integer> out_counts) {\n //... Put in ArrayList so sort entries by frequency\n ArrayList<Map.Entry<String, MutableInteger>> entries =\n new ArrayList<Map.Entry<String, MutableInteger>>(wordFrequency.entrySet());\n Collections.sort(entries, new ComparatorFrequency());\n\n //... Add word and frequency to parallel output ArrayLists.\n for (Map.Entry<String, MutableInteger> ent : entries) {\n out_words.add(ent.getKey());\n out_counts.add(ent.getValue().getValue());\n }\n }", "public int getFrequency(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.frequency;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }", "public abstract int countAllGroundAtoms(StandardPredicate predicate, List<Short> partitions);", "private int countRootScan(SearchContext ctx) {\n\t\tfinal int dimension = numDim;\n\t\tfinal int[] mins = ctx.qmins;\n\t\tfinal int[] maxs = ctx.qmaxs;\n\t\tfinal SearchNode curNode = ctx.current();\n\t\tfinal int contained = curNode.contained;\n\t\tfinal int rootStart = curNode.rootStart;\n\t\tfinal int rootEnd = rootStart + curNode.width;\n\t\tfinal int notContained = dimension - Integer.bitCount(contained);\n\t\tint freqResult = 0;\n\t\tif (notContained == 1) {\n\t\t\t// sequential-scan on final dimension\n\t\t\tfinal int last1d = Integer.numberOfLeadingZeros(~contained);\n\t\t\tfinal int[] basearray = zoPoints[last1d];\n\t\t\tfinal int min = mins[last1d];\n\t\t\tfinal int max = maxs[last1d];\n\t\t\tfor (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tfinal int val = basearray[j];\n\t\t\t\tif (val >= min && val <= max) {\n\t\t\t\t\tfreqResult++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// sequential-scan on not contained dimensions\n\t\t\tint[] dims = ctx.work1;\n\t\t\tfor (int ptr = 0, d = 0; d < dimension; d++) {\n\t\t\t\tif (contained << d < 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tdims[ptr++] = d;\n\t\t\t}\n\t\t\tJLOOP: for (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tfor (int ptr = 0; ptr < notContained; ptr++) {\n\t\t\t\t\tfinal int d = dims[ptr];\n\t\t\t\t\tfinal int val = zoPoints[d][j];\n\t\t\t\t\tif (val < mins[d] || val > maxs[d]) {\n\t\t\t\t\t\tcontinue JLOOP;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfreqResult++;\n\t\t\t}\n\t\t}\n\t\treturn freqResult;\n\t}", "static void sortByFreq(int arr[], int n)\r\n {\n int[] hash = new int[61];\r\n for (int x : arr) {\r\n hash[x]++;\r\n }\r\n HashMap<Integer, ArrayList<Integer>> valueHash = new HashMap<Integer, ArrayList<Integer>>();\r\n \r\n for (int i = 0; i<hash.length; i++) {\r\n int x = hash[i];\r\n if (x != 0) {\r\n if (valueHash.containsKey(x)) {\r\n valueHash.get(x).add(i);\r\n } else {\r\n ArrayList<Integer> list = new ArrayList<>();\r\n list.add(i);\r\n valueHash.put(x, list);\r\n }\r\n }\r\n }\r\n Set<Integer> keys = valueHash.keySet();\r\n List<Integer> list = new ArrayList<Integer>(keys); \r\n Collections.sort(list, new Comparator<Integer>()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2)\r\n\t\t\t{\r\n\t\t\t\tif (o1 > o2) return -1;\r\n\t\t\t\t\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t});\r\n StringBuffer buff = new StringBuffer();\r\n for (int x : list) {\r\n \tArrayList<Integer> numList = valueHash.get(x);\r\n \tCollections.sort(numList);\r\n \tfor (int num : numList) {\r\n \t\tint y = x;\r\n \t\twhile (y > 0) {\r\n \t\t\tbuff.append(num + \" \");\r\n \t\t\ty--;\r\n \t\t}\r\n \t}\r\n }\r\n System.out.print(buff);\r\n }", "public static Map mapearFreqObj(List objetos) {\r\n Map<String, Integer> contFreq = new HashMap<>();\r\n Iterator<Integer> it = objetos.iterator();\r\n while (it.hasNext()) {\r\n Object obj = it.next();\r\n int frequency = Collections.frequency(objetos, obj);\r\n contFreq.put(String.valueOf(obj), frequency);\r\n }\r\n\r\n return contFreq;\r\n\r\n }", "static void sortByFreq(int arr[], int n){\n Map<Integer, Integer> map = new HashMap<>(); \n List<Integer> outputArray = new ArrayList<>(); \n \n // Assign elements and their count in the list and map \n for (int current : arr) { \n int count = map.getOrDefault(current, 0); \n map.put(current, count + 1); \n outputArray.add(current); \n } \n \n // Compare the map by value \n SortComparator comp = new SortComparator(map); \n \n // Sort the map using Collections CLass \n Collections.sort(outputArray, comp); \n \n // Final Output \n for (Integer i : outputArray) { \n System.out.print(i + \" \"); \n }\n }", "public Map<Integer, Float> getPercentInFrequency() {\n\t\t\tMap<Integer, Float> percents = new LinkedHashMap<Integer, Float>();\n\t\t\t\n\t\t\tint[][] times = getTimeInFrequency();\n\t\t\tif (times == null || times.length == 0) return null;\n\t\t\t\n\t\t\tlong total = 0;\n\t\t\t\n\t\t\tfor (int i = 0; i < times.length; ++i) {\n\t\t\t\ttotal += times[i][1];\n\t\t\t}\n\t\t\t\n\t\t\tif (total == 0) return null;\n\t\t\t\n\t\t\tfor (int i = 0; i < times.length; ++i) {\n\t\t\t\tpercents.put(times[i][0], (float) times[i][1] / total * 100);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn percents;\n\t\t}", "public static ArrayList<Integer> sumMostFreqNum(int[] arr) { \n\t\tArrayList<Integer> mostFreqNumSum = new ArrayList<Integer>();\n\t\t//First I need to sort the array in ascending order\n\t\t//The method offers O(n*log(n)) performance.\n\t\tArrays.sort(arr);\n\t\t\n\t\t//the index of the most frequency number in the array\n\t\tint mostFreqNumIdx = 0;\n\t\t// the count of the most frequency number \n\t\tint count = 0;\n\t\t\n\t\t// the started index of the new type element. \n\t\t// Because we sort the array firstly, so the same elements just stay nearly.\n\t\t// It looks they are just in the different types.\n\t\tint tmpNumIdx = 0;\n\t\tint newCount = 0;\n\t\t\n\t\t//additional, a linear comparison here to put the sum of the most frequency integer(s) to an array.\n\t\t//actually maybe more than one integer are most common in the array.\n\t\t//it offers O(n) performance.\n\t\t\n\t\tfor(int i = 0; i < arr.length + 1; i++) {\n\t\t\tif(i == arr.length /*meet the end of the array*/ || \n\t\t\t arr[tmpNumIdx] != arr[i] /*if a new type if found*/) {\n\t\t\t\t//calculate the count of elements in a specific type\n\t\t\t\tnewCount = i - tmpNumIdx;\n\t\t\t\t\n\t\t\t\t//if count of the elements of the new type is greater than or equals to the old one. \n\t\t\t\tif(newCount >= count) {\n\t\t\t\t\tmostFreqNumIdx = tmpNumIdx;\n\t\t\t\t\tif(newCount > count) {\n\t\t\t\t\t\t//update the count of the most frequency number\n\t\t\t\t\t\tcount = newCount;\n\t\t\t\t\t\t//find the best candidate , then drop others\n\t\t\t\t\t\tmostFreqNumSum.clear(); \n\t\t\t\t\t}\n\t\t\t\t\t//add it to the result list\n\t\t\t\t\tmostFreqNumSum.add(arr[mostFreqNumIdx] * count);\n\t\t\t\t} \n\t\t\t\t// the started index of the new type \n\t\t\t\ttmpNumIdx = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mostFreqNumSum;\n\t}", "private double avgNonEmpty() {\n\t\tdouble percent = 0;\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tif (ll.size() != 0) percent++;\n\t\t}\n\t\treturn (numEntries / percent);\n\t}", "private List<Float> nucleotideFrequencies() {\n\t\tList<Float> freqs = new ArrayList<Float>();\n\t\tfreqs.add((float) 0.3);\n\t\tfreqs.add((float) 0.5);\n\t\tfreqs.add((float) 0.8);\n\t\tfreqs.add((float) 1.0);\n\t\treturn freqs;\n\t}", "protected static double[] getFrequencies(List<Sequence> sequences) {\n return getFrequenciesMaybeSafe(sequences, false);\n }", "private void collectTripFrequencyDistribution(Map<Integer, HouseholdType> householdTypeBySampleId) {\n initializeFrequencyArrays(householdTypeBySampleId);\n fillFrequencyArrays(householdTypeBySampleId);\n }", "@Override\n public long getFrequencyCount() {\n return count;\n }", "private void getHamStatistics() throws IOException{\n System.out.println(\"Getting ham statistics\"); \n File hamFile = new File(HamPath);\n // Find all words from the ham emails\n for(File file: hamFile.listFiles()){\n try { \n BufferedReader b = new BufferedReader(new FileReader(file));\n Scanner scanner = null; \n String line = b.readLine(); \n while(line != null){\n scanner = new Scanner(line);\n while(scanner.hasNext()){\n String next = scanner.next(); \n if(WordCountHam.get(next) != null){\n WordCountHam.put(next, WordCountHam.get(next)+1); \n }\n }\n line = b.readLine(); \n }\n } catch (FileNotFoundException ex) {\n System.err.println(ex.toString());\n }\n }\n }", "private Map<String,List<Invertedindex>> collecting() //\r\n {\r\n Map<String,List<Invertedindex>> maps = new TreeMap<>();\r\n for (Core pon:pondred){\r\n for(Map.Entry<String,Double> term:pon.allTerms.entrySet()){\r\n if (maps.containsKey(term.getKey())){\r\n List<Invertedindex> index = maps.get(term.getKey());\r\n index.add(new Invertedindex(pon.m_cle,term.getValue(),pon.getBalise(term.getKey())));\r\n maps.put(term.getKey(), index);\r\n }else {\r\n List<Invertedindex> index = new ArrayList<>();\r\n index.add(new Invertedindex(pon.m_cle,term.getValue(),pon.getBalise(term.getKey())));\r\n maps.put(term.getKey(), index);\r\n }\r\n if(cleFreq.containsKey(pon.m_cle))\r\n cleFreq.put(pon.m_cle,cleFreq.get(pon.m_cle)+term.getValue());\r\n else cleFreq.put(pon.m_cle,term.getValue());\r\n\r\n }\r\n }\r\n return maps;\r\n }", "public static Map<String,Integer> getCounts(ArrayList<String> words) {\r\n HashMap<String, Integer> map = new HashMap<String, Integer>();\r\n ArrayList<String> uniqueWords = new ArrayList<String>();\r\n for(String word: words) {\r\n if(!uniqueWords.contains(word)) {\r\n map.put(word, Collections.frequency(words, word));\r\n uniqueWords.add(word);\r\n }\r\n }\r\n return map;\r\n }", "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 HashMap<Integer, HashMap<String,String>> getAllFrequencies() {\n HashMap<Integer,HashMap<String,String>> freq\n = dbController.getAllFrequencies();\n if (freq == null)\n return null;\n HashMap<Integer, HashMap<String, String>> response = new HashMap<Integer, HashMap<String, String>>();\n int i = 2;\n //Passing on any frequency and creates a message to send\n for (Map.Entry<Integer,HashMap<String,String>> objs : freq.entrySet()){\n HashMap<String,String> obj = objs.getValue();\n\n response.put(i, new HashMapBuilder<String, String>().put(\"name\", obj.get(\"name\"))\n .put(\"frequency\",obj.get(\"frequency\")).build());\n i++;\n }\n return response;\n }", "int getMetricValuesCount();", "static void table(ArrayList<Integer> myLst){\n TreeMap<Integer,Integer> myTeeMap = new TreeMap<Integer, Integer>();\n\n //Traverse ArrayList and create TreeMap structure.\n for (int i = 0; i < myLst.size(); i++){\n if (myTeeMap.containsKey(myLst.get(i))){\n myTeeMap.put(myLst.get(i), myTeeMap.get(myLst.get(i)) +1);\n }\n else{\n myTeeMap.put(myLst.get(i),1);\n }\n }\n\n //Print out myTeeMap\n for (Map.Entry<Integer, Integer> e : myTeeMap.entrySet())\n System.out.println(\"Key: \"+e.getKey()\n + \" \"\n + \"| Occurrences: \"+e.getValue());\n }", "int getMetricsCount();", "public void print_metrics(){\n\t\tHashMap<Integer, HashSet<Integer>> pairs=return_pairs();\n\t\tint total=gold.data.getTuples().size();\n\t\ttotal=total*(total-1)/2;\n\t\tSystem.out.println(\"Reduction Ratio is: \"+(1.0-(double) countHashMap(pairs)/total));\n\t\tint count=0;\n\t\tfor(int i:pairs.keySet())\n\t\t\tfor(int j:pairs.get(i))\n\t\t\tif(goldContains(i,j))\n\t\t\t\tcount++;\n\t\tSystem.out.println(\"Pairs Completeness is: \"+(double) count/gold.num_dups);\n\t}", "private String histogram() {\n\t\tStringBuilder sb = new StringBuilder(\"[\");\n\t\t\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint size = 0;\n\t\t\tfor (int j = 0; j < myBuckets.size(); j++) {\n\t\t\t\tif (myBuckets.get(j).size() == i) size++;\n\t\t\t}\n\t\t\tsb.append(size + \", \");\n\t\t}\n\t\tsb.replace(sb.length() - 2, sb.length(), \"]\");\n\t\treturn sb.toString();\n\t}", "private void countSubDataPropertyOfAxiomsMetric() {\r\n\t\tint subDataPropertyOfAxiomsCount = ontology.getAxiomCount(AxiomType.SUB_DATA_PROPERTY,\r\n\t\t\t\tOntologyUtility.ImportClosures(imports));\r\n\t\treturnObject.put(\"subDataPropertyOfAxioms\", subDataPropertyOfAxiomsCount);\r\n\r\n\t}", "public static String histogram(ArrayList<Integer> frequency)\r\n {\r\n int maxFrequency;\r\n int starRepresent;\r\n maxFrequency = 0;\r\n \r\n for (int i = 0; i < frequency.size() -1; i++)\r\n {\r\n if (frequency.get(i) > maxFrequency)\r\n maxFrequency = frequency.get(i);\r\n }\r\n \r\n starRepresent = maxFrequency / 10;\r\n \r\n System.out.printf(\"%10s\", \"Frequency Distrubution\");\r\n System.out.println();\r\n System.out.printf(\"%10s\", \"( max freq is \" + maxFrequency + \")\");\r\n System.out.println();\r\n \r\n for (int i = 10; i > 0; i--)\r\n {\r\n for (int index = 0; index <= frequency.size() - 1; index++)\r\n {\r\n if (frequency.get(index) / starRepresent >= i)\r\n System.out.print(\"* \");\r\n else\r\n System.out.print(\" \");\r\n }\r\n System.out.print(\"\\n\");\r\n }\r\n return \"\";\r\n }", "private void calculatefundamentalFreq() {\n\t\tint count;\n\t\tfloat f0 = 0;\n\t\tSystem.out.println(\"pitches\");\n\t\tSystem.out.println(pitches);\n\t\tfor(count = 0; count < pitches.size(); count++)\n\t\t{\n\t\t\tf0 += pitches.get(count);\n\t\t}\n\t\tif(count != 0)\n\t\t\tfundamentalFreq = f0 / count;\n\t\telse\n\t\t\tfundamentalFreq = 0;\n\t}", "public static double[][] calAlleleFrequency(GenotypeMatrix G) {\n\t\tdouble[][] allelefreq = new double[G.getNumMarker()][3];\n\t\tfor (int i = 0; i < G.getGRow(); i++) {\n\t\t\tfor (int j = 0; j < G.getNumMarker(); j++) {\n\t\t\t\tint[] c = G.getBiAlleleGenotype(i, j);\n\t\t\t\tallelefreq[j][c[0]]++;\n\t\t\t\tallelefreq[j][c[1]]++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < G.getNumMarker(); i++) {\n\t\t\tdouble wa = allelefreq[i][0] + allelefreq[i][1];\n\t\t\tdouble a = allelefreq[i][0] + allelefreq[i][1] + allelefreq[i][2];\n\t\t\tif (wa > 0) {\n\t\t\t\tfor (int j = 0; j < allelefreq[i].length - 1; j++) {\n\t\t\t\t\tallelefreq[i][j] /= wa;\n\t\t\t\t}\n\t\t\t\tallelefreq[i][2] /= a;\n\t\t\t} else {\n\t\t\t\tallelefreq[i][0] = Double.NaN;\n\t\t\t\tallelefreq[i][0] = Double.NaN;\n\t\t\t\tallelefreq[i][2] = 1;\n\t\t\t}\n\t\t}\n\n\t\treturn allelefreq;\n\t}", "private IDictionary<String, Double> computeTfScores(IList<String> words) {\n IDictionary<String, Double> tfScores = new ChainedHashDictionary<String, Double>();\n IDictionary<String, Double> wordCounts = new ChainedHashDictionary<String, Double>();\n \n // maps each given word to their frequency\n for (String word: words) {\n \t\tif (!wordCounts.containsKey(word)) {\n \t\t\twordCounts.put(word, 1.0);\n \t\t} else {\n \t\t\tDouble count = wordCounts.get(word);\n \t\t\twordCounts.put(word, count + 1.0);\n \t\t} \t\t\n }\n Double totalWords = (double) words.size();\n \n // Computes TF scores\n for (KVPair<String, Double> pair: wordCounts) {\n \t\ttfScores.put(pair.getKey(), pair.getValue() / totalWords);\n }\n return tfScores;\n }", "private Map<Character, Integer> getFreqs(String input) {\n\t\tMap<Character, Integer> freqMap = new HashMap<>();\n\t\tfor (char c : input.toCharArray()) {\n\t\t\tif (freqMap.containsKey(c)) {\n\t\t\t\tfreqMap.put(c, freqMap.get(c) + 1);\n\t\t\t} else {\n\t\t\t\tfreqMap.put(c, 1);\n\t\t\t}\n\t\t}\n\t\treturn freqMap;\n\t}", "public static long calculateSummary(List<BackflowEntry> entries) {\n Long res = 0L;\n for(BackflowEntry entry : entries) {\n res += entry.getCount();\n }\n return res; \n }", "public void groupingByCountingExample(){\n Map<String, Long> result = createPeople()\n .stream()\n .collect(groupingBy(Person::getName, counting()));\n print.accept(result);\n }", "public static void main(String[] args) throws IOException {\n\t\tint n = readInt(), m = readInt();\n\t\tint[] freq = new int[m+1];\n\t\tint total = 0;\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = readInt();\n\t\t\tfreq[x]++;\n\t\t\tif (freq[x] == 1) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\tif (total == m) {\n\t\t\t\tcount++;\n\t\t\t\ttotal = 0;\n\t\t\t\tArrays.fill(freq, 0);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count+1);\n\t}", "int DF(String term) {\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(term)) {\n df++;\n }\n }\n return df;\n }", "private static void printAllWordCounts(JavaSparkContext sc, String outputDir) {\n\t\tList<String> files = WordCountsUtil.getAllFiles(outputDir);\n\t\tJavaPairRDD<String, Integer> totalPairs= null;\n\t\tfor (String file : files) {\n\n\t\t\tif (new File(file).exists()) {\n\t\t\t\tJavaPairRDD<Text, IntWritable> input = sc.sequenceFile(file, Text.class, IntWritable.class);\n\t\t\t\tJavaPairRDD<String, Integer> result2 = input.mapToPair(new ConvertToNativeTypes());\n\t\t\t\n\t\t\t\tif(totalPairs==null)\n\t\t\t\t{\n\t\t\t\t\ttotalPairs=result2;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttotalPairs=result2.union(totalPairs);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\ttotalPairs= totalPairs.reduceByKey(new Function2<Integer, Integer, Integer>() {\n\t\t\t\n\t\t\t\n\t\t\tprivate static final long serialVersionUID = -7143103360793492209L;\n\n\t\t\t@Override\n\t\t\tpublic Integer call(Integer v1, Integer v2) throws Exception {\n\t\t\t\t\n\t\t\t\treturn v1+v2;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t\n//\t\t\ttotalPairs.foreach( new VoidFunction<Tuple2<String,Integer>>() {\n//\t\t\t\t\n//\t\t\t\t@Override\n//\t\t\t\tpublic void call(Tuple2<String, Integer> t) throws Exception {\n//\t\t\t\t\t// TODO Auto-generated method stub\n//\t\t\t\t\tSystem.out.println(t);\n//\t\t\t\t}\n//\t\t\t});\n\t\t\n\t\tSystem.out.println(totalPairs.collect());\n\t}", "protected double[] getPairCounts(Hashtable<Integer, Double> words) {\n\t\tdouble positiveCount = 0;\n\t\tdouble negativeCount = 0;\n\t\tfor(int word1 : words.keySet()){\n\t\t\tfor(int word2 : words.keySet()){\n\t\t\t\tif(word1 != word2){\n\t\t\t\t\tif(relatedPairs[word1].contains(word2)){\n\t\t\t\t\t\tpositiveCount+= words.get(word1) * words.get(word2); //pairs with feature same SG\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnegativeCount+= words.get(word1) * words.get(word2); // pairs with feature different SG\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new double[]{positiveCount, negativeCount};//return both\n\t}", "public static List<Float> findFrequency(ComplexNum[] wave)\n\t{\n\t\t\n\t\tComplexNum temp = new ComplexNum();\n\t\tComplexNum sum = new ComplexNum(0,0);\n\t\t\n\t\tdouble mag[] = new double [wave.length];\n\t\tlong timeStart = System.currentTimeMillis();\n\t\tfor(int k = 0; k < wave.length; k++)\n\t\t{\t\n\t\t\tsum.setReal(0.0);\n\t\t\tsum.setImaginary(0.0);\n\t\t\t\n\t\t\tfor(int t = 0; t < wave.length; t++)\n\t\t\t{\n\t\t\t\tdouble realTemp = Math.cos(-2 * Math.PI * k * t /wave.length);\n\t\t\t\tdouble imagTemp = Math.sin(- 2 * Math.PI * k * t /wave.length);\n\t\t\t\t\n\t\t\t\ttemp.setReal((realTemp*wave[t].getReal()));\n\t\t\t\ttemp.setImaginary((imagTemp*wave[t].getReal()));\n\t\t\t\t\n\t\t\t\tsum = sum.add(temp);\t\n\t\t\t}\n\t\t\t\n\t\t\tmag[k] = sum.magnitude();\n\t\t\t\n\t\t}\n\t\t\n\t\tList<Float> found = process(mag, testSampleRate, wave.length, 0.5);\n\t\tList<Float> foundFrequencies = new ArrayList<Float>();\n\t\tlong timeEnd = System.currentTimeMillis();\n\t\tfor (float freq : found) \n\t\t{\n\t\t\tif(freq > 20 && freq < 20000)\n\t\t\t\tfoundFrequencies.add(freq);\n\t\t}\n\n\t return (foundFrequencies);\n\t}", "private void normByTopicAndMultiByCount(Vector doc, List<Integer> terms, Matrix perTopicSparseDistributions) {\n for (Integer termIndex : terms) {\n double sum = 0;\n for (int x = 0; x < numTopics; x++) {\n sum += perTopicSparseDistributions.viewRow(x).getQuick(termIndex);\n }\n double count = doc.getQuick(termIndex);\n for (int x = 0; x < numTopics; x++) {\n perTopicSparseDistributions.viewRow(x).setQuick(termIndex,\n perTopicSparseDistributions.viewRow(x).getQuick(termIndex) * count / sum);\n }\n }\n }", "public static HashMap<String, Integer> countOccurences(ArrayList<String> arr) {\n arr = toSortedString(arr);\n HashMap<String, Integer> hash = new HashMap();\n for(String str :arr){\n if(hash.containsKey(str)){\n hash.replace(str, hash.get(str)+1);\n }\n else{\n hash.put(str,1);\n }\n }\n return hash;\n }", "public void countByCharacter() {\n if (super.getInput() == null) {\n return;\n }\n FileInputStream is;\n try {\n is = new FileInputStream(super.getInput());\n NxParser nxp = new NxParser();\n System.out.println(\"Parsing \" + super.getInput() + \"...\");\n nxp.parse(is);\n for (Node[] nx : nxp) {\n String nodeid = nx[0].toString();\n String predicate = nx[1].getLabel();\n if (!PredicateUtils.isSchemaOrgEvent(predicate)) {\n continue;\n }\n predicate = PredicateUtils.fixSchemaOrg(predicate);\n if (!ATTR.equalsIgnoreCase(PredicateUtils.getEventProperty(predicate))) {\n continue;\n }\n String obj = nx[2].getLabel();\n int length = obj.length();\n Integer count = mapEvents.get(nodeid);\n mapEvents.put(nodeid, (count == null ? length : count + length));\n Integer countLength = mapLengths.get(String.valueOf(length));\n mapLengths.put(String.valueOf(length), (countLength == null ? 1 : countLength + 1));\n }\n System.out.println(\"The total number of lines: \" + nxp.lineNumber());\n System.out.println(\"The total number of events: \" + mapEvents.size());\n System.out.println(\"Start sorting mapEvents...\");\n Map<String, Integer> mapEvent = VectorUtils.sortByValue(mapEvents, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"event\"), mapEvent);\n System.out.println(\"Start sorting mapLengths...\");\n Map<String, Integer> mapLength = VectorUtils.sortByValue(mapLengths, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"length\"), mapLength);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "static int findFrequency(Queue<Integer> q, int k){\n \n // return Collections.frequency(q, k);\n return (int) q.stream().filter(e-> e== k).count();\n }", "public static void DocumentFrequencies() throws FileNotFoundException {\n for (Entry<String, List<Integer>> entry : dictionary.entrySet()) {\n List<Integer> termfrequency = new ArrayList<>();\n\n termfrequency = entry.getValue();\t// getting each word's termfrequency list\n int i = 0;\n termfrequency.add(0); \t\t\t//maintaining documentfrequency at the 57th index\n Integer documentFrequency = termfrequency.get(totaldocument+1);\n while(i<56) { //iterate 0 to 55 all speeches term frequency\n if(termfrequency.get(i)>0) {\t\t//increment document frequency of that word if termfrequency is greater than 0.0\n documentFrequency++;\t\t\t//increment document frequency\n }\n i++;\t\t//increment index\n }\n termfrequency.set(57, documentFrequency);\t//re-set the documentfrequency and save the current maintained document frequency from 0 to calculated value\n dictionary.put(entry.getKey(), termfrequency);\t\t// place the incremented final value of that word back to the same list in dictionary hashmap\n }\n //save();\n }", "public static Histogram readFrequencyTable(String fileName) {\r\n List<String[]> data = FileUtils.readCSVFile(fileName, \";\", -1);\r\n \r\n double classWidth = Double.parseDouble(data.get(1)[0]) - Double.parseDouble(data.get(0)[0]);\r\n double start = Double.parseDouble(data.get(0)[0]) - classWidth / 2.0;\r\n double stop = Double.parseDouble(data.get(data.size() - 1)[0]) + classWidth / 2.0;\r\n \r\n Histogram table = new Histogram(start, stop, (int) ((stop - start) / classWidth));\r\n for (String[] row : data) {\r\n int frequency = (int) Double.parseDouble(row[1]);\r\n double value = Double.parseDouble(row[0]);\r\n for (int i = 0; i < frequency; i++) {\r\n table.add(value);\r\n }\r\n }\r\n return table;\r\n }", "void collectLeastFrequent(FrequencyTable fq);", "public static void main(String[] args) {\n\n\n int [][] array = {\n {1, 4, 3, 2, 5},\n {4, 5, 3, 2, 9},\n {4, 7, 8, 1, 4}};\n\n int sum = 0;\n int mean = 0;\n int median = 0;\n double variance = 0;\n double sdev = 0; //Standard deviation\n\n //Make 2d array into 1d array\n int [] list = new int [array.length * array[0].length];\n\n int listnum = 0;\n for (int i = 0; i < array.length; i++){\n for (int j = 0; j < array.length; j++){\n list[listnum++] = array [i][j];\n }\n }\n\n //This is used to find the SUM\n for (int i = 0; i < list.length; i++) {\n sum += list[i];\n }\n System.out.println(\"This is the sum: \" + sum);\n\n //MEAN\n mean = sum/list.length;\n System.out.println(\"Mean: \" + mean);\n\n //This is used to find the MEDIAN\n Arrays.sort(list);\n\n int middle = (list.length / 2);\n if (list.length % 2 == 0) {\n int medium1 = list[middle];\n int medium2 = list[middle - 1];\n median = (medium1 + medium2) / 2;\n } else {\n median = list[middle + 1];\n }\n System.out.println(\"The MEDIAN is: \" + median);\n\n\n //This is the mode\n int[] frequencies = new int[10]; // all zero\n for(int [] row : array){\n for(int val : row){\n frequencies[val]++;\n }\n }\n\n // scan for the largest value\n int largest = 0;\n int mode = -1;\n for (int i = 0; i < 10; ++i) {\n if (frequencies[i] > largest) {\n largest = frequencies[i];\n mode = i;\n }\n }System.out.println(\"Mode: \" + mode);\n\n\n\n //VARIANCE\n double temp = 0;\n for (double a : list) {\n temp += (a - mean) * (a - mean);\n }\n variance = temp / list.length;\n System.out.println(\"Variance:\" + variance);\n\n //Standard deviation\n sdev = Math.sqrt(variance);\n System.out.println(\"Standard Deviation: \" + sdev);\n }", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "public void computeHistogram() {\n\t}", "public Set<Frequency> getFrequencies() {\n return null;\n }", "public double getCentreFrequency(int subsystem) {\n return _avTable.getDouble(ATTR_CENTRE_FREQUENCY, subsystem, 0.0);\n }", "public void charFrequencyCount(Scanner s) {\n\t\twhile (s.hasNextLine()) { /* keep scanning while there is info in the\n\t\t\t\t\t\t\t\t * file\n\t\t\t\t\t\t\t\t * */ \n\t\t\tchar[] curLine = s.nextLine().toCharArray();\n\t\t\tfileData.add(curLine); // save the data for later\n\n\t\t\t/*\n\t\t\t * Go through the line curRent line and count the characters\n\t\t\t */\n\t\t\tfor (int i = 0; i < curLine.length; i++) {\n\t\t\t\tfrequencyCount[curLine[i]]++;\n\t\t\t}\n\t\t\tfrequencyCount[10]++; // add a new line!\n\t\t}\n\t\t/*\n\t\t * There is always one extra newline so take one away to re-balance it.\n\t\t */\n\t\tfrequencyCount[10]--;\n\t}", "private HashMap<String, Double> getHashMapScore(String query){\n WaveIO waveIO = new WaveIO();\n\n short[] inputSignal = waveIO.readWave(query);\n MagnitudeSpectrum ms = new MagnitudeSpectrum();\n double[] msFeatureQuery = ms.getFeature(inputSignal);\n Energy energy = new Energy();\n double[] energyFeatureQuery = energy.getFeature(inputSignal);\n ZeroCrossing zc = new ZeroCrossing();\n double[] zcFeatureQuery = zc.getFeature(inputSignal);\n MFCC mfcc = new MFCC(Frames.frameLength);\n mfcc.process(inputSignal);\n double[] mfccFeatureQuery = mfcc.getMeanFeature();\n \n \n // Get cosine SimList\n HashMap<String, Double> cosineSimList = new HashMap<String, Double>();\n HashMap<String, Double> cosineMsSimList = new HashMap<String, Double>();\n HashMap<String, Double> cosineEnergySimList = new HashMap<String, Double>();\n HashMap<String, Double> cosineZcSimList = new HashMap<String, Double>();\n HashMap<String, Double> cosineMfccSimList = new HashMap<String, Double>();\n \n for (Map.Entry<String,double[]> f: m_msFeature.entrySet()){\n \tcosineMsSimList.put(f.getKey(), (Cosine.getDistance(msFeatureQuery, (double[]) f.getValue())));\n \t// System.out.println(cosineMsSimList.get(f.getKey()));\n }\n for (Map.Entry<String,double[]> f: m_energyFeature.entrySet()){\n \tcosineEnergySimList.put(f.getKey(), (Cosine.getDistance(energyFeatureQuery, (double[]) f.getValue())));\n }\n for (Map.Entry<String,double[]> f: m_zcFeature.entrySet()){\n \tcosineZcSimList.put(f.getKey(), (Cosine.getDistance(zcFeatureQuery, (double[]) f.getValue())));\n }\n for (Map.Entry<String,double[]> f: m_mfccFeature.entrySet()){\n \tcosineMfccSimList.put(f.getKey(), (Cosine.getDistance(mfccFeatureQuery, (double[]) f.getValue())));\n }\n normalizeValue(cosineMsSimList);\n normalizeValue(cosineEnergySimList);\n normalizeValue(cosineZcSimList);\n normalizeValue(cosineMfccSimList);\n // Combine 4 features\n for (Map.Entry<String,double[]> f: m_msFeature.entrySet()){\n \tcosineSimList.put(f.getKey(), (m_msFeatureWeight * cosineMsSimList.get(f.getKey())) + (m_energyFeatureWeight * cosineEnergySimList.get(f.getKey())) + (m_zcFeatureWeight * cosineZcSimList.get(f.getKey())) + (m_mfccFeatureWeight * cosineMfccSimList.get(f.getKey())));\n }\n \n // Get Euclidean SimList\n HashMap<String, Double> euclideanSimList = new HashMap<String, Double>();\n HashMap<String, Double> euclideanMsSimList = new HashMap<String, Double>();\n HashMap<String, Double> euclideanEnergySimList = new HashMap<String, Double>();\n HashMap<String, Double> euclideanZcSimList = new HashMap<String, Double>();\n HashMap<String, Double> euclideanMfccSimList = new HashMap<String, Double>();\n \n for (Map.Entry<String,double[]> f: m_msFeature.entrySet()){\n \teuclideanMsSimList.put(f.getKey(), (Euclidean.getDistance(msFeatureQuery, (double[]) f.getValue())));\n }\n for (Map.Entry<String,double[]> f: m_energyFeature.entrySet()){\n \teuclideanEnergySimList.put(f.getKey(), (Euclidean.getDistance(energyFeatureQuery, (double[]) f.getValue())));\n }\n for (Map.Entry<String,double[]> f: m_zcFeature.entrySet()){\n \teuclideanZcSimList.put(f.getKey(), (Euclidean.getDistance(zcFeatureQuery, (double[]) f.getValue())));\n }\n for (Map.Entry<String,double[]> f: m_mfccFeature.entrySet()){\n \teuclideanMfccSimList.put(f.getKey(), (Euclidean.getDistance(mfccFeatureQuery, (double[]) f.getValue())));\n }\n normalizeValue(euclideanMsSimList);\n normalizeValue(euclideanEnergySimList);\n normalizeValue(euclideanZcSimList);\n normalizeValue(euclideanMfccSimList);\n // Combine 4 features\n for (Map.Entry<String,double[]> f: m_msFeature.entrySet()){\n \teuclideanSimList.put(f.getKey(), (m_msFeatureWeight * euclideanMsSimList.get(f.getKey())) + (m_energyFeatureWeight * euclideanEnergySimList.get(f.getKey())) + (m_zcFeatureWeight * euclideanZcSimList.get(f.getKey())) + (m_mfccFeatureWeight * euclideanMfccSimList.get(f.getKey())));\n }\n \n // Get CityBlock SimList\n HashMap<String, Double> cityblockSimList = new HashMap<String, Double>();\n HashMap<String, Double> cityblockMsSimList = new HashMap<String, Double>();\n HashMap<String, Double> cityblockEnergySimList = new HashMap<String, Double>();\n HashMap<String, Double> cityblockZcSimList = new HashMap<String, Double>();\n HashMap<String, Double> cityblockMfccSimList = new HashMap<String, Double>();\n \n for (Map.Entry<String,double[]> f: m_msFeature.entrySet()){\n \tcityblockMsSimList.put(f.getKey(), (Euclidean.getDistance(msFeatureQuery, (double[]) f.getValue())));\n }\n for (Map.Entry<String,double[]> f: m_energyFeature.entrySet()){\n \tcityblockEnergySimList.put(f.getKey(), (Euclidean.getDistance(energyFeatureQuery, (double[]) f.getValue())));\n }\n for (Map.Entry<String,double[]> f: m_zcFeature.entrySet()){\n \tcityblockZcSimList.put(f.getKey(), (Euclidean.getDistance(zcFeatureQuery, (double[]) f.getValue())));\n }\n for (Map.Entry<String,double[]> f: m_mfccFeature.entrySet()){\n \tcityblockMfccSimList.put(f.getKey(), (Euclidean.getDistance(mfccFeatureQuery, (double[]) f.getValue())));\n }\n normalizeValue(cityblockMsSimList);\n normalizeValue(cityblockEnergySimList);\n normalizeValue(cityblockZcSimList);\n normalizeValue(cityblockMfccSimList);\n // Combine 4 features\n for (Map.Entry<String,double[]> f: m_msFeature.entrySet()){\n \tcityblockSimList.put(f.getKey(), (m_msFeatureWeight * cityblockMsSimList.get(f.getKey())) + (m_energyFeatureWeight * cityblockEnergySimList.get(f.getKey())) + (m_zcFeatureWeight * cityblockZcSimList.get(f.getKey())) + (m_mfccFeatureWeight * cityblockMfccSimList.get(f.getKey())));\n }\n \n // Overall\n HashMap<String, Double> simList = new HashMap<String, Double>();\n for (Map.Entry<String,double[]> f: m_msFeature.entrySet()){\n \tsimList.put(f.getKey(), (m_cosineWeight * cosineSimList.get(f.getKey())) + (m_euclideanWeight * euclideanSimList.get(f.getKey())) + (m_cityblockWeight * cityblockSimList.get(f.getKey())));\n }\n \n return simList;\n }", "public static void main(String[] args) {\n\t\tint arr[] = {1,5,3,1,2,5,7};\r\n\t\t//all elements are in range 1 to N (7 here)\r\n\t\t//find frequency of each element in O(N) and space complexity 1.\r\n\t\tfor(int i = 0; i < arr.length; i++) {\r\n\t\t\t//add any random number (say 10, greater than length)\r\n\t\t\t//to index 1 less than arr[i]\r\n\t\t\t//%10 to prevent overflow in case value comes out to be greater than allowed length\r\n\t\t\tarr[arr[i]%10 - 1] += 10;\r\n\t\t}\r\n\t\tfor(int i = 0; i < arr.length; i++) {\r\n\t\t\tSystem.out.println(\"Frequency of \" +(i+1) +\" is \"+ (arr[i]/10));\r\n\t\t}\r\n\t}", "@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }", "public static Map<Character,Integer> countFreq(String string){\n\n\n\n Map<Character,Integer> results = new HashMap<Character,Integer>();\n for (int i = 0; i < string.length(); i++) {\n Character temp = string.charAt(i);\n Integer count;\n// System.out.println(temp);\n if (results.containsKey(temp)){\n count=results.get(temp);\n count++;\n results.replace(temp,count);\n }\n else\n results.put(temp,1);\n\n }\n\n return results;\n }", "public void statistics(){\n // calculate N\n for (int k=0 ; k<K ; ++k){\n N[k] = 0.0;\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv =X.get(n);\n N[k] = N[k] + sv.getVoxels().length*r.getEntry(n, k);\n }\n N[k] = N[k] + .000001;\n }\n\n \n // calculate xBar\n for (int k=0 ; k<K ; ++k){\n xBar[k].set(0.0);\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv = X.get(n);\n double rnk = r.getEntry(n, k);\n RealVector x = sv.getCenter().mapMultiply(rnk*sv.getVoxels().length);\n xBar[k] = xBar[k].add(x);\n }\n xBar[k].mapDivideToSelf(N[k]);\n } \n \n // calculate the S\n for (int k=0 ; k<K ; ++k){\n for (int row=0 ; row<X.getD() ; ++row){\n for (int col=0 ; col<X.getD() ; ++col){\n S[k].setEntry(row, col, 0.0);\n }\n }\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv = X.get(n);\n for (RealVector vox : sv.getVoxels()){\n RealVector del = vox.subtract(xBar[k]); \n S[k] = S[k].add(del.outerProduct(del).scalarMultiply(r.getEntry(n, k))); \n }\n }\n S[k] = S[k].scalarMultiply(1.0/N[k]);\n }\n }", "public int[] getFrequencies(SortOrder sortBy) {\n int[] result = new int[wordFrequency.size()];\n ArrayList<Map.Entry<String, MutableInteger>> entries =\n new ArrayList<Map.Entry<String, MutableInteger>>(wordFrequency.entrySet());\n if (sortBy == SortOrder.ALPHABETICALLY_ASCENDING) {\n Collections.sort(entries, SORT_ALPHABETICALLY_ASCENDING);\n } else {\n Collections.sort(entries, SORT_BY_FREQUENCY_ASCENDING);\n }\n\n //... Add words to the String array.\n int i = 0;\n for (Map.Entry<String, MutableInteger> ent : entries) {\n result[i++] = ent.getValue().getValue();\n }\n return result;\n }", "private void count(HashMap<Column, String> data, List<Expression> exp,\n Function f) {\n\n\t\tString val = f.getParameters().toString();\n//\t\tCreateTable ct = null;\n//\t\tString datatype = null;\n\n\t\tExpression expr = ((Expression) f.getParameters().getExpressions()\n\t\t\t\t.get(0));\n\t\tScanOperator sc = new ScanOperator(dataType);\n\n\t\tLeafValue leafval = sc.accept(expr, data);\n\t\tString tmp = f.getName() + \"_\" + val;\n\t\tif (check.contains(tmp)) {\n\t\t\t// do nothing\n\t\t} else {\n\t\t\tcheck.add(tmp);\n\t\t}\n\t\tif (leafval != null) {\n\t\t\tif (output.containsKey(tmp)) {\n\t\t\t\tLeafValue l = output.get(tmp);\n\t\t\t\tint x = Integer.parseInt(l.toString());\n\t\t\t\tx++;\n\t\t\t\tl = new LongValue(x);\n\t\t\t\toutput.put(tmp, l);\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tint x = 1;\n\t\t\t\tLeafValue l = new LongValue(x);\n\t\t\t\toutput.put(tmp, l);\n\t\t\t}\n\t\t}\n\t}", "private int getSum(int[] freq, int i, int j) {\n int sum = 0;\n for (int x = i; x <= j; x++) {\n sum += freq[x];\n }\n return sum;\n }", "private int[] readCharacterFrequency(BitInputStream in) throws IOException {\r\n int[] freq = new int[n];\r\n for(int i = 0; i < n; i++){\r\n freq[i] = in.readInt();\r\n }\r\n return freq;\r\n }", "private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }", "public static void main(String[] args) {\n int[] row1 = new int[]{3, 5, 1, 1};\n int[] row2 = new int[]{2, 3, 3, 2};\n int[] row3 = new int[]{5, 5};\n int[] row4 = new int[]{4, 4, 2};\n int[] row5 = new int[]{1, 3, 3, 3};\n int[] row6 = new int[]{1, 1, 6, 1, 1};\n\n //create a hashmap to hold keys(sums), and values(number of times the wall has rows that add up to that sum)\n HashMap<Integer, Integer> hashMap = new HashMap<>();\n\n //iterate over a row, each time a sum is reached replace the value at key sum, with an incremented value\n int sum = 0;\n for (int i = 0; i < row1.length - 1; i++) {\n\n sum += row1[i];\n if (hashMap.containsKey(sum)) {\n int var = hashMap.get(sum) + 1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n //print out the contents of the keySet, which sums have been reached, and the values aka how many times each sum has been reached\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n //Do this for every row in the wall\n sum = 0;\n for(int i = 0; i < row2.length-1; i++) {\n\n sum += row2[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row3.length-1; i++) {\n\n sum += row3[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row4.length-1; i++) {\n\n sum += row4[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row5.length-1; i++) {\n\n sum += row5[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n sum = 0;\n for(int i = 0; i < row6.length-1; i++) {\n\n sum += row6[i];\n if(hashMap.containsKey(sum)) {\n int var = hashMap.get(sum)+1;\n hashMap.replace(sum, var);\n } else {\n hashMap.put(sum, 1);\n }\n }\n System.out.println(\"Sums Reached and how many times respectively:\");\n System.out.println(hashMap.keySet());\n System.out.println(hashMap.values());\n System.out.println(\"------------------------\");\n\n //now that every row has been covered, the key associated with the highest value will be where you should make your cut\n System.out.println(\"To cut through the least amount of bricks, you should make the cut at: \");\n int max = 0;\n for(int i : hashMap.values()) {\n if(i > max) {\n max = i;\n }\n }\n for(Map.Entry<Integer, Integer> entry : hashMap.entrySet()) {\n if(entry.getValue() == max) {\n System.out.println(entry.getKey());\n }\n }\n //and the # of bricks to cut through will be the amount of rows minus how many times the sum was reached\n System.out.println(\"The least amount of rows to cut through is \");\n System.out.println(6 - max);\n\n }", "public StringCount[] GetCounts() \n\t{\n\t\tStringCount[] counts = new StringCount[numEntries];\n int entries = 0;\n \n for(int i = 0; i < tableSize; i++)\n {\n if(table[i] != null)\n {\n insertionSort(new StringCount(table[i].key, table[i].value), counts, entries);\n entries++;\n }\n }\n\t\treturn counts;\n\t}", "public void testF() {\n\t\tfor (int k = 0; k < usedSS; k++) {\n\t\t\tList<Integer> subStr = vals.subList(k*compSize, (k+1)*compSize);\n\t\t\tint sum = (int) subStr.stream().filter(i -> i != BipartiteMatching.FREE).count();\n\t\t\tfData.add(sum);\t\t\t\n\t\t}\n\t}", "public static void aggregateWordCountsAndPrint(JavaSparkContext sc ,JavaPairDStream<String, Integer> newWordCounts,String outputDir){\n\t\t\n\t\t// Apply the inner function to each RDD in this newWordCounts DStream\n\t\tnewWordCounts.foreachRDD((rdd, time) -> {\n\n\t\n\t\t\tif (rdd.count()==0)\n\t\t\t{\n\t\t\t\t System.out.println(\"No words in this time interval: \" +time);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tJavaPairRDD<Text, IntWritable> result = rdd.mapToPair(new ConvertToWritableTypes());\n\t\t\tresult.saveAsHadoopFile(outputDir+\"/\" + time.toString(), Text.class, IntWritable.class,\n\t\t\t\t\tSequenceFileOutputFormat.class);\n\t\t\t//Print the aggregation word counts \n\t\t\tprintAllWordCounts(sc, outputDir);\n\n\t\t});\n\t\t\n\t\t\n\t\t\n\t}", "static long countTriplets(List<Long> arr, long r) {\n\n long count=0;\n long l = arr.size();\n \n Map <Long,Integer> m = new HashMap<Long,Integer>();\n \n for(int i=0;i<arr.size();i++)\n {\n //Map with Uniqe numbers and their frequency.\n if(m.containsValue(arr.get(i)))\n m.put(arr.get(i), m.get(arr.get(i)) + 1);\n else\n m.put(arr.get(i),1);\n }\n \n \n long n = arr.size();\n if(r==1)\n {\n for(Map.Entry<Long,Integer> entry : m.entrySet())\n {\n long k1 = entry.getKey();\n long val = entry.getValue();\n if(val>2)\n {\n count = count + val*(val-1)*(val-2)/6;\n }\n }\n }\n else\n {\n for(Map.Entry<Long,Integer> entry : m.entrySet())\n {\n long k1 = entry.getKey();\n long val = entry.getValue();\n long k2 = k1*r;\n long k3 = k1*r*r;\n if(m.containsKey(k2) && m.containsKey(k3))\n {\n count = count + val*m.get(k2)*m.get(k3);\n }\n }\n }\n\n return count;\n }", "private void countCells() {\n\t\tvisitedCells = 0;\n\t\ttotalCells = 0;\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\ttotalCells++;\n\t\t\t\tif (cell[ix][iy] == 1) {\n\t\t\t\t\tvisitedCells++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }", "public void collector(ArrayList<ACell> cells) {\r\n for (ACell c : cells) {\r\n c.collector(this);\r\n }\r\n }", "public void countByAlpha() {\n if (super.getInput() == null) {\n return;\n }\n FileInputStream is;\n try {\n is = new FileInputStream(super.getInput());\n NxParser nxp = new NxParser();\n System.out.println(\"Parsing \" + super.getInput() + \"...\");\n nxp.parse(is);\n for (Node[] nx : nxp) {\n String nodeid = nx[0].toString();\n String predicate = nx[1].getLabel();\n if (!PredicateUtils.isSchemaOrgEvent(predicate)) {\n continue;\n }\n predicate = PredicateUtils.fixSchemaOrg(predicate);\n if (!ATTR.equalsIgnoreCase(PredicateUtils.getEventProperty(predicate))) {\n continue;\n }\n String obj = nx[2].getLabel();\n obj = NGramUtils.removePunctuaion(obj);\n int length = obj.length();\n Integer count = mapEvents.get(nodeid);\n mapEvents.put(nodeid, (count == null ? length : count + length));\n Integer countLength = mapLengths.get(String.valueOf(length));\n mapLengths.put(String.valueOf(length), (countLength == null ? 1 : countLength + 1));\n }\n System.out.println(\"The total number of lines: \" + nxp.lineNumber());\n System.out.println(\"The total number of events: \" + mapEvents.size());\n System.out.println(\"Start sorting mapEvents...\");\n Map<String, Integer> mapEvent = VectorUtils.sortByValue(mapEvents, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"event\"), mapEvent);\n System.out.println(\"Start sorting mapLengths...\");\n Map<String, Integer> mapLength = VectorUtils.sortByValue(mapLengths, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"length\"), mapLength);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Map<FruitType, Long> groupByTypeWithCounts() {\n\t\treturn fruits.stream().collect(Collectors.groupingBy(Fruit::getType, Collectors.counting()));\n\t}", "public void doCount(ArrayList<String> liste){\n\t\tint j;\n\t\t\n\t\tfor (int i = 0; i < liste.size(); i++) {\n\t\t\t// check if string already exists\n\t\t\tif(!map.containsKey(liste.get(i))){\n\t\t\t\t// check frequency of the given string\n\t\t\t\tj = Collections.frequency(liste, liste.get(i));\t\n\t\t\t\t\n\t\t\t\t// underscore instead of blank space\n\t\t\t\tif(liste.get(i).equals(\" \"))\n\t\t\t\t\tmap.put(\"_\", j);\t\n\t\t\t\telse\n\t\t\t\t\tmap.put(liste.get(i), j);\t// (char, frequency)\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n\t\t//return map;\n\t}", "private static void mostOccur(int[] is) {\n\t\t\t\n\t\t\t\n\t\t\tMap<Integer, Integer> numberCount = new HashMap<>();\n\t\t\t\n\t\t\t\n\t\t\tfor (int i=0; i<is.length; i++ ) {\n\t\t\t\tif(null==numberCount.get(i)) {\n\t\t\t\tnumberCount.put(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnumberCount.put(i, numberCount.get(i) +1);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Iterator<Integer> it = numberCount.keySet().iterator();\n\t\t\tSet<Entry<Integer, Integer>> entries= numberCount.entrySet();\n\t\t\t\n\t\t\tint maxcount=1;\n\t\t\tint maxvalue = 0;\n\t\t\tfor(Entry<Integer, Integer> entry: entries) {\n\t\t\t\tif (entry.getValue()>maxcount) {\n\t\t\t\tmaxcount = entry.getValue();\n\t\t\t\tmaxvalue = entry.getKey();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(maxvalue == 0) {\n\t\t\t\tSystem.out.println(\"All numbers are same\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Most occurance\" + maxvalue + \"and count\" +maxcount);\n\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\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t}", "int[] buildFrequencyTable(String s)\n{\n int[] table = new int [Character.getNumericValue('z') - Character.getNumericValue('a') + 1];\n for (char c : s.toCharArray())\n {\n int x = getCharNumber(c);\n if (x != -1) table[x]++;\n }\n return table;\n}" ]
[ "0.5746285", "0.5731173", "0.57159233", "0.5641483", "0.557366", "0.55629766", "0.5547714", "0.5512701", "0.55096", "0.5506952", "0.5459825", "0.54571694", "0.54183453", "0.54106593", "0.54032075", "0.5394916", "0.53597677", "0.53407913", "0.53013384", "0.5290141", "0.5287206", "0.52836424", "0.52473265", "0.52215904", "0.5197824", "0.5183506", "0.5166511", "0.51476115", "0.5145192", "0.51401013", "0.5108468", "0.50989044", "0.50901", "0.5088667", "0.508727", "0.50793225", "0.50594276", "0.5056163", "0.50319326", "0.5028484", "0.50194204", "0.5015885", "0.50147563", "0.50121725", "0.49835932", "0.49833024", "0.49725693", "0.4968186", "0.49667296", "0.4964452", "0.49371073", "0.4935833", "0.49339285", "0.49301884", "0.4927351", "0.49161765", "0.4908054", "0.4906377", "0.48945034", "0.48931688", "0.48888397", "0.48787832", "0.48779997", "0.48752066", "0.4874204", "0.48719195", "0.4867903", "0.48663113", "0.48580444", "0.4857337", "0.485468", "0.48532045", "0.48349282", "0.48305762", "0.48205078", "0.48194683", "0.48157203", "0.48135528", "0.48102316", "0.4803602", "0.48001823", "0.4795909", "0.47939238", "0.4791284", "0.4788162", "0.47838655", "0.47761574", "0.47649342", "0.47647893", "0.47578847", "0.475651", "0.475397", "0.47516868", "0.47495738", "0.47461653", "0.47441784", "0.47438577", "0.47426176", "0.4737262", "0.4736955", "0.4732468" ]
0.0
-1
Computes the recall using confusion matrix cell frequencies.
public double computeRecall(Label classLabel){ double tp = this.computeTP(classLabel); //total number of instances of class 'classLabel' double totalReal = this.sumColumn(classLabel); return tp/totalReal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double computeMacroRecall(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual recall values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeRecall(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "double computeRecall(int[][] paraPredicionMatrix) {\n double tempRecall = 0.0;\n int tempTotal = 0;\n int tempAccurate = 0;\n for (int i = 0; i < paraPredicionMatrix.length; i++) {\n for (int j = 0; j < paraPredicionMatrix[i].length; j++) {\n if (formalContext.testingFormalContext[i][j] > 0) {\n tempTotal++;\n if (paraPredicionMatrix[i][j] == 1) {\n tempAccurate++;\n } // End if\n } // End if\n } // End for j\n } // End for i\n System.out.println(\"tempAccurate: \" + tempAccurate);\n System.out.println(\"tempTotal: \" + tempTotal);\n if (tempAccurate == 0) {\n return 0.0;\n } // End if\n tempRecall = (tempAccurate + 0.0) / tempTotal;\n return tempRecall;\n }", "protected abstract List<ConfusionMatrix> calcConfusions();", "@Override\n\tpublic ConfusionMatrix calculate_confusion_matrix(Instance[] testData) {\n\n\t\t// Count the true positives, true negatives, false positives, false negatives\n\t\tint TP, FP, FN, TN;\n\t\tTP = 0;\n\t\tFP = 0;\n\t\tFN = 0;\n\t\tTN = 0;\n\n\t\tfor (Instance ins : testData) {\n\t\t\t// if True SPORTS\n\t\t\tif (ins.label == Label.SPORTS) {\n\t\t\t\t// if TP\n\t\t\t\tif (classify(ins.words).label == Label.SPORTS) {\n\t\t\t\t\tTP += 1;\n\t\t\t\t}\n\t\t\t\t// else FN\n\t\t\t\telse {\n\t\t\t\t\tFN += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if True BUSINESS\n\t\t\telse {\n\t\t\t\t// if TN\n\t\t\t\tif (classify(ins.words).label == Label.BUSINESS) {\n\t\t\t\t\tTN += 1;\n\t\t\t\t}\n\t\t\t\t// else FP\n\t\t\t\telse {\n\t\t\t\t\tFP += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ConfusionMatrix(TP, FP, FN, TN);\n\t}", "private Map<String, Map<String, Integer>> computeConfusionMatrix(List<String> sentences, List<String> targets) {\r\n Map<String, Map<String, Integer>> confusionMap = new HashMap<>();\r\n // initialize the map (confusion matrix) of occurrences to be all zeros\r\n for (String trueCategory : categories) {\r\n Map<String, Integer> subConfusionMap = new HashMap<>();\r\n for (String predictedCategory : categories) {\r\n subConfusionMap.put(predictedCategory, 0);\r\n }\r\n confusionMap.put(trueCategory, subConfusionMap);\r\n }\r\n\r\n List<String> predictions = predict(sentences);\r\n for (int i = 0; i < sentences.size(); i++) {\r\n String trueCategory = targets.get(i);\r\n String predictedCategory = predictions.get(i);\r\n Map<String, Integer> subConfusionMap = confusionMap.get(trueCategory);\r\n subConfusionMap.put(predictedCategory, subConfusionMap.get(predictedCategory) + 1);\r\n }\r\n return confusionMap;\r\n }", "private static int[][] getConfusionMatrix(List<CSVAttribute[]> predictedTestData,\n List<CSVAttribute[]> validationData, int labelAttribute) {\n\n int[][] result = new int[][]{{0,0},{0,0}};\n\n for (int j = 0; j < predictedTestData.size(); j++) {\n CSVAttribute predictedLabel = predictedTestData.get(j)[labelAttribute];\n CSVAttribute realLabel = validationData.get(j)[labelAttribute];\n if (predictedLabel.equals(realLabel) && predictedLabel.getValue().equals(\"1\")) result[0][0]++; // tp\n if (!predictedLabel.equals(realLabel) && predictedLabel.getValue().equals(\"1\")) result[0][1]++; // fp\n if (!predictedLabel.equals(realLabel) && predictedLabel.getValue().equals(\"0\")) result[1][0]++; // fn\n if (predictedLabel.equals(realLabel) && predictedLabel.getValue().equals(\"0\")) result[1][1]++; // tn\n }\n\n return result;\n }", "public static void main(String[] args) throws Exception {\n\t\tint i;\r\n\t\tint [][]preci_recall = new int [5][6]; \r\n\r\n\t\tNGRAM ngram = new NGRAM();\r\n\t\t\r\n\t\tfor(i=0; i<5; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println((i+1) + \" th FOLD IS A TEST SET\");\r\n\t\t\t\r\n\t\t\tdouble[][] test_ngram_features = ngram.feature(i,1);\r\n\t\t\tdouble[][] train_ngram_features = ngram.feature(i,0);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"NGRAM FEATURES...OK\");\r\n\t\r\n//\t\t\t\r\n//\t\t\tLIWC liwc = new LIWC();\r\n//\t\t\t\r\n//\t\t\tdouble[][] test_liwc_features = liwc.feature(i,1,test_ngram_features.length);\r\n//\t\t\tdouble[][] train_liwc_features = liwc.feature(i,0,train_ngram_features.length);\r\n//\r\n//\t\t\tSystem.out.println(\"LIWC FEATURES..OK\");\r\n//\t\t\t\r\n//\t\t\tCOMBINE combine = new COMBINE();\r\n//\t\t\tdouble[][] train_features = combine.sum(train_liwc_features,train_ngram_features);\r\n//\t\t\tdouble[][] test_features = combine.sum(test_liwc_features,test_ngram_features);\r\n//\t\t\t\r\n//\t\t\tSystem.out.println(\"COMBINE...OK\");\r\n\t\t\r\n\t\t\tSVMLIGHT svmlight = new SVMLIGHT();\r\n\t\t\tpreci_recall[i]=svmlight.calcc(train_ngram_features, test_ngram_features);\r\n\r\n\t\t}\r\n\t\t\r\n//\t 0 : truthful TP\r\n//\t 1 : truthful TP+FP\r\n//\t 2 : truthful TP+FN\r\n//\t 3 : deceptive TP\r\n//\t 4 : deceptive TP+FP\r\n//\t 5 : deceptive TP+FN\r\n\t\t\r\n\t\tint truthful_TP_sum=0,truthful_TPFP_sum=0,truthful_TPFN_sum=0;\r\n\t\tint deceptive_TP_sum=0,deceptive_TPFP_sum=0,deceptive_TPFN_sum=0;\r\n\t\t\r\n\t\tfor(i=0;i<5;i++) {\r\n\t\t\ttruthful_TP_sum+=preci_recall[i][0];\r\n\t\t\ttruthful_TPFP_sum+=preci_recall[i][1];\r\n\t\t\ttruthful_TPFN_sum+=preci_recall[i][2];\r\n\t\t\t\r\n\t\t\tdeceptive_TP_sum+=preci_recall[i][3];\r\n\t\t\tdeceptive_TPFP_sum+=preci_recall[i][4];\r\n\t\t\tdeceptive_TPFN_sum+=preci_recall[i][5];\r\n\t\t}\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"\\n\\nTRUTHFUL_TP_SUM : \" + truthful_TP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFP_SUM : \" + truthful_TPFP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFN_SUM : \" + truthful_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE_TP_SUM : \" + deceptive_TP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFP_SUM : \" + deceptive_TPFP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFN_SUM : \" + deceptive_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nTRUTHFUL PRECISION : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFP_sum));\r\n\t\tSystem.out.println(\"TRUTHFUL RECALL : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFN_sum));\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE PRECISION : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFP_sum));\r\n\t\tSystem.out.println(\"DECEPTIVE RECALL : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFN_sum));\r\n\t\t\r\n\r\n\t}", "double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}", "public TwoClassConfusionMatrix() {\n\t}", "double countMisclassifications(Matrix features, Matrix labels)\r\n {\r\n if(features.rows() != labels.rows())\r\n throw new IllegalArgumentException(\"Illegal Argument Exception Created!!\");\r\n\tdouble mis = 0;\r\n for(int i = 0; i < features.rows(); i++)\r\n\t{\r\n Vec feat = features.row(i);\r\n Vec pred = predict(feat);\r\n Vec lab = labels.row(i);\r\n\r\n for(int j = 0; j < lab.size(); j++){\r\n \r\n if(pred.get(j) != lab.get(j))\r\n mis++;\r\n }\r\n\t}\r\n // System.out.println(\"mis \" + mis);\r\n // System.out.println(\"rowcol \" + (labels.rows()*labels.cols()));\r\n\r\n double misclassifictionRate = 100.0*(mis/(labels.rows()*labels.cols()));\r\n return misclassifictionRate;\r\n }", "public double[][] fetchConfusionMatrix() \n\t{\n int[] rowSum = new int[10];\n double[][] CM = new double[10][10];\n \n for (int i = 0; i < 10; i++) \n {\n for (int j = 0; j < 10; j++) \n {\n rowSum[i] = rowSum[i] + confMatrix[i][j];\n }\n }\n\n for (int i = 0; i < 10; i++) \n {\n for (int j = 0; j < 10; j++) \n {\n CM[i][j] = 1.00 * confMatrix[i][j] / rowSum[i];\n }\n }\n return CM;\n }", "protected ConfusionMatrix(){\n\n\t}", "public double calculateRecall() {\n final long divisor = truePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return truePositive / (double)divisor;\n }\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "public void recalc() {\n\t\tMapping mapping = getConsumerProductMatrix();\n\t\tif (mapping == null) {\n\t\t\treturn; // there is nobody to calculate recommendation for\n\t\t}\n\t\tSparseMatrix<Float64> Ct = makeC(mapping.matrix).transpose();\n\t\tSparseMatrix<Float64> B = makeB(mapping.matrix);\n\t\tSparseMatrix<Float64> CR0 = makeCR0(mapping.matrix.getNumberOfRows());\n\n\t\tSparseMatrix<Float64> PR = null;\n\t\tSparseMatrix<Float64> CR = CR0;\n\n\t\tint iterations =\n\t\t\tConfigService.CONFIG_SERVICE.getConfig(\n\t\t\t\tServerConfigKey.RECOMMENDATION_ITERATIONS).get();\n\t\tfor (int i = 0; i < iterations; i++) {\n\t\t\tPR = CR.times(B);\n\t\t\tCR = PR.times(Ct).plus(CR0);\n\t\t}\n\n\t\tsaveRecommendations(mapping, PR);\n\t}", "public Integer getFrequency(Label prediction, Label real){\n\n\t\tint rowIx = resolveIndex(prediction);\n\t\tint colIx = resolveIndex(real);\n\n\n\t\treturn matrix.get(rowIx).get(colIx);\n\t}", "int getFreq();", "public double getRecall() {\n final int totalCount = getTotalErrorCount();\n if (totalCount == 0) {\n return 1;\n } else {\n return getTrueErrorCount() / (double) totalCount;\n }\n }", "public static void classfy(ArrayList<ArrayList<String>> dataset ,ArrayList<ArrayList<String>> testData,int k) {\n\t\tint index = 0;\r\n\t\tint count = 0;\r\n\t\tfor (ArrayList<String> testItem : testData) {\r\n\t\t\tString str=getFeatureLabel(dataset, testItem, k);\r\n\t\t\tSystem.out.println(str);\r\n\t\t\tif (testItem.get((testData.get(0).size()-1)).equals(str)) {\r\n\t\t\t\tSystem.out.println(\"testItem\"+index+\"分类正确\");\r\n\t\t\t\tcount ++;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"testItem\"+index+\"分类错误\");\r\n\t\t\t}\r\n\t\t\tindex ++;\r\n\t\t}\r\n\t\tSystem.out.println(\"正确率为\"+count*1.0/testData.size());\r\n\t}", "public double computeMacroF1(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual f1 scores\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeF1Score(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public double computeAccuracy(){\n\n\t\t//count the totla number of predictions\n\t\tdouble total = sumAll();\n\n\t\tdouble truePredictions = 0;\n\t\t//iterate all correct guesses\n\t\tfor(Label l : labels){\n\t\t\ttruePredictions += this.computeTP(l);\n\t\t\t\n\t\t}\n\n\t\treturn truePredictions/(total);\n\n\t}", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "public int classify(String doc){\n\t\tint label = 0;\n\t\tint vSize = vocabulary.size();\n\t\tdouble[] score = new double[numClasses];\n\t\tfor(int i=0;i<score.length;i++){\n\t\t\tscore[i] = Math.log(classCounts[i]*1.0/trainingDocs.size());\n\t\t}\n\t\tString[] tokens = doc.split(\" \");\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tfor(String token: tokens){\n\t\t\t\tif(condProb[i].containsKey(token)){\n\t\t\t\t\tscore[i] += Math.log(condProb[i].get(token));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tscore[i] += Math.log(1.0/(classTokenCounts[i]+vSize));\n\t\t\t\t}\n\t\t\t\t//System.out.println(\"token: \"+token+\" \"+score[i]);\n\t\t\t}\n\t\t}\n\t\tdouble maxScore = score[0];\n\t\t//System.out.println(\"class 0: \"+score[0]);\n\t\tfor(int i=1;i<score.length;i++){\n\t\t\t//System.out.println(\"class \"+i+\": \"+score[i]);\n\t\t\tif(score[i]>maxScore){\n\t\t\t\tlabel = i;\n\t\t\t}\n\t\t}\n\t\treturn label;\n\t}", "public double computeF1Score(Label classLabel){\n\t\tdouble r = this.computeRecall(classLabel);\n\t\tdouble p = this.computePrecision(classLabel);\n\t\treturn (2.0 * p * r)/(p+r);\n\t}", "private void calcaluteFeaturePrecisionRecall(Block b, File xmiblockFolder, int numberOfBlocks) {\n\t\tSystem.out.println(\" calcalute Precision Recall for block : \"+b.getName());\n\n\t\tFile[] distributions = getDistributionsContainingBlock(b);\n\t\t\n\t\tVector<File> remainingDistributions = getDistributionsNotContainingBlock(distributions,AdaptedModelManager.getAdaptedModel().getOwnedAdaptedArtefacts());\n\n\t\t FeatureIdentificationEvaluation featureIdentEval =new FeatureIdentificationEvaluation();\n\t\t List<File> eclipseFeatures =null;\n\t\t \n\t\t \n\t\t\teclipseFeatures = featureIdentEval.getCommonEclipseFeatures(distributions, oldCommonFeatures,remainingDistributions );\n\t\t\t\n\t\t\t// save them here to be excluded the next evaluation (for another block)\n\t\t oldCommonFeatures.addAll(eclipseFeatures);\n\t\t \n\t\t \n\t\t\t File[] eclipseFeaturesArray = new File[eclipseFeatures.size()];\n\t\t\t int j=0;\n\t\t//\t System.out.println(\"common features : \");\n\t\t\t for (File file : eclipseFeatures) {\n\t//\t\t\t System.out.println(file.getName());\n\t\t\t\t eclipseFeaturesArray[j++] = file;\n\t\t\t }\n\t\t\t\t File but4reuseFeature = xmiblockFolder.listFiles()[0]; // TODO get file with same name as block name\n if(but4reuseFeature.exists() && ! but4reuseFeature.isDirectory() && but4reuseFeature.getName().endsWith(\".xmi\")){\n\t\t\t\t\t featureIdentEval.calculateRecallAndPrecision( but4reuseFeature, eclipseFeaturesArray);\n\t\t\t\t\t \n\t\t\t\t\t precisionValues.put(b, featureIdentEval.getPrecision());\n\t\t\t\t\t recallValues.put(b, featureIdentEval.getRecall()) ;\n\t\t\t\t\t truePositiveValues.put(b, featureIdentEval.getTruePositives());\n\t\t\t\t\t falseNegativeValues.put(b, featureIdentEval.getFalseNegatives());\n\t\t\t\t\t falsePositiveValues.put(b, featureIdentEval.getFalsePositives());\n }\n \n\n\t}", "void computePrecisionAndRecall(int paraLikeThreshold, int paraK, int paraN, double paraMax, double paraBelta,\n\t\t\tdouble paraGama) {\n\n\t\t// System.out.println(\"the uTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRateInds);\n\t\t// System.out.println(\"the uTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRatings);\n\t\t// System.out.println(\"the iTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRateInds);\n\t\t// System.out.println(\"the iTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRatings);\n\t\t// System.out.println(\"the uTeRateInds is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTeRateInds);\n\t\t// System.out.println(Arrays.toString(dataModel.uTeDgr));\n\n\t\tint tempSucRecLen = 0;\n\t\tint tempRecLen = 0;\n\t\tint tempLikeLen = 0;\n\t\tint tempCount = 0;\n\t\tdouble tempNDCG = 0;\n\t\tfor (int i = 0; i < dataModel.userNum; i++) {\n\t\t\t// System.out.println(\"the user is \" + i + \" , the length is \" +\n\t\t\t// dataModel.uTeRateInds[i].length);\n\t\t\tint[] tempRecLists = recommendListForOneUser(i, paraLikeThreshold, paraK, paraN, paraBelta, paraGama);\n\t\t\t// System.out.println(\"the reclist is \" + Arrays.toString(tempRecLists));\n\t\t\tint[] tempLikeLists = likeListForOneUser(i, paraLikeThreshold);\n\t\t\t// System.out.println(\"the likelist is \" + Arrays.toString(tempLikeLists));\n\t\t\tint[] tempInterSection = SetOperator.interSection(tempRecLists, tempLikeLists);\n\n\t\t\t// System.out.println(\"User \" + i + \" recommend lists: \");\n\t\t\t// SimpleTool.printIntArray(tempRecLists);\n\t\t\tif (tempInterSection != null) {\n\t\t\t\ttempSucRecLen = tempInterSection.length;\n\t\t\t\ttempRecLen = tempRecLists.length;\n\t\t\t\ttempLikeLen = tempLikeLists.length;\n\t\t\t\tif (tempRecLen > 1e-6) {\n\t\t\t\t\tprecision += (tempSucRecLen + 0.0) / tempRecLen;\n\t\t\t\t\ttempNDCG = computeNDCG(i, tempRecLists, paraMax);\n\t\t\t\t\tNDCG += tempNDCG;\n\t\t\t\t} // Of if\n\t\t\t\tif (tempLikeLen > 1e-6) {\n\t\t\t\t\trecall += (tempSucRecLen + 0.0) / tempLikeLen;\n\t\t\t\t} // Of if\n\t\t\t} else {\n\t\t\t\ttempCount++;\n\t\t\t\tcontinue;// Of if\n\t\t\t}\n\n\t\t} // Of for i\n\t\t\t// System.out.println(\"the count is: \" + tempCount);\n\t\tprecision = precision / (dataModel.userNum - tempCount);\n\t\trecall = recall / (dataModel.userNum - tempCount);\n\t\tNDCG = NDCG / (dataModel.userNum - tempCount);\n\t}", "public double[] fetchClassificationRates() \n {\n\n double[] classificationRates = new double[10];\n \n for (int digit = 0; digit < 10; digit++) \n {\n \tclassificationRates[digit] = fetchConfusionMatrix()[digit][digit];\n }\n\n return classificationRates;\n }", "boolean hasFreq();", "public static void evaluation(List<Tweet> tweets){\n\t\tEvaluator eval = new Evaluator();\n\t\tint[][] confusionMatrix = eval.computeConfusionMatrix(tweets);\n\n\t\t// Variables for calculation of the micro and macro accuracy.\n\t\tint allTp = 0;\n\t\tint allFn = 0;\n\t\tint allFp = 0;\n\t\tint allTn = 0;\n\t\tdouble macroAccuracy = 0.0;\n double macroPrecision = 0.0;\n double macroRecall = 0.0;\n double macroFscore = 0.0;\n\n\n\t\t// System.out.println(confusionMatrix.keySet());\n\t\t// Outputting the evaluation for each label.\n\t\tfor (Labels label : Labels.values()) {\n\t\t\tint tp = eval.computeTP(confusionMatrix, label);\n\t\t\tallTp = allTp + tp;\n\t\t\tint fn = eval.computeFN(confusionMatrix, label);\n\t\t\tallFn = allFn + fn;\n\t\t\tint fp = eval.computeFP(confusionMatrix, label);\n\t\t\tallFp = allFp + fp;\n\t\t\tint tn = eval.computeTN(confusionMatrix, label);\n\t\t\tallTn = allTn + tn;\n\n\t\t\tdouble precision = eval.getPrecision(tp, fp);\n\t\t\tdouble recall = eval.getRecall(tp, fn);\n double fscore = eval.getFScore(precision, recall);\n\t\t\tmacroAccuracy = macroAccuracy + eval.getAccuracy(tp, fn, fp, tn);\n\n macroPrecision += precision;\n macroRecall += recall;\n macroFscore += fscore;\n\n\t\t\tSystem.out.println(\"********* Outputting the evaluation results for \" + label.toString() + \" *********\");\n\t\t\tSystem.out.println(label.toString() + \"\\t\\t TP: \" + tp + \"\\t FN: \" + fn + \"\\t FP: \" + fp + \"\\t TN: \" + tn);\n\t\t\tSystem.out.println(\"\\t\\t Precision: \" + precision);\n\t\t\tSystem.out.println(\"\\t\\t Recall: \" + recall);\n\t\t\tSystem.out.println(\"\\t\\t FScore: \" + fscore);\n\t\t\tSystem.out.println(\"\\t\\t Accuracy: \" + eval.getAccuracy(tp, fn, fp, tn));\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\t// Outputting the accuracy for all labels.\n\t\tSystem.out.println(\"********* Outputting the macro/micro accuracy for all labels *********\");\n\t\tSystem.out.println(\"Macro-Precision: \" + macroPrecision/Labels.getSize());\n System.out.println(\"Macro-Recall: \" + macroRecall/Labels.getSize());\n System.out.println(\"Macro-Fscore: \" + macroFscore/Labels.getSize());\n\t\tSystem.out.println(\"Macro-Accuracy: \" + macroAccuracy / Labels.getSize());\n\t}", "public TwoClassConfusionMatrix(final double numberOfTruePositives, final double numberOfFalseNegatives, final double numberOfFalsePositives, final double numberOfTrueNegatives) {\n\t\tthis.numberOfTruePositives = numberOfTruePositives;\n\t\tthis.numberOfFalseNegatives = numberOfFalseNegatives;\n\t\tthis.numberOfFalsePositives = numberOfFalsePositives;\n\t\tthis.numberOfTrueNegatives = numberOfTrueNegatives;\n\t}", "public ComputeTermFrequencies() { super(); }", "private void computeMultiClassMCC(ConfusionMatrixElement[] elements) {\n\t\tdouble Sq = matrixTotal * matrixTotal;\n\t\tdouble CS = Arrays.stream(elements).map(n -> n.tp).reduce(0.0d, (n, m) -> n + m) * matrixTotal;\n\t\tdouble t = 0.0d, p = 0.0d, tt = 0.0d, pp = 0.0d, tp = 0.0d;\n\t\t\n\t\tfor (ConfusionMatrixElement e : elements) {\n\t\t\tt = (e.tp + e.fp); \n\t\t\tp = (e.tp + e.fn);\n\t\t\t\n\t\t\ttt += (t * t);\n\t\t\tpp += (p * p);\n\t\t\ttp += (t * p);\n\t\t}\n\t\tmatrixMCC = (CS - tp) / (Math.sqrt(Sq - pp) * Math.sqrt(Sq - tt));\n\t}", "public Context(SequenceModel<Label> model, List<Prediction<Label>> predictions) {\n super(model, predictions);\n this.cm = new LabelConfusionMatrix(model.getOutputIDInfo(), predictions);\n }", "public double getAccuracyWithLabFormat(String input)\n {\n\n resetWeight();\n\n BagOfWords bag =new BagOfWords(\" \");\n\n String tt=input;\n\n input = input.replaceAll(\"\\n\",\" \");\n\n for (String s:input.split(\" \"))\n {\n bag.add(s);\n }\n\n\n\n for(HashMap.Entry<String, Integer> entry : bag.getBagHashMap().entrySet())\n {\n String key = entry.getKey();\n\n for (TFIDF bag1: trainedClasses)\n {\n for (Word w:bag1.getWordsSets().getWordList())\n {\n if (w.getValue().equals(key))\n {\n bag1.setWeight(bag1.getWeight()+w.getFreq());\n bag1.setFileCount(bag1.getFileCount()+1);\n }\n }\n\n }\n\n }\n\n for (TFIDF bag1: trainedClasses)\n {\n bag1.setWeight(bag1.getWeight()/(bag1.getFileCount()+1));\n }\n\n int i= trainedClasses.size();\n\n for (TFIDF bag1: trainedClasses)\n {\n if (tt.split(\"\\n\")[0].contains(bag1.getName()))\n {\n i=Math.min(i, trainedClasses.indexOf(bag1));\n }\n\n }\n\n StringBuilder ret= new StringBuilder(\"(\" + i + \")\" + \"\\n\");\n\n trainedClasses.sort(new Comparator<TFIDF>() {\n @Override\n public int compare(TFIDF idf, TFIDF t1) {\n if (idf.getWeight()>t1.getWeight())\n return -1;\n else\n return 1;\n }\n });\n\n for (TFIDF bag1: trainedClasses)\n {\n ret.append(\" --> \").append(bag1.getName()).append(\": \").append(bag1.getWeight()).append(\"\\n\");\n }\n\n return (100/Math.pow(i+1,2));\n\n }", "@Override\n public String toString() {\n final String lineSeparator = System.getProperty(\"line.separator\");\n return new StringBuilder(\"TableOfConfusion\").append(lineSeparator)\n .append(\"precision: \").append(calculatePrecision()).append(lineSeparator)\n .append(\"recall: \").append(calculateRecall()).append(lineSeparator)\n .append(\"specificity: \").append(calculateSpecificity()).append(lineSeparator)\n .append(\"accuracy: \").append(calculateAccuracy()).append(lineSeparator)\n .append(\"fscore: \").append(calculateFScore()).append(lineSeparator)\n .toString();\n }", "public Context(Model<Label> model, List<Prediction<Label>> predictions) {\n super(model, predictions);\n this.cm = new LabelConfusionMatrix(model.getOutputIDInfo(), predictions);\n }", "public double getNumberOfCorrectlyClassified() {\n\t\treturn numberOfTruePositives + numberOfTrueNegatives;\n\t}", "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 }", "@Test\n\tpublic void testClassifier() {\n\t\t// Ensure there are no intermediate files left in tmp directory\n\t\tFile exampleFile = FileUtils.getTmpFile(FusionClassifier.EXAMPLE_FILE_NAME);\n\t\tFile predictionsFile = FileUtils.getTmpFile(FusionClassifier.PREDICTIONS_FILE_NAME);\n\t\texampleFile.delete();\n\t\tpredictionsFile.delete();\n\t\t\n\t\tList<List<Double>> columnFeatures = new ArrayList<>();\n\t\tSet<String> inputRecognizers = new HashSet();\n\t\tList<Map<String, Double>> supportingCandidates = new ArrayList();\n\t\tList<Map<String, Double>> competingCandidates = new ArrayList();\n\t\t\n\t\t// Supporting candidates\n\t\tMap<String, Double> supportingCandidatesTipo = new HashMap();\n\t\tsupportingCandidatesTipo.put(INPUT_RECOGNIZER_ID, TIPO_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesTipo);\n\n\t\tMap<String, Double> supportingCandidatesInsegna = new HashMap();\n\t\tsupportingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, INSEGNA_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesInsegna);\n\t\t\n\t\t// Competing candidates\n\t\tMap<String, Double> competingCandidatesTipo = new HashMap();\n\t\tcompetingCandidatesTipo.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesTipo);\n\t\tMap<String, Double> competingCandidatesInsegna = new HashMap();\n\t\tcompetingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesInsegna);\n\n\t\t// Two columns: insegna and tipo from osterie_tipiche\n\t\t// A single column feature: uniqueness\n\t\tList<Double> featuresTipo = new ArrayList();\n\t\tfeaturesTipo.add(0.145833);\n\t\tcolumnFeatures.add(featuresTipo);\n\t\t\n\t\tList<Double> featuresInsegna = new ArrayList();\n\t\tfeaturesInsegna.add(1.0);\n\t\tcolumnFeatures.add(featuresInsegna);\n\t\t\n\t\t// A single input recognizer\n\t\tinputRecognizers.add(INPUT_RECOGNIZER_ID);\n\n\t\t// Create the classifier\n\t\tFusionClassifier classifier \n\t\t\t= new FusionClassifier(FileUtils.getSVMModelFile(MINIMAL_FUSION_CR_NAME), \n\t\t\t\t\tcolumnFeatures, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\tinputRecognizers);\n\t\tList<Double> predictions \n\t\t\t= classifier.classifyColumns(supportingCandidates, competingCandidates);\n\t\t\n\t\tboolean tipoIsNegativeExample = predictions.get(0) < -0.5;\n\t\t\n//\t\tTODO This currently doesn't work -- need to investigate\n//\t\tboolean insegnaIsPositiveExample = predictions.get(1) > 0.5;\n\t\t\n\t\tassertTrue(tipoIsNegativeExample);\n//\t\tassertTrue(insegnaIsPositiveExample);\n\t\t\n\ttry {\n\t\tSystem.out.println(new File(\".\").getCanonicalPath());\n\t\tSystem.out.println(getClass().getProtectionDomain().getCodeSource().getLocation());\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\t\n\t}", "public static void getFreq(){\n\t\t\tint mutTotalcounter=0;\n\t\t\t\n\t\t\tfor(int i=0; i<numOfMutations.length-1; i++){\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]==numOfMutations[i+1]){\n\t\t\t\t\tfrequency[mutTotalcounter]+=1; //if number of mutation is repeated in original array, frequency is incremented\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]!=numOfMutations[i+1])\n\t\t\t\t{\n\t\t\t\t\tmutTotal[mutTotalcounter++]=numOfMutations[i]; //if number is not repeated in array, the next element in array\n\t\t\t\t\t//becomes the next number of mutations that occurred\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((i+1)==numOfMutations.length-1){\n\t\t\t\t\t//used to get the last element in original array since for loop will go out of bounds\n\t\t\t\t\tmutTotal[mutTotalcounter]=numOfMutations[i+1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"XMut : YFreq\");\n\t\t\t//console display of mutation and frequency values\n\t\t\tfor (int i=0; i<=mutTotal.length-1;i++){\n\t\t\t\tif(mutTotal[i]==0 && frequency[i]==0) continue;\n\t\t\t\tfrequency[i]+=1;\n\t\t\t\tSystem.out.print(mutTotal[i]+\" : \");\n\t\t\t\tSystem.out.print(frequency[i]);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}", "private ArrayList<Integer> cofusionMatrix(ArrayList<Double>trustOfAdvisors) {\n\t\tArrayList<Integer> cmvals = new ArrayList<Integer>();\n\t\tfor(int i=0; i<4; i++){\n\t\t\tcmvals.add(0);\n\t\t}\n\t\tfor (int k = 0; k < trustOfAdvisors.size(); k++) {\n\t\t\tint aid = k;\n\t\t\tif (aid >= Parameter.NO_OF_DISHONEST_BUYERS && aid < (trustOfAdvisors.size())) { // ground truth: honest advisors\n\t\t\t\tif (trustOfAdvisors.get(aid) > 0.5) // true positive\n\t\t\t\t{\n\t\t\t\t\tcmvals.set(0, cmvals.get(0)+1);\t\n\t\t\t\t}\n\t\t\t\telse if (trustOfAdvisors.get(aid) < 0.5) // false negative\n\t\t\t\t{\n\t\t\t\t\tcmvals.set(1, cmvals.get(1)+1);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} else { // ground truth: dishonest advisors\n\t\t\t\tif (trustOfAdvisors.get(aid)> 0.5) // false positive\n\t\t\t\t{\n\t\t\t\t\tcmvals.set(2, cmvals.get(2)+1);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (trustOfAdvisors.get(aid) < 0.5) // true negative\n\t\t\t\t{\n\t\t\t\t\tcmvals.set(3, cmvals.get(3)+1);\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cmvals;\n\t}", "public double getAccuracy(){\n return (numOfHits/numOfGuesses);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public Map<Integer, Boolean> testCategorization(String topic, String[] features) {\n\n\t\tint n = trainingSet.size(); // Count docs.\n\n\t\t// Count docs in class.\n\t\tint nc = 0;\n\t\tfor (Integer id : trainingSet) {\n\t\t\tboolean inClass = this.getDocument(id).getTopics().contains(topic);\n\t\t\tif (inClass)\n\t\t\t\tnc++;\n\t\t}\n\n\t\tdouble prior_c = nc / (double) n;\n\t\tdouble prior_cbar = (n - nc) / (double) n;\n\n\t\tMap<String, Double> condProb_c = new HashMap<String, Double>();\n\t\tMap<String, Double> condProb_cbar = new HashMap<String, Double>();\n\n\t\t// Count docs in class containing term.\n\t\tfor (String term : features) {\n\t\t\tSet<Integer> postings = terms.get(term).getPostings().keySet();\n\t\t\tint nct_c = 0, nct_cbar = 0;\n\t\t\tfor (Integer id : trainingSet) {\n\t\t\t\tboolean inClass = this.getDocument(id).getTopics().contains(topic);\n\t\t\t\tif (postings.contains(id)) { // document contains the term\n\t\t\t\t\tif (inClass)\n\t\t\t\t\t\tnct_c++;\n\t\t\t\t\telse\n\t\t\t\t\t\tnct_cbar++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// And calculate conditional probabilities.\n\t\t\tcondProb_c.put(term, (nct_c + 1) / (double) (nc + 2));\n\t\t\tcondProb_cbar.put(term, (nct_cbar + 1) / (double) ((n - nc) + 2));\n\t\t}\n\n\t\t// ---APPLY BERNOULLI----\n\n\t\tMap<Integer, Boolean> marked = new HashMap<Integer, Boolean>();\n\t\tfor (Integer id : testSet) {\n\t\t\tdouble score_c = Math.log(prior_c);\n\t\t\tdouble score_cbar = Math.log(prior_cbar);\n\t\t\tfor (String term : features) {\n\t\t\t\tSet<Integer> postings = terms.get(term).getPostings().keySet();\n\t\t\t\tif (postings.contains(id)) {\n\t\t\t\t\tscore_c += Math.log(condProb_c.get(term));\n\t\t\t\t\tscore_cbar += Math.log(condProb_cbar.get(term));\n\t\t\t\t} else {\n\t\t\t\t\tscore_c += Math.log(1 - condProb_c.get(term));\n\t\t\t\t\tscore_cbar += Math.log(1 - condProb_cbar.get(term));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (score_c > score_cbar)\n\t\t\t\tmarked.put(id, true);\n\t\t\telse\n\t\t\t\tmarked.put(id, false);\n\t\t}\n\t\treturn marked;\n\t}", "public NBClassifier(String trainDataFolder, int trainPortion)\n\t{\n\t\ttrainingDocs = new ArrayList<String>();\n\t\tallDocs = new ArrayList<String>();\n\t\tnumClasses = 2;\n\t\tclassCounts = new int[numClasses];\n\t\tclassStrings = new String[numClasses];\n\t\tclassTokenCounts = new int[numClasses];\n\t\tcondProb = new HashMap[numClasses];\n\t\tvocabulary = new HashSet<String>();\n\t\tfor(int i=0;i<numClasses;i++){ //just initialization\n\t\t\tclassStrings[i] = \"\";\n\t\t\tcondProb[i] = new HashMap<String,Double>();\n\t\t}\n\t\ttotalDocs = 5574;\n\t\toffset = Math.round(totalDocs) * trainPortion / 100;\n\t\tSystem.out.println(\"Numer of Documents For Training: \"+offset);\n\t\tSystem.out.println(\"Numer of Documents For Testing: \"+(totalDocs-offset));\n\t\tpreprocess(trainDataFolder);\n\t\t\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tString[] tokens = classStrings[i].split(\" \");\n\t\t\tclassTokenCounts[i] = tokens.length;\n\t\t\t//collecting the counts\n\t\t\tfor(String token:tokens){\n\t\t\t\t//System.out.println(token);\n\t\t\t\tvocabulary.add(token);\n\t\t\t\tif(condProb[i].containsKey(token)){\n\t\t\t\t\tdouble count = condProb[i].get(token);\n\t\t\t\t\tcondProb[i].put(token, count+1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcondProb[i].put(token, 1.0);\n\t\t\t\t//System.out.println(token+\" : \"+condProb[i].get(token));\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tIterator<Map.Entry<String, Double>> iterator = condProb[i].entrySet().iterator();\n\t\t\tint vSize = vocabulary.size();\n\t\t\twhile(iterator.hasNext())\n\t\t\t{\n\t\t\t\tMap.Entry<String, Double> entry = iterator.next();\n\t\t\t\tString token = entry.getKey();\n\t\t\t\tDouble count = entry.getValue();\n\t\t\t\t//System.out.println(count+1+\" / ( \"+classTokenCounts[i]+\" + \"+vSize+\" )\");\n\t\t\t\tcount = (count+1)/(classTokenCounts[i]+vSize);\n\t\t\t\tcondProb[i].put(token, count);\n\t\t\t}\n\t\t\t//System.out.println(\"dekho: \"+condProb[i]);\n\t\t}\n\t\ttestModel();\n\t}", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toMatrixString();\n assertEquals(\"=== Confusion Matrix ===\\n\\n a b <-- classified as\\n 0 0 | a = class1\\n 0 0 | b = class2\\n\", string0);\n }", "public void trainBernoulli() {\t\t\n\t\tMap<String, Cluster> trainingDataSet = readFile(trainLabelPath, trainDataPath, \"training\");\n\t\tMap<String, Cluster> testingDataSet = readFile(testLabelPath, testDataPath, \"testing\");\n\n\t\t// do testing, if the predicted class and the gold class is not equal, increment one\n\t\tdouble error = 0;\n\n\t\tdouble documentSize = 0;\n\n\t\tSystem.out.println(\"evaluate the performance\");\n\t\tfor (int testKey = 1; testKey <= 20; testKey++) {\n\t\t\tCluster testingCluster = testingDataSet.get(Integer.toString(testKey));\n\t\t\tSystem.out.println(\"Cluster: \"+testingCluster.toString());\n\n\t\t\tfor (Document document : testingCluster.getDocuments()) {\n\t\t\t\tdocumentSize += 1; \n\t\t\t\tList<Double> classprobability = new ArrayList<Double>();\n\t\t\t\tMap<String, Integer> testDocumentWordCounts = document.getWordCount();\n\n\t\t\t\tfor (int classindex = 1; classindex <= 20; classindex++) {\n\t\t\t\t\t// used for calculating the probability\n\t\t\t\t\tCluster trainCluster = trainingDataSet.get(Integer.toString(classindex));\n\t\t\t\t\t// System.out.println(classindex + \" \" + trainCluster.mClassId);\n\t\t\t\t\tMap<String, Double> bernoulliProbability = trainCluster.bernoulliProbabilities;\n\t\t\t\t\tdouble probability = Math.log(trainCluster.getDocumentSize()/trainDocSize);\n\t\t\t\t\tfor(int index = 1; index <= voc.size(); index++ ){\n\n\t\t\t\t\t\t// judge whether this word is stop word \n\t\t\t\t\t\tboolean isStopwords = englishStopPosition.contains(index);\n\t\t\t\t\t\tif (isStopwords) continue;\n\n\t\t\t\t\t\tboolean contain = testDocumentWordCounts.containsKey(Integer.toString(index));\t\t\t\t\t\t\n\t\t\t\t\t\tif (contain) {\n\t\t\t\t\t\t\tprobability += Math.log(bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprobability += Math.log(1 - bernoulliProbability.get(Integer.toString(index)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// put the probability into the map for the specific class\n\t\t\t\t\tclassprobability.add(probability);\n\t\t\t\t}\n\t\t\t\tObject obj = Collections.max(classprobability);\n\t\t\t\t// System.out.println(classprobability);\n\t\t\t\tString predicte_class1 = obj.toString();\n\t\t\t\t// System.out.println(predicte_class1);\n\t\t\t\t// System.out.println(Double.parseDouble(predicte_class1));\n\t\t\t\tint index = classprobability.indexOf(Double.parseDouble(predicte_class1));\n\t\t\t\t// System.out.println(index);\n\t\t\t\tString predicte_class = Integer.toString(index + 1);\n\n\n\t\t\t\tconfusion_matrix[testKey - 1][index] += 1;\n\n\t\t\t\t// System.out.println(document.docId + \": G, \" + testKey + \"; P: \" + predicte_class);\n\t\t\t\tif (!predicte_class.equals(Integer.toString(testKey))) {\n\t\t\t\t\terror += 1;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize);\n\t\t}\n\n\t\tSystem.out.println(\"the error is \" + error + \"; the document size : \" + documentSize + \" precision rate : \" + (1 - error/documentSize));\n\n\t\t// print confusion matrix\n\t\tprintConfusionMatrix(confusion_matrix);\n\t}", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n NaiveBayesMultinomialText naiveBayesMultinomialText1 = (NaiveBayesMultinomialText)AbstractClassifier.makeCopy(naiveBayesMultinomialText0);\n naiveBayesMultinomialText1.m_wordFrequencies = true;\n boolean boolean0 = naiveBayesMultinomialText1.getUseWordFrequencies();\n assertTrue(naiveBayesMultinomialText1.getUseWordFrequencies());\n assertTrue(boolean0);\n }", "public int m6502f() throws C0918i {\n LocationProvider n = m6509n();\n if (n == null) {\n return 0;\n }\n try {\n return n.getAccuracy() == 1 ? 2 : 1;\n } catch (C0918i e) {\n throw e;\n }\n }", "int score(OfcHandMatrix matrix);", "private static double[] calculateYuleK(Map<String, Double> wordFrequencies) \n\t{\n\t\t// m1 = number of different words in document (review)\n\t\tdouble m1 = wordFrequencies.keySet().size();\n\n\t\tMap<Double, Double> yuleMap = Utilities.reverseMap(wordFrequencies);\n\n\t\t// m2 = sum of products of each observed frequency squared and number of \n\t\t// words with that frequency\n\t\tdouble m2 = 0.0;\n\t\tdouble[] legomenas = new double[11];\n\t\tfor(Entry<Double,Double> e : yuleMap.entrySet()){\n\t\t\tDouble freq = e.getKey();\n\t\t\tDouble wordCount = e.getValue();\n\t\t\tm2 += freq*freq*wordCount;\n\t\t\tif (freq.intValue() < legomenas.length)\n\t\t\t\tlegomenas[freq.intValue()] = wordCount;\n\t\t}\n\t\tlegomenas[0] = 10000*(m2-m1)/(m1*m1); \n\t\treturn legomenas;\n\t}", "@Test\n\tpublic void classificationTest(){\n\n\t\tJavaPairRDD<String, Set<String>> javaRDD = javaSparkContext.textFile(\"/Downloads/book2-master/2rd_data/ch02/Gowalla_totalCheckins.txt\")\n\t\t\t\t.map(line -> line.split(\"~\"))\n\t\t\t\t.map(s -> new AppDto(s[0],s[1],s[2],s[3],s[4]))\n\t\t\t\t.mapToPair(app -> {\n\t\t\t\t\tSet<String> setIntro = Arrays.stream(app.getIntroduction().split(\" \"))\n\t\t\t\t\t\t\t.map(s -> s.split(\"/\"))\n\t\t\t\t\t\t\t.filter(ss -> ss[0].length()>1 && (ss[1].equals(\"v\") || ss[1].indexOf(\"n\")>-1))\n\t\t\t\t\t\t\t.map(ss -> ss[0]).collect(Collectors.toSet());\n\n\t\t\t\t\treturn new Tuple2<>(app.getCls(), setIntro);\n\t\t\t\t});\n\n\t\tjavaRDD.map(t -> t._2).zipWithIndex();\n\t}", "public double testAccuracy() {\r\n\t\tdouble accuracy = 0;\r\n\t\tint i = 0;\r\n\t\tdouble split = ((float)dataEntries.size()/(float)100)*70;\r\n\t\t\r\n\t\t//Filling arrays with the correct and predicted results to compare.\r\n\t\tfor (i=(int)split; i<dataEntries.size(); i++) {\r\n\t\t\t\tEntry en = dataEntries.get(i);\r\n\t\t\t\tcorrectArray.add(en.getHasCOVID19());\r\n\t\t\t\tdouble diagnosis = calcProbs(new Entry(en.getTemperature(), en.getAches(), en.getCough(), en.getSoreThroat(), en.getSoreThroat()));\r\n\t\t\t\tif (diagnosis>0.5) { predictArray.add(\"yes\"); }\r\n\t\t\t\telse { predictArray.add(\"no\"); }\r\n\t\t}\r\n\t\t\r\n\t\t//Comparing the results of \"hasCOVID19\" to each other.\r\n\t\tfor(i=0;i<correctArray.size();i++) {\r\n\t\t\tif (correctArray.get(i).equals(predictArray.get(i))) {\r\n\t\t\t\taccuracy++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\taccuracy /= correctArray.size();\r\n\t\treturn accuracy * 100;\r\n\t}", "public double kendallTauBCoef() {\n\t\t\n\t\tint cons = 0, disc = 0, score_ties = 0, rate_ties = 0;\n\t\tdouble coef;\n\t\t\n\t\tfor(int a = 0; a < results.size(); a++) {\n\t\t\tfor(int b = 0; b < results.size(); b++) {\n\t\t\t\tif(a != b) {\t\t\t\t\t\n\t\t\t\t\tif(agreement(results.get(a), results.get(b)) == 1) {\n\t\t\t\t\t\tcons++;\n\t\t\t\t\t}else if(agreement(results.get(a), results.get(b)) == -1){\n\t\t\t\t\t\tdisc++;\n\t\t\t\t\t}else if(agreement(results.get(a), results.get(b)) == 2){\n\t\t\t\t\t\tscore_ties++;\n\t\t\t\t\t}\n\t\t\t\t\telse if(agreement(results.get(a), results.get(b)) == 3){\n\t\t\t\t\t\trate_ties++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n//\t\tSystem.out.println(\"C: \" + cons);\n//\t\tSystem.out.println(\"D: \" + disc);\n//\t\tSystem.out.println(\"S: \" + score_ties);\n//\t\tSystem.out.println(\"R: \" + rate_ties);\n\t\tcoef = (cons - disc) / Math.sqrt((cons + disc + score_ties) * (cons + disc + rate_ties));\n\n\t\treturn Math.abs(coef);\n\t}", "public int MajorityVote(double sample[]) {\n\t\t \n\t\tif(leaf_buff == null) {\n\t\t\tleaf_buff = new ArrayList<KDNode>();\n\t\t\tLeafNodes(leaf_buff);\n\t\t}\n\n\t\tint class_count[] = new int[]{0, 0, 0, 0};\n\t\tfor(int i=0; i<leaf_buff.size(); i++) {\n\t\t\tint label = leaf_buff.get(i).classifier.Output(sample);\n\n\t\t\tswitch(label) {\n\t\t\t\tcase -2: class_count[0]++;break;\n\t\t\t\tcase -1: class_count[1]++;break;\n\t\t\t\tcase 1: class_count[2]++;break;\n\t\t\t\tcase 2: class_count[3]++;break;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint max = 0;\n\t\tint label = 0;\n\t\tfor(int i=0; i<4; i++) {\n\t\t\t\n\t\t\tif(class_count[i] > max) {\n\t\t\t\tmax = class_count[i];\n\t\t\t\tlabel = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn label;\n\t}", "public int getFreq(){ return frequency;}", "public int classify(Bitmap bitmap) {\n preprocess(bitmap);\n runInference();\n return postprocess();\n }", "java.lang.String getFrequency();", "public static int[] mucScore(LeanDocument key, LeanDocument response)\n{\n // System.out.println(\"==========================================================\");\n // System.out.println(\"Key:\\n\"+key.toStringNoSing()+\"\\n*************************\\nResponse:\\n\"+response.toStringNoSing());\n\n Iterator<TreeMap<Integer, Integer>> goldChains = key.chainIterator();\n // double mucRecall = 0.0;\n int mucRecallNom = 0;\n int mucRecallDenom = 0;\n while (goldChains.hasNext()) {\n TreeMap<Integer, Integer> keyChain = goldChains.next();\n if (keyChain.size() > 1) {\n int numInt = numIntersect(key, keyChain, response);\n\n // int numMatched = getNumMatched(key, keyChain);\n // if(numMatched>0){\n // mucRecallNom += numMatched-numInt;\n mucRecallNom += (keyChain.size() - numInt);\n // mucRecallDenom += numMatched-1;\n mucRecallDenom += keyChain.size() - 1;\n\n // System.out.println(keyChain+\"\\n\"+(keyChain.size() - numInt)+\"/\"+(keyChain.size()-1));\n // }\n }\n }\n int[] result = { mucRecallNom, mucRecallDenom };\n\n return result;\n}", "public double classifyAll(String testDataFolder)\n\t{\n\t\tFile folder = new File(testDataFolder);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tdouble accuracy = 0.0;\n\t\tint correct_classifications = 0;\n\t\tint testdata = 0;\n\t\tfor(int i=0;i<listOfFiles.length;i++){\n\t\t\tString doc = \"\";\n\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(listOfFiles[i].getAbsoluteFile()));\n\t\t\t\t\tint count = 0;\n\t\t\t\t\tint actual_count = 0;\n\t\t\t\t\tint class_=0;\n\t\t\t\t\tint[] correct = new int[numClasses];\n\t\t\t\t\tint[] test = new int[numClasses];\n\t\t\t\t\tString line = \"\";\n\t\t\t\t\tint tabIndex=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\ttestdata++;\n\t\t\t\t\t\ttabIndex = line.indexOf('\\t');\n\t\t\t\t\t\tString type = line.substring(0, tabIndex);\n\t\t\t\t\t\tString msg = line.substring(tabIndex + 1);\n\t\t\t\t\t\tmsg = msg.toLowerCase();\n\t\t\t\t\t\tif(type.equals(\"ham\")){class_ = 0;}\n\t\t\t\t\t\telse{class_ = 1;}\n\t\t\t\t\t\ttest[class_]++;\n\t\t\t\t\t\tactual_count = actual_count + class_;\n\t\t\t\t\t\tint label = classify(msg);\n\t\t\t\t\t\tcount = count + label;\n\t\t\t\t\t\t//System.out.println(label+\"/\"+class_+\" \"+count);\n\t\t\t\t\t\tif(label-class_==0){\n\t\t\t\t\t\t\tcorrect_classifications++;\n\t\t\t\t\t\t\tcorrect[class_]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tint label = classify(doc);\n\t\t\t\tif(label - class_==0){correct[class_]++;}\n\t\t\t} \n\t\t\tcatch (IOException e){e.printStackTrace();}\n\t\t}\n\t\taccuracy = Math.round(correct_classifications * 1000.0 / testdata)/1000.0;\n\t\tSystem.out.println(\"Accuracy: \"+accuracy);\n\t\treturn accuracy;\n\t}", "public void affichage() {\n if (blanc){\n System.out.print(\"Cb\");\n }\n else{\n System.out.print(\"Cn\");\n }\t\t\n }", "private void determineCounts( )\n {\n for( int r = 0; r < rows; r++ )\n {\n for( int c = 0; c < cols; c++ )\n {\n if( theMines[ r ][ c ] == 1 )\n theCounts[ r ] [ c ] = 9;\n else\n count( r, c );\n }\n }\n }", "public static void CaliculatePRcontr(Configuration conf, long cnt) throws Exception { \n\n\t\t// cntTotal\n\t\tconf.setLong(\"count\", cnt);\n\t\tJob job = new Job(conf, \"ceate matrix\");\n\n\t\tjob.setJarByClass(PageRank.class);\n\t\tjob.setMapperClass(PRcontrMapper.class);\n\t\tjob.setReducerClass(Reducer.class);\n\t\t//\t\tjob.setMapOutputKeyClass(Text.class);\n\t\t//\t\tjob.setMapOutputValueClass(UrlTypeAndPosition.class);\n\t\tjob.setOutputKeyClass(NullWritable.class);\n\t\tjob.setOutputValueClass(Matrix_XY_PRcontribution.class);\n\t\tFileInputFormat.addInputPath(job, new Path(\"createMatrixOutput/part-r-00000\"));\n\t\tFileOutputFormat.setOutputPath(job,new Path(\"createDangMatrixDangOutput\"));\n\t\tMultipleOutputs.addNamedOutput(job, \"MandD\", TextOutputFormat.class, NullWritable.class, Text.class);\n\t\tMultipleOutputs.addNamedOutput(job, \"R\", TextOutputFormat.class, NullWritable.class, Text.class);\n\n\n\n\n\t\tjob.waitForCompletion(true);\n\t}", "@Override\n public void update(LabeledText labeledText){\n super.update(labeledText);\n\n /* FILL IN HERE */\n classCounts[labeledText.label]++;\n for (String ng: labeledText.text.ngrams) { \n \tfor (int h=0;h< nbOfHashes;h++) {\n \t\tcounts[labeledText.label][h][hash(ng,h)]++; \n \t}\n \t//System.out.println(\"Hash: \" + hash(ng) + \" Label : \" + labeledText.label + \" Update: \" + counts[labeledText.label][hash(ng)]);\n }\n \n }", "int getNumFrequents() {\n return numFrequents;\n }", "float getFrequency();", "private void updateCFRABC(int num) {\r\n if (num < 0) {\r\n window.removeAllShapes();\r\n }\r\n else {\r\n State currentState = covidCalculator.getLL().get(num);\r\n ArrayList<Race> currentRacesSorted = covidCalculator.sortByABC(\r\n currentState);\r\n\r\n for (int i = 0; i < currentRacesSorted.size(); i++) {\r\n String cfrPercentage = String.valueOf(currentRacesSorted.get(i)\r\n .getCFR());\r\n\r\n if (!cfrPercentage.equals(\"-1%\")) {\r\n TextShape cfrName = new TextShape(0, 0, cfrPercentage);\r\n cfrName.moveTo(barXPos + (spacingSize * spacingCounter),\r\n +barYPos + 25);\r\n window.addShape(cfrName);\r\n }\r\n spacingCounter++;\r\n }\r\n }\r\n lastStateMemory = num;\r\n spacingCounter = 1;\r\n }", "public long getCheckFrequency() {\n return iCheckFrequency;\n }", "double calcScoreFromObjCount(double[] c_in, double[] c_out) {\r\n\t\t// / multi-class\r\n\t\tdouble diff, sum = 0, max_val = Double.NEGATIVE_INFINITY, min_val = Double.POSITIVE_INFINITY;\r\n\t\tfor (int i = 0; i < num_class; i++) {\r\n\t\t\tdiff = (c_in[i] - c_out[i]);\r\n\t\t\tif (diff > max_val) {\r\n\t\t\t\tmax_val = diff;\r\n\t\t\t}\r\n\t\t\tif (diff < min_val) {\r\n\t\t\t\tmin_val = diff;\r\n\t\t\t}\r\n\t\t\tsum += Math.abs(diff);\r\n\t\t}\r\n\t\treturn (sum - Math.abs(max_val) - Math.abs(min_val)) + Math.abs(max_val - min_val);\r\n\t}", "private void test() {\r\n \ttry {\r\n\t\t\ttestWriter.write(\"Testing started...\");\r\n\t\t\r\n\t\t\tpredictions = new HashMap<>();\r\n \trightAnswers = new HashMap<>();\r\n\r\n\r\n \t// Get results and check them\r\n \tEvaluation eval = new Evaluation(numLabels);\r\n \tfinalTestIterator.reset();\r\n\r\n \tint metaDataCounter = 0;\r\n \tint addrCounter = 0;\r\n\r\n \twhile(finalTestIterator.hasNext()) {\r\n \t// If iterator has next dataset\r\n \tfinalTestData = finalTestIterator.next();\r\n \t// Get meta-data from this dataset\r\n\r\n \t@SuppressWarnings(\"rawtypes\")\r\n \tList<?> exampleMetaData = finalTestData.getExampleMetaData();\r\n \tIterator<?> exampleMetaDataIterator = exampleMetaData.iterator();\r\n \ttestWriter.write(\"\\n Metadata from dataset #\" + metaDataCounter + \":\\n\");\r\n \tSystem.out.println(\"\\n Metadata from dataset #\" + metaDataCounter + \":\\n\");\r\n\r\n \t// Normalize data\r\n \tnormalizer.fit(finalTestData);\r\n\r\n \t// Count processed images\r\n \tnumProcessed = (metaDataCounter + 1) * batchSizeTesting;\r\n \tloaded.setText(\"Loaded and processed: \" + numProcessed + \" pictures\");\r\n\r\n \tINDArray features = finalTestData.getFeatures();\r\n \tINDArray labels = finalTestData.getLabels();\r\n \tSystem.out.println(\"\\n Right labels #\" + metaDataCounter + \":\\n\");\r\n \ttestWriter.write(\"\\n Right labels #\" + metaDataCounter + \":\\n\");\r\n \t// Get right answers of NN for every input object\r\n \tint[][] rightLabels = labels.toIntMatrix();\r\n \tfor (int i = 0; i < rightLabels.length; i++) {\r\n \tRecordMetaDataURI metaDataUri = (RecordMetaDataURI) exampleMetaDataIterator.next();\r\n \t// Print address of image\r\n \tSystem.out.println(metaDataUri.getLocation());\r\n \tfor (int j = 0; j < rightLabels[i].length; j++) {\r\n \tif(rightLabels[i][j] == 1) {\r\n \t//public V put(K key, V value) -> key=address, value=right class label\r\n \trightAnswers.put(metaDataUri.getLocation(), j);\r\n \tthis.addresses.add(metaDataUri.getLocation());\r\n \t}\r\n \t}\r\n \t}\r\n \tSystem.out.println(\"\\nRight answers:\");\r\n \ttestWriter.write(\"\\nRight answers:\");\r\n \t// Print right answers\r\n \tfor(Map.Entry<String, Integer> answer : predictions.entrySet()){\r\n \t\ttestWriter.write(String.format(\"Address: %s Right answer: %s \\n\", answer.getKey(), answer.getValue().toString()));\r\n \tSystem.out.printf(String.format(\"Address: %s Right answer: %s \\n\", answer.getKey(), answer.getValue().toString()));\r\n \t}\r\n\r\n \t// Evaluate on the test data\r\n \tINDArray predicted = vgg16Transfer.outputSingle(features);\r\n \tint predFoundCounter = 0;\r\n \tSystem.out.println(\"\\n Labels predicted #\" + metaDataCounter + \":\\n\");\r\n \ttestWriter.write(\"\\n Labels predicted #\" + metaDataCounter + \":\\n\");\r\n \t// Get predictions of NN for every input object\r\n \tint[][] labelsPredicted = predicted.toIntMatrix();\r\n \tfor (int i = 0; i < labelsPredicted.length; i++) {\r\n \tfor (int j = 0; j < labelsPredicted[i].length; j++) {\r\n \tpredFoundCounter++;\r\n \tif(labelsPredicted[i][j] == 1) {\r\n \t//public V put(K key, V value) -> key=address, value=predicted class label\r\n \tpredFoundCounter = 0;\r\n \tthis.predictions.put(this.addresses.get(addrCounter), j);\r\n \t}\r\n \telse {\r\n \tif (predFoundCounter == 3) {\r\n \t// To fix bug when searching positive predictions\r\n \tthis.predictions.put(this.addresses.get(addrCounter), 2);\r\n \t}\r\n \t}\r\n \t}\r\n \taddrCounter++;\r\n \t}\r\n \tSystem.out.println(\"\\nPredicted:\");\r\n \ttestWriter.write(\"\\nPredicted:\");\r\n \t// Print predictions\r\n \tfor(Map.Entry<String, Integer> pred : rightAnswers.entrySet()){\r\n \tSystem.out.printf(\"Address: %s Predicted answer: %s \\n\", pred.getKey(), pred.getValue().toString());\r\n \ttestWriter.write(String.format(\"Address: %s Predicted answer: %s \\n\", pred.getKey(), pred.getValue().toString()));\r\n \t}\r\n \tmetaDataCounter++;\r\n\r\n \teval.eval(labels, predicted);\r\n \t}\r\n\r\n \tSystem.out.println(\"\\n\\n Cheack loaded model on test data...\");\r\n \tSystem.out.println(String.format(\"Evaluation on test data - [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n \t\t\teval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n \tSystem.out.println(eval.stats());\r\n \tSystem.out.println(eval.confusionToString());\r\n \ttestWriter.write(\"\\n\\n Cheack loaded model on test data...\");\r\n \ttestWriter.write(String.format(\"Evaluation on test data - [Accuracy: %.3f, P: %.3f, R: %.3f, F1: %.3f] \",\r\n \t\t\teval.accuracy(), eval.precision(), eval.recall(), eval.f1()));\r\n \ttestWriter.write(eval.stats());\r\n \ttestWriter.write(eval.confusionToString());\r\n\r\n \t// Save test rates\r\n \tthis.f1_score = eval.f1();\r\n \tthis.recall_score = eval.recall();\r\n \tthis.accuracy_score = eval.accuracy();\r\n \tthis.precision_score = eval.precision();\r\n \tthis.falseNegativeRate_score = eval.falseNegativeRate();\r\n \tthis.falsePositiveRate_score = eval.falsePositiveRate();\r\n\r\n \tthis.f1.setText(\"F1 = \" + String.format(\"%.4f\", f1_score));\r\n \tthis.recall.setText(\"Recall = \" + String.format(\"%.4f\", recall_score));\r\n \tthis.accuracy.setText(\"Accuracy = \" + String.format(\"%.4f\", accuracy_score));\r\n \tthis.precision.setText(\"Precision = \" + String.format(\"%.4f\", precision_score));\r\n \tthis.falseNegativeRate.setText(\"False Negative Rate = \" + String.format(\"%.4f\", falseNegativeRate_score));\r\n \tthis.falsePositiveRate.setText(\"False Positive Rate = \" + String.format(\"%.4f\", falsePositiveRate_score));\r\n \r\n \ttestWriter.write(\"F1 = \" + String.format(\"%.4f\", f1_score));\r\n \ttestWriter.write(\"Recall = \" + String.format(\"%.4f\", recall_score));\r\n \ttestWriter.write(\"Accuracy = \" + String.format(\"%.4f\", accuracy_score));\r\n \ttestWriter.write(\"Precision = \" + String.format(\"%.4f\", precision_score));\r\n \ttestWriter.write(\"False Negative Rate = \" + String.format(\"%.4f\", falseNegativeRate_score));\r\n \ttestWriter.write(\"False Positive Rate = \" + String.format(\"%.4f\", falsePositiveRate_score));\r\n\r\n \tshowBarChart();\r\n \t} catch (IOException e) {\r\n \t\tSystem.err.println(\"Error while writing to log file\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "private void doBayesianClassification() {\n\t\tList<MutualInformation> mutualInformationList = new ArrayList<MutualInformation>();\r\n\t\tint k = 5;\r\n\t\tSystem.out.println(\"k = \" + k);\r\n\t\tdouble N = fileNames.size();\r\n\t\t\r\n\t\tList<Set<String>> classifiedDocsList = new ArrayList<Set<String>>();\r\n\t\tclassifiedDocsList.add(setOfHamiltonDocs);\r\n\t\tclassifiedDocsList.add(setOfMadisonDocs);\r\n\t\tclassifiedDocsList.add(setOfJayDocs);\r\n\t\t\r\n\t\tfor (String term : corpusVocab) {\r\n\r\n\t\t\t// All docs containing this term\r\n\t\t\tSet<String> matchingDocs = new HashSet<String>();\r\n\t\t\t\r\n\t\t\tfor (PositionalPosting posting : pInvertedIndex.getPostings(term)) {\r\n\t\t\t\tmatchingDocs.add(fileNames.get(posting.getDocumentId()));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// iterate through all classes (Hamilton, Madison, Jay)\r\n\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tSet<String> classifiedDocs = classifiedDocsList.get(i);\r\n\t\t\t\t\r\n\t\t\t\tSet<String> intersection = new HashSet<String>(matchingDocs);\r\n\t\t\t\tintersection.retainAll(classifiedDocs);\r\n\t\t\t\tdouble N11 = intersection.size();\r\n\t\t\t\t\r\n\t\t\t\tSet<String> difference = new HashSet<String>(matchingDocs);\r\n\t\t\t\tdifference.removeAll(classifiedDocs);\r\n\t\t\t\tdouble N10 = difference.size();\r\n\t\t\t\t\r\n\t\t\t\tdouble N01 = classifiedDocs.size() - N11;\r\n\t\t\t\tdouble N00 = fileNames.size() - classifiedDocs.size() - N10;\r\n\r\n\t\t\t\t// Calculate I(t,c)\r\n\t\t\t\tdouble Itc = (N11 / N) * log2((N * N11) / ((N11 + N10) * (N11 + N01)))\r\n\t\t\t\t\t\t+ (N01 / N) * log2((N * N01) / ((N01 + N00) * (N11 + N01)))\r\n\t\t\t\t\t\t+ (N10 / N) * log2((N * N10) / ((N11 + N10) * (N10 + N00)))\r\n\t\t\t\t\t\t+ (N00 / N) * log2((N * N00) / ((N01 + N00) * (N10 + N00)));\r\n\t\t\t\tif (!Double.isNaN(Itc)) {\r\n\t\t\t\t\tmutualInformationList.add(new MutualInformation(term, Itc));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Build Discriminating Set of vocab terms by sorting mutual information\r\n\t\t// list and keep the first k values\r\n\t\tSet<String> terms = new HashSet<String>();\r\n\t\tCollections.sort(mutualInformationList, Collections.reverseOrder());\r\n\t\tfor (int i = 0; i < k; i++) {\r\n\t\t\tterms.add(mutualInformationList.get(i).getTerm());\r\n\t\t}\r\n\t\t\r\n\t\t// get term counts in classified (trainer) docs\t\t\r\n\t\tint[] classifiedDocsTermFreq = new int[classifiedDocsList.size()];\r\n\t\t\r\n\t\tclassifiedDocsTermFreq[0] = getTermFreq(hamiltonDocs, terms);\r\n\t\tclassifiedDocsTermFreq[1] = getTermFreq(madisonDocs, terms);\r\n\t\tclassifiedDocsTermFreq[2] = getTermFreq(jayDocs, terms);\r\n\t\t\r\n\t\t// Calculate p(t|c)\r\n\t\t// maps term to list of p(t|c) for each class\r\n\t\tMap<String, List<Double>> ptc = new HashMap<String, List<Double>>();\r\n\t\t\r\n\t\tfor (String term : terms) {\r\n\t\t\tptc.put(term, new ArrayList<Double>());\r\n\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tint ftc = 0;\r\n\t\t\t\tfor (PositionalPosting posting : pInvertedIndex.getPostings(term)) {\r\n\t\t\t\t\tif (classifiedDocsList.get(i).contains(fileNames.get(posting.getDocumentId()))) {\r\n\t\t\t\t\t\tftc += posting.getPositions().size();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tptc.get(term).add((double) (ftc + 1) / (double) (classifiedDocsTermFreq[i] + terms.size()));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// visit each unclassified document\r\n\t\ttry {\r\n\t\t\tPath currentWorkingPath = Paths.get(toBeClassified).toAbsolutePath();\r\n\t\t\t// This is our standard \"walk through all .txt files\" code.\r\n\t\t\tFiles.walkFileTree(currentWorkingPath, new SimpleFileVisitor<Path>() {\r\n\r\n\t\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\r\n\t\t\t\t\t// make sure we only process the current working directory\r\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {\r\n\r\n\t\t\t\t\tif (file.toString().endsWith(\".txt\")) {\r\n\r\n\t\t\t\t\t\tTokenStream tokenStream = null;\r\n\t\t\t\t\t\t// terms in this document\r\n\t\t\t\t\t\tSet<String> docTerms = new HashSet<String>();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttokenStream = Utils.getTokenStreams(file.toFile());\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\twhile (tokenStream.hasNextToken()) {\r\n\t\t\t\t\t\t\tString token = Utils.processWord(tokenStream.nextToken().trim(), false);\r\n\t\t\t\t\t\t\tdocTerms.add(token);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// only keep terms in discriminating set\r\n\t\t\t\t\t\tdocTerms.retainAll(terms);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// calculate log(p(c) + sum(log(p(ti|c))) for each class\r\n\t\t\t\t\t\tdouble[] pce = new double[classifiedDocsList.size()];\r\n\t\t\t\t\t\tfor (int i = 0; i < classifiedDocsList.size(); i++) {\r\n\t\t\t\t\t\t\tdouble sum = 0;\r\n\t\t\t\t\t\t\tfor (String term : docTerms) {\r\n\t\t\t\t\t\t\t\tsum += Math.log(ptc.get(term).get(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpce[i] = Math.log(classifiedDocsTermFreq[i] / terms.size()) + sum;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (pce[0] > pce[1] && pce[0] > pce[2]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Hamilton\");\r\n\t\t\t\t\t\t} else if (pce[1] > pce[0] && pce[1] > pce[2]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Madison\");\r\n\t\t\t\t\t\t} else if (pce[2] > pce[0] && pce[2] > pce[1]) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Document : \" + file.getFileName().toString() + \" : belongs to Jay\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"I don't know whom document : \" + file.getFileName().toString() + \" : belongs to.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// don't throw exceptions if files are locked/other errors occur\r\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file, IOException e) {\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void computeConjunNum()\r\n\t{\n\t\tconjunNum = 0;\r\n\t\tfor (int i=0;i<lilyNum;i++)\r\n\t\t{\r\n\t\t\tboolean flag=false;\r\n\t\t\tfor (int j=0;j<refNum;j++)\r\n\t\t\t{\r\n\t\t\t\tif (refResult[j].sourceLabel.equals(lilyResult[i].sourceLabel) && \r\n\t\t\t\t\trefResult[j].targetLabel.equals(lilyResult[i].targetLabel) &&\r\n\t\t\t\t\t(refResult[j].relationType == lilyResult[i].relationType))\t\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\tconjunNum++;\r\n\t\t\t\t\tflag=true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!flag){\r\n\t\t\t\tSystem.out.println(\"错误:\"+lilyResult[i].sourceLabel+int2type(lilyResult[i].relationType)+lilyResult[i].targetLabel);\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tconjunNum = 0;\r\n\t\tfor (int i=0;i<refNum;i++)\r\n\t\t{\r\n\t\t\tboolean flag=false;\r\n\t\t\tfor (int j=0;j<lilyNum;j++)\r\n\t\t\t{\r\n\t\t\t\tif (refResult[i].sourceLabel.equals(lilyResult[j].sourceLabel) && \r\n\t\t\t\t\trefResult[i].targetLabel.equals(lilyResult[j].targetLabel) &&\r\n\t\t\t\t\t(refResult[i].relationType == lilyResult[j].relationType))\t\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\tconjunNum++;\r\n\t\t\t\t\tflag=true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!flag){\r\n\t\t\t\tSystem.out.println(\"遗漏:\"+refResult[i].sourceLabel+int2type(refResult[i].relationType)+refResult[i].targetLabel);\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }", "public static void main(String[] args)\n\t{\n\t\talg.ub.predictor.Predictor predictorUB = new alg.ub.predictor.Resnick();\n\t\talg.ub.neighbourhood.Neighbourhood neighbourhoodUB = new ThresholdNeighbourhood(20,0);\n\t\tSimilarityMetric metricUB = new HybridSim(0.4,0.5,0.1);\n\t\t\n\t\t// configure the Item-based CF algorithm - set the predictor, neighbourhood and similarity metric ...\n\t\tPredictor predictorIB = new Resnick();\n\t\tNeighbourhood neighbourhoodIB = new kNearestNeighbourhood(20);\n\t\tSimilarityMetric metricIB = new HybridSim(0.8,0.3,0.1);\n\n\t\t\n\t\t// set the paths and filenames of the item file, train file and test file ...\n\t\tString itemFile = \"ML dataset\" + File.separator + \"u.item\";\n\t\tString trainFile = \"ML dataset\" + File.separator + \"u.train\";\n\t\tString testFile = \"ML dataset\" + File.separator + \"u.test\";\n\t\t\n\t\t// set the path and filename of the output file ...\n\t\tString outputFile = \"results\" + File.separator + \"predictions.txt\";\n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////\n\t\t// Evaluates the CF algorithm:\n\t\t// - the RMSE (if actual ratings are available) and coverage are output to screen\n\t\t// - the output file is created\n\t\tDatasetReader reader = new DatasetReader(itemFile, trainFile, testFile);\n\t\t\n\t\tCFAlgorithm hbcf = new HybirdBasedCF(predictorIB, predictorUB, neighbourhoodIB, neighbourhoodUB, metricIB, metricUB, reader);\n\t\tEvaluator eval = new Evaluator(hbcf, reader.getTestData());\n\t\teval.writeResults(outputFile);\n\t\t\n\t\tDouble RMSE = eval.getRMSE();\n\t\tif(RMSE != null) System.out.println(\"RMSE: \" + RMSE);\n\t\t\n\t\tfor(int i = 1; i <= 5; i++)\n\t\t{\n\t\t\tRMSE = eval.getRMSE(i);\n\t\t\tif(RMSE != null) System.out.println(\"RMSE (true rating = \" + i + \"): \" + RMSE);\n\t\t}\n\t\t\n\t\tdouble coverage = eval.getCoverage();\n\t\tSystem.out.println(\"coverage: \" + coverage + \"%\");\n\t}", "public double computeMacroPrecision(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual precision values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computePrecision(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public int ClassLabel(double sample[]) {\n\t\t\n\t\tif(k_closest == null) {\n\t\t\tclass_label = Output(sample);\n\t\t\treturn class_label;\n\t\t}\n\t\t\n\t\tfloat min = Float.MAX_VALUE;\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tmin = Math.min(ptr.s.weight, min);\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tmin = Math.abs(min) + 1;\n\t\t\n\t\tfloat class_count[] = new float[]{0, 0, 0, 0};\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\t\n\t\t\tptr.s.norm_weight = (ptr.s.weight + min);\n\t\t\tSample s = ptr.s;\n\t\t\t\n\t\t\tint out = s.Classify(sample);\n\t\t\t\n\t\t\tswitch(out) {\n\t\t\t\tcase -2: class_count[0] += s.norm_weight; break;\n\t\t\t\tcase -1: class_count[1] += s.norm_weight; break;\n\t\t\t\tcase 1: class_count[2] += s.norm_weight; break;\n\t\t\t\tcase 2: class_count[3] += s.norm_weight; break;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfloat max = 0;\n\t\tint label_set[] = new int[]{-2, -1, 1, 2};\n\t\tclass_label = 0;\n\t\tfor(int i=0; i<4; i++) {\n\t\t\t\n\t\t\tif(class_count[i] > max) {\n\t\t\t\tmax = class_count[i];\n\t\t\t\tclass_label = label_set[i];\n\t\t\t}\n\t\t} \n\t\t\n\t\treturn class_label;\n\t}", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "private String getAmountOfAbsencePerClass(List<String> classNames)\n {\n String stringToPrint = \"\";\n\n for (String name : DifferentClasses)\n {\n if (Collections.frequency(classNames, name) != 0)\n {\n stringToPrint += name + \" (\" + Collections.frequency(classNames, name) + \")\\n\";\n }\n }\n return stringToPrint;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(Rule4(\"realize\"));\r\n\t\t\r\n\t\tSystem.out.println(ConsonantFrequency(\"re\"));\r\n\t \r\n\r\n\t\t \r\n\r\n\t}", "public FuzzyNodeClassif( String buffer, int nb_class ) throws Exception {\n super( buffer );\n this.nb_class = nb_class;\n // lecture du noeud\n this.Variables.add(new Integer(st.nextToken().trim()) ); // lecture de la classe majoritaire\n for( int i=0 ; i<nb_class ; i++ )\n this.Variables.add(new Double(st.nextToken().trim())); // lecture des effectifs par classe\n }", "int sizeOfClassificationArray();", "public void getProfileCounts(char[][] c, int j, int[] counts) {\n for (int i = 0; i < c.length; i++) {\n switch (c[i][j]) {\n case 'A':\n counts[0]++;\n break;\n case 'C':\n counts[1]++;\n break;\n case 'G':\n counts[2]++;\n break;\n case 'T':\n counts[3]++;\n break;\n }\n }\n }", "private static void mostOccur(int[] is) {\n\t\t\t\n\t\t\t\n\t\t\tMap<Integer, Integer> numberCount = new HashMap<>();\n\t\t\t\n\t\t\t\n\t\t\tfor (int i=0; i<is.length; i++ ) {\n\t\t\t\tif(null==numberCount.get(i)) {\n\t\t\t\tnumberCount.put(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnumberCount.put(i, numberCount.get(i) +1);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Iterator<Integer> it = numberCount.keySet().iterator();\n\t\t\tSet<Entry<Integer, Integer>> entries= numberCount.entrySet();\n\t\t\t\n\t\t\tint maxcount=1;\n\t\t\tint maxvalue = 0;\n\t\t\tfor(Entry<Integer, Integer> entry: entries) {\n\t\t\t\tif (entry.getValue()>maxcount) {\n\t\t\t\tmaxcount = entry.getValue();\n\t\t\t\tmaxvalue = entry.getKey();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(maxvalue == 0) {\n\t\t\t\tSystem.out.println(\"All numbers are same\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Most occurance\" + maxvalue + \"and count\" +maxcount);\n\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\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t}", "public int getOccurrences() {\n\t\treturn this.occurrenceFactors.size();\n\t}", "int getNumberOfFold();", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n int response [] = {1, 2, 5, 4, 3, 5, 2, 1, 3, 3, 1, 4, 3, 3, 3, 1 ,2, 3, 3, 2, 2};\n int frequency []=new int [6];\n\n for(int counter = 1; counter < response.length; counter++)\n {\n try\n {\n ++frequency[response[counter]];\n }\n catch (ArrayIndexOutOfBoundsException e)\n {\n System.out.println(e);\n\n System.out.printf(\" response[%d] = %d\\n\", counter, response[counter]);\n }\n }\n\n System.out.printf(\"%s%10s\\n\", \"Rating\", \"Frequency\");\n\n for(int rating = 1; rating < frequency.length; rating++)\n System.out.printf(\"%5d%10d\\n\", rating, frequency[rating]);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public int classify(String tweet){\n\t\t//Each word is classified indenpendtly, whichever one has the most wins. \n\t\tString [] parsedTweet = tweetStripper.parseTweet(tweet).split(\" \");\n\n\t\t//Compute the leading term of category probability:\n\t\tfloat[] catProb = new float[categories.length];\n\t\tint i = 0;\n\t\tfor(int cat : categories){\n\t\t\tcatProb[i] = category_count.get(cat).size()/(float)total_training_size;\n\t\t\ti++;\n\t\t}\n\n\t\t//Compute the number of times a word appears in all categories:\n\t\tHashMap<String, Integer> total_all_classes = new HashMap<String, Integer>();\n\t\tfor(String pt : parsedTweet){\n\t\t\tfor(int cat : categories){\n\t\t\t\tif(!total_all_classes.containsKey(pt)){\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\ttotal_all_classes.put(pt,category_count.get(cat).get(pt));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//What happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//If we've seen the word before:\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\tint additional = total_all_classes.get(pt) + category_count.get(cat).get(pt);\n\t\t\t\t\t\ttotal_all_classes.put(pt, additional);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//I'm skeptical if this will ever be execuated, but what happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Create something to hold the probabilities in\n\t\tfloat[] class_probability = new float[categories.length];\n\t\t//Initalize:\n\t\tfor(int c = 0; c < categories.length; c++){\n\t\t\tclass_probability[c] = 1;\n\t\t}\n\n\t\t//Compute the prodcut of the toals with priors and weights and assumed prob.\n\t\t//product of ( #word appears in all class * (#word appears in class c/#words in class c) )+ weight*assumed probability all divided by weight + #words appeared in all classes\n\t\tfor(int cat : categories){\n\t\t\tfor(String pt : parsedTweet){\n\t\t\t\tif(category_count.get(cat).containsKey(pt) && total_all_classes.containsKey(pt)){ \n\t\t\t\t\t//This is going to be a terribly long expression sadly.\n\t\t\t\t\tclass_probability[cat] *= ((total_all_classes.get(pt)*(category_count.get(cat).get(pt)/(float)category_count.get(cat).size())) + weight*assumed_prob)/(float)(weight + total_all_classes.get(pt));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Multiply the whole term by the leading term of catProb:\n\t\tfor(int cat : categories){\n\t\t\tclass_probability[cat] = catProb[cat]*class_probability[cat];\n\t\t}\n\n\t\t//Figure out which class/category is the highest and return the best fitting one.\n\t\tint bestFit = CAT_SAFE; //If can't figure, return that its SAFE? Dunno if this is the best choice\n\t\tfloat bestProb = -1;\n\t\tfor(int cat : categories){\n\t\t\tif(class_probability[cat] > bestProb){\n\t\t\t\tbestFit = cat;\n\t\t\t}\n\t\t\tSystem.out.println(class_probability[cat]);\n\t\t}\n\t\tSystem.out.println(bestProb < threshold);\n\t\tif(bestProb < threshold){\n\t\t\tbestFit = DEFAULT_CATEGORY;\n\t\t}\n\n\n\n\t\treturn bestFit;\n\n\t}", "public abstract int getCntFtc();", "public byte score() {\n\t\tbyte score = 0;\n\t\t\n\t\tfor (byte r = 0; r < b.length; r++) {\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tif (b[r][c].getSide()) {\n\t\t\t\t\tscore += (b[r][c]).getValue();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\tscore -= (b[r][c]).getValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn score;\n\t}", "private void updateCFRCFR(int num) {\r\n if (num < 0) {\r\n window.removeAllShapes();\r\n }\r\n else {\r\n State currentState = covidCalculator.getLL().get(num);\r\n ArrayList<Race> currentRacesSorted = covidCalculator.sortByCFR(\r\n currentState);\r\n\r\n for (int i = 0; i < currentRacesSorted.size(); i++) {\r\n String cfrPercentage = String.valueOf(currentRacesSorted.get(i)\r\n .getCFR());\r\n\r\n if (!cfrPercentage.equals(\"-1%\")) {\r\n TextShape cfrName = new TextShape(0, 0, cfrPercentage);\r\n cfrName.moveTo(barXPos + (spacingSize * spacingCounter),\r\n +barYPos + 25);\r\n window.addShape(cfrName);\r\n }\r\n spacingCounter++;\r\n }\r\n }\r\n lastStateMemory = num;\r\n spacingCounter = 1;\r\n }", "@Override\n\tpublic int showFrequency(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn hashArray[hashVal].frequency;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public void spearmansRankCorrelation(double cutoff, MWBMatchingAlgorithm mwbm) {\n double p = 0;\n\n SpearmansCorrelation t = new SpearmansCorrelation();\n\n // size has to be the same so we randomly sample the number of the smaller sample from\n // the big sample\n if (this.train.size() > this.test.size()) {\n this.sample(this.train, this.test, this.train_values);\n }\n else if (this.test.size() > this.train.size()) {\n this.sample(this.test, this.train, this.test_values);\n }\n\n // try out possible attribute combinations\n for (int i = 0; i < this.train.numAttributes(); i++) {\n for (int j = 0; j < this.test.numAttributes(); j++) {\n // negative infinity counts as not present, we do this so we don't have to map\n // between attribute indexs in weka\n // and the result of the mwbm computation\n mwbm.setWeight(i, j, Double.NEGATIVE_INFINITY);\n\n // class attributes are not relevant\n if (this.test.classIndex() == j) {\n continue;\n }\n if (this.train.classIndex() == i) {\n continue;\n }\n\n p = t.correlation(this.train_values.get(i), this.test_values.get(j));\n if (p > cutoff) {\n mwbm.setWeight(i, j, p);\n }\n }\n }\n }", "public abstract double score(\n\t\tdouble tf,\n\t\tdouble docLength,\n\t\tdouble n_t,\n\t\tdouble F_t,\n\t\tdouble keyFrequency);", "public void evaluate ( String predictionFileName ) \n\t\t\t\tthrows IOException\t\n\t{\n\t\tdouble MAE = 0.0, RMSE = 0.0;\n\t\tint countRatings = 0, countTotal = 0;\n\t\t\t\t\n\t\tBufferedWriter wr = new BufferedWriter(new FileWriter(predictionFileName));\n\t\tfor (Integer user : dao.getTestUsers())\t{\n\t\t\tfor (Integer item : dao.getTestItems(user))\t{\n\t\t\t\tcountTotal++;\n\t\t\t\tdouble P = predict(user, item);\n\t\t\t\t// A prediction of -INF is used to indicate that the prediction cannot be made\n\t\t\t\tif (P == Double.NEGATIVE_INFINITY)\n\t\t\t\t\tcontinue;\n\t\t\t\tcountRatings++;\n\t\t\t\tdouble R = dao.getTestRating(user, item);\n\t\t\t\tdouble tmp = P - R;\n\t\t\t\tMAE += Math.abs(tmp);\n\t\t\t\tRMSE += tmp * tmp;\n\t\t\t\twr.write(String.format(\"%d %d %f %f\\n\", user, item, R, P));\n\t\t\t}\n\t\t}\n\t\twr.flush();\n\t\twr.close();\n\n\t\tSystem.out.println(\"Recommender evaluation on test data...\");\n\t\tif (countRatings == 0)\n\t\t\tSystem.out.println(\"Coverage : 0%\");\n\t\telse {\n\t\t\tMAE /= countRatings;\n\t\t\tRMSE = Math.sqrt(RMSE / countRatings);\n\t\t\tSystem.out.printf(\"Coverage %f%%\\n\", (countRatings * 100.0) / countTotal);\n\t\t\tSystem.out.printf(\"MAE : %f\\n\", MAE);\n\t\t\tSystem.out.printf(\"RMSE : %f\\n\", RMSE);\n\t\t}\t\t\n\t}", "private PrecisionAndRecall() {\n\n }", "public double[][] coFactorFinder() {\n\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\n\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t\t/* co-factor: change signs.\n\t\t\t\t\t|+ - +|\n\t\t\t\t\t|- + -|\n\t\t\t\t\t|+ - +|\t */\n\t\t\t\tthis.coFactor = new double[this.singleMatrix.length][this.singleMatrix[i].length];\n\t\t\t\t\n\t\t\t\tthis.coFactor[0][0] = this.minor[0][0];\n\t\t\t\tthis.coFactor[0][1] = - this.minor[0][1];\n\t\t\t\tthis.coFactor[0][2] = this.minor[0][2];\n\t\t\t\tthis.coFactor[1][0] = - this.minor[1][0];\n\t\t\t\tthis.coFactor[1][1] = this.minor[1][1];\n\t\t\t\tthis.coFactor[1][2] = - this.minor[1][2];\n\t\t\t\tthis.coFactor[2][0] = this.minor[2][0];\n\t\t\t\tthis.coFactor[2][1] = - this.minor[2][1];\n\t\t\t\tthis.coFactor[2][2] = this.minor[2][2];\n\t\t\t\t\t\n\t\t\t}\n\t\t}\t\t\t\t\n\t\t//\tprint\n\t\t\tSystem.out.println(\"\\nCo-factor of the current matrix is: \");\n\t\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\t\t\t\n\t\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t \t\t\n\t\t\t\t\tSystem.out.print(String.format(\"%.2f\", coFactor[i][j]) + \" \");\t//display the result with a space between value representing as two decimal point\n\t\t\t\t}\n\t\t\tSystem.out.println();\t//a new line for the next row and cols\n\t\t\t}\n\t\treturn coFactor;\t//return co-factors\n\t\t}", "public void doValidation(int currentRound)\n {\n getData(currentRound);\n// System.out.println(\"training unterminated ones\");\n kMeans.setItems(trainingData.get(0));\n kMeans.k=k1;\n kMeans.init();\n List<Cluster> unterminatedClusters=kMeans.doCluster();\n for (int i=0;i<unterminatedClusters.size();i++)\n {\n unterminatedClusters.get(i).label=0;\n }\n \n// System.out.println(\"training terminated ones\");\n kMeans.setItems(trainingData.get(1));\n kMeans.k=k2;\n kMeans.init();\n List<Cluster> terminatedClusters=kMeans.doCluster();\n for (int i=0;i<terminatedClusters.size();i++)\n {\n terminatedClusters.get(i).label=1;\n }\n \n List<Cluster> clusters=new ArrayList<Cluster>();\n clusters.addAll(unterminatedClusters);\n clusters.addAll(terminatedClusters);\n kMeans.setClusters(clusters);\n int[] corrects=new int[2];\n int[] counts=new int[2];\n for (int i=0;i<2;i++)\n {\n corrects[i]=0;\n counts[i]=0;\n }\n for (Item item:testData)\n {\n int label=kMeans.getNearestCluster(item).label;\n counts[label]++;\n if (label==item.type)\n {\n corrects[item.type]++;\n }\n }\n correctness+=corrects[1]*1.0/counts[1];\n correctCount+=corrects[1];\n// for (int i=0;i<2;i++)\n// System.out.println(\"for type \"+i+\": \" +corrects[i]+\" correct out of \"+counts[i]+\" in total (\"+corrects[i]*1.0/counts[i]+\")\");\n }", "public int calculScore(Deck deck)\n {\n return 0;\n }" ]
[ "0.6430834", "0.6043389", "0.57063913", "0.56698716", "0.5534509", "0.5524444", "0.5423201", "0.5400251", "0.5394081", "0.5363681", "0.53577596", "0.52322036", "0.50878316", "0.50497955", "0.5045942", "0.49724886", "0.49240932", "0.49131477", "0.48853472", "0.48616526", "0.48391217", "0.48340237", "0.48001078", "0.47966316", "0.47769892", "0.4747305", "0.47404072", "0.46909925", "0.46887818", "0.4608342", "0.4599999", "0.45958588", "0.4585402", "0.45852673", "0.45781514", "0.4554572", "0.45484546", "0.45422757", "0.4541198", "0.4529024", "0.45257035", "0.45225206", "0.45216212", "0.45151502", "0.4513061", "0.4510947", "0.4500623", "0.44842637", "0.44755566", "0.4458455", "0.4427818", "0.44237438", "0.43978012", "0.43974194", "0.43934995", "0.4385158", "0.43813154", "0.43721053", "0.4367676", "0.43572038", "0.43544626", "0.4352105", "0.43469182", "0.43442854", "0.4324166", "0.4319384", "0.4311642", "0.43083236", "0.43024802", "0.42981404", "0.4296216", "0.4292799", "0.42717817", "0.42671704", "0.4264099", "0.42639887", "0.42634985", "0.42625836", "0.42550305", "0.42488173", "0.42478994", "0.42422152", "0.42415276", "0.42400435", "0.42243505", "0.42237905", "0.42157778", "0.42131191", "0.42054552", "0.4204926", "0.42019895", "0.41993052", "0.4198894", "0.41977316", "0.41886488", "0.4187018", "0.41854092", "0.41807348", "0.4180031", "0.41705886" ]
0.5950099
2
Computes the precision using confusion matrix cell frequencies.
public double computePrecision(Label classLabel){ double tp = this.computeTP(classLabel); //total number of predicted instances of class 'classLabel' double totalPredicted = this.sumRow(classLabel); return tp/totalPredicted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double computePrecision(int[][] paraPredicionMatrix) {\n double tempPrecision = 0.0;\n int tempTotal = 0;\n int temptempPrecisionCount = 0;\n for (int i = 0; i < paraPredicionMatrix.length; i++) {\n for (int j = 0; j < paraPredicionMatrix[i].length; j++) {\n if (paraPredicionMatrix[i][j] == 1) {\n tempTotal++;\n if (formalContext.testingFormalContext[i][j] > 0) {\n temptempPrecisionCount++;\n } // End if\n } // End if\n } // End for j\n } // End for i\n System.out.println(\"temptempPrecisionCount: \" + temptempPrecisionCount);\n System.out.println(\"tempTotal: \" + tempTotal);\n if (temptempPrecisionCount == 0) {\n return 0.0;\n } // End if\n tempPrecision = (temptempPrecisionCount + 0.0) / tempTotal;\n return tempPrecision;\n }", "public double computeMacroPrecision(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual precision values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computePrecision(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "int getPrecision(int iterations);", "public double calculatePrecision() {\n final long divisor = truePositive + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return truePositive / (double)divisor;\n }\n }", "double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}", "public double calculateP(DocumentSet Tc, DocumentSet Ac, DocumentSet TPc) {\r\n\r\n\t\tdouble precision = 0;\r\n\r\n\t\tif (Ac != null && Ac.getCardinality() != 0) {\r\n\t\t\tprecision = (double) TPc.getCardinality() / Ac.getCardinality();\r\n\t\t}\r\n\t\treturn precision;\r\n\t}", "public double getPrecision() {\n final int totalCount = getTrueErrorCount() + getFalseErrorCount();\n if (totalCount == 0) {\n return 1;\n } else {\n return getTrueErrorCount() / (double) totalCount;\n }\n }", "int getPrecision();", "int getPrecision();", "int getPrecision();", "public double computeAccuracy(){\n\n\t\t//count the totla number of predictions\n\t\tdouble total = sumAll();\n\n\t\tdouble truePredictions = 0;\n\t\t//iterate all correct guesses\n\t\tfor(Label l : labels){\n\t\t\ttruePredictions += this.computeTP(l);\n\t\t\t\n\t\t}\n\n\t\treturn truePredictions/(total);\n\n\t}", "void computePrecisionAndRecall(int paraLikeThreshold, int paraK, int paraN, double paraMax, double paraBelta,\n\t\t\tdouble paraGama) {\n\n\t\t// System.out.println(\"the uTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRateInds);\n\t\t// System.out.println(\"the uTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRatings);\n\t\t// System.out.println(\"the iTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRateInds);\n\t\t// System.out.println(\"the iTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRatings);\n\t\t// System.out.println(\"the uTeRateInds is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTeRateInds);\n\t\t// System.out.println(Arrays.toString(dataModel.uTeDgr));\n\n\t\tint tempSucRecLen = 0;\n\t\tint tempRecLen = 0;\n\t\tint tempLikeLen = 0;\n\t\tint tempCount = 0;\n\t\tdouble tempNDCG = 0;\n\t\tfor (int i = 0; i < dataModel.userNum; i++) {\n\t\t\t// System.out.println(\"the user is \" + i + \" , the length is \" +\n\t\t\t// dataModel.uTeRateInds[i].length);\n\t\t\tint[] tempRecLists = recommendListForOneUser(i, paraLikeThreshold, paraK, paraN, paraBelta, paraGama);\n\t\t\t// System.out.println(\"the reclist is \" + Arrays.toString(tempRecLists));\n\t\t\tint[] tempLikeLists = likeListForOneUser(i, paraLikeThreshold);\n\t\t\t// System.out.println(\"the likelist is \" + Arrays.toString(tempLikeLists));\n\t\t\tint[] tempInterSection = SetOperator.interSection(tempRecLists, tempLikeLists);\n\n\t\t\t// System.out.println(\"User \" + i + \" recommend lists: \");\n\t\t\t// SimpleTool.printIntArray(tempRecLists);\n\t\t\tif (tempInterSection != null) {\n\t\t\t\ttempSucRecLen = tempInterSection.length;\n\t\t\t\ttempRecLen = tempRecLists.length;\n\t\t\t\ttempLikeLen = tempLikeLists.length;\n\t\t\t\tif (tempRecLen > 1e-6) {\n\t\t\t\t\tprecision += (tempSucRecLen + 0.0) / tempRecLen;\n\t\t\t\t\ttempNDCG = computeNDCG(i, tempRecLists, paraMax);\n\t\t\t\t\tNDCG += tempNDCG;\n\t\t\t\t} // Of if\n\t\t\t\tif (tempLikeLen > 1e-6) {\n\t\t\t\t\trecall += (tempSucRecLen + 0.0) / tempLikeLen;\n\t\t\t\t} // Of if\n\t\t\t} else {\n\t\t\t\ttempCount++;\n\t\t\t\tcontinue;// Of if\n\t\t\t}\n\n\t\t} // Of for i\n\t\t\t// System.out.println(\"the count is: \" + tempCount);\n\t\tprecision = precision / (dataModel.userNum - tempCount);\n\t\trecall = recall / (dataModel.userNum - tempCount);\n\t\tNDCG = NDCG / (dataModel.userNum - tempCount);\n\t}", "protected abstract List<ConfusionMatrix> calcConfusions();", "double computeRecall(int[][] paraPredicionMatrix) {\n double tempRecall = 0.0;\n int tempTotal = 0;\n int tempAccurate = 0;\n for (int i = 0; i < paraPredicionMatrix.length; i++) {\n for (int j = 0; j < paraPredicionMatrix[i].length; j++) {\n if (formalContext.testingFormalContext[i][j] > 0) {\n tempTotal++;\n if (paraPredicionMatrix[i][j] == 1) {\n tempAccurate++;\n } // End if\n } // End if\n } // End for j\n } // End for i\n System.out.println(\"tempAccurate: \" + tempAccurate);\n System.out.println(\"tempTotal: \" + tempTotal);\n if (tempAccurate == 0) {\n return 0.0;\n } // End if\n tempRecall = (tempAccurate + 0.0) / tempTotal;\n return tempRecall;\n }", "public void calculateProbabilities(){\n\t}", "Object getPrecision();", "Object getPrecision();", "public double[][] fetchConfusionMatrix() \n\t{\n int[] rowSum = new int[10];\n double[][] CM = new double[10][10];\n \n for (int i = 0; i < 10; i++) \n {\n for (int j = 0; j < 10; j++) \n {\n rowSum[i] = rowSum[i] + confMatrix[i][j];\n }\n }\n\n for (int i = 0; i < 10; i++) \n {\n for (int j = 0; j < 10; j++) \n {\n CM[i][j] = 1.00 * confMatrix[i][j] / rowSum[i];\n }\n }\n return CM;\n }", "int getNumIterations(int precision);", "public int getPrecision() {\r\n return precision;\r\n }", "public interface PrecisionProvider {\n\n /**\n * Returns the number of digits that can be calculated precisely with a given amount of iterations.\n *\n * @param iterations The number of iterations you want to calculate\n * @return The number of digits that will be calculated correctly\n */\n int getPrecision(int iterations);\n\n /**\n * Calculates the number of iterations required for the specified level of precision. More information:\n * https://mathoverflow.net/q/261162/146822\n *\n * @param precision The level of precision you want to calculate.\n * @return The number of iterations required\n */\n int getNumIterations(int precision);\n}", "public int getPrecision() {\n return precision_;\n }", "public double getAccuracy(){\n return (numOfHits/numOfGuesses);\n }", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "public int getPrecision() {\n return precision_;\n }", "public Precision() {\n\t\tthis.threshold = 1.0;\n\t}", "public double calculateFact() {\n\t\tdouble rootTwoPi = 2.5071326821120348744018252306904d;\n\t\treturn Math.log10(rootTwoPi) + (numForFact+0.5)*Math.log10(numForFact) - Math.log10(numForFact);\n\t}", "public Integer getPrecision() {\n return _precision;\n }", "public Integer getPrecision() {\n return _precision;\n }", "protected boolean testPrecision ()\n {\n double precision = relativePrecision / (1.0 + relativePrecision);\n \n /******************************************************\n * Check the relative precision\n */\n double relPrecision = agentStat.confidence () / agentStat.mean ();\n\n trc.show (\"testPrecision\", \" precision = \" + precision +\n \" relPrecision = \" + relPrecision);\n\n if (numMeans < 2) {\n return false;\n } else { \n return relPrecision <= precision;\n } // if\n\n }", "private PrecisionAndRecall() {\n\n }", "public double calculateFScore() {\n final double divisor = calculatePrecision() + calculateRecall();\n if(divisor == 0) {\n return 0.0;\n } else {\n return 2 * ((calculatePrecision() * calculateRecall()) / (calculatePrecision() + calculateRecall()));\n }\n }", "public double getNumberOfCorrectlyClassified() {\n\t\treturn numberOfTruePositives + numberOfTrueNegatives;\n\t}", "@Override\n public float getPrecision() {\n return 0.09F;\n }", "private void evaluateProbabilities()\n\t{\n\t}", "private static int[][] getConfusionMatrix(List<CSVAttribute[]> predictedTestData,\n List<CSVAttribute[]> validationData, int labelAttribute) {\n\n int[][] result = new int[][]{{0,0},{0,0}};\n\n for (int j = 0; j < predictedTestData.size(); j++) {\n CSVAttribute predictedLabel = predictedTestData.get(j)[labelAttribute];\n CSVAttribute realLabel = validationData.get(j)[labelAttribute];\n if (predictedLabel.equals(realLabel) && predictedLabel.getValue().equals(\"1\")) result[0][0]++; // tp\n if (!predictedLabel.equals(realLabel) && predictedLabel.getValue().equals(\"1\")) result[0][1]++; // fp\n if (!predictedLabel.equals(realLabel) && predictedLabel.getValue().equals(\"0\")) result[1][0]++; // fn\n if (predictedLabel.equals(realLabel) && predictedLabel.getValue().equals(\"0\")) result[1][1]++; // tn\n }\n\n return result;\n }", "public void print_metrics(){\n\t\tHashMap<Integer, HashSet<Integer>> pairs=return_pairs();\n\t\tint total=gold.data.getTuples().size();\n\t\ttotal=total*(total-1)/2;\n\t\tSystem.out.println(\"Reduction Ratio is: \"+(1.0-(double) countHashMap(pairs)/total));\n\t\tint count=0;\n\t\tfor(int i:pairs.keySet())\n\t\t\tfor(int j:pairs.get(i))\n\t\t\tif(goldContains(i,j))\n\t\t\t\tcount++;\n\t\tSystem.out.println(\"Pairs Completeness is: \"+(double) count/gold.num_dups);\n\t}", "private double getConcessionFactor() {\n\t\treturn CONCESSIONFACTOR;\n\t}", "private void updatePrecisionAndRecallAndAp(List<ScoreRetrieval> results, List<QuerieDocRelevance> queryRelevance){\n List<Double> precisionQuerieAP = new ArrayList<>();\n List<Double> precisionQuerieAPRankedTop = new ArrayList<>();\n int tp=0;\n int fp=0;\n int fn=0;\n int cont=0;\n int rankMax=10;\n \n //results.stream().map(ScoreRetrieval::getDocId).filter( docId -> querieRelevance.contains(docId)).mapToInt(List::size).sum();\n \n for(ScoreRetrieval result : results){\n if(queryRelevance.stream().filter(o -> o.getDocID()==result.getDocId()).findFirst().isPresent()){ \n tp++;\n precisionQuerieAP.add(tp/(double)(tp+fp));\n if(cont<rankMax){\n precisionQuerieAPRankedTop.add(tp/(double)(tp+fp));\n }\n }else{\n fp++;\n }\n cont++;\n }\n if(precisionQuerieAP.isEmpty()){\n apRes.add(0.0);\n }else{\n apRes.add(precisionQuerieAP.stream().mapToDouble(d->d).sum()/precisionQuerieAP.size());\n }\n if(precisionQuerieAPRankedTop.isEmpty()){\n apResRankedTopLimited.add(0.0);\n }else{\n apResRankedTopLimited.add(precisionQuerieAPRankedTop.stream().mapToDouble(d->d).sum()/precisionQuerieAPRankedTop.size());\n }\n \n \n for(QuerieDocRelevance querieRel : queryRelevance){\n if(!(results.stream().filter(q -> q.getDocId()==querieRel.getDocID()).findFirst().isPresent())){\n fn++; \n }\n }\n \n precision.add(tp/(double)(tp+fp));\n recall.add(tp/(double)(tp+fn));\n }", "public double testAccuracy() {\r\n\t\tdouble accuracy = 0;\r\n\t\tint i = 0;\r\n\t\tdouble split = ((float)dataEntries.size()/(float)100)*70;\r\n\t\t\r\n\t\t//Filling arrays with the correct and predicted results to compare.\r\n\t\tfor (i=(int)split; i<dataEntries.size(); i++) {\r\n\t\t\t\tEntry en = dataEntries.get(i);\r\n\t\t\t\tcorrectArray.add(en.getHasCOVID19());\r\n\t\t\t\tdouble diagnosis = calcProbs(new Entry(en.getTemperature(), en.getAches(), en.getCough(), en.getSoreThroat(), en.getSoreThroat()));\r\n\t\t\t\tif (diagnosis>0.5) { predictArray.add(\"yes\"); }\r\n\t\t\t\telse { predictArray.add(\"no\"); }\r\n\t\t}\r\n\t\t\r\n\t\t//Comparing the results of \"hasCOVID19\" to each other.\r\n\t\tfor(i=0;i<correctArray.size();i++) {\r\n\t\t\tif (correctArray.get(i).equals(predictArray.get(i))) {\r\n\t\t\t\taccuracy++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\taccuracy /= correctArray.size();\r\n\t\treturn accuracy * 100;\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 }", "public float evaluate(PhraseInfo p) {\n int numChords = p.gen.prog.get(p.gen.progIndex).size();\n int tn = Math.min(phraseLen, (int)Math.round(targetNotes * ((numChords + 1) / 3.0))); // not directly proportional.\n // scores: 50, 49, 46, 41, 34, 25 etc.\n int score = Math.max(0, 50 - (int)Math.round(Math.pow(Math.abs(p.noteCount - tn), 2)));\n return (float)Math.min(1.0f, score/50.0f);\n }", "public double calculateAccuracy() {\n final long divisor = truePositive + trueNegative + falsePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return (truePositive + trueNegative) / (double)divisor;\n }\n }", "public double getRelativePrecision ()\n {\n return relativePrecision;\n\n }", "public static void relprecision() throws IOException \n\t{\n\t \n\t\t\n\t\tMap<String,Map<String,List<String>>> trainset = null ; \n\t\t//Map<String, List<String>> titles = ReadXMLFile.ReadCDR_TestSet_BioC() ;\n\t File fFile = new File(\"F:\\\\eclipse64\\\\data\\\\labeled_titles.txt\");\n\t // File fFile = new File(\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelation\");\n\t List<String> sents = readfiles.readLinesbylines(fFile.toURL());\n\t\t\n\t\tSentinfo sentInfo = new Sentinfo() ; \n\t\t\n\t\t//trainset = ReadXMLFile.DeserializeT(\"F:\\\\eclipse64\\\\eclipse\\\\TrainsetTest\") ;\n\t\tLinkedHashMap<String, Integer> TripleDict = new LinkedHashMap<String, Integer>();\n\t\tMap<String,List<Integer>> Labeling= new HashMap<String,List<Integer>>() ;\n\t\t\n\t\tMetaMapApi api = new MetaMapApiImpl();\n\t\tList<String> theOptions = new ArrayList<String>();\n\t theOptions.add(\"-y\"); // turn on Word Sense Disambiguation\n\t theOptions.add(\"-u\"); // unique abrevation \n\t theOptions.add(\"--negex\"); \n\t theOptions.add(\"-v\");\n\t theOptions.add(\"-c\"); // use relaxed model that containing internal syntactic structure, such as conjunction.\n\t if (theOptions.size() > 0) {\n\t api.setOptions(theOptions);\n\t }\n\t \n\t\t\n\t\t\n\t\t\n\t\tint count = 0 ;\n\t\tint count1 = 0 ;\n\t\tModel candidategraph = ModelFactory.createDefaultModel(); \n\t\tMap<String,List<String>> TripleCandidates = new HashMap<String, List<String>>();\n\t\tList<String> statements= new ArrayList<String>() ;\n\t\tList<String> notstatements= new ArrayList<String>() ;\n\t\tDouble TPcount = 0.0 ; \n\t\tDouble FPcount = 0.0 ;\n\t\tDouble NonTPcount = 0.0 ;\n\t\tDouble TPcountTot = 0.0 ; \n\t\tDouble NonTPcountTot = 0.0 ;\n\t\tfor(String title : sents)\n\t\t{\n\t\t\t\n\t\t\tif (title.contains(\"<YES>\") || title.contains(\"<TREAT>\") || title.contains(\"<DIS>\") || title.contains(\"</\"))\n\t\t\t{\n\t\t\t\n\t\t\t\tBoolean TP = false ; \n\t\t\t\tBoolean NonTP = false ;\n\t if (title.contains(\"<YES>\") && title.contains(\"</YES>\"))\n\t {\n\t \t TP = true ; \n\t \t TPcountTot++ ; \n\t \t \n\t }\n\t else\n\t {\n\t \t NonTP = true ; \n\t \t NonTPcountTot++ ; \n\t }\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\ttitle = title.replaceAll(\"<YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<DIS>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</DIS>\", \" \") ;\n\t\t\t\ttitle = title.toLowerCase() ;\n\t\n\t\t\t\tcount++ ; \n\t\n\t\t\t\t// get the goldstandard concepts for current title \n\t\t\t\tList<String> GoldSndconcepts = new ArrayList<String> () ;\n\t\t\t\tMap<String, Integer> allconcepts = null ; \n\t\t\t\t\n\t\t\t\t// this is optional and not needed here , it used to measure the concepts recall \n\t\t\t\tMap<String, List<String>> temptitles = new HashMap<String, List<String>>(); \n\t\t\t\ttemptitles.put(title,GoldSndconcepts) ;\n\t\t\t\t\t\t\t\n\t\t\t\t// get the concepts \n\t\t\t\tallconcepts = ConceptsDiscovery.getconcepts(temptitles,api);\n\t\t\t\t\n\t\t\t\tArrayList<String> RelInstances1 = SyntaticPattern.getSyntaticPattern(title,allconcepts,dataset.FILE_NAME_Patterns) ;\n\t\t\t\t//Methylated-CpG island recovery assay: a new technique for the rapid detection of methylated-CpG islands in cancer\n\t\t\t\tif (RelInstances1 != null && RelInstances1.size() > 0 )\n\t\t\t\t{\n\t\t\t\t\tTripleCandidates.put(title, RelInstances1) ;\n\t\t\t\t\tReadXMLFile.Serialized(TripleCandidates,\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelationdisc\") ;\n\t\t\t\t\t\n\t\t\t if (TP )\n\t\t\t {\n\t\t\t \t TPcount++ ; \n\t\t\t \t \n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \t FPcount++ ; \n\t\t\t }\n\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t notstatements.add(title) ;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t\tint i = 0 ;\n\t\ti++ ; \n\t}", "public double getPrize();", "float getSpecialProb();", "private Map<String, Map<String, Integer>> computeConfusionMatrix(List<String> sentences, List<String> targets) {\r\n Map<String, Map<String, Integer>> confusionMap = new HashMap<>();\r\n // initialize the map (confusion matrix) of occurrences to be all zeros\r\n for (String trueCategory : categories) {\r\n Map<String, Integer> subConfusionMap = new HashMap<>();\r\n for (String predictedCategory : categories) {\r\n subConfusionMap.put(predictedCategory, 0);\r\n }\r\n confusionMap.put(trueCategory, subConfusionMap);\r\n }\r\n\r\n List<String> predictions = predict(sentences);\r\n for (int i = 0; i < sentences.size(); i++) {\r\n String trueCategory = targets.get(i);\r\n String predictedCategory = predictions.get(i);\r\n Map<String, Integer> subConfusionMap = confusionMap.get(trueCategory);\r\n subConfusionMap.put(predictedCategory, subConfusionMap.get(predictedCategory) + 1);\r\n }\r\n return confusionMap;\r\n }", "@Override\n\tpublic ConfusionMatrix calculate_confusion_matrix(Instance[] testData) {\n\n\t\t// Count the true positives, true negatives, false positives, false negatives\n\t\tint TP, FP, FN, TN;\n\t\tTP = 0;\n\t\tFP = 0;\n\t\tFN = 0;\n\t\tTN = 0;\n\n\t\tfor (Instance ins : testData) {\n\t\t\t// if True SPORTS\n\t\t\tif (ins.label == Label.SPORTS) {\n\t\t\t\t// if TP\n\t\t\t\tif (classify(ins.words).label == Label.SPORTS) {\n\t\t\t\t\tTP += 1;\n\t\t\t\t}\n\t\t\t\t// else FN\n\t\t\t\telse {\n\t\t\t\t\tFN += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if True BUSINESS\n\t\t\telse {\n\t\t\t\t// if TN\n\t\t\t\tif (classify(ins.words).label == Label.BUSINESS) {\n\t\t\t\t\tTN += 1;\n\t\t\t\t}\n\t\t\t\t// else FP\n\t\t\t\telse {\n\t\t\t\t\tFP += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ConfusionMatrix(TP, FP, FN, TN);\n\t}", "private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }", "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 }", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "private HashMap<String, int[] > getAttrClassRatio ( ArrayList<String> alCalcAttr, ArrayList<String> alClasAttr ) {\r\n\t\tHashMap< String, int[] > attrClassRatioMap = new HashMap<String, int[] >();\r\n\t\tString classA = alClasAttr.get(0);\r\n\t\tfor ( int i = 0; i < alCalcAttr.size(); i++ ) {\r\n\t\t\tString attr = alCalcAttr.get(i);\r\n\t\t\tString classification = alClasAttr.get(i);\r\n\t\t\tif ( !attrClassRatioMap.containsKey(attr) ) {\r\n\t\t\t\tattrClassRatioMap.put( attr, new int[2] );\r\n\t\t\t}\r\n\t\t\tif ( classA.equals( classification ) ) {\r\n\t\t\t\tint[] classCount = attrClassRatioMap.get( attr );\r\n\t\t\t\t++classCount[0];\r\n\t\t\t\tattrClassRatioMap.put( attr, classCount );\r\n\t\t\t} else {\r\n\t\t\t\tint[] classCount = attrClassRatioMap.get( attr );\r\n\t\t\t\t++classCount[1];\r\n\t\t\t\tattrClassRatioMap.put( attr, classCount );\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn attrClassRatioMap;\r\n\t}", "private int getPrize(int matchingNumbersCount)\r\n\t{\r\n\t\tswitch(matchingNumbersCount)\r\n\t\t{\r\n\t\tcase 3:\r\n\t\t\treturn 25;\r\n\t\tcase 4:\r\n\t\t\treturn 100;\r\n\t\tcase 5:\r\n\t\t\treturn 1000;\r\n\t\tcase 6:\r\n\t\t\treturn 1000000;\r\n\t\tdefault:\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "int getPrecision(Object elementID) throws Exception;", "private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }", "private double calcuCMetric() {\n\t\treturn (p-1)/fcost;\n\t}", "public int getPrecision() { \n\t\tString bigdRep = this.getValue().toPlainString(); // wth?\n\t\tint precision = bigdRep.length();\n\t\tprecision = precision - bigdRep.lastIndexOf('.');\n\t\treturn precision;\n\t}", "public static void CaliculatePRcontr(Configuration conf, long cnt) throws Exception { \n\n\t\t// cntTotal\n\t\tconf.setLong(\"count\", cnt);\n\t\tJob job = new Job(conf, \"ceate matrix\");\n\n\t\tjob.setJarByClass(PageRank.class);\n\t\tjob.setMapperClass(PRcontrMapper.class);\n\t\tjob.setReducerClass(Reducer.class);\n\t\t//\t\tjob.setMapOutputKeyClass(Text.class);\n\t\t//\t\tjob.setMapOutputValueClass(UrlTypeAndPosition.class);\n\t\tjob.setOutputKeyClass(NullWritable.class);\n\t\tjob.setOutputValueClass(Matrix_XY_PRcontribution.class);\n\t\tFileInputFormat.addInputPath(job, new Path(\"createMatrixOutput/part-r-00000\"));\n\t\tFileOutputFormat.setOutputPath(job,new Path(\"createDangMatrixDangOutput\"));\n\t\tMultipleOutputs.addNamedOutput(job, \"MandD\", TextOutputFormat.class, NullWritable.class, Text.class);\n\t\tMultipleOutputs.addNamedOutput(job, \"R\", TextOutputFormat.class, NullWritable.class, Text.class);\n\n\n\n\n\t\tjob.waitForCompletion(true);\n\t}", "private Double calculateConfidence(final List<Order> orders, final Association association) {\n\t\tdouble leftSupport = 0;\n\n\t\tfor (Order order : orders) {\n\t\t\tif (order.getItems().containsAll(association.getLeft())) {\n\t\t\t\tleftSupport++;\n\t\t\t}\n\t\t}\n\n\t\tif (leftSupport > 0) {\n\t\t\treturn association.getSupport() / (leftSupport / orders.size());\n\t\t}\n\n\t\treturn 0d;\n\t}", "double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}", "public Integer getFrequency(Label prediction, Label real){\n\n\t\tint rowIx = resolveIndex(prediction);\n\t\tint colIx = resolveIndex(real);\n\n\n\t\treturn matrix.get(rowIx).get(colIx);\n\t}", "private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }", "public void calcP() {\r\n\t\tthis.setP(sick/people.size());\r\n\t}", "@Override\n public String toString() {\n final String lineSeparator = System.getProperty(\"line.separator\");\n return new StringBuilder(\"TableOfConfusion\").append(lineSeparator)\n .append(\"precision: \").append(calculatePrecision()).append(lineSeparator)\n .append(\"recall: \").append(calculateRecall()).append(lineSeparator)\n .append(\"specificity: \").append(calculateSpecificity()).append(lineSeparator)\n .append(\"accuracy: \").append(calculateAccuracy()).append(lineSeparator)\n .append(\"fscore: \").append(calculateFScore()).append(lineSeparator)\n .toString();\n }", "@Test\n public void testOneUserTrecevalStrategyMultipleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 2.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "private void calcaluteFeaturePrecisionRecall(Block b, File xmiblockFolder, int numberOfBlocks) {\n\t\tSystem.out.println(\" calcalute Precision Recall for block : \"+b.getName());\n\n\t\tFile[] distributions = getDistributionsContainingBlock(b);\n\t\t\n\t\tVector<File> remainingDistributions = getDistributionsNotContainingBlock(distributions,AdaptedModelManager.getAdaptedModel().getOwnedAdaptedArtefacts());\n\n\t\t FeatureIdentificationEvaluation featureIdentEval =new FeatureIdentificationEvaluation();\n\t\t List<File> eclipseFeatures =null;\n\t\t \n\t\t \n\t\t\teclipseFeatures = featureIdentEval.getCommonEclipseFeatures(distributions, oldCommonFeatures,remainingDistributions );\n\t\t\t\n\t\t\t// save them here to be excluded the next evaluation (for another block)\n\t\t oldCommonFeatures.addAll(eclipseFeatures);\n\t\t \n\t\t \n\t\t\t File[] eclipseFeaturesArray = new File[eclipseFeatures.size()];\n\t\t\t int j=0;\n\t\t//\t System.out.println(\"common features : \");\n\t\t\t for (File file : eclipseFeatures) {\n\t//\t\t\t System.out.println(file.getName());\n\t\t\t\t eclipseFeaturesArray[j++] = file;\n\t\t\t }\n\t\t\t\t File but4reuseFeature = xmiblockFolder.listFiles()[0]; // TODO get file with same name as block name\n if(but4reuseFeature.exists() && ! but4reuseFeature.isDirectory() && but4reuseFeature.getName().endsWith(\".xmi\")){\n\t\t\t\t\t featureIdentEval.calculateRecallAndPrecision( but4reuseFeature, eclipseFeaturesArray);\n\t\t\t\t\t \n\t\t\t\t\t precisionValues.put(b, featureIdentEval.getPrecision());\n\t\t\t\t\t recallValues.put(b, featureIdentEval.getRecall()) ;\n\t\t\t\t\t truePositiveValues.put(b, featureIdentEval.getTruePositives());\n\t\t\t\t\t falseNegativeValues.put(b, featureIdentEval.getFalseNegatives());\n\t\t\t\t\t falsePositiveValues.put(b, featureIdentEval.getFalsePositives());\n }\n \n\n\t}", "public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "public float getAccuracy() {\n return this.accuracy;\n }", "public int computeFP(Label classLabel){\n\n\t\tint tp = this.computeTP(classLabel);\n\t\t//the total number of predictions that guess 'classLabel'\n\t\tint totalPredictions = this.sumRow(classLabel);\n\n\t\treturn totalPredictions - tp;\n\n\t}", "@Override\r\n\tpublic Double getPropensity_familyproins_score() {\n\t\treturn super.getPropensity_familyproins_score();\r\n\t}", "public void calculatePF() {\r\n\t\tfloat pfRate = 10.5f;\r\n\t\tSystem.out.println(\"The PF rate of the employee is \"+pfRate);\r\n\t\tdisplay();\r\n\t}", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "double countMisclassifications(Matrix features, Matrix labels)\r\n {\r\n if(features.rows() != labels.rows())\r\n throw new IllegalArgumentException(\"Illegal Argument Exception Created!!\");\r\n\tdouble mis = 0;\r\n for(int i = 0; i < features.rows(); i++)\r\n\t{\r\n Vec feat = features.row(i);\r\n Vec pred = predict(feat);\r\n Vec lab = labels.row(i);\r\n\r\n for(int j = 0; j < lab.size(); j++){\r\n \r\n if(pred.get(j) != lab.get(j))\r\n mis++;\r\n }\r\n\t}\r\n // System.out.println(\"mis \" + mis);\r\n // System.out.println(\"rowcol \" + (labels.rows()*labels.cols()));\r\n\r\n double misclassifictionRate = 100.0*(mis/(labels.rows()*labels.cols()));\r\n return misclassifictionRate;\r\n }", "public double computeSupport(double N) {\r\n\t\treturn counter / N;\r\n\t}", "float getConfidence();", "public static void main(String[] args) throws Exception {\n\t\tint i;\r\n\t\tint [][]preci_recall = new int [5][6]; \r\n\r\n\t\tNGRAM ngram = new NGRAM();\r\n\t\t\r\n\t\tfor(i=0; i<5; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println((i+1) + \" th FOLD IS A TEST SET\");\r\n\t\t\t\r\n\t\t\tdouble[][] test_ngram_features = ngram.feature(i,1);\r\n\t\t\tdouble[][] train_ngram_features = ngram.feature(i,0);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"NGRAM FEATURES...OK\");\r\n\t\r\n//\t\t\t\r\n//\t\t\tLIWC liwc = new LIWC();\r\n//\t\t\t\r\n//\t\t\tdouble[][] test_liwc_features = liwc.feature(i,1,test_ngram_features.length);\r\n//\t\t\tdouble[][] train_liwc_features = liwc.feature(i,0,train_ngram_features.length);\r\n//\r\n//\t\t\tSystem.out.println(\"LIWC FEATURES..OK\");\r\n//\t\t\t\r\n//\t\t\tCOMBINE combine = new COMBINE();\r\n//\t\t\tdouble[][] train_features = combine.sum(train_liwc_features,train_ngram_features);\r\n//\t\t\tdouble[][] test_features = combine.sum(test_liwc_features,test_ngram_features);\r\n//\t\t\t\r\n//\t\t\tSystem.out.println(\"COMBINE...OK\");\r\n\t\t\r\n\t\t\tSVMLIGHT svmlight = new SVMLIGHT();\r\n\t\t\tpreci_recall[i]=svmlight.calcc(train_ngram_features, test_ngram_features);\r\n\r\n\t\t}\r\n\t\t\r\n//\t 0 : truthful TP\r\n//\t 1 : truthful TP+FP\r\n//\t 2 : truthful TP+FN\r\n//\t 3 : deceptive TP\r\n//\t 4 : deceptive TP+FP\r\n//\t 5 : deceptive TP+FN\r\n\t\t\r\n\t\tint truthful_TP_sum=0,truthful_TPFP_sum=0,truthful_TPFN_sum=0;\r\n\t\tint deceptive_TP_sum=0,deceptive_TPFP_sum=0,deceptive_TPFN_sum=0;\r\n\t\t\r\n\t\tfor(i=0;i<5;i++) {\r\n\t\t\ttruthful_TP_sum+=preci_recall[i][0];\r\n\t\t\ttruthful_TPFP_sum+=preci_recall[i][1];\r\n\t\t\ttruthful_TPFN_sum+=preci_recall[i][2];\r\n\t\t\t\r\n\t\t\tdeceptive_TP_sum+=preci_recall[i][3];\r\n\t\t\tdeceptive_TPFP_sum+=preci_recall[i][4];\r\n\t\t\tdeceptive_TPFN_sum+=preci_recall[i][5];\r\n\t\t}\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"\\n\\nTRUTHFUL_TP_SUM : \" + truthful_TP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFP_SUM : \" + truthful_TPFP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFN_SUM : \" + truthful_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE_TP_SUM : \" + deceptive_TP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFP_SUM : \" + deceptive_TPFP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFN_SUM : \" + deceptive_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nTRUTHFUL PRECISION : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFP_sum));\r\n\t\tSystem.out.println(\"TRUTHFUL RECALL : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFN_sum));\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE PRECISION : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFP_sum));\r\n\t\tSystem.out.println(\"DECEPTIVE RECALL : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFN_sum));\r\n\t\t\r\n\r\n\t}", "public abstract double score(double tf, double docLength, double precomp);", "public static int fastClassify(Model M, int[][] x){\n //dont call other classes\n\t //look out for terms that you can take out\n//\t int d =0;\n//\t double joint;\n//\t double t= 1.0;\n//\t\tdouble high;\n//\t\t//Double tot1;\n//\t\tdouble higher;\n//\t\tdouble tot =1.0;\n//\t\tdouble tot1= 1.0;\n//\t int digit =0;\n//\t for(int i=0; i<x.length; i++){\n//\t\tfor(int j=0;j<x[i].length; j++){\n//\n//\t\t//probability at 0;\n//\t\t\ttot*=conditionalProbabilityXijgD(M,i,j,x[i][j],0); \n//\t\t \n//\t\t high = M.getPD(0)*tot;\n//\t\t\twhile(d<10){\n//\t\t\t\ttot1*=conditionalProbabilityXijgD(M,i,j,x[i][j],d); \n//\t\t\t\thigher = M.getPD(d)*tot1;\n//\t\t\t\t\n//\t\t\t\tif(high <higher){\n//\t\t\t\t\thigh = higher;\n//\t\t\t\t\tdigit =d;\n//\t\t\t\t}\n//\t\t\t\td++;\n//\t\t\t}\n//\t\t \n//\t }\n//\t \n//\t }\n\t double high=0.0;\n\t int digit =0;\n\t int i=0;\n\t while(i<10){\n\t\t double tot =jointProbabilityXD(M,x,i);\n\t \t\n\t if(high<tot){\n\t\t high=tot;\n\t \t\tdigit =i; \n\t \t}\n\t\t i++;\n\t \t//System.out.println(0.988809344056389 < 0.011080326918292818);\n\t \n\t\t// System.out.println(tot);\n\t }\n\t return digit;\n\t \n \n}", "public Double testperf(Integer userId, Profile testProfile, List<Integer> recs, Integer k) {\n\t\t\n\t\tDouble prec = 0.0;\n\t\tInteger numTestItems = 0;\n\t\t\n\t\tfor (Integer testItem : testProfile.getIds()) {\n\t\t\tDouble val = testProfile.getValue(testItem);\n\t\t\tif (val >= threshold)\n\t\t\t\tnumTestItems++;\n\t\t}\n\t\t// Indicate that no test items were available by returning null\n\t\tif (numTestItems == 0)\n\t\t\treturn null;\n\t\t\n\t\tInteger numRecItems = 0;\n\t\tfor (Integer itemId : recs) {\n\t\t\tDouble val = testProfile.getValue(itemId);\n\t\t\tif (val != null) {\n\t\t\t\tif (val >= threshold)\n\t\t\t\t\tprec = prec + 1.0;\t\n\t\t\t}\n\t\t\tnumRecItems++;\n\t\t\tif (numRecItems == k)\n\t\t\t\tbreak;\n\t\t}\n\t\tprec = prec / k;\n\t\t\n\t\treturn prec;\n\t}", "static int getNumBytes(int precision) {\n return NO_FRACSECOND_BYTES + (getFracSecondBits(precision) + 7) / 8;\n }", "public void test2 (List<List<String>> sentences) {\n double totalLogProb = 0;\n double totalNumTokens = 0;\n for (List<String> sentence : sentences) {\n totalNumTokens += sentence.size();\n double sentenceLogProb = sentenceLogProb2(sentence);\n totalLogProb += sentenceLogProb;\n }\n double perplexity = Math.exp(-totalLogProb / totalNumTokens);\n System.out.println(\"Word Perplexity = \" + perplexity );\n }", "@Override\r\n\tpublic double getAccuracy() {\n\t\treturn this.accuracy;\r\n\t}", "public double computeMacroF1(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual f1 scores\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeF1Score(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public int score() {\n int sum = 0;\n for (Candidate c : chosen) {\n sum += c.score(compatibilityScoreSet);\n }\n return sum;\n }", "public double computeF1Score(Label classLabel){\n\t\tdouble r = this.computeRecall(classLabel);\n\t\tdouble p = this.computePrecision(classLabel);\n\t\treturn (2.0 * p * r)/(p+r);\n\t}", "public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}", "public abstract double score(\n\t\tdouble tf,\n\t\tdouble docLength,\n\t\tdouble n_t,\n\t\tdouble F_t,\n\t\tdouble keyFrequency);", "public int computeTP(Label classLabel){\n\t\treturn getFrequency(classLabel,classLabel);\n\t}", "private void calculatefundamentalFreq() {\n\t\tint count;\n\t\tfloat f0 = 0;\n\t\tSystem.out.println(\"pitches\");\n\t\tSystem.out.println(pitches);\n\t\tfor(count = 0; count < pitches.size(); count++)\n\t\t{\n\t\t\tf0 += pitches.get(count);\n\t\t}\n\t\tif(count != 0)\n\t\t\tfundamentalFreq = f0 / count;\n\t\telse\n\t\t\tfundamentalFreq = 0;\n\t}", "public double prom () {\n return this.sum()/this.size();\n }", "public void testLiangFigure6() {\n int[] a = {0, 0, 0, 0, 1, 1, 1, 1};\n int[] b = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] c = {0, 1, 0, 1, 0, 1, 0, 1};\n int[] ap = {0, 0, 1, 1, 0, 0, 1, 1};\n int[] bp = {0, 1, 0, 1, 1, 1, 1, 1};\n int[] cp = {0, 0, 0, 1, 0, 1, 1, 1};\n\n for (int i = 0; i < ntimes - 1; i++) {\n cases[i][0] = a[i];\n cases[i][1] = b[i];\n cases[i][2] = c[i];\n cases[i + 1][3] = ap[i];\n cases[i + 1][4] = bp[i];\n cases[i + 1][5] = cp[i];\n }\n cases[8][0] = 0;\n cases[8][1] = 0;\n cases[8][2] = 0;\n cases[0][3] = 0;\n cases[0][4] = 0;\n cases[0][5] = 0;\n\n RevealEvaluator re = new RevealEvaluator(cases);\n\n double rea = re.entropy(a);\n assertEquals(1.0, rea, TOLERANCE);\n System.out.println(\"H(a) = \" + rea); //Should be 1.0\n\n double reb = re.entropy(b);\n assertEquals(1.0, reb, TOLERANCE);\n System.out.println(\"H(b) = \" + reb); //Should be 1.0\n\n double rec = re.entropy(c);\n assertEquals(1.0, rec, TOLERANCE);\n System.out.println(\"H(c) = \" + rec); //Should be 1.0\n\n double reab = re.jointEntropy(a, b);\n assertEquals(2.0, reab, TOLERANCE);\n System.out.println(\"H(a,b) = \" + reab); //Should be 2.0\n\n double reap = re.entropy(ap);\n assertEquals(1.0, reap, TOLERANCE);\n System.out.println(\"H(ap) = \" + reap); //Should be 1.0\n\n double rebp = re.entropy(bp);\n assertEquals(0.8112781244591328, rebp, TOLERANCE);\n System.out.println(\"H(bp) = \" + rebp); //Should be 0.8112781244591328\n\n double recp = re.entropy(cp);\n assertEquals(1.0, recp, TOLERANCE);\n System.out.println(\"H(cp) = \" + recp); //Should be 1.0\n\n double reapa = re.jointEntropy(ap, a);\n assertEquals(2.0, reapa, TOLERANCE);\n System.out.println(\"H(ap, a) = \" + reapa); //Should be 2.0\n\n double rebpb = re.jointEntropy(bp, b);\n assertEquals(1.8112781244591327, rebpb, TOLERANCE);\n System.out.println(\n \"H(bp, b) = \" + rebpb); //Should be 1.8112781244591327\n\n double recpb = re.jointEntropy(cp, b);\n assertEquals(1.8112781244591327, recpb, TOLERANCE);\n System.out.println(\n \"H(cp, b) = \" + recpb); //Should be 1.8112781244591327\n\n int[][] ab = new int[2][8];\n for (int i = 0; i < 8; i++) {\n ab[0][i] = a[i];\n ab[1][i] = b[i];\n }\n\n double rebpab = re.jointEntropy(bp, ab);\n assertEquals(2.5, rebpab, TOLERANCE);\n System.out.println(\"H(bp, a, b) = \" + rebpab); //Should be 2.5\n\n double recpab = re.jointEntropy(cp, ab);\n assertEquals(2.5, recpab, TOLERANCE);\n System.out.println(\"H(cp, a, b) = \" + recpab); //Should be 2.5\n\n int[][] abc = new int[3][8];\n for (int i = 0; i < 8; i++) {\n abc[0][i] = a[i];\n abc[1][i] = b[i];\n abc[2][i] = c[i];\n }\n\n double recpabc = re.jointEntropy(cp, abc);\n assertEquals(3.0, recpabc, TOLERANCE);\n System.out.println(\"H(cp, a, b, c) = \" + recpabc); //Should be 3.0\n\n //Setup array cases and test mutualInformation\n int[] p = new int[1];\n p[0] = 0;\n\n double rembpa = re.mutualInformation(4, p, 1);\n assertEquals(0.31127812445913294, rembpa, TOLERANCE);\n System.out.println(\n \"M(Bp, A) = \" + rembpa); //Should be 0.31127812445913294\n\n int[] pp = new int[2];\n pp[0] = 0;\n pp[1] = 1;\n\n double rmcpab = re.mutualInformation(5, pp, 1);\n assertEquals(0.5, rmcpab, TOLERANCE);\n System.out.println(\"M(Cp, [A,B]) = \" + rmcpab); //Should be 0.5\n\n int[] ppp = new int[3];\n ppp[0] = 0;\n ppp[1] = 1;\n ppp[2] = 2;\n\n double rmcpabc = re.mutualInformation(5, ppp, 1);\n assertEquals(1.0, rmcpabc, TOLERANCE);\n System.out.println(\"M(Cp, [A,B,C]) = \" + rmcpabc); //Should be 1.0\n\n }", "public static double getMaxPrecision(HashMap<Double,Double> p, double R){\n double max_P = 0;\n \n // Follows the definition in the textbook, page 316\n for(Double recall : p.keySet()){\n \tif(recall >= R){\n \t\tdouble precision = Double.parseDouble(p.get(recall).toString());\n \t\tif(precision >= max_P){\n \t\t\tmax_P = precision;\n \t\t}\n \t}\n }\n \n return max_P;\n }", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "int getFreq();", "public double fpp() {\n return config().getP();\n }", "@Override\r\n\tpublic Double getModel_presf_prop_score() {\n\t\treturn super.getModel_presf_prop_score();\r\n\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}" ]
[ "0.72484344", "0.72458285", "0.63421535", "0.6245422", "0.604374", "0.6007496", "0.597563", "0.59648573", "0.59648573", "0.59648573", "0.5941711", "0.59371215", "0.59319365", "0.58965605", "0.5853102", "0.57523054", "0.57523054", "0.57083386", "0.5708024", "0.56994975", "0.56873053", "0.5636802", "0.5613539", "0.558916", "0.5588819", "0.5585306", "0.5568921", "0.55598646", "0.55598646", "0.55523866", "0.55451936", "0.55260473", "0.54954016", "0.5490426", "0.5421407", "0.5389157", "0.53673995", "0.5358384", "0.535779", "0.53519094", "0.53392047", "0.53292584", "0.5305428", "0.5303079", "0.52899075", "0.52499443", "0.5248913", "0.52470225", "0.52462536", "0.5204897", "0.51802427", "0.516944", "0.516172", "0.5154256", "0.51458144", "0.5135629", "0.5110572", "0.5105963", "0.510522", "0.50913423", "0.50688404", "0.50552166", "0.5048876", "0.50344926", "0.5026798", "0.50238395", "0.50204414", "0.5018603", "0.501475", "0.5008821", "0.49996984", "0.49935147", "0.49932617", "0.4991046", "0.4972652", "0.49722517", "0.4961632", "0.4959388", "0.49499586", "0.4941231", "0.4940493", "0.49267167", "0.49251336", "0.49213934", "0.4919091", "0.49179688", "0.49155354", "0.49096003", "0.49065587", "0.49049115", "0.48983595", "0.48974305", "0.4894644", "0.48912123", "0.48891258", "0.48865744", "0.4883326", "0.4881287", "0.48733386", "0.4863572" ]
0.6084892
4
Computes the F1 score of chosen label
public double computeF1Score(Label classLabel){ double r = this.computeRecall(classLabel); double p = this.computePrecision(classLabel); return (2.0 * p * r)/(p+r); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double computeMacroF1(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual f1 scores\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeF1Score(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "double ComputeFT_F1Score(individual st){\n\t\tdouble sum = 0, ft;\n\t\tint i;\n\t\tdouble[] tm;\n\t\t\n\t\tint tp, tn, fp, fn;\n\n\t\tdouble precision, recall;\n\t\ttp=0;\n\t\ttn=0;\n\t\tfp=0;\n\t\tfn=0;\n\t\t\n\t\ttm=ComputeTest(st.chrom);\n\t\tfor(i = 0; i < NUMFITTEST; i++) {\n\t\t\tft = PVAL(tm[i]);\n\t\t\t\n//\t\t\tSystem.out.println(\"TM[i]:\"+ft);\n\t\t\tif(ft<0) {\t\t\t\t\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\ttn++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\tfp++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttp++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n//\t\t\t\n\t\t}\t\n//\t\t\n//\t\tSystem.out.println(\"TP:\"+tp);\n//\t\tSystem.out.println(\"FP:\"+fp);\n//\t\tSystem.out.println(\"FN:\"+fn);\n//\t\tSystem.out.println(\"TN:\"+tn);\n\t\tprecision=tp/(tp+fp);\n\t\trecall=tp/(tp+fn);\n\t\tsum=2*precision*recall/(precision+recall);\n\t\treturn sum;\n\t}", "@Override\n\tprotected double scoreFDSD(int arg0, int arg1) {\n\t\treturn 0;\n\t}", "public abstract double score(double tf, double docLength, double precomp);", "public float specificity(final L label)\n {\n\n final Multiset<L> predictionsForLabel = confusionMatrix.computeIfAbsent(label, l ->HashMultiset.create());\n\n final int hasLabel = predictionsForLabel.size();\n final int hasLabelRight = predictionsForLabel.count(label); // true positives\n\n\n final int notLabelWrong = getTotalPredicted(label) - hasLabelRight; // false negatives\n final int notLabel = numExamples - hasLabel;\n final int notLabelRight = notLabel - notLabelWrong; // true negatives\n\n if (notLabel == 0)\n {\n return 1.0f;\n }\n\n return (float) notLabelRight / (float) notLabel;\n }", "private double p_l(Label label) {\n\t\t// TODO : Implement\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tint total = docCount.get(Label.POSITIVE)+docCount.get(Label.NEGATIVE);\n\t\t\n\t\t\n\t\tif(label.equals(Label.POSITIVE))\n\t\t\treturn ((double)(docCount.get(Label.POSITIVE)))/((double)(total));\n\t\telse\n\t\t\treturn ((double)(docCount.get(Label.NEGATIVE)))/((double)(total));\n\t}", "public int computeFP(Label classLabel){\n\n\t\tint tp = this.computeTP(classLabel);\n\t\t//the total number of predictions that guess 'classLabel'\n\t\tint totalPredictions = this.sumRow(classLabel);\n\n\t\treturn totalPredictions - tp;\n\n\t}", "@Override\n\tpublic double p_l(Label label) {\n\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tdouble ret = 0;\n\t\t\n\t\t// set up m_sports_count and m_business_count\n\t\tdocuments_per_label_count(m_trainingData);\n\n\t\tdouble sum = m_sports_count + m_business_count;\n\n\t\tif (label == Label.SPORTS) {\n\t\t\tret = m_sports_count / sum;\n\t\t} else {\n\t\t\tret = m_business_count / sum;\n\t\t}\n\n\t\treturn ret;\n\t}", "public int computeFN(Label classLabel){\n\n\t\tint tp = this.computeTP(classLabel);\n\t\t//the total number of real labels of 'classLabel'\n\t\tint totalReal = this.sumColumn(classLabel);\n\n\t\treturn totalReal - tp;\n\n\t}", "public abstract double score(double tf, double docLength);", "float getScore();", "float getScore();", "int score();", "int score();", "public void evaluateUniformDistribution(String label) {\r\n // subtract one point for each card of same suit next to a card one away in rank\r\n // subtract two points for each run of two\r\n // three points for each run of three, etc.\r\n // add no points for two adjacent cards of same suit but not of sequential rank\r\n // add one point for two adjacent cards of different suit and same rank\r\n // add two points for two adjacent cards of different suit and sequential rank\r\n // add five points for two adjacent cards of different suit and different rank\r\n int score = 0;\r\n Card c = cards.get(0);\r\n Card d = null;\r\n boolean run = false;\r\n int runCount = 0;\r\n int diff = 0;\r\n for (int i = 1; i < cards.size(); i++) {\r\n d = cards.get(i);\r\n diff = c.getRank() - d.getRank();\r\n if (c.getSuit() == d.getSuit()) {\r\n // same suit\r\n if (diff == 1) { // sequential rank\r\n run = true;\r\n score -= (1 + (runCount*2));\r\n runCount++;\r\n }\r\n } else {\r\n // different suit\r\n if (diff == 0) { // same rank\r\n score++;\r\n } else if (diff == 1) { // sequential rank\r\n score += 2;\r\n } else {\r\n score += 5;\r\n }\r\n }\r\n c = d;\r\n }\r\n System.out.println(label + \" score: \" + score);\r\n }", "public abstract double score(\n\t\tdouble tf,\n\t\tdouble docLength,\n\t\tdouble n_t,\n\t\tdouble F_t,\n\t\tdouble keyFrequency);", "protected float computeModelScoreOnTraining() {\n/* 508 */ float s = computeModelScoreOnTraining(0, this.samples.size() - 1, 0);\n/* 509 */ s /= this.samples.size();\n/* 510 */ return s;\n/* */ }", "public double getBestScore();", "Float getScore();", "public double getAccuracyWithLabFormat(String input)\n {\n\n resetWeight();\n\n BagOfWords bag =new BagOfWords(\" \");\n\n String tt=input;\n\n input = input.replaceAll(\"\\n\",\" \");\n\n for (String s:input.split(\" \"))\n {\n bag.add(s);\n }\n\n\n\n for(HashMap.Entry<String, Integer> entry : bag.getBagHashMap().entrySet())\n {\n String key = entry.getKey();\n\n for (TFIDF bag1: trainedClasses)\n {\n for (Word w:bag1.getWordsSets().getWordList())\n {\n if (w.getValue().equals(key))\n {\n bag1.setWeight(bag1.getWeight()+w.getFreq());\n bag1.setFileCount(bag1.getFileCount()+1);\n }\n }\n\n }\n\n }\n\n for (TFIDF bag1: trainedClasses)\n {\n bag1.setWeight(bag1.getWeight()/(bag1.getFileCount()+1));\n }\n\n int i= trainedClasses.size();\n\n for (TFIDF bag1: trainedClasses)\n {\n if (tt.split(\"\\n\")[0].contains(bag1.getName()))\n {\n i=Math.min(i, trainedClasses.indexOf(bag1));\n }\n\n }\n\n StringBuilder ret= new StringBuilder(\"(\" + i + \")\" + \"\\n\");\n\n trainedClasses.sort(new Comparator<TFIDF>() {\n @Override\n public int compare(TFIDF idf, TFIDF t1) {\n if (idf.getWeight()>t1.getWeight())\n return -1;\n else\n return 1;\n }\n });\n\n for (TFIDF bag1: trainedClasses)\n {\n ret.append(\" --> \").append(bag1.getName()).append(\": \").append(bag1.getWeight()).append(\"\\n\");\n }\n\n return (100/Math.pow(i+1,2));\n\n }", "protected final void calcScore()\n {\n\n m_score = SCORE_OTHER;\n\n if (null == m_targetString)\n calcTargetString();\n }", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n match_score *= 100.0f;\n tvFaceMatchScore1.setText(Float.toString(match_score));\n llFaceMatchScore.setVisibility(View.VISIBLE);\n\n }\n }", "@Override\n\t\t\tpublic double computeScore(Shop arg0, Shop arg1) {\n\t\t\t\treturn 0;\n\t\t\t}", "@Override\n\t\t\tpublic double computeScore(Shop arg0, Shop arg1) {\n\t\t\t\treturn 0;\n\t\t\t}", "@Override\n protected float score(BasicStats stats, float termFreq, float docLength) {\n float k1 = (float)1.2;\n float k2 = 750;\n float b = (float)0.75;\n float N = stats.getNumberOfDocuments();\n float df = stats.getDocFreq();\n float qtermFreq = 1;\n float score = (float)Math.log((N - df + 0.5)/df+0.5);\n score*=((k1+1)*termFreq)/(k1*(1-b+b*(docLength/stats.getAvgFieldLength()))+termFreq);\n score*=((k2+1)*qtermFreq)/(k2+qtermFreq);\n return score; }", "public abstract float getScore();", "public double computeAccuracy(){\n\n\t\t//count the totla number of predictions\n\t\tdouble total = sumAll();\n\n\t\tdouble truePredictions = 0;\n\t\t//iterate all correct guesses\n\t\tfor(Label l : labels){\n\t\t\ttruePredictions += this.computeTP(l);\n\t\t\t\n\t\t}\n\n\t\treturn truePredictions/(total);\n\n\t}", "public float computeTermScore(int term, int dl, int tf, GlobalStats stats);", "@Override\n\tpublic void inputScore() {\n\n\t}", "@Override\n\tpublic double classify(Example example) {\n\t\t// run forwards part of training algorithm on specific example\n\t\t// input to calculateForward method is ArrayList of examples, so\n\t\t// arbitrarily creating one in order to avoid duplicating code\n\t\tArrayList<Example> ex = new ArrayList<Example>();\n\t\tex.add(example);\n\t\tSystem.out.println(\"calculated: \" + calculateForward(ex).get(0) + \" label: \" + example.getLabel());\n\t\treturn (calculateForward(ex).get(0) > 0) ? 1.0 : -1.0;\n\t}", "Float getAutoScore();", "private Label createScoreFloatLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"\"+Math.round(playerInput.gameScore),textStyle);\n text.setFontScale(2f*scale,2f*scale);\n text.setAlignment(Align.center);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.60f);\n return text;\n }", "private void scoring(NameInfo name1Info, NameInfo name2Info, int flag) {\n\t\tString name1 = name1Info.getName();\n\t\tString name2 = name2Info.getName();\n\t\tString type1 = name1Info.getType();\n\t\tString type2 = name2Info.getType();\n\t\tif (name1.length() == 0 || name2.length() == 0) {\n\t\t\tscore = 0.0f;\n\t\t\tscoreShingle = 0.0f;\n\t\t\treason = \"There is an empty name.\";\n\t\t\treturn;\n\t\t}\n\t\tswitch (flag) {\n\t\t\n\t\tcase 1: // PER\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tfloat scorePER = getPERScore(name1Info, name2Info);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric\";\n\t\t\tif (score < scorePER) {\n\t\t\t\tscore = scorePER;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 2: // LOC\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tscore = shortMan.scoring(name1, name2);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\tfloat countryLangScore = countryMan.scoring(name1, name2);\n\t\t\tif (score < countryLangScore) {\n\t\t\t\tscore = countryLangScore;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Country-Language list.\";\n\t\t\t\tif (score < scoreShingle) {\n\t\t\t\t\tscore = scoreShingle;\n\t\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 3: // ORG\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tscore = acroMan.scoring(name1Info, name2Info);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\tif (scoreShingle > score) {\n\t\t\t\tscore = scoreShingle;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 4: // GEN\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tfloat scorePer = getPERScore(name1Info, name2Info);\n\t\t\tfloat scoreShort = shortMan.scoring(name1, name2);\n\t\t\tfloat scoreCL = countryMan.scoring(name1, name2);\n\t\t\tfloat scoreAcro = acroMan.scoring(name1Info, name2Info);\n\t\t\tif (scoreAcro > score) {\n\t\t\t\tscore = scoreAcro;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t}\n\t\t\tif (scoreCL > score) {\n\t\t\t\tscore = scoreCL;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Country-Language list.\";\n\t\t\t}\n\t\t\tif (scoreShort > score) {\n\t\t\t\tscore = scoreShort;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\t}\n\t\t\tif (scorePer > score) {\n\t\t\t\tscore = scorePer;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric\";\n\t\t\t}\n\t\t\tif (scoreShingle > score) {\n\t\t\t\tscore = scoreShingle;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t}\n\t\t\tif (acroMan.isSpecificCase()) {\n\t\t\t\tscore = scoreAcro;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 5: // Two different types\n\t\t\tif (type1.equals(\"PER\") || type2.equals(\"PER\")) {\n\t\t\t\tscore = 0.0f;\n\t\t\t\treason = \"Type: \" + type1 + \". and \" + type2 + \". cannot be compared\";\n\t\t\t} else if (type1.equals(\"LOC\") || type2.equals(\"LOC\")) {\n\t\t\t\tscore = shortMan.scoring(name1, name2);\n\t\t\t\treason = \"Type: LOC. metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\t} else if (type1.equals(\"ORG\") || type2.equals(\"ORG\")) {\n\t\t\t\tfloat orgScore = acroMan.scoring(name1Info, name2Info);\n\t\t\t\tif (score < orgScore) {\n\t\t\t\t\tscore = orgScore;\n\t\t\t\t\treason = \"Type: ORG. metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tscore = 0.0f;\n\t\t\t\treason = \"Type: \" + type1 + \". and \" + type2 + \". cannot be compared\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tscore = 0.0f;\n\t\t\treason = \"#######SHOULD NOT HAPPEN#######\";\n\t\t}\n\t\tif (name1.equalsIgnoreCase(name2))\n\t\t\tscore = 1.0f;\n\t\tif (!name1Info.getType().equals(\"PER\") && !name2Info.getType().equals(\"PER\"))\n\t\t\thandleLargeRatio(name1, name2);\n\t}", "S predictScores(P preProcInputs);", "double getLabel();", "public float computePhraseScore(int dl, int tf, GlobalStats stats);", "static private int _score(\n UIXRenderingContext context,\n String lafName,\n LookAndFeelScorer scorer\n )\n {\n Score score = scorer.scoreLookAndFeel(context, lafName);\n\n // First, check for any NO_MATCH scores.\n int nameScore = score.getNameScore();\n int agentTypeScore = score.getAgentTypeScore();\n int agentApplicationScore = score.getAgentApplicationScore();\n int agentVersionScore = score.getAgentVersionScore();\n int agentOSScore = score.getAgentOSScore();\n int discriminantScore = score.getDiscriminantScore();\n\n // If any of the component scores are NO_MATCH, then we\n // don't have a match - return NO_MATCH.\n if ((nameScore == Score.NO_MATCH) ||\n (agentTypeScore == Score.NO_MATCH) ||\n (agentApplicationScore == Score.NO_MATCH) ||\n (agentVersionScore == Score.NO_MATCH) ||\n (agentOSScore == Score.NO_MATCH) ||\n (discriminantScore == Score.NO_MATCH))\n {\n return Score.NO_MATCH;\n }\n\n return (nameScore +\n agentTypeScore +\n agentApplicationScore +\n agentVersionScore +\n agentOSScore +\n discriminantScore);\n }", "double getScore(IToken tk1, IToken tk2);", "@Override\n protected float score(BasicStats stats, float termFreq, float docLength) {\n double s = 0.75;\n\n long N = stats.getNumberOfDocuments();\n long df = stats.getDocFreq();\n float cwd = termFreq;\n float cwq = 1; //assume that the query term frequency is always one\n float n = docLength;\n float navg = stats.getAvgFieldLength();\n\n double p1 = (1+Math.log(1+Math.log(cwd)))/(1-s+s*n/navg);\n float ans = (float) (p1 * cwq * Math.log((N+1)/df));\n\n return ans;\n }", "public void calculateScore() {\n for (Sequence seq: currentSeq) {\n double wordWeight = Retriever.getWeight(seq);\n String token = seq.getToken();\n int size = seq.getRight() - seq.getLeft() + 1;\n int titleCount = getCount(token.toLowerCase(), title.toLowerCase());\n if (titleCount != 0) {\n setMatch(size);\n setTitleContains(true);\n }\n int lowerCount = getCount(token.toLowerCase(), lowerContent);\n if (lowerCount == 0) {\n// scoreInfo += \"Token: \" + token + \" Original=0 Lower=0 WordWeight=\" + wordWeight + \" wordTotal=0\\n\";\n continue;\n }\n int originalCount = getCount(token, content);\n lowerCount = lowerCount - originalCount;\n if (lowerCount != 0 || originalCount != 0) {\n setMatch(size);\n }\n double originalScore = formula(wordWeight, originalCount);\n double lowerScore = formula(wordWeight, lowerCount);\n final double weight = 1.5;\n double addedScore = weight * originalScore + lowerScore;\n// scoreInfo += \"Token: \" + token + \" Original=\" + originalScore + \" Lower=\" + lowerScore +\n// \" WordWeight=\" + wordWeight + \" wordTotal=\" + addedScore + \"\\n\";\n dependencyScore += addedScore;\n }\n currentSeq.clear();\n }", "public int classify(String doc){\n\t\tint label = 0;\n\t\tint vSize = vocabulary.size();\n\t\tdouble[] score = new double[numClasses];\n\t\tfor(int i=0;i<score.length;i++){\n\t\t\tscore[i] = Math.log(classCounts[i]*1.0/trainingDocs.size());\n\t\t}\n\t\tString[] tokens = doc.split(\" \");\n\t\tfor(int i=0;i<numClasses;i++){\n\t\t\tfor(String token: tokens){\n\t\t\t\tif(condProb[i].containsKey(token)){\n\t\t\t\t\tscore[i] += Math.log(condProb[i].get(token));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tscore[i] += Math.log(1.0/(classTokenCounts[i]+vSize));\n\t\t\t\t}\n\t\t\t\t//System.out.println(\"token: \"+token+\" \"+score[i]);\n\t\t\t}\n\t\t}\n\t\tdouble maxScore = score[0];\n\t\t//System.out.println(\"class 0: \"+score[0]);\n\t\tfor(int i=1;i<score.length;i++){\n\t\t\t//System.out.println(\"class \"+i+\": \"+score[i]);\n\t\t\tif(score[i]>maxScore){\n\t\t\t\tlabel = i;\n\t\t\t}\n\t\t}\n\t\treturn label;\n\t}", "public float evaluate(PhraseInfo p) {\n int numChords = p.gen.prog.get(p.gen.progIndex).size();\n int tn = Math.min(phraseLen, (int)Math.round(targetNotes * ((numChords + 1) / 3.0))); // not directly proportional.\n // scores: 50, 49, 46, 41, 34, 25 etc.\n int score = Math.max(0, 50 - (int)Math.round(Math.pow(Math.abs(p.noteCount - tn), 2)));\n return (float)Math.min(1.0f, score/50.0f);\n }", "private int computeScore() {\n int score = 0;\n for (int i = 0; i < MainActivity.DEFAULT_SIZE; i++) {\n TextView answerView = (TextView) findViewById(MainActivity.NAME_VIEWS[i]);\n String answer = answerView.getText().toString();\n String solution = getQuizCountries().get(i).getName();\n if (answer.equals(solution)) {\n score++;\n }\n }\n return score;\n }", "public int computeTP(Label classLabel){\n\t\treturn getFrequency(classLabel,classLabel);\n\t}", "public final float score(float tf, float docLength) {\r\n\t\tfloat Robertson_tf = k_1*tf/(tf+k_1*(1-b+b*docLength/averageDocumentLength));\r\n\t\tfloat idf = (float)Idf.log(numberOfDocuments/documentFrequency+1);\r\n\t\treturn keyFrequency * Robertson_tf * idf;\r\n\t}", "public float getScore(){return score;}", "@Override\n\tpublic Scores compare(File f1, File f2) {\n\t\treturn new Scores(1.0, \"AlwaysTrueComparisonStrategy:1\");\n\t}", "int score(OfcHandMatrix matrix);", "private static Double mklabel(Double label) {\n\t\tDouble _label;\n\t\tif (label == 0) {\n\t\t\t_label = -1.0;\n\t\t} else {\n\t\t\t_label = 1.0;\n\t\t}\n\t\treturn _label;\n\t}", "public int score() {\n int sum = 0;\n for (Candidate c : chosen) {\n sum += c.score(compatibilityScoreSet);\n }\n return sum;\n }", "private Double computeRate(Double score,List<FyQuestion> questions) {\n\t\tDouble total=0.0;\r\n\t\tfor(FyQuestion q:questions) {\r\n\t\t\ttotal+=(q.getScore()*(100-q.getDifficulty()))/score;\r\n\t\t}\r\n\t\treturn total/100;\r\n\t}", "public static String calculateScore(String textToScore) {\r\n\r\n\t\tdouble nbSentences = 0.0;\r\n\t\tdouble nbWords = 0.0;\r\n\t\tdouble nbSyllables = 0.0;\r\n\t\tString result = \"\";\r\n\r\n\t\tif (textToScore != null) {\r\n\t\t\tString[] sentences = textToScore.split(\"\\\\.\");\r\n\t\t\tString[] words;\r\n\r\n\t\t\tfor (int i = 0; i < sentences.length; i++) {\r\n\t\t\t\twords = sentences[i].split(\"\\\\s+\");\r\n\t\t\t\tnbSentences++;\r\n\t\t\t\tfor (int j = 0; j < words.length; j++) {\r\n\t\t\t\t\tnbWords++;\r\n\t\t\t\t\tnbSyllables += countSyllables(words[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (nbSentences > 0 && nbWords > 0 && nbSyllables > 0) {\r\n\t\t\t\tdouble fkra = (0.39 * (nbWords / nbSentences)) + (11.8 * (nbSyllables / nbWords)) - 15.59;\r\n\t\t\t\tlong round = Math.round(fkra);\r\n\t\t\t\tif(round<1) {\r\n\t\t\t\t\tround = 1;\r\n\t\t\t\t}\r\n\t\t\t\telse if (round>10) {\r\n\t\t\t\t\tround = 10;\r\n\t\t\t\t} \r\n\t\t\t\tresult = String.valueOf(round);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "public final double[] score0( double[] data, double[] preds ) {\n java.util.Arrays.fill(preds,0);\n h2o_rf_02_Forest_0.score0(data,preds);\n h2o_rf_02_Forest_1.score0(data,preds);\n h2o_rf_02_Forest_2.score0(data,preds);\n h2o_rf_02_Forest_3.score0(data,preds);\n h2o_rf_02_Forest_4.score0(data,preds);\n h2o_rf_02_Forest_5.score0(data,preds);\n h2o_rf_02_Forest_6.score0(data,preds);\n h2o_rf_02_Forest_7.score0(data,preds);\n h2o_rf_02_Forest_8.score0(data,preds);\n h2o_rf_02_Forest_9.score0(data,preds);\n h2o_rf_02_Forest_10.score0(data,preds);\n h2o_rf_02_Forest_11.score0(data,preds);\n h2o_rf_02_Forest_12.score0(data,preds);\n h2o_rf_02_Forest_13.score0(data,preds);\n h2o_rf_02_Forest_14.score0(data,preds);\n h2o_rf_02_Forest_15.score0(data,preds);\n h2o_rf_02_Forest_16.score0(data,preds);\n h2o_rf_02_Forest_17.score0(data,preds);\n h2o_rf_02_Forest_18.score0(data,preds);\n h2o_rf_02_Forest_19.score0(data,preds);\n h2o_rf_02_Forest_20.score0(data,preds);\n h2o_rf_02_Forest_21.score0(data,preds);\n h2o_rf_02_Forest_22.score0(data,preds);\n h2o_rf_02_Forest_23.score0(data,preds);\n h2o_rf_02_Forest_24.score0(data,preds);\n h2o_rf_02_Forest_25.score0(data,preds);\n h2o_rf_02_Forest_26.score0(data,preds);\n h2o_rf_02_Forest_27.score0(data,preds);\n h2o_rf_02_Forest_28.score0(data,preds);\n h2o_rf_02_Forest_29.score0(data,preds);\n h2o_rf_02_Forest_30.score0(data,preds);\n h2o_rf_02_Forest_31.score0(data,preds);\n h2o_rf_02_Forest_32.score0(data,preds);\n h2o_rf_02_Forest_33.score0(data,preds);\n h2o_rf_02_Forest_34.score0(data,preds);\n h2o_rf_02_Forest_35.score0(data,preds);\n h2o_rf_02_Forest_36.score0(data,preds);\n h2o_rf_02_Forest_37.score0(data,preds);\n h2o_rf_02_Forest_38.score0(data,preds);\n h2o_rf_02_Forest_39.score0(data,preds);\n h2o_rf_02_Forest_40.score0(data,preds);\n h2o_rf_02_Forest_41.score0(data,preds);\n h2o_rf_02_Forest_42.score0(data,preds);\n h2o_rf_02_Forest_43.score0(data,preds);\n h2o_rf_02_Forest_44.score0(data,preds);\n h2o_rf_02_Forest_45.score0(data,preds);\n h2o_rf_02_Forest_46.score0(data,preds);\n h2o_rf_02_Forest_47.score0(data,preds);\n h2o_rf_02_Forest_48.score0(data,preds);\n h2o_rf_02_Forest_49.score0(data,preds);\n h2o_rf_02_Forest_50.score0(data,preds);\n h2o_rf_02_Forest_51.score0(data,preds);\n h2o_rf_02_Forest_52.score0(data,preds);\n h2o_rf_02_Forest_53.score0(data,preds);\n h2o_rf_02_Forest_54.score0(data,preds);\n h2o_rf_02_Forest_55.score0(data,preds);\n h2o_rf_02_Forest_56.score0(data,preds);\n h2o_rf_02_Forest_57.score0(data,preds);\n h2o_rf_02_Forest_58.score0(data,preds);\n h2o_rf_02_Forest_59.score0(data,preds);\n h2o_rf_02_Forest_60.score0(data,preds);\n h2o_rf_02_Forest_61.score0(data,preds);\n h2o_rf_02_Forest_62.score0(data,preds);\n h2o_rf_02_Forest_63.score0(data,preds);\n h2o_rf_02_Forest_64.score0(data,preds);\n h2o_rf_02_Forest_65.score0(data,preds);\n h2o_rf_02_Forest_66.score0(data,preds);\n h2o_rf_02_Forest_67.score0(data,preds);\n h2o_rf_02_Forest_68.score0(data,preds);\n h2o_rf_02_Forest_69.score0(data,preds);\n h2o_rf_02_Forest_70.score0(data,preds);\n h2o_rf_02_Forest_71.score0(data,preds);\n h2o_rf_02_Forest_72.score0(data,preds);\n h2o_rf_02_Forest_73.score0(data,preds);\n h2o_rf_02_Forest_74.score0(data,preds);\n h2o_rf_02_Forest_75.score0(data,preds);\n h2o_rf_02_Forest_76.score0(data,preds);\n h2o_rf_02_Forest_77.score0(data,preds);\n h2o_rf_02_Forest_78.score0(data,preds);\n h2o_rf_02_Forest_79.score0(data,preds);\n h2o_rf_02_Forest_80.score0(data,preds);\n h2o_rf_02_Forest_81.score0(data,preds);\n h2o_rf_02_Forest_82.score0(data,preds);\n h2o_rf_02_Forest_83.score0(data,preds);\n h2o_rf_02_Forest_84.score0(data,preds);\n h2o_rf_02_Forest_85.score0(data,preds);\n h2o_rf_02_Forest_86.score0(data,preds);\n h2o_rf_02_Forest_87.score0(data,preds);\n h2o_rf_02_Forest_88.score0(data,preds);\n h2o_rf_02_Forest_89.score0(data,preds);\n h2o_rf_02_Forest_90.score0(data,preds);\n h2o_rf_02_Forest_91.score0(data,preds);\n h2o_rf_02_Forest_92.score0(data,preds);\n h2o_rf_02_Forest_93.score0(data,preds);\n h2o_rf_02_Forest_94.score0(data,preds);\n h2o_rf_02_Forest_95.score0(data,preds);\n h2o_rf_02_Forest_96.score0(data,preds);\n h2o_rf_02_Forest_97.score0(data,preds);\n h2o_rf_02_Forest_98.score0(data,preds);\n h2o_rf_02_Forest_99.score0(data,preds);\n h2o_rf_02_Forest_100.score0(data,preds);\n h2o_rf_02_Forest_101.score0(data,preds);\n h2o_rf_02_Forest_102.score0(data,preds);\n h2o_rf_02_Forest_103.score0(data,preds);\n h2o_rf_02_Forest_104.score0(data,preds);\n h2o_rf_02_Forest_105.score0(data,preds);\n h2o_rf_02_Forest_106.score0(data,preds);\n h2o_rf_02_Forest_107.score0(data,preds);\n h2o_rf_02_Forest_108.score0(data,preds);\n h2o_rf_02_Forest_109.score0(data,preds);\n h2o_rf_02_Forest_110.score0(data,preds);\n h2o_rf_02_Forest_111.score0(data,preds);\n h2o_rf_02_Forest_112.score0(data,preds);\n h2o_rf_02_Forest_113.score0(data,preds);\n h2o_rf_02_Forest_114.score0(data,preds);\n h2o_rf_02_Forest_115.score0(data,preds);\n h2o_rf_02_Forest_116.score0(data,preds);\n h2o_rf_02_Forest_117.score0(data,preds);\n h2o_rf_02_Forest_118.score0(data,preds);\n h2o_rf_02_Forest_119.score0(data,preds);\n h2o_rf_02_Forest_120.score0(data,preds);\n h2o_rf_02_Forest_121.score0(data,preds);\n h2o_rf_02_Forest_122.score0(data,preds);\n h2o_rf_02_Forest_123.score0(data,preds);\n h2o_rf_02_Forest_124.score0(data,preds);\n h2o_rf_02_Forest_125.score0(data,preds);\n h2o_rf_02_Forest_126.score0(data,preds);\n h2o_rf_02_Forest_127.score0(data,preds);\n h2o_rf_02_Forest_128.score0(data,preds);\n h2o_rf_02_Forest_129.score0(data,preds);\n h2o_rf_02_Forest_130.score0(data,preds);\n h2o_rf_02_Forest_131.score0(data,preds);\n h2o_rf_02_Forest_132.score0(data,preds);\n h2o_rf_02_Forest_133.score0(data,preds);\n h2o_rf_02_Forest_134.score0(data,preds);\n h2o_rf_02_Forest_135.score0(data,preds);\n h2o_rf_02_Forest_136.score0(data,preds);\n h2o_rf_02_Forest_137.score0(data,preds);\n h2o_rf_02_Forest_138.score0(data,preds);\n h2o_rf_02_Forest_139.score0(data,preds);\n h2o_rf_02_Forest_140.score0(data,preds);\n h2o_rf_02_Forest_141.score0(data,preds);\n h2o_rf_02_Forest_142.score0(data,preds);\n h2o_rf_02_Forest_143.score0(data,preds);\n h2o_rf_02_Forest_144.score0(data,preds);\n h2o_rf_02_Forest_145.score0(data,preds);\n h2o_rf_02_Forest_146.score0(data,preds);\n h2o_rf_02_Forest_147.score0(data,preds);\n h2o_rf_02_Forest_148.score0(data,preds);\n h2o_rf_02_Forest_149.score0(data,preds);\n h2o_rf_02_Forest_150.score0(data,preds);\n h2o_rf_02_Forest_151.score0(data,preds);\n h2o_rf_02_Forest_152.score0(data,preds);\n h2o_rf_02_Forest_153.score0(data,preds);\n h2o_rf_02_Forest_154.score0(data,preds);\n h2o_rf_02_Forest_155.score0(data,preds);\n h2o_rf_02_Forest_156.score0(data,preds);\n h2o_rf_02_Forest_157.score0(data,preds);\n h2o_rf_02_Forest_158.score0(data,preds);\n h2o_rf_02_Forest_159.score0(data,preds);\n h2o_rf_02_Forest_160.score0(data,preds);\n h2o_rf_02_Forest_161.score0(data,preds);\n h2o_rf_02_Forest_162.score0(data,preds);\n h2o_rf_02_Forest_163.score0(data,preds);\n h2o_rf_02_Forest_164.score0(data,preds);\n h2o_rf_02_Forest_165.score0(data,preds);\n h2o_rf_02_Forest_166.score0(data,preds);\n h2o_rf_02_Forest_167.score0(data,preds);\n h2o_rf_02_Forest_168.score0(data,preds);\n h2o_rf_02_Forest_169.score0(data,preds);\n h2o_rf_02_Forest_170.score0(data,preds);\n h2o_rf_02_Forest_171.score0(data,preds);\n h2o_rf_02_Forest_172.score0(data,preds);\n h2o_rf_02_Forest_173.score0(data,preds);\n h2o_rf_02_Forest_174.score0(data,preds);\n h2o_rf_02_Forest_175.score0(data,preds);\n h2o_rf_02_Forest_176.score0(data,preds);\n h2o_rf_02_Forest_177.score0(data,preds);\n h2o_rf_02_Forest_178.score0(data,preds);\n h2o_rf_02_Forest_179.score0(data,preds);\n h2o_rf_02_Forest_180.score0(data,preds);\n h2o_rf_02_Forest_181.score0(data,preds);\n h2o_rf_02_Forest_182.score0(data,preds);\n h2o_rf_02_Forest_183.score0(data,preds);\n h2o_rf_02_Forest_184.score0(data,preds);\n h2o_rf_02_Forest_185.score0(data,preds);\n h2o_rf_02_Forest_186.score0(data,preds);\n h2o_rf_02_Forest_187.score0(data,preds);\n h2o_rf_02_Forest_188.score0(data,preds);\n h2o_rf_02_Forest_189.score0(data,preds);\n h2o_rf_02_Forest_190.score0(data,preds);\n h2o_rf_02_Forest_191.score0(data,preds);\n h2o_rf_02_Forest_192.score0(data,preds);\n h2o_rf_02_Forest_193.score0(data,preds);\n h2o_rf_02_Forest_194.score0(data,preds);\n h2o_rf_02_Forest_195.score0(data,preds);\n h2o_rf_02_Forest_196.score0(data,preds);\n h2o_rf_02_Forest_197.score0(data,preds);\n h2o_rf_02_Forest_198.score0(data,preds);\n h2o_rf_02_Forest_199.score0(data,preds);\n double sum = 0;\n for(int i=1; i<preds.length; i++) { sum += preds[i]; }\n if (sum>0) for(int i=1; i<preds.length; i++) { preds[i] /= sum; }\n preds[0] = hex.genmodel.GenModel.getPrediction(preds, PRIOR_CLASS_DISTRIB, data, 0.5);\n return preds;\n }", "public int scoreLeafNode();", "public JLabel getLblScore() {\r\n\t\treturn lblScore;\r\n\t}", "double scoreAnswer(Question question, Answer answer);", "private int scoreTitleMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 100;\n \n // Don't do prefix scanning on short titles.\n String str1 = data.tags.getString(tag1);\n String str2 = data.tags.getString(tag2);\n if (str1.length() < 5 || str2.length() < 5)\n return 0;\n \n // If either is a prefix of the other, we have a match.\n if (str1.startsWith(str2) || str2.startsWith(str1))\n return 100;\n \n // All other cases: fail for now at least.\n return 0;\n }", "float predict();", "public static void main(String[] args) throws Exception {\n\t\tint i;\r\n\t\tint [][]preci_recall = new int [5][6]; \r\n\r\n\t\tNGRAM ngram = new NGRAM();\r\n\t\t\r\n\t\tfor(i=0; i<5; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println((i+1) + \" th FOLD IS A TEST SET\");\r\n\t\t\t\r\n\t\t\tdouble[][] test_ngram_features = ngram.feature(i,1);\r\n\t\t\tdouble[][] train_ngram_features = ngram.feature(i,0);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"NGRAM FEATURES...OK\");\r\n\t\r\n//\t\t\t\r\n//\t\t\tLIWC liwc = new LIWC();\r\n//\t\t\t\r\n//\t\t\tdouble[][] test_liwc_features = liwc.feature(i,1,test_ngram_features.length);\r\n//\t\t\tdouble[][] train_liwc_features = liwc.feature(i,0,train_ngram_features.length);\r\n//\r\n//\t\t\tSystem.out.println(\"LIWC FEATURES..OK\");\r\n//\t\t\t\r\n//\t\t\tCOMBINE combine = new COMBINE();\r\n//\t\t\tdouble[][] train_features = combine.sum(train_liwc_features,train_ngram_features);\r\n//\t\t\tdouble[][] test_features = combine.sum(test_liwc_features,test_ngram_features);\r\n//\t\t\t\r\n//\t\t\tSystem.out.println(\"COMBINE...OK\");\r\n\t\t\r\n\t\t\tSVMLIGHT svmlight = new SVMLIGHT();\r\n\t\t\tpreci_recall[i]=svmlight.calcc(train_ngram_features, test_ngram_features);\r\n\r\n\t\t}\r\n\t\t\r\n//\t 0 : truthful TP\r\n//\t 1 : truthful TP+FP\r\n//\t 2 : truthful TP+FN\r\n//\t 3 : deceptive TP\r\n//\t 4 : deceptive TP+FP\r\n//\t 5 : deceptive TP+FN\r\n\t\t\r\n\t\tint truthful_TP_sum=0,truthful_TPFP_sum=0,truthful_TPFN_sum=0;\r\n\t\tint deceptive_TP_sum=0,deceptive_TPFP_sum=0,deceptive_TPFN_sum=0;\r\n\t\t\r\n\t\tfor(i=0;i<5;i++) {\r\n\t\t\ttruthful_TP_sum+=preci_recall[i][0];\r\n\t\t\ttruthful_TPFP_sum+=preci_recall[i][1];\r\n\t\t\ttruthful_TPFN_sum+=preci_recall[i][2];\r\n\t\t\t\r\n\t\t\tdeceptive_TP_sum+=preci_recall[i][3];\r\n\t\t\tdeceptive_TPFP_sum+=preci_recall[i][4];\r\n\t\t\tdeceptive_TPFN_sum+=preci_recall[i][5];\r\n\t\t}\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"\\n\\nTRUTHFUL_TP_SUM : \" + truthful_TP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFP_SUM : \" + truthful_TPFP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFN_SUM : \" + truthful_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE_TP_SUM : \" + deceptive_TP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFP_SUM : \" + deceptive_TPFP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFN_SUM : \" + deceptive_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nTRUTHFUL PRECISION : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFP_sum));\r\n\t\tSystem.out.println(\"TRUTHFUL RECALL : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFN_sum));\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE PRECISION : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFP_sum));\r\n\t\tSystem.out.println(\"DECEPTIVE RECALL : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFN_sum));\r\n\t\t\r\n\r\n\t}", "public double score(RankList rl)\r\n\t{\r\n\t\tList<Integer> rel = new ArrayList<Integer>();\r\n\t\tfor(int i=0;i<rl.size();i++)\r\n\t\t\trel.add((int)rl.get(i).getLabel());\r\n\t\tif(rl.size() < 1)\r\n\t\t\treturn -1.0;\r\n\t\t\r\n\t\treturn getDCG(rel, k);\r\n\t}", "public double computeMacroRecall(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual recall values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeRecall(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public void addOneToScore() {\r\n score++;\r\n }", "private double scorePonderated(int i, int total) {\r\n\t\tif (total == 1) {\r\n\t\t\treturn 100.0;\r\n\t\t}\r\n\t\tdouble score = 100.0 / (2.0 * (i + 1));\r\n\t\treturn score;\r\n\t}", "public final float score(\r\n\t\tfloat tf,\r\n\t\tfloat docLength,\r\n\t\tfloat documentFrequency,\r\n\t\tfloat termFrequency,\r\n\t\tfloat keyFrequency) \r\n\t{\r\n\t\tfloat Robertson_tf = k_1*tf/(tf+k_1*(1-b+b*docLength/averageDocumentLength));\r\n\t\tfloat idf =(float) Idf.log(numberOfDocuments/documentFrequency+1);\r\n\t\treturn keyFrequency*Robertson_tf * idf;\r\n\r\n\t}", "int getScoreValue();", "@Override\r\n public void onSuccess(List<ImageLabel> labels) {\n Toast.makeText(AttendanceActivity.this, \"Got results from mlkit!!!\", Toast.LENGTH_SHORT).show();\r\n for (ImageLabel label : labels) {\r\n String text = label.getText();\r\n float confidence = label.getConfidence();\r\n int index = label.getIndex();\r\n Log.d(\"confidence\",text+\" \"+confidence);\r\n }\r\n }", "void calcScore() {\n\t\t\tMat points = new Mat(nodes.size(),2,CvType.CV_32FC1);\n\t\t\tMat line = new Mat(4,1,CvType.CV_32FC1);\n\n\t\t\tif(nodes.size() > 2) {\n\t\t\t\t// We know for sure here that the size() is at least 3\n\t\t\t\tfor(int i = 0; i < nodes.size(); i++) {\n\t\t\t\t\tpoints.put(i, 0, nodes.get(i).x);\n\t\t\t\t\tpoints.put(i, 1, nodes.get(i).y);\n\t\t\t\t}\n\t\n\t\t\t\tImgproc.fitLine(points, line, Imgproc.CV_DIST_L2, 0, 0.01, 0.01);\n\t\t\t\tPoint2 lineNormale = new Point2(line.get(0, 0)[0], line.get(1, 0)[0]);\n\t\t\t\tPoint2 linePoint = new Point2(line.get(2, 0)[0], line.get(3, 0)[0]);\n\t\n\t\t\t\tscore = 0;\n\t\t\t\tdouble totalLength = 0;\n\t\t\t\tdouble[] lengths = new double[nodes.size() - 1];\n\t\t\t\tfor(int i = 0; i < nodes.size(); i++) {\n\t\t\t\t\t// First score is the distance from each point to the fitted line\n\t\t\t\t\t// We normalize the distances by the base size so the size doesn't matter\n\t\t\t\t\tscore += Math.abs(nodes.get(i).distanceToLine(linePoint, lineNormale) / base().norm());\n\t\t\t\t\tif(i > 0) {\n\t\t\t\t\t\t// Then the collinearity of the steps with the base\n\t\t\t\t\t\t// That is cosine -> 1.0, where cosine = a dot b / |a|*|b|\n\t\t\t\t\t\tPoint2 step = nodes.get(i).minus(nodes.get(i-1));\n\t\t\t\t\t\tdouble dotProduct = step.dot(base());\n\t\t\t\t\t\tscore += Math.abs(dotProduct/(base().norm()*step.norm()) - 1);\n\t\t\t\t\t\ttotalLength += step.norm();\n\t\t\t\t\t\tlengths[i-1] = step.norm();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Normalize by the number of nodes so the shorter sequences don't have advantage\n\t\t\t\tscore /= nodes.size();\n\t\t\t\t// Add scores (penalties) for missing nodes\n\t\t\t\t// If we divide the total length by the expected number of steps\n\t\t\t\t// the result should be close to the length of the majority of the visible steps \n\t\t\t\tArrays.sort(lengths);\n\t\t\t\tdouble median = lengths.length % 2 == 0\n\t\t\t\t\t\t? (lengths[nodes.size()/2] + lengths[nodes.size()/2-1]) / 2\n\t\t\t\t\t\t: lengths[nodes.size()/2];\n\t\t\t\tscore += Math.abs(median - totalLength/(maxNodes-1)) / median;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Two or less nodes is not a chain. So give it the worst score possible \n\t\t\t\tscore = Double.MAX_VALUE;\n\t\t\t}\n\t\t}", "@Test\r\n\tpublic void calculMetricInferiorStudentBetterScoreTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricInferior(new ModelValue(25f, 2f), 12f, 8f), new Float(0));\r\n\t}", "public double computeRecall(Label classLabel){\n\t\tdouble tp = this.computeTP(classLabel);\n\t\t//total number of instances of class 'classLabel'\n\t\tdouble totalReal = this.sumColumn(classLabel);\n\t\treturn tp/totalReal;\n\t}", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "public static void ftest(final double[] data1, final double[] data2, final $double f, final $double prob)\r\n throws NRException {\n Beta beta = new Beta();\r\n double df1, df2;\r\n final $double var1 = $(0.0), var2 = $(0.0), ave1 = $(0.0), ave2 = $(0.0);\r\n int n1 = data1.length, n2 = data2.length;\r\n avevar(data1, ave1, var1);\r\n avevar(data2, ave2, var2);\r\n if (var1.$() > var2.$()) { // Make F the ratio of the larger\r\n // variance to the smaller\r\n f.$(var1.$() / var2.$()); // one.\r\n df1 = n1 - 1;\r\n df2 = n2 - 1;\r\n } else {\r\n f.$(var2.$() / var1.$());\r\n df1 = n2 - 1;\r\n df2 = n1 - 1;\r\n }\r\n prob.$(2.0 * beta.betai(0.5 * df2, 0.5 * df1, df2 / (df2 + df1 * f.$())));\r\n if (prob.$() > 1.0)\r\n prob.$(2. - prob.$());\r\n }", "public int compareTo(FontMatch match) {\n/* 710 */ return Double.compare(match.score, this.score);\n/* */ }", "int getScore();", "double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}", "public void score(List<String> modelFiles, String testFile, String outputFile) {\n/* 1180 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 1181 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* 1184 */ int nFold = modelFiles.size();\n/* */ \n/* 1186 */ List<RankList> samples = readInput(testFile);\n/* 1187 */ System.out.print(\"Preparing \" + nFold + \"-fold test data... \");\n/* 1188 */ FeatureManager.prepareCV(samples, nFold, trainingData, testData);\n/* 1189 */ System.out.println(\"[Done.]\");\n/* */ try {\n/* 1191 */ BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), \"UTF-8\"));\n/* 1192 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* 1194 */ List<RankList> test = testData.get(f);\n/* 1195 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1196 */ int[] features = ranker.getFeatures();\n/* 1197 */ if (normalize)\n/* 1198 */ normalize(test, features); \n/* 1199 */ for (RankList l : test) {\n/* 1200 */ for (int j = 0; j < l.size(); j++) {\n/* 1201 */ out.write(l.getID() + \"\\t\" + j + \"\\t\" + ranker.eval(l.get(j)) + \"\");\n/* 1202 */ out.newLine();\n/* */ } \n/* */ } \n/* */ } \n/* 1206 */ out.close();\n/* */ }\n/* 1208 */ catch (IOException ex) {\n/* */ \n/* 1210 */ throw RankLibError.create(\"Error in Evaluator::score(): \", ex);\n/* */ } \n/* */ }", "private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }", "private void EvalFitness(){\r\n _FitVal=0;\r\n for(int i=0; i<7;i++)\r\n for(int j=i+1;j<8;j++){\r\n if( _Data[i]==_Data[j]) _FitVal++;\r\n if(j-i==Math.abs(_Data[i]-_Data[j])) _FitVal++;\r\n }\r\n }", "private double getScore() {\n double score = 0;\n score += getRBAnswers(R.id.radiogroup1, R.id.radiobutton_answer12);\n score += getRBAnswers(R.id.radiogroup2, R.id.radiobutton_answer21);\n score += getRBAnswers(R.id.radiogroup3, R.id.radiobutton_answer33);\n score += getRBAnswers(R.id.radiogroup4, R.id.radiobutton_answer41);\n score += getCBAnswers();\n score += getTextAns();\n score = Math.round(score / .0006);\n score = score / 100;\n return score;\n }", "protected abstract void calcScores();", "@Override\r\n\tpublic int compareTo(CandidateDoc o) {\n\t\tif((score-o.score)>0)\r\n\t\t{\r\n\t\t\treturn 1;\r\n\t\t}else if((score-o.score)<0)\r\n\t\t{\r\n\t\t\treturn -1;\r\n\t\t}else\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t}", "public int computeTN(Label classLabel){\n\n\t\t/*\n\t\t * TODO: optimize this loggic\n\t\t */\n\t\t//count the totla number of predictions\n\t\tint total = sumAll();\n\n\n\n\t\tint tp = this.computeTP(classLabel);\n\t\tint fp = this.computeFP(classLabel);\n\t\tint fn = this.computeFN(classLabel);\n\n\t\treturn total - tp - fp - fn;\n\t}", "public Float getScore() {\n return score;\n }", "protected abstract double relevantScore(Tweet tweet);", "protected float computeModelScoreOnValidation() {\n/* 549 */ float score = computeModelScoreOnValidation(0, this.validationSamples.size() - 1);\n/* 550 */ return score / this.validationSamples.size();\n/* */ }", "private Label createScoreLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"Score:\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(2f*scale,2f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.70f);\n return text;\n }", "public double calculateFScore() {\n final double divisor = calculatePrecision() + calculateRecall();\n if(divisor == 0) {\n return 0.0;\n } else {\n return 2 * ((calculatePrecision() * calculateRecall()) / (calculatePrecision() + calculateRecall()));\n }\n }", "public void calcScore(int score) {\r\n\t\tif (initFinish)\r\n\t\t\tthis.score += score * this.multy;\r\n\t\t// TODO delete\r\n//\t\tSystem.out.println(\"score: \" + this.score + \"multy: \" + this.multy);\r\n\t}", "public void score(){\n\t\tscores=new float[3];\n\t\ttop3=new String[3];\n\t\tfor(int i=0;i<3;i++){\n\t\t\ttop3[i]=new String();\n\t\t\tscores[i]=(float)0;\n\t\t}\n\t\t//System.out.println(doclist.size());\n\t\tfor(int i=0;i<doclist.size();i++){\n\t\t\ttry{\n\t\t\t\tDocProcessor dp=new DocProcessor(doclist.get(i));\n\t\t\t\tdp.tokenizing();\n\t\t\t\tdp.stem();\n\t\t\t\t//System.out.println(dp.getContent());\n\t\t\t\t/*for(int j=2;j>=0;j--){\n\t\t\t\t\tSystem.out.println(\"top\"+(3-j)+\": \"+scores[j]);\n\t\t\t\t\tSystem.out.println(top3[j]);\n\t\t\t\t}*/\n\t\t\t\tfloat score=dp.score(this.keywords);\n\t\t\t\tfor(int j=2;j>=0;j--){\n\t\t\t\t\tif(score>scores[j]){\n\t\t\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\t\t\tscores[k]=scores[k+1];\n\t\t\t\t\t\t\ttop3[k]=top3[k+1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscores[j]=score;\n\t\t\t\t\t\ttop3[j]=dp.getContent();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*for(int j=2;j>=0;j--){\n\t\t\t\t\tSystem.out.println(\"top\"+(3-j)+\": \"+scores[j]);\n\t\t\t\t\tSystem.out.println(top3[j]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"*******************************\");*/\n\t\t\t}catch(NullPointerException f){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "private double calcB1() {\n double[] dataX = dsX.getDataX();\n double[] dataY = dsY.getDataY();\n double sumX = 0;\n double sumY = 0;\n double sumXY = 0;\n double sumXsq = 0;\n\n for (int i = 0; i < dataX.length; i++) {\n sumX += dataX[i];\n sumY += dataY[i];\n sumXY += dataX[i] * dataY[i];\n sumXsq += Math.pow(dataX[i], 2);\n }\n return (((dataX.length * sumXY) - (sumX * sumY)) / ((dataX.length * sumXsq) - (Math.pow(sumX, 2))));\n }", "void calcFittest(){\n System.out.println(\"Wall hugs\");\n System.out.println(this.wallHugs);\n\n System.out.println(\"Freedom points\");\n System.out.println(this.freedomPoints);\n\n System.out.println(\"Visited points\");\n System.out.println(this.vistedPoints);\n\n this.fitnessScore = freedomPoints - wallHugs - vistedPoints;\n System.out.println(\"Individual fit score: \" + fitnessScore);\n }", "private static boolean predictWinner1(int[] scores) {\n Map<String, Integer> map = new HashMap<>();\n return predictWinner1(scores, 0, scores.length - 1, 0, map) >= 0 ? true : false;\n }", "float getConfidence();", "@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "private static float computeScore(GameModel model) {\n\n float score = 0;\n int numEmptyCells = 0;\n for (byte b : model.getGrid()) {\n if (b < 0) {\n numEmptyCells++;\n } else {\n score += 1 << b;\n }\n }\n return score * (1 + numEmptyCells * EMPTY_CELL_SCORE_BONUS);\n }", "@Override\r\n\tpublic int calculax2p(int score, boolean zerou) {\r\n\t\tif(score > getMaiorScore()) {\r\n\t\t\treturn score / 1000;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public int getAdditiveScoreOnFirstAllele(int idx, int i) {\n\t\tint posByte = QCedSnpIndex.get(i) >> shift;\r\n\t\tint posBit = (QCedSnpIndex.get(i) & 0xf) << 1;\r\n\t\tint g = (genotypeMat[idx][posByte] >> (posBit)) & 3;\r\n\t\treturn g == ConstValues.MISSING_GENOTYPE ? g : (2 - g);\r\n\t\t// if (g == 1) {// 01\r\n\t\t// return 3;\r\n\t\t// } else if (g == 0) {\r\n\t\t// return 0;\r\n\t\t// } else if (g == 2) {\r\n\t\t// return 1;\r\n\t\t// } else {\r\n\t\t// return 2;\r\n\t\t// }\r\n\t}", "double CalculateFitness(double fun) \n\t {\n\t\t double result=0;\n\t\t if(fun>=0)\n\t\t {\n\t\t\t result=1/(fun+1);\n\t\t }\n\t\t else\n\t\t {\n\t\t\t \n\t\t\t result=0;\n\t\t }\n\t\t return result;\n\t }", "@Override\n\tpublic double[] loss(double[] x, double[] label) {\n\t\tdouble[] temp = MatrixOperation.zero(x.length);\n\t\tfor(int i = 0;i<x.length;i++) {\n\t\t\ttemp[i] = (x[i] - label[i]) * (x[i] - label[i]) / 2;\n\t\t}\n\t\treturn temp;\n\t}", "public void give_score(int n){\n final_score=0.25*(n-m.get_m()+1)+0.2*(n-h.get_h()+1)+0.25*(n-l.get_l()+1)+0.3*(n-a.get_a()+1);\r\n }" ]
[ "0.80101514", "0.6735681", "0.6085114", "0.6070547", "0.5948859", "0.5856856", "0.5814857", "0.5767737", "0.5745028", "0.5723341", "0.56911826", "0.56911826", "0.5675629", "0.5675629", "0.5670531", "0.55606663", "0.55545294", "0.5548808", "0.553036", "0.55070555", "0.5500993", "0.549942", "0.5481856", "0.5475769", "0.5475769", "0.5451111", "0.54426473", "0.5395299", "0.5373681", "0.5361396", "0.53313726", "0.5322027", "0.53100336", "0.5296411", "0.52842635", "0.5278342", "0.52613425", "0.5257411", "0.52559435", "0.52322316", "0.5231087", "0.52046096", "0.51985306", "0.5191089", "0.51907986", "0.5190637", "0.51586866", "0.51542765", "0.512884", "0.51159745", "0.511008", "0.51085037", "0.51063585", "0.51061594", "0.5096388", "0.5081315", "0.507316", "0.50585926", "0.50399345", "0.5022783", "0.49940547", "0.4993989", "0.4982522", "0.4981347", "0.49724418", "0.4970609", "0.4969536", "0.49674827", "0.4965587", "0.49533677", "0.49461785", "0.4938245", "0.49334055", "0.49323967", "0.49312988", "0.4930424", "0.49194646", "0.4914061", "0.49022183", "0.4885629", "0.48838323", "0.48775604", "0.48773253", "0.48769128", "0.48765534", "0.4873947", "0.48722953", "0.48636943", "0.48612356", "0.4858615", "0.48573178", "0.48552728", "0.4844731", "0.48434675", "0.4838666", "0.4836872", "0.48363778", "0.483577", "0.48347047", "0.48307648" ]
0.8361131
0
Computes the macroaveraged F1 score.
public double computeMacroF1(){ double res = 0; //iterate all labels to compute their individual f1 scores for(Label l : labels){ res += this.computeF1Score(l); } //take the average res = res/((double)labels.size()); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double computeF1Score(Label classLabel){\n\t\tdouble r = this.computeRecall(classLabel);\n\t\tdouble p = this.computePrecision(classLabel);\n\t\treturn (2.0 * p * r)/(p+r);\n\t}", "double ComputeFT_F1Score(individual st){\n\t\tdouble sum = 0, ft;\n\t\tint i;\n\t\tdouble[] tm;\n\t\t\n\t\tint tp, tn, fp, fn;\n\n\t\tdouble precision, recall;\n\t\ttp=0;\n\t\ttn=0;\n\t\tfp=0;\n\t\tfn=0;\n\t\t\n\t\ttm=ComputeTest(st.chrom);\n\t\tfor(i = 0; i < NUMFITTEST; i++) {\n\t\t\tft = PVAL(tm[i]);\n\t\t\t\n//\t\t\tSystem.out.println(\"TM[i]:\"+ft);\n\t\t\tif(ft<0) {\t\t\t\t\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\ttn++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\tfp++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttp++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n//\t\t\t\n\t\t}\t\n//\t\t\n//\t\tSystem.out.println(\"TP:\"+tp);\n//\t\tSystem.out.println(\"FP:\"+fp);\n//\t\tSystem.out.println(\"FN:\"+fn);\n//\t\tSystem.out.println(\"TN:\"+tn);\n\t\tprecision=tp/(tp+fp);\n\t\trecall=tp/(tp+fn);\n\t\tsum=2*precision*recall/(precision+recall);\n\t\treturn sum;\n\t}", "public double computeMacroRecall(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual recall values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeRecall(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }", "public abstract double score(double tf, double docLength, double precomp);", "public void calculateAverage() {\n\n if (turn == 1) {\n p1.setTotalScore(p1.getTotalScore() + turnScore);\n\n p1.setTotalDarts(p1.getTotalDarts() + 1);\n\n float p1Average = p1.getTotalScore() / p1.getTotalDarts();\n p1.setAverage(p1Average);\n\n } else if (turn == 2) {\n p2.setTotalDarts(p2.getTotalDarts() + 1);\n p2.setTotalScore(p2.getTotalScore() + turnScore);\n\n float p2Average = p2.getTotalScore() / p2.getTotalDarts();\n p2.setAverage(p2Average);\n }\n\n\n }", "public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}", "public int average() {\n int total = 0;\n\n for (int score : scores) {\n total += score;\n }\n\n return total / scores.length;\n }", "public double courseAverage()\n\t{\n\t\tdouble dQuiz;\n\t\tdouble dProj;\n\t\tdouble dTest;\n\t\tdouble dFinal;\n\t\tdouble dWeightedAvg;\n\t\t\n\t\tswitch(quizzesGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1:\n\t\t\t\tdQuiz= (1.0 * quiz1) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdQuiz=((1.0 * quiz1+quiz2)/2) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3)/3) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4)/4) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4 + quiz5)/5) * pctQ;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdQuiz = 0;\n\t\t}\n\t\tswitch(projGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1: \n\t\t\t\tdProj=((1.0 * proj1)) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdProj=((1.0 * proj1 + proj2)/2) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3)/3)*pctP;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3 + proj4)/4) * pctP;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdProj = 0;\n\t\t}\n\t\tswitch(testGraded)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\tdTest=(1.0 * test1) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdTest=((1.0 * test1+test2)/2) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdTest=((1.0 * test1 + test2 + test3)/3) * pctT;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdTest = 0;\n\t\t}\n\t\tif(recordedFinalExam==true)\n\t\t{\n\t\t\tdFinal=finalExam*pctF;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdFinal=0;\n\t\t}\n\t\tdWeightedAvg= (dProj + dTest + dQuiz + dFinal);\n\t\treturn dWeightedAvg;\n\t\t\n\t}", "public double computeMacroPrecision(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual precision values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computePrecision(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public static double getAveg(int[] scores) {\r\n\t\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < scores.length; ++i) {\r\n\t\t\tsum += scores[i];\r\n\t\t}\r\n\t\t\r\n\t\treturn ((double)(sum))/(scores.length);\r\n\t\r\n\t}", "public void average() {\n\t\tif (averaged)\n\t\t\tthrow new AssertionError(\"can't average twice!!\");\n\t\t\n\t\tscale = 1.0/(double)t;\n\t\t\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i] = (t+1.0)*w[i] - wupdates[i];\n\t\t\n\t\taveraged = true;\n\t\n\t}", "void addScore(double score){\n\t\tsumScore+=score;\n\t\tnumScores++;\n\t\taverage = sumScore/numScores;\n\t}", "static void chapter1Milestone2(double num1, double num2){\n double average = (num1 + num2) / 2;\n System.out.println(\"Average is: \" + average);\n }", "public abstract double score(double tf, double docLength);", "public void findAvg()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n total += scores[i][j];\n }\n }\n System.out.println(\"The class average test score is \" + \n total/24 + \".\");\n }", "@Override\n\t\t\tpublic double computeScore(Shop arg0, Shop arg1) {\n\t\t\t\treturn 0;\n\t\t\t}", "@Override\n\t\t\tpublic double computeScore(Shop arg0, Shop arg1) {\n\t\t\t\treturn 0;\n\t\t\t}", "double totalMoviesAverageScore() {\n // call totalMovieAverage with no movie name\n // so filter will filter nothing and we'll get all the movies\n return totalMovieAverage(\"\");\n }", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "protected abstract void calcScores();", "@Override\n\tprotected double scoreFDSD(int arg0, int arg1) {\n\t\treturn 0;\n\t}", "public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }", "public double getAverageScore() {\n\t return this.totalScore / this.count; \n\t }", "double average();", "protected float computeModelScoreOnTraining() {\n/* 508 */ float s = computeModelScoreOnTraining(0, this.samples.size() - 1, 0);\n/* 509 */ s /= this.samples.size();\n/* 510 */ return s;\n/* */ }", "double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}", "public static void incrementScore() {\n\t\tscore++;\n\t}", "@Override\n public int calculateScore(Object boardManager) {\n int stepScore = calStepScore((SlidingBoardManager) boardManager);\n int timeScore = calTimeScore((SlidingBoardManager) boardManager);\n\n if (stepScore < 0) {\n stepScore = 0;\n }\n if (timeScore < 0) {\n timeScore = 0;\n }\n\n return (stepScore + timeScore) / 2;\n }", "public void process()\n {\n for (int i = 0; i <= names.length-1; i++)\n {\n int x = 0;\n System.out.println(\"\");\n System.out.print(names[i] + \" had test scores of \");\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n System.out.print(scores[i][j] + \", \");\n \n x += scores[i][j];\n \n }\n System.out.print(\" Test average is \" + x/4 + \".\");\n }\n System.out.println(\"\");\n findL();\n findH();\n findAvg();\n }", "public void calculateScore() {\n for (Sequence seq: currentSeq) {\n double wordWeight = Retriever.getWeight(seq);\n String token = seq.getToken();\n int size = seq.getRight() - seq.getLeft() + 1;\n int titleCount = getCount(token.toLowerCase(), title.toLowerCase());\n if (titleCount != 0) {\n setMatch(size);\n setTitleContains(true);\n }\n int lowerCount = getCount(token.toLowerCase(), lowerContent);\n if (lowerCount == 0) {\n// scoreInfo += \"Token: \" + token + \" Original=0 Lower=0 WordWeight=\" + wordWeight + \" wordTotal=0\\n\";\n continue;\n }\n int originalCount = getCount(token, content);\n lowerCount = lowerCount - originalCount;\n if (lowerCount != 0 || originalCount != 0) {\n setMatch(size);\n }\n double originalScore = formula(wordWeight, originalCount);\n double lowerScore = formula(wordWeight, lowerCount);\n final double weight = 1.5;\n double addedScore = weight * originalScore + lowerScore;\n// scoreInfo += \"Token: \" + token + \" Original=\" + originalScore + \" Lower=\" + lowerScore +\n// \" WordWeight=\" + wordWeight + \" wordTotal=\" + addedScore + \"\\n\";\n dependencyScore += addedScore;\n }\n currentSeq.clear();\n }", "int score();", "int score();", "@Override\n\tpublic double getTotalScore() {\n\t\treturn score;\n\t}", "public void calcScore(int score) {\r\n\t\tif (initFinish)\r\n\t\t\tthis.score += score * this.multy;\r\n\t\t// TODO delete\r\n//\t\tSystem.out.println(\"score: \" + this.score + \"multy: \" + this.multy);\r\n\t}", "public Double getTotalScore() {\n return getExperienceTime() * 1.5 + meanGPA();\n }", "float getScore();", "float getScore();", "public static void computeAvg(functionRuntimes fRT)\r\n {\r\n\r\n }", "@Override\n protected float score(BasicStats stats, float termFreq, float docLength) {\n float k1 = (float)1.2;\n float k2 = 750;\n float b = (float)0.75;\n float N = stats.getNumberOfDocuments();\n float df = stats.getDocFreq();\n float qtermFreq = 1;\n float score = (float)Math.log((N - df + 0.5)/df+0.5);\n score*=((k1+1)*termFreq)/(k1*(1-b+b*(docLength/stats.getAvgFieldLength()))+termFreq);\n score*=((k2+1)*qtermFreq)/(k2+qtermFreq);\n return score; }", "@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}", "public int score(){\r\n\t\t//to be implemented: should return game score \r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tscore= frames.get(i).score();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn score + bonusGame;\r\n\t}", "public static double averageQuizScore(double quiz1, double quiz2, double quiz3){\n return (quiz1 + quiz2 + quiz3) / 3;\n }", "public static double calcAverage(double testScore1, double testScore2, double testScore3) {\n\t\tdouble average; // average of all 3 test scores\n\t\t\n\t\taverage = (testScore1 + testScore2 + testScore3) / 3;\n\t\t\n\t\treturn average;\t//returns an average of all 3 \n\t}", "public fuseAverage1(int[] sortedSnapshot) {\n\t\tthis.sortedSnapshot = sortedSnapshot;\n\t}", "private void calculateAverages(){\n for (int i=0; i<40; i=i+4){\n totalGoalsScored1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored1 = totalGoalsScored1/numberItems;\n //Total and average scored goals of team 2\n for (int i=2; i<40; i=i+4){\n totalGoalsScored2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored2 = totalGoalsScored2/numberItems;\n //Total and average received goals of team 1\n for (int i=1; i<40; i=i+4){\n totalGoalsReceived1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived1 = totalGoalsReceived1/numberItems;\n //Total and average received goals of team 2\n for (int i=3; i<40; i=i+4){\n totalGoalsReceived2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived2 = totalGoalsReceived2/numberItems;\n }", "public int finalScore() {\n\t\tint total = 0;\n\t\tfor (Frame frame : frames) {\n\t\t\ttotal += frame.getScore(); // running total of each frames score added \n\t\t}\n\t\treturn total;\n\t}", "public double calculateFScore() {\n final double divisor = calculatePrecision() + calculateRecall();\n if(divisor == 0) {\n return 0.0;\n } else {\n return 2 * ((calculatePrecision() * calculateRecall()) / (calculatePrecision() + calculateRecall()));\n }\n }", "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 calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "public double average(){\n\t\t// computes the overall grade\n\t\tfinal double\n\t\t\tPROGRAM_WEIGHT = .40,\n\t\t\tEXAM_WEIGHT = 1 - PROGRAM_WEIGHT;\n\t\t\n\t\tdouble overallGrade;\n\t\t\n\t\toverallGrade = programGrade * PROGRAM_WEIGHT + examGrade * EXAM_WEIGHT;\n\t\t\n\t\treturn overallGrade;\n\t}", "@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}", "public double average(int first, int last){\n double final = 0;\n for(int i = first; i < last; i++){\n final += scores[i];\n }\n return final/(last-first+1);\n}", "public static void calculate_average_ratio1() {\n double sum = 0;\n\n for (int i = 0; i < Variables.pixels.size(); i++) {\n sum += Variables.pixels.get(i).getRatio1();\n }\n Variables.average_ratio1 = sum / Variables.pixels.size();\n }", "public static void main( String args[] ) throws Exception\n\t{\n\t\t\tBufferedReader infile = new BufferedReader( new FileReader( \"ExamScores.txt\" ) );\n\n\t\t\t// you declare all needed ArrayLists and other variables from here on.\n\t\t\tArrayList<String> lines = new ArrayList<String>();\n\n\t\t\tSystem.out.println(\"\\nSTEP #1: 50%\"); // 50%\n\t\t\twhile (infile.ready()) {\n\t\t\t\tString line = infile.readLine();\n\t\t\t\tSystem.out.println(line);\n\t\t\t\tlines.add(line);\n\t\t\t}\n\t\t\tinfile.close();\n\n\n\t\t\tSystem.out.println(\"\\nSTEP #2: 25%\"); // 75 %\n\t\t\tCollections.sort(lines);\n\t\t\tfor (String s: lines)\n\t\t\t\tSystem.out.println(s);\n\n\t\t\tSystem.out.println(\"\\nSTEP #3: 10%\"); // 85%\n\n\t\t\tTreeMap<String, ArrayList<Integer>> st2sc = new TreeMap<String, ArrayList<Integer>>();\n\t\t\tTreeMap<Double, String> ave2st = new TreeMap<Double, String>();\n\t\t\tint[] sum = new int[lines.get(0).split(\"\\\\s+\").length-1];\n\t\t\t\n\t\t\tinfile = new BufferedReader ( new FileReader(\"query.txt\") );\n\t\t\tString[] queryS= infile.readLine().split(\" \");\n\t\t\tint[] query = new int[queryS.length];\n\t\t\tfor (int i=0; i<queryS.length; i++)\n\t\t\t\tquery[i]=Integer.parseInt(queryS[i]);\n\t\t\tfor (String s: lines)\n\t\t\t{\t\n\t\t\t\tdouble sumq = 0;\n\t\t\t\tdouble aveq = 0;\n\t\t\t\tString[] tokens = s.split(\"\\\\s+\");\n\t\t\t\tArrayList<Integer> scores = new ArrayList<Integer>();\n\t\t\t\tfor (int t=1; t<tokens.length; t++){\n\t\t\t\t\tscores.add(Integer.parseInt(tokens[t]));\n\t\t\t\t}\n\t\t\t\tst2sc.put(tokens[0], scores);\n\t\t\t\tfor (int q: query)\n\t\t\t\t\tsumq += Integer.parseInt(tokens[q]);\n\t\t\t\tfor (int nth = 0; nth<sum.length; nth++){\n\t\t\t\t\tsum[nth]+= Integer.parseInt(tokens[nth+1]);\n\t\t\t\t}\n\t\t\t\taveq = sumq/3;\n\t\t\t\tave2st.put(aveq, tokens[0]);\n\t\t\t}\n\t\t\tfor (double f: ave2st.keySet())\n\t\t\t\tSystem.out.printf(ave2st.get(f)+\" \"+\"%.2f\\n\", f);\n\n\t\t\tSystem.out.println(\"\\nSTEP #4: 15%\"); // 100%\n\t\t\t\n\t\t\tint lowest = sum[0];\n\t\t\tint which = 0;\n\t\t\tfor (int i=1; i<sum.length; i++)\n\t\t\t{\n\t\t\t\tif (sum[i]<lowest)\n\t\t\t\t{\n\t\t\t\t\tlowest = sum[i];\n\t\t\t\t\twhich = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"exam\"+(which+1)+\" had the lowest average\");\n\n\n\t}", "public abstract float getScore();", "public abstract double score(\n\t\tdouble tf,\n\t\tdouble docLength,\n\t\tdouble n_t,\n\t\tdouble F_t,\n\t\tdouble keyFrequency);", "double calculateScore(String documentId);", "double agression();", "public float computeTermScore(int term, int dl, int tf, GlobalStats stats);", "@Override\n\tpublic void inputScore() {\n\n\t}", "@Override\n public Double average() {\n return (sum() / (double) count());\n }", "public float method_373(double var1) {\r\n float var3 = this.method_372() - this.method_371();\r\n return this.method_371() + var3 * ((float)var1 / 16.0F);\r\n }", "private void calculateOverall()\n {\n ArrayList<Integer> average = new ArrayList<Integer>(1);\n ArrayList<Integer> median = new ArrayList<Integer>(1);\n ArrayList<Integer> mode = new ArrayList<Integer>();\n ArrayList<Integer> stdDev = new ArrayList<Integer>(1);\n \n int avg = 0;\n int med = 90;\n int mod = 90;\n int dev = 0;\n \n int[] modeArray = new int[100];\n \n for (int i = 0; i < 100; i++) {\n \tmodeArray[i] = 0;\n }\n \n for (Integer score : allScores) {\n \tavg += score;\n \tmodeArray[score]++;\n }\n \n for (int i = 0; i < 100; i++) {\n \tif (modeArray[i] > mod) {\n \t\tmod = modeArray[i];\n \t}\n }\n \n avg = avg / allScores.size();\n \n Collections.sort(allScores);\n med = allScores.get(allScores.size() / 2);\n \n for (Integer score : allScores) {\n \tdev += Math.pow(score - avg, 2);\n }\n dev = (int)Math.floor(Math.sqrt(dev / allScores.size()));\n\n // TODO: Perform the actual calculations here\n average.add(avg);\n median.add(med);\n mode.add(mod);\n stdDev.add(dev);\n\n this.overallAnalytics.put(\"Average\", average);\n this.overallAnalytics.put(\"Median\", median);\n this.overallAnalytics.put(\"Mode\", mode);\n this.overallAnalytics.put(\"Standard Deviation\", stdDev);\n }", "public float method_370(double var1) {\r\n float var3 = this.method_369() - this.method_368();\r\n return this.method_368() + var3 * ((float)var1 / 16.0F);\r\n }", "public void addScore()\n {\n score += 1;\n }", "public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }", "public double getOverallScore()\n\t{\n\t\t return ((((((this.quiz1/QUIZ_MAX) + (this.quiz2/QUIZ_MAX) + (this.quiz3/QUIZ_MAX)) / 3) * QUIZ_WEIGHT) + ((this.midtermExam / MIDTERM_MAX) * MIDTERM_WEIGHT) + ((this.finalExam / FINAL_MAX) * FINAL_WEIGHT)) * 100);\n\t}", "protected final void calcScore()\n {\n\n m_score = SCORE_OTHER;\n\n if (null == m_targetString)\n calcTargetString();\n }", "public float averageAnswers() {\n\t\tfloat out = 0;\n\t\t\n\t\tIterator<SolveResult> iter = super.iterator();\n\t\t\n\t\twhile(iter.hasNext()) {\n\t\t\tSolveResult thisResult = iter.next();\n\t\t\tfloat clues = ResultSet.clueCount(thisResult.puzzle);\n\t\t\tfloat cardinality = thisResult.puzzle.getCardinality();\n\t\t\tfloat conflicts = thisResult.puzzle.conflictCount();\n\t\t\t\n\t\t\tif(!(cardinality - clues - conflicts < 0)) {\n\t\t\t\tout += ((cardinality - clues - conflicts) / (81 - clues));\n\t\t\t}\n\t\t}\n\t\treturn out / super.size();\n\t}", "public double sum() {\n/* 196 */ return this.mean * this.count;\n/* */ }", "public int getAverageScore() {\n\t\treturn totalScore / quizCount;\n\t}", "Float getScore();", "@Override\n public int accion() {\n return this.alcance*2/3*3;\n }", "private void computeAverageFrequencyDelayValue() {\n\tthis.averageFrequencyDelayValue = value * this.averageDelay;\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public final double[] score0( double[] data, double[] preds ) {\n java.util.Arrays.fill(preds,0);\n h2o_rf_02_Forest_0.score0(data,preds);\n h2o_rf_02_Forest_1.score0(data,preds);\n h2o_rf_02_Forest_2.score0(data,preds);\n h2o_rf_02_Forest_3.score0(data,preds);\n h2o_rf_02_Forest_4.score0(data,preds);\n h2o_rf_02_Forest_5.score0(data,preds);\n h2o_rf_02_Forest_6.score0(data,preds);\n h2o_rf_02_Forest_7.score0(data,preds);\n h2o_rf_02_Forest_8.score0(data,preds);\n h2o_rf_02_Forest_9.score0(data,preds);\n h2o_rf_02_Forest_10.score0(data,preds);\n h2o_rf_02_Forest_11.score0(data,preds);\n h2o_rf_02_Forest_12.score0(data,preds);\n h2o_rf_02_Forest_13.score0(data,preds);\n h2o_rf_02_Forest_14.score0(data,preds);\n h2o_rf_02_Forest_15.score0(data,preds);\n h2o_rf_02_Forest_16.score0(data,preds);\n h2o_rf_02_Forest_17.score0(data,preds);\n h2o_rf_02_Forest_18.score0(data,preds);\n h2o_rf_02_Forest_19.score0(data,preds);\n h2o_rf_02_Forest_20.score0(data,preds);\n h2o_rf_02_Forest_21.score0(data,preds);\n h2o_rf_02_Forest_22.score0(data,preds);\n h2o_rf_02_Forest_23.score0(data,preds);\n h2o_rf_02_Forest_24.score0(data,preds);\n h2o_rf_02_Forest_25.score0(data,preds);\n h2o_rf_02_Forest_26.score0(data,preds);\n h2o_rf_02_Forest_27.score0(data,preds);\n h2o_rf_02_Forest_28.score0(data,preds);\n h2o_rf_02_Forest_29.score0(data,preds);\n h2o_rf_02_Forest_30.score0(data,preds);\n h2o_rf_02_Forest_31.score0(data,preds);\n h2o_rf_02_Forest_32.score0(data,preds);\n h2o_rf_02_Forest_33.score0(data,preds);\n h2o_rf_02_Forest_34.score0(data,preds);\n h2o_rf_02_Forest_35.score0(data,preds);\n h2o_rf_02_Forest_36.score0(data,preds);\n h2o_rf_02_Forest_37.score0(data,preds);\n h2o_rf_02_Forest_38.score0(data,preds);\n h2o_rf_02_Forest_39.score0(data,preds);\n h2o_rf_02_Forest_40.score0(data,preds);\n h2o_rf_02_Forest_41.score0(data,preds);\n h2o_rf_02_Forest_42.score0(data,preds);\n h2o_rf_02_Forest_43.score0(data,preds);\n h2o_rf_02_Forest_44.score0(data,preds);\n h2o_rf_02_Forest_45.score0(data,preds);\n h2o_rf_02_Forest_46.score0(data,preds);\n h2o_rf_02_Forest_47.score0(data,preds);\n h2o_rf_02_Forest_48.score0(data,preds);\n h2o_rf_02_Forest_49.score0(data,preds);\n h2o_rf_02_Forest_50.score0(data,preds);\n h2o_rf_02_Forest_51.score0(data,preds);\n h2o_rf_02_Forest_52.score0(data,preds);\n h2o_rf_02_Forest_53.score0(data,preds);\n h2o_rf_02_Forest_54.score0(data,preds);\n h2o_rf_02_Forest_55.score0(data,preds);\n h2o_rf_02_Forest_56.score0(data,preds);\n h2o_rf_02_Forest_57.score0(data,preds);\n h2o_rf_02_Forest_58.score0(data,preds);\n h2o_rf_02_Forest_59.score0(data,preds);\n h2o_rf_02_Forest_60.score0(data,preds);\n h2o_rf_02_Forest_61.score0(data,preds);\n h2o_rf_02_Forest_62.score0(data,preds);\n h2o_rf_02_Forest_63.score0(data,preds);\n h2o_rf_02_Forest_64.score0(data,preds);\n h2o_rf_02_Forest_65.score0(data,preds);\n h2o_rf_02_Forest_66.score0(data,preds);\n h2o_rf_02_Forest_67.score0(data,preds);\n h2o_rf_02_Forest_68.score0(data,preds);\n h2o_rf_02_Forest_69.score0(data,preds);\n h2o_rf_02_Forest_70.score0(data,preds);\n h2o_rf_02_Forest_71.score0(data,preds);\n h2o_rf_02_Forest_72.score0(data,preds);\n h2o_rf_02_Forest_73.score0(data,preds);\n h2o_rf_02_Forest_74.score0(data,preds);\n h2o_rf_02_Forest_75.score0(data,preds);\n h2o_rf_02_Forest_76.score0(data,preds);\n h2o_rf_02_Forest_77.score0(data,preds);\n h2o_rf_02_Forest_78.score0(data,preds);\n h2o_rf_02_Forest_79.score0(data,preds);\n h2o_rf_02_Forest_80.score0(data,preds);\n h2o_rf_02_Forest_81.score0(data,preds);\n h2o_rf_02_Forest_82.score0(data,preds);\n h2o_rf_02_Forest_83.score0(data,preds);\n h2o_rf_02_Forest_84.score0(data,preds);\n h2o_rf_02_Forest_85.score0(data,preds);\n h2o_rf_02_Forest_86.score0(data,preds);\n h2o_rf_02_Forest_87.score0(data,preds);\n h2o_rf_02_Forest_88.score0(data,preds);\n h2o_rf_02_Forest_89.score0(data,preds);\n h2o_rf_02_Forest_90.score0(data,preds);\n h2o_rf_02_Forest_91.score0(data,preds);\n h2o_rf_02_Forest_92.score0(data,preds);\n h2o_rf_02_Forest_93.score0(data,preds);\n h2o_rf_02_Forest_94.score0(data,preds);\n h2o_rf_02_Forest_95.score0(data,preds);\n h2o_rf_02_Forest_96.score0(data,preds);\n h2o_rf_02_Forest_97.score0(data,preds);\n h2o_rf_02_Forest_98.score0(data,preds);\n h2o_rf_02_Forest_99.score0(data,preds);\n h2o_rf_02_Forest_100.score0(data,preds);\n h2o_rf_02_Forest_101.score0(data,preds);\n h2o_rf_02_Forest_102.score0(data,preds);\n h2o_rf_02_Forest_103.score0(data,preds);\n h2o_rf_02_Forest_104.score0(data,preds);\n h2o_rf_02_Forest_105.score0(data,preds);\n h2o_rf_02_Forest_106.score0(data,preds);\n h2o_rf_02_Forest_107.score0(data,preds);\n h2o_rf_02_Forest_108.score0(data,preds);\n h2o_rf_02_Forest_109.score0(data,preds);\n h2o_rf_02_Forest_110.score0(data,preds);\n h2o_rf_02_Forest_111.score0(data,preds);\n h2o_rf_02_Forest_112.score0(data,preds);\n h2o_rf_02_Forest_113.score0(data,preds);\n h2o_rf_02_Forest_114.score0(data,preds);\n h2o_rf_02_Forest_115.score0(data,preds);\n h2o_rf_02_Forest_116.score0(data,preds);\n h2o_rf_02_Forest_117.score0(data,preds);\n h2o_rf_02_Forest_118.score0(data,preds);\n h2o_rf_02_Forest_119.score0(data,preds);\n h2o_rf_02_Forest_120.score0(data,preds);\n h2o_rf_02_Forest_121.score0(data,preds);\n h2o_rf_02_Forest_122.score0(data,preds);\n h2o_rf_02_Forest_123.score0(data,preds);\n h2o_rf_02_Forest_124.score0(data,preds);\n h2o_rf_02_Forest_125.score0(data,preds);\n h2o_rf_02_Forest_126.score0(data,preds);\n h2o_rf_02_Forest_127.score0(data,preds);\n h2o_rf_02_Forest_128.score0(data,preds);\n h2o_rf_02_Forest_129.score0(data,preds);\n h2o_rf_02_Forest_130.score0(data,preds);\n h2o_rf_02_Forest_131.score0(data,preds);\n h2o_rf_02_Forest_132.score0(data,preds);\n h2o_rf_02_Forest_133.score0(data,preds);\n h2o_rf_02_Forest_134.score0(data,preds);\n h2o_rf_02_Forest_135.score0(data,preds);\n h2o_rf_02_Forest_136.score0(data,preds);\n h2o_rf_02_Forest_137.score0(data,preds);\n h2o_rf_02_Forest_138.score0(data,preds);\n h2o_rf_02_Forest_139.score0(data,preds);\n h2o_rf_02_Forest_140.score0(data,preds);\n h2o_rf_02_Forest_141.score0(data,preds);\n h2o_rf_02_Forest_142.score0(data,preds);\n h2o_rf_02_Forest_143.score0(data,preds);\n h2o_rf_02_Forest_144.score0(data,preds);\n h2o_rf_02_Forest_145.score0(data,preds);\n h2o_rf_02_Forest_146.score0(data,preds);\n h2o_rf_02_Forest_147.score0(data,preds);\n h2o_rf_02_Forest_148.score0(data,preds);\n h2o_rf_02_Forest_149.score0(data,preds);\n h2o_rf_02_Forest_150.score0(data,preds);\n h2o_rf_02_Forest_151.score0(data,preds);\n h2o_rf_02_Forest_152.score0(data,preds);\n h2o_rf_02_Forest_153.score0(data,preds);\n h2o_rf_02_Forest_154.score0(data,preds);\n h2o_rf_02_Forest_155.score0(data,preds);\n h2o_rf_02_Forest_156.score0(data,preds);\n h2o_rf_02_Forest_157.score0(data,preds);\n h2o_rf_02_Forest_158.score0(data,preds);\n h2o_rf_02_Forest_159.score0(data,preds);\n h2o_rf_02_Forest_160.score0(data,preds);\n h2o_rf_02_Forest_161.score0(data,preds);\n h2o_rf_02_Forest_162.score0(data,preds);\n h2o_rf_02_Forest_163.score0(data,preds);\n h2o_rf_02_Forest_164.score0(data,preds);\n h2o_rf_02_Forest_165.score0(data,preds);\n h2o_rf_02_Forest_166.score0(data,preds);\n h2o_rf_02_Forest_167.score0(data,preds);\n h2o_rf_02_Forest_168.score0(data,preds);\n h2o_rf_02_Forest_169.score0(data,preds);\n h2o_rf_02_Forest_170.score0(data,preds);\n h2o_rf_02_Forest_171.score0(data,preds);\n h2o_rf_02_Forest_172.score0(data,preds);\n h2o_rf_02_Forest_173.score0(data,preds);\n h2o_rf_02_Forest_174.score0(data,preds);\n h2o_rf_02_Forest_175.score0(data,preds);\n h2o_rf_02_Forest_176.score0(data,preds);\n h2o_rf_02_Forest_177.score0(data,preds);\n h2o_rf_02_Forest_178.score0(data,preds);\n h2o_rf_02_Forest_179.score0(data,preds);\n h2o_rf_02_Forest_180.score0(data,preds);\n h2o_rf_02_Forest_181.score0(data,preds);\n h2o_rf_02_Forest_182.score0(data,preds);\n h2o_rf_02_Forest_183.score0(data,preds);\n h2o_rf_02_Forest_184.score0(data,preds);\n h2o_rf_02_Forest_185.score0(data,preds);\n h2o_rf_02_Forest_186.score0(data,preds);\n h2o_rf_02_Forest_187.score0(data,preds);\n h2o_rf_02_Forest_188.score0(data,preds);\n h2o_rf_02_Forest_189.score0(data,preds);\n h2o_rf_02_Forest_190.score0(data,preds);\n h2o_rf_02_Forest_191.score0(data,preds);\n h2o_rf_02_Forest_192.score0(data,preds);\n h2o_rf_02_Forest_193.score0(data,preds);\n h2o_rf_02_Forest_194.score0(data,preds);\n h2o_rf_02_Forest_195.score0(data,preds);\n h2o_rf_02_Forest_196.score0(data,preds);\n h2o_rf_02_Forest_197.score0(data,preds);\n h2o_rf_02_Forest_198.score0(data,preds);\n h2o_rf_02_Forest_199.score0(data,preds);\n double sum = 0;\n for(int i=1; i<preds.length; i++) { sum += preds[i]; }\n if (sum>0) for(int i=1; i<preds.length; i++) { preds[i] /= sum; }\n preds[0] = hex.genmodel.GenModel.getPrediction(preds, PRIOR_CLASS_DISTRIB, data, 0.5);\n return preds;\n }", "private double calcScorePercent() {\n\t\tdouble adjustedLab = totalPP * labWeight;\n\t\tdouble adjustedProj = totalPP * projWeight;\n\t\tdouble adjustedExam = totalPP * examWeight;\n\t\tdouble adjustedCodeLab = totalPP * codeLabWeight;\n\t\tdouble adjustedFinal = totalPP * finalWeight;\n\n\t\tlabScore = (labScore / labPP) * adjustedLab;\n\t\tprojScore = (projScore / projPP) * adjustedProj;\n\t\texamScore = (examScore / examPP) * adjustedExam;\n\t\tcodeLabScore = (codeLabScore / codeLabPP) * adjustedCodeLab;\n\t\tfinalExamScore = (finalExamScore / finalExamPP) * adjustedFinal;\n\n//\t\tdouble labPercent = labScore / adjustedLab;\n//\t\tdouble projPercent = projScore / adjustedProj;\n//\t\tdouble examPercent = examScore / adjustedExam;\n//\t\tdouble codeLabPercent = codeLabScore / adjustedCodeLab;\n//\t\tdouble finalPercent = finalExamScore / adjustedFinal;\n\n\t\tdouble totalPercent = (labScore + projScore + examScore + codeLabScore + finalExamScore) / totalPP;\n\t\t\n\t\tscorePercent = totalPercent;\n\t\t\n\t\treturn totalPercent;\n\t}", "public int totalScore() {\n return 0;\n }", "@Override\n protected float score(BasicStats stats, float termFreq, float docLength) {\n double s = 0.75;\n\n long N = stats.getNumberOfDocuments();\n long df = stats.getDocFreq();\n float cwd = termFreq;\n float cwq = 1; //assume that the query term frequency is always one\n float n = docLength;\n float navg = stats.getAvgFieldLength();\n\n double p1 = (1+Math.log(1+Math.log(cwd)))/(1-s+s*n/navg);\n float ans = (float) (p1 * cwq * Math.log((N+1)/df));\n\n return ans;\n }", "public float getAverageLoad1() {\r\n return convert(averageLoad1);\r\n }", "public float getAverageScore(GameModel startingState) {\n\n float totalScore = 0;\n for (int i = 0; i < NUM_SIMULATIONS; i++) {\n GameModel copy = GameModel.copyOf(startingState);\n copy.addNumber();\n totalScore += simulateAndGetScore(copy);\n }\n\n return totalScore / NUM_SIMULATIONS;\n }", "protected abstract List<Double> calcScores();", "private double calcAverage(int startIndex, int endIndex) {\n\t\t\n\t\t// total for the scores\n\t\tdouble total = 0;\n\t\t\n\t\t// loop between indexes and add the scores\n\t\tfor (int i = startIndex; i < endIndex; i++) \n\t\t\ttotal += scores.get(i);\n\t\t\n\t\t// return the average\n\t\treturn total / (endIndex - startIndex);\n\t}", "public void determineClassAvg(){//determineClassAvg body start\n\t\t\n\t\t//declaring variables\n\t\tint total \t\t\t= 0;\n\t\tint counter \t\t= 0;\n\t\tint grade;\n\t\tdouble avg;\n\t\t\n\t\t//Reference variables\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.printf(\"Enter First Grade or Enter -1 to quit: \");\n\t\tgrade = input.nextInt();\n\t\t\n\t\twhile(grade != -1){\n\t\t\ttotal \t\t= grade + total;\n\t\t\tcounter\t\t= counter + 1;\n\t\t\tSystem.out.printf(\"Enter Next Grade or enter -1 to quite: \");\n\t\t\tgrade \t\t= input.nextInt();\t\t\t\n\t\t}\n\t\t\n\t\tif(counter != 0){\n\t\t\tavg \t\t= (double) total/counter;\n\t\t\tSystem.out.printf(\"total number of student %d \\n\",counter);\n\t\t\tSystem.out.printf(\"Total Grade %d \\n\", total);\n\t\t\tSystem.out.printf(\"avrage = %.2f \\n\",avg);\n\t\t}\n\t\telse{\n\t\t\tSystem.out.printf(\"No grade were entered\");\n\t\t}\n\t\tinput.close();\n\t}", "public static int m20195a(float f, float f2, float f3, float f4) {\n int i = f != 0.0f ? (int) (((float) 527) * f) : 17;\n if (f2 != 0.0f) {\n i = (int) (((float) (i * 31)) * f2);\n }\n if (f3 != 0.0f) {\n i = (int) (((float) (i * 31)) * f3);\n }\n return f4 != 0.0f ? (int) (((float) (i * 31)) * f4) : i;\n }", "public void run() {\n\t\tSystem.out.println(\"fuseAvg\");\n\t\tAverageConcurrent1 averager = new AverageConcurrent1();\n\t\tValidateFusion validator = new ValidateFusion();\n\t\tfloat avg = averager.averageConcurrent1(sortedSnapshot);\t\t\t \n\t\tvalidator.validate(avg, 0);\n\t\tGlobalInfo.completeThreads++;\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private double scorePonderated(int i, int total) {\r\n\t\tif (total == 1) {\r\n\t\t\treturn 100.0;\r\n\t\t}\r\n\t\tdouble score = 100.0 / (2.0 * (i + 1));\r\n\t\treturn score;\r\n\t}", "public float computePhraseScore(int dl, int tf, GlobalStats stats);", "public int calculScore(Deck deck)\n {\n return 0;\n }", "public double getAverage()\n {\n if (test1 < 0 || test2 < 0)\n {\n System.out.println(\"Warning: one or more grades have not been entered.\");\n return -1;\n }\n return (test1 + test2) / 2;\n }", "private void calculateAvg() {\n\t\tDescriptiveStatistics stats = new DescriptiveStatistics();\n\t\tfor (QueryInfo oneQ : this.maxQueries) {\n\t\t\tstats.addValue(oneQ.getGapCount() * oneQ.getFrequency());\n\t\t}\n\t\tthis.avgGain = stats.getMean();\n\t\tthis.medianGain = stats.getPercentile(50);\n\t\tthis.quartiles = stats.getPercentile(75);\n\t}", "private Double computeRate(Double score,List<FyQuestion> questions) {\n\t\tDouble total=0.0;\r\n\t\tfor(FyQuestion q:questions) {\r\n\t\t\ttotal+=(q.getScore()*(100-q.getDifficulty()))/score;\r\n\t\t}\r\n\t\treturn total/100;\r\n\t}", "private void PeriodMeanEvaluation () {\n\n float x = 0;\n for(int i = 0; i < 3; i++)\n {\n for(int j = 0; j < numberOfSample; j++)\n {\n x = x + singleFrame[j][i];\n }\n meanOfPeriodCoord[i] = (x/numberOfSample);\n x = 0;\n }\n }", "public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }", "private int scoreCounter(int result) {\n result +=1;\n return result;\n }", "int score(OfcHandMatrix matrix);", "public Double getAverageHistoryFirstAttScore(String methodName, Environment env);", "Float getAutoScore();", "public int average(int num1, int num2) {\n return (num1 + num2) / 2;\n }" ]
[ "0.6806591", "0.62690073", "0.6119175", "0.6061729", "0.590527", "0.5874833", "0.5868861", "0.5644998", "0.5576321", "0.5565552", "0.5561997", "0.5547411", "0.54725295", "0.5437136", "0.54322827", "0.54303277", "0.5414527", "0.5414527", "0.54104984", "0.53805393", "0.53802115", "0.5353994", "0.53317124", "0.5331075", "0.53272164", "0.5288885", "0.5284971", "0.5275493", "0.5250128", "0.5247765", "0.52465403", "0.52443427", "0.52443427", "0.5212743", "0.520595", "0.5205543", "0.5194033", "0.5194033", "0.5173688", "0.5161261", "0.5145783", "0.51428294", "0.513141", "0.5130343", "0.5118892", "0.5111781", "0.5097149", "0.5086531", "0.50813353", "0.5079339", "0.50736123", "0.5068691", "0.5068681", "0.5065947", "0.5064361", "0.50626415", "0.5060469", "0.5055638", "0.50549793", "0.50467616", "0.50351787", "0.5026832", "0.5024893", "0.5013692", "0.5009223", "0.4998957", "0.49974772", "0.49868459", "0.49756742", "0.49512795", "0.4950618", "0.49452358", "0.49431783", "0.49376938", "0.49274796", "0.49209258", "0.491723", "0.49069455", "0.49067003", "0.48978403", "0.48965013", "0.48955792", "0.48941624", "0.48923278", "0.489062", "0.48891088", "0.48857683", "0.4884195", "0.48780838", "0.48763454", "0.48664874", "0.48580495", "0.4850895", "0.4850658", "0.48485476", "0.4842922", "0.48370942", "0.48302704", "0.48266917", "0.48264897" ]
0.83092993
0
Computes the macroaveraged precision
public double computeMacroPrecision(){ double res = 0; //iterate all labels to compute their individual precision values for(Label l : labels){ res += this.computePrecision(l); } //take the average res = res/((double)labels.size()); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getPrecision(int iterations);", "public double calculatePrecision() {\n final long divisor = truePositive + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return truePositive / (double)divisor;\n }\n }", "int getPrecision();", "int getPrecision();", "int getPrecision();", "protected boolean testPrecision ()\n {\n double precision = relativePrecision / (1.0 + relativePrecision);\n \n /******************************************************\n * Check the relative precision\n */\n double relPrecision = agentStat.confidence () / agentStat.mean ();\n\n trc.show (\"testPrecision\", \" precision = \" + precision +\n \" relPrecision = \" + relPrecision);\n\n if (numMeans < 2) {\n return false;\n } else { \n return relPrecision <= precision;\n } // if\n\n }", "Object getPrecision();", "Object getPrecision();", "double computePrecision(int[][] paraPredicionMatrix) {\n double tempPrecision = 0.0;\n int tempTotal = 0;\n int temptempPrecisionCount = 0;\n for (int i = 0; i < paraPredicionMatrix.length; i++) {\n for (int j = 0; j < paraPredicionMatrix[i].length; j++) {\n if (paraPredicionMatrix[i][j] == 1) {\n tempTotal++;\n if (formalContext.testingFormalContext[i][j] > 0) {\n temptempPrecisionCount++;\n } // End if\n } // End if\n } // End for j\n } // End for i\n System.out.println(\"temptempPrecisionCount: \" + temptempPrecisionCount);\n System.out.println(\"tempTotal: \" + tempTotal);\n if (temptempPrecisionCount == 0) {\n return 0.0;\n } // End if\n tempPrecision = (temptempPrecisionCount + 0.0) / tempTotal;\n return tempPrecision;\n }", "public Double getTotalScore() {\n return getExperienceTime() * 1.5 + meanGPA();\n }", "private PrecisionAndRecall() {\n\n }", "public double calculateFScore() {\n final double divisor = calculatePrecision() + calculateRecall();\n if(divisor == 0) {\n return 0.0;\n } else {\n return 2 * ((calculatePrecision() * calculateRecall()) / (calculatePrecision() + calculateRecall()));\n }\n }", "@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}", "public double getRelativePrecision ()\n {\n return relativePrecision;\n\n }", "public double computeMacroRecall(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual recall values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeRecall(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public double courseAverage()\n\t{\n\t\tdouble dQuiz;\n\t\tdouble dProj;\n\t\tdouble dTest;\n\t\tdouble dFinal;\n\t\tdouble dWeightedAvg;\n\t\t\n\t\tswitch(quizzesGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1:\n\t\t\t\tdQuiz= (1.0 * quiz1) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdQuiz=((1.0 * quiz1+quiz2)/2) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3)/3) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4)/4) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4 + quiz5)/5) * pctQ;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdQuiz = 0;\n\t\t}\n\t\tswitch(projGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1: \n\t\t\t\tdProj=((1.0 * proj1)) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdProj=((1.0 * proj1 + proj2)/2) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3)/3)*pctP;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3 + proj4)/4) * pctP;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdProj = 0;\n\t\t}\n\t\tswitch(testGraded)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\tdTest=(1.0 * test1) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdTest=((1.0 * test1+test2)/2) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdTest=((1.0 * test1 + test2 + test3)/3) * pctT;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdTest = 0;\n\t\t}\n\t\tif(recordedFinalExam==true)\n\t\t{\n\t\t\tdFinal=finalExam*pctF;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdFinal=0;\n\t\t}\n\t\tdWeightedAvg= (dProj + dTest + dQuiz + dFinal);\n\t\treturn dWeightedAvg;\n\t\t\n\t}", "int getNumIterations(int precision);", "public double getPrecision() {\n final int totalCount = getTrueErrorCount() + getFalseErrorCount();\n if (totalCount == 0) {\n return 1;\n } else {\n return getTrueErrorCount() / (double) totalCount;\n }\n }", "public interface PrecisionProvider {\n\n /**\n * Returns the number of digits that can be calculated precisely with a given amount of iterations.\n *\n * @param iterations The number of iterations you want to calculate\n * @return The number of digits that will be calculated correctly\n */\n int getPrecision(int iterations);\n\n /**\n * Calculates the number of iterations required for the specified level of precision. More information:\n * https://mathoverflow.net/q/261162/146822\n *\n * @param precision The level of precision you want to calculate.\n * @return The number of iterations required\n */\n int getNumIterations(int precision);\n}", "double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}", "double average();", "@Override\n public float getPrecision() {\n return 0.09F;\n }", "private void PeriodMeanEvaluation () {\n\n float x = 0;\n for(int i = 0; i < 3; i++)\n {\n for(int j = 0; j < numberOfSample; j++)\n {\n x = x + singleFrame[j][i];\n }\n meanOfPeriodCoord[i] = (x/numberOfSample);\n x = 0;\n }\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public double computePrecision(Label classLabel){\n\t\tdouble tp = this.computeTP(classLabel);\n\t\t//total number of predicted instances of class 'classLabel'\n\t\tdouble totalPredicted = this.sumRow(classLabel);\n\t\treturn tp/totalPredicted;\n\t}", "public Precision() {\n\t\tthis.threshold = 1.0;\n\t}", "public BigDecimal getRows_examined_avg() {\n return rows_examined_avg;\n }", "public int getPrecision() {\r\n return precision;\r\n }", "double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}", "private void computeAverageFrequencyDelayValue() {\n\tthis.averageFrequencyDelayValue = value * this.averageDelay;\n }", "public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }", "double agression();", "public static double averagePrecision(RankingOutput yi, RankingOutput y) {\n\t\tint[] ranking = new int[yi.getNumberOfExamples()]; \n\t\t// Stores list of images sorted by rank. Higher rank to lower rank \n\t\tint[] sortedExamples = new int[yi.getNumberOfExamples()]; \n\n\t\t// convert rank matrix to rank list\n\t\tfor(int i=0; i<yi.getNumberOfExamples(); i++){\n\t\t\t// start with lowest rank for each sample i.e 1 \n\t\t\tranking[i] = 1; \n\t\t\tfor(int j=0; j<yi.getNumberOfExamples(); j++){\n\t\t\t\tif(y.getRanking(i) > y.getRanking(j)){\n\t\t\t\t\tranking[i] = ranking[i] + 1;\n\t\t\t\t} \n\t\t\t}\n\t\t\tsortedExamples[yi.getNumberOfExamples() - ranking[i]] = i;\n\t\t} \n\n\t\tint posCount = 0;\n\t\tint totalCount = 0;\n\t\tdouble precisionAti = 0;\n\t\tfor(int i=0; i<yi.getNumberOfExamples(); i++){\n\t\t\tint label = yi.getLabel(sortedExamples[i]);\n\t\t\tif(label == 1){\n\t\t\t\tposCount++;\n\t\t\t\ttotalCount++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttotalCount++;\n\t\t\t}\n\t\t\tif(label == 1){\n\t\t\t\tprecisionAti = precisionAti + (double)posCount/(double)totalCount;\n\t\t\t}\n\t\t}\n\t\tprecisionAti = precisionAti/posCount;\n\n\t\treturn precisionAti;\n\t}", "public void calculateAverage() {\n\n if (turn == 1) {\n p1.setTotalScore(p1.getTotalScore() + turnScore);\n\n p1.setTotalDarts(p1.getTotalDarts() + 1);\n\n float p1Average = p1.getTotalScore() / p1.getTotalDarts();\n p1.setAverage(p1Average);\n\n } else if (turn == 2) {\n p2.setTotalDarts(p2.getTotalDarts() + 1);\n p2.setTotalScore(p2.getTotalScore() + turnScore);\n\n float p2Average = p2.getTotalScore() / p2.getTotalDarts();\n p2.setAverage(p2Average);\n }\n\n\n }", "public int getPrecision() {\n return precision_;\n }", "public double calculateP(DocumentSet Tc, DocumentSet Ac, DocumentSet TPc) {\r\n\r\n\t\tdouble precision = 0;\r\n\r\n\t\tif (Ac != null && Ac.getCardinality() != 0) {\r\n\t\t\tprecision = (double) TPc.getCardinality() / Ac.getCardinality();\r\n\t\t}\r\n\t\treturn precision;\r\n\t}", "@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}", "double average() { // used double b/c I want decimal places\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tsum = sum + array[i];\n\t\t}\n\t\tdouble average = (double) sum / array.length;\n\t\treturn average;\n\n\t}", "void total() {\r\n t=m1+m2+m3;\r\n per=t/3;\r\n System.out.println(\"total :\"+t);\r\n System.out.println(\"persentage:\"+per);\r\n \r\n \r\n }", "void computePrecisionAndRecall(int paraLikeThreshold, int paraK, int paraN, double paraMax, double paraBelta,\n\t\t\tdouble paraGama) {\n\n\t\t// System.out.println(\"the uTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRateInds);\n\t\t// System.out.println(\"the uTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRatings);\n\t\t// System.out.println(\"the iTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRateInds);\n\t\t// System.out.println(\"the iTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRatings);\n\t\t// System.out.println(\"the uTeRateInds is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTeRateInds);\n\t\t// System.out.println(Arrays.toString(dataModel.uTeDgr));\n\n\t\tint tempSucRecLen = 0;\n\t\tint tempRecLen = 0;\n\t\tint tempLikeLen = 0;\n\t\tint tempCount = 0;\n\t\tdouble tempNDCG = 0;\n\t\tfor (int i = 0; i < dataModel.userNum; i++) {\n\t\t\t// System.out.println(\"the user is \" + i + \" , the length is \" +\n\t\t\t// dataModel.uTeRateInds[i].length);\n\t\t\tint[] tempRecLists = recommendListForOneUser(i, paraLikeThreshold, paraK, paraN, paraBelta, paraGama);\n\t\t\t// System.out.println(\"the reclist is \" + Arrays.toString(tempRecLists));\n\t\t\tint[] tempLikeLists = likeListForOneUser(i, paraLikeThreshold);\n\t\t\t// System.out.println(\"the likelist is \" + Arrays.toString(tempLikeLists));\n\t\t\tint[] tempInterSection = SetOperator.interSection(tempRecLists, tempLikeLists);\n\n\t\t\t// System.out.println(\"User \" + i + \" recommend lists: \");\n\t\t\t// SimpleTool.printIntArray(tempRecLists);\n\t\t\tif (tempInterSection != null) {\n\t\t\t\ttempSucRecLen = tempInterSection.length;\n\t\t\t\ttempRecLen = tempRecLists.length;\n\t\t\t\ttempLikeLen = tempLikeLists.length;\n\t\t\t\tif (tempRecLen > 1e-6) {\n\t\t\t\t\tprecision += (tempSucRecLen + 0.0) / tempRecLen;\n\t\t\t\t\ttempNDCG = computeNDCG(i, tempRecLists, paraMax);\n\t\t\t\t\tNDCG += tempNDCG;\n\t\t\t\t} // Of if\n\t\t\t\tif (tempLikeLen > 1e-6) {\n\t\t\t\t\trecall += (tempSucRecLen + 0.0) / tempLikeLen;\n\t\t\t\t} // Of if\n\t\t\t} else {\n\t\t\t\ttempCount++;\n\t\t\t\tcontinue;// Of if\n\t\t\t}\n\n\t\t} // Of for i\n\t\t\t// System.out.println(\"the count is: \" + tempCount);\n\t\tprecision = precision / (dataModel.userNum - tempCount);\n\t\trecall = recall / (dataModel.userNum - tempCount);\n\t\tNDCG = NDCG / (dataModel.userNum - tempCount);\n\t}", "public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }", "public static double getAveg(int[] scores) {\r\n\t\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < scores.length; ++i) {\r\n\t\t\tsum += scores[i];\r\n\t\t}\r\n\t\t\r\n\t\treturn ((double)(sum))/(scores.length);\r\n\t\r\n\t}", "public double computeMacroF1(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual f1 scores\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeF1Score(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public int getPrecision() {\n return precision_;\n }", "private void updatePrecisionAndRecallAndAp(List<ScoreRetrieval> results, List<QuerieDocRelevance> queryRelevance){\n List<Double> precisionQuerieAP = new ArrayList<>();\n List<Double> precisionQuerieAPRankedTop = new ArrayList<>();\n int tp=0;\n int fp=0;\n int fn=0;\n int cont=0;\n int rankMax=10;\n \n //results.stream().map(ScoreRetrieval::getDocId).filter( docId -> querieRelevance.contains(docId)).mapToInt(List::size).sum();\n \n for(ScoreRetrieval result : results){\n if(queryRelevance.stream().filter(o -> o.getDocID()==result.getDocId()).findFirst().isPresent()){ \n tp++;\n precisionQuerieAP.add(tp/(double)(tp+fp));\n if(cont<rankMax){\n precisionQuerieAPRankedTop.add(tp/(double)(tp+fp));\n }\n }else{\n fp++;\n }\n cont++;\n }\n if(precisionQuerieAP.isEmpty()){\n apRes.add(0.0);\n }else{\n apRes.add(precisionQuerieAP.stream().mapToDouble(d->d).sum()/precisionQuerieAP.size());\n }\n if(precisionQuerieAPRankedTop.isEmpty()){\n apResRankedTopLimited.add(0.0);\n }else{\n apResRankedTopLimited.add(precisionQuerieAPRankedTop.stream().mapToDouble(d->d).sum()/precisionQuerieAPRankedTop.size());\n }\n \n \n for(QuerieDocRelevance querieRel : queryRelevance){\n if(!(results.stream().filter(q -> q.getDocId()==querieRel.getDocID()).findFirst().isPresent())){\n fn++; \n }\n }\n \n precision.add(tp/(double)(tp+fp));\n recall.add(tp/(double)(tp+fn));\n }", "public void average() {\n\t\tif (averaged)\n\t\t\tthrow new AssertionError(\"can't average twice!!\");\n\t\t\n\t\tscale = 1.0/(double)t;\n\t\t\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i] = (t+1.0)*w[i] - wupdates[i];\n\t\t\n\t\taveraged = true;\n\t\n\t}", "public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }", "private double GPA_Cal(double[][] GPA_Array) {\n\t\tdouble ch = GPA_Array[0][1]+GPA_Array[1][1]+GPA_Array[2][1]+GPA_Array[3][1];\n\t\tdouble qp = 0;\n\t\tfor(int i = 0;i<GPA_Array.length;i++) {\n\t\t\tqp+= (GPA_Array[i][0]*GPA_Array[i][1]);\n\t\t}\n\t\treturn (qp/ch);\n\t\t\n\t}", "double getAvgControl();", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=30-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "public static double doAvgTurnAroundTime() {\n if (count >= 1) {\n return turnaroundTimeTotal / count;\n } else {\n return -1;\n }\n }", "public int getAvgSpec() {\n return totalSpec/totalMatches;\n }", "public Integer getPrecision() {\n return _precision;\n }", "public Integer getPrecision() {\n return _precision;\n }", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=50-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "int getPrecision(Object elementID) throws Exception;", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=20-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "static void chapter1Milestone2(double num1, double num2){\n double average = (num1 + num2) / 2;\n System.out.println(\"Average is: \" + average);\n }", "public void calculateMMage() {\n\t\t\n\t}", "private double computeSumAlpha()\n\t{\n\t\tdouble sum = 0;\n\t\tdouble[] a = svm.getAlphas();\n\t\tfor(double d : a)\n\t\t\tsum += Math.abs(d);\n\t\treturn sum;\n\t}", "@Test\n public void testFourthPositiveRegion(){\n precisionAssertEquals(\n \"Test [x = 1.3]: fourth positive region\",\n 0.92594,\n systemFunctions.calculate(1.3)\n );\n precisionAssertEquals(\n \"Test [x = 1.5]: fourth positive region\",\n 0.900074,\n systemFunctions.calculate(1.5)\n );\n precisionAssertEquals(\n \"Test [x = 1.75]: fourth positive region\",\n 0.836129,\n systemFunctions.calculate(1.75)\n );\n }", "@Test\n public void testFourthPositiveRegion(){\n precisionAssertEquals(\n \"Test [x = 1.3]: fourth positive region\",\n 0.92594,\n systemFunctions.calculate(1.3)\n );\n precisionAssertEquals(\n \"Test [x = 1.5]: fourth positive region\",\n 0.900074,\n systemFunctions.calculate(1.5)\n );\n precisionAssertEquals(\n \"Test [x = 1.75]: fourth positive region\",\n 0.836129,\n systemFunctions.calculate(1.75)\n );\n }", "public double calculateAvgLeadTime() {\n Double totalLeadTime = 0.0;\n LinkedList<Card> completedCards = BoardManager.get().getCurrentBoard().getCardsOf(Role.COMPLETED_WORK);\n for (Card card : completedCards) {\n totalLeadTime += (int) DAYS.between(card.getCreationDate(versions), card.getCompletionDate(versions));\n }\n if (totalLeadTime == 0.0){\n return 0.0;\n }\n return Math.round(totalLeadTime/completedCards.size() * 100D) / 100D;\n }", "public double averageProcessTime() {\n\t\tif (numCompleted < 1) {\n\t\t\treturn 0.0;\n\t\t} else {\n\t\treturn (double)totalProcessTime / (double)numCompleted;\n\t\t}\n\t}", "public MacroAvgAggregatePerformances<TimeType,PType> getMacroAveraging() {\n\t\t\n\t\treturn this.macroAvg;\n\t}", "@Override\n\tpublic void collectionProcessComplete(ProcessTrace aTrace)\n\t\t\tthrows ResourceProcessException, IOException {\n\t\tSystem.out.println(\"Average precision \" + totalScore / documentCount);\n\t}", "public double calculateAccuracy() {\n final long divisor = truePositive + trueNegative + falsePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return (truePositive + trueNegative) / (double)divisor;\n }\n }", "@Override\n public Double average() {\n return (sum() / (double) count());\n }", "public double sum() {\n/* 196 */ return this.mean * this.count;\n/* */ }", "public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}", "@Override\n public int accion() {\n return this.alcance*2/3*3;\n }", "public double getAverageRate() {\n return (leftEnc.getRate() + rightEnc.getRate()) / 2;\n }", "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 }", "public void calcP() {\r\n\t\tthis.setP(sick/people.size());\r\n\t}", "public double epsilon();", "double compute() {\r\ndouble b, e;\r\nb = (1 + rateOfRet/compPerYear);\r\ne = compPerYear * numYears;\r\nreturn principal * Math.pow(b, e);\r\n}", "public void findAvg()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n total += scores[i][j];\n }\n }\n System.out.println(\"The class average test score is \" + \n total/24 + \".\");\n }", "public static double CalculateAverageTurnaround(process[] processes )\n\t{\n\t\tdouble totalTurnaroundTime = 0;\n\t\tfor(int i = 0; i < processes.length; i++)\n\t\t{\n\t\t\ttotalTurnaroundTime = totalTurnaroundTime + calculateTurnaroundTime(processes[i]);\n\t\t}\n\t\t\n\t\treturn totalTurnaroundTime / processes.length;\n\t}", "public void calculatePF() {\r\n\t\tfloat pfRate = 10.5f;\r\n\t\tSystem.out.println(\"The PF rate of the employee is \"+pfRate);\r\n\t\tdisplay();\r\n\t}", "@Override\n\tpublic double calcularPrecio() {\n\t\treturn 0;\n\t}", "public double getAvgDraws() {\n\t\tdouble result = -1.0, sum = 0.0;\n\t\tint count = 0;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT SUM(drawCnt) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tsum = this.rs.getDouble(1) ;\n\t\t\t}\n\t\t\tthis.rs = smt.executeQuery(\"SELECT COUNT(id) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tcount = this.rs.getInt(1);\n\t\t\t\tresult = sum / count;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Query is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public double getAvg(){\n double avg=0;\n for(int x=0; x<max; x++){\n avg=avg+times[x];\n }\n avg=avg/max;\n return avg;\n }", "public static void computeAvg(functionRuntimes fRT)\r\n {\r\n\r\n }", "double computeMAE(int paraK) {\n\t\tdouble tempMae = 0;\n\t\tint tempTotalCount = 0;\n\t\t// Step 1. Predict the distribution\n\t\tfor (int i = 0; i < dataModel.uTeRateInds.length; i++) {\n\t\t\tfor (int j = 0; j < dataModel.uTeRateInds[i].length; j++) {\n\t\t\t\tint[] tempDistribution = predict(i, dataModel.uTeRateInds[i][j], paraK);\n\t\t\t\tif (tempDistribution == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} // Of if\n\n\t\t\t\tdouble tempPrediction = 0;\n\t\t\t\tint tempCount = 0;\n\t\t\t\tfor (int k = 0; k < tempDistribution.length; k++) {\n\t\t\t\t\ttempPrediction += tempDistribution[k] * (k + 1);\n\t\t\t\t\ttempCount += tempDistribution[k];\n\t\t\t\t} // Of for k\n\t\t\t\ttempPrediction /= tempCount;\n\n\t\t\t\ttempMae += Math.abs(tempPrediction - dataModel.uTeRatings[i][j]);\n\t\t\t\ttempTotalCount++;\n\t\t\t} // of for\n\t\t} // of for i\n\n\t\tif (tempTotalCount > 1e-6) {\n\t\t\ttempMae /= tempTotalCount;\n\t\t} // of\n\n\t\treturn tempMae;\n\t}", "public BigDecimal getAverageCpm() {\r\n return averageCpm;\r\n }", "private double roundDecimal(double value, int precision) {\n \tdouble precisionMultiple = Math.pow(10, precision);\n \treturn Math.round(value * precisionMultiple) / precisionMultiple;\n }", "private static double getA(Point p_p1, Point p_p2, Point q_p1, Point q_p2){\n\t\tdouble a1, a2;\n\t\ta1 = q_p2.coordinate[0] - q_p1.coordinate[0] - \n\t\t\t p_p2.coordinate[0] + p_p1.coordinate[0];\t\t\n\t\ta2 = q_p2.coordinate[1] - q_p1.coordinate[1] - \n\t\t\t p_p2.coordinate[1] + p_p1.coordinate[1];\n\t\t\t\t\n\t\tdouble a = Math.pow(a1,2) + Math.pow(a2,2);\n\t\t\n\t\treturn a;\n\t}", "public BigDecimal getTotalPremAmt() {\n\t\treturn totalPremAmt;\n\t}", "public double getPrize();", "static void avg(){\r\n\t\tSystem.out.println(\"Hi Avg\");\r\n\t}", "@Test(timeout = 4000)\n public void test069() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[4];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, (-1.0));\n assertEquals(Double.NEGATIVE_INFINITY, evaluation0.meanPriorAbsoluteError(), 0.01);\n }", "public double getAverageScore() {\n\t return this.totalScore / this.count; \n\t }", "private double calcScorePercent() {\n\t\tdouble adjustedLab = totalPP * labWeight;\n\t\tdouble adjustedProj = totalPP * projWeight;\n\t\tdouble adjustedExam = totalPP * examWeight;\n\t\tdouble adjustedCodeLab = totalPP * codeLabWeight;\n\t\tdouble adjustedFinal = totalPP * finalWeight;\n\n\t\tlabScore = (labScore / labPP) * adjustedLab;\n\t\tprojScore = (projScore / projPP) * adjustedProj;\n\t\texamScore = (examScore / examPP) * adjustedExam;\n\t\tcodeLabScore = (codeLabScore / codeLabPP) * adjustedCodeLab;\n\t\tfinalExamScore = (finalExamScore / finalExamPP) * adjustedFinal;\n\n//\t\tdouble labPercent = labScore / adjustedLab;\n//\t\tdouble projPercent = projScore / adjustedProj;\n//\t\tdouble examPercent = examScore / adjustedExam;\n//\t\tdouble codeLabPercent = codeLabScore / adjustedCodeLab;\n//\t\tdouble finalPercent = finalExamScore / adjustedFinal;\n\n\t\tdouble totalPercent = (labScore + projScore + examScore + codeLabScore + finalExamScore) / totalPP;\n\t\t\n\t\tscorePercent = totalPercent;\n\t\t\n\t\treturn totalPercent;\n\t}", "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 float averageTime() {\n\t\tfloat out = 0;\n\t\t\n\t\tIterator<SolveResult> iter = super.iterator();\n\t\t\n\t\twhile(iter.hasNext()) {\n\t\t\tout += iter.next().timeTaken;\n\t\t}\n\t\t\n\t\treturn out / super.size();\n\t}", "public int getAverageScore() {\n\t\treturn totalScore / quizCount;\n\t}", "public static double averageQuizScore(double quiz1, double quiz2, double quiz3){\n return (quiz1 + quiz2 + quiz3) / 3;\n }", "private long m18344e(long frameCount) {\n return (1000000 * frameCount) / ((long) this.f16624r);\n }", "private double calcAvgY(List<Review> Reviews) {\n\t\tdouble avg = 0.0;\n\t\tint count = 0;\n\t\tfor (int i = 0; i < Reviews.size(); i++) {\n\t\t\tavg += Reviews.get(i).getNumStars();\n\t\t\tcount++;\n\t\t}\n\t\treturn avg / count;\n\t}", "public float averageAnswers() {\n\t\tfloat out = 0;\n\t\t\n\t\tIterator<SolveResult> iter = super.iterator();\n\t\t\n\t\twhile(iter.hasNext()) {\n\t\t\tSolveResult thisResult = iter.next();\n\t\t\tfloat clues = ResultSet.clueCount(thisResult.puzzle);\n\t\t\tfloat cardinality = thisResult.puzzle.getCardinality();\n\t\t\tfloat conflicts = thisResult.puzzle.conflictCount();\n\t\t\t\n\t\t\tif(!(cardinality - clues - conflicts < 0)) {\n\t\t\t\tout += ((cardinality - clues - conflicts) / (81 - clues));\n\t\t\t}\n\t\t}\n\t\treturn out / super.size();\n\t}" ]
[ "0.63850546", "0.63285905", "0.59352195", "0.59352195", "0.59352195", "0.58988184", "0.584924", "0.584924", "0.584553", "0.57698524", "0.5737512", "0.56810534", "0.5663408", "0.56281334", "0.55893254", "0.5547043", "0.554284", "0.55282766", "0.54973006", "0.5479573", "0.547132", "0.54532814", "0.54438007", "0.5431905", "0.5414165", "0.54124755", "0.5399751", "0.53723", "0.5348279", "0.534148", "0.5316158", "0.531456", "0.53082067", "0.5289825", "0.52826226", "0.5279773", "0.52790743", "0.52762365", "0.5255338", "0.5243716", "0.5227197", "0.52160406", "0.52012604", "0.51870054", "0.51832247", "0.5182169", "0.51736486", "0.5168747", "0.5159047", "0.5151948", "0.51151013", "0.51108813", "0.51097167", "0.51097167", "0.5108859", "0.51064974", "0.51041466", "0.5100922", "0.5095124", "0.5093856", "0.504079", "0.504079", "0.50297815", "0.5012158", "0.50114125", "0.50052375", "0.5004559", "0.5002873", "0.50025165", "0.5001781", "0.5000346", "0.49982926", "0.4997994", "0.49959937", "0.4995749", "0.49955168", "0.49950135", "0.49870524", "0.4983183", "0.49689785", "0.49685633", "0.49630964", "0.49598512", "0.49573663", "0.49513876", "0.49431255", "0.49375418", "0.49338168", "0.49323326", "0.49260306", "0.49242303", "0.49178296", "0.49175587", "0.49156377", "0.49144477", "0.4912148", "0.49071857", "0.4900253", "0.48967355", "0.48957777" ]
0.7976139
0
Computes the macroaveraged recall
public double computeMacroRecall(){ double res = 0; //iterate all labels to compute their individual recall values for(Label l : labels){ res += this.computeRecall(l); } //take the average res = res/((double)labels.size()); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double computeRecall(Label classLabel){\n\t\tdouble tp = this.computeTP(classLabel);\n\t\t//total number of instances of class 'classLabel'\n\t\tdouble totalReal = this.sumColumn(classLabel);\n\t\treturn tp/totalReal;\n\t}", "public double calculateRecall() {\n final long divisor = truePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return truePositive / (double)divisor;\n }\n }", "double computeRecall(int[][] paraPredicionMatrix) {\n double tempRecall = 0.0;\n int tempTotal = 0;\n int tempAccurate = 0;\n for (int i = 0; i < paraPredicionMatrix.length; i++) {\n for (int j = 0; j < paraPredicionMatrix[i].length; j++) {\n if (formalContext.testingFormalContext[i][j] > 0) {\n tempTotal++;\n if (paraPredicionMatrix[i][j] == 1) {\n tempAccurate++;\n } // End if\n } // End if\n } // End for j\n } // End for i\n System.out.println(\"tempAccurate: \" + tempAccurate);\n System.out.println(\"tempTotal: \" + tempTotal);\n if (tempAccurate == 0) {\n return 0.0;\n } // End if\n tempRecall = (tempAccurate + 0.0) / tempTotal;\n return tempRecall;\n }", "private PrecisionAndRecall() {\n\n }", "public double getRecall() {\n final int totalCount = getTotalErrorCount();\n if (totalCount == 0) {\n return 1;\n } else {\n return getTrueErrorCount() / (double) totalCount;\n }\n }", "void computePrecisionAndRecall(int paraLikeThreshold, int paraK, int paraN, double paraMax, double paraBelta,\n\t\t\tdouble paraGama) {\n\n\t\t// System.out.println(\"the uTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRateInds);\n\t\t// System.out.println(\"the uTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRatings);\n\t\t// System.out.println(\"the iTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRateInds);\n\t\t// System.out.println(\"the iTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRatings);\n\t\t// System.out.println(\"the uTeRateInds is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTeRateInds);\n\t\t// System.out.println(Arrays.toString(dataModel.uTeDgr));\n\n\t\tint tempSucRecLen = 0;\n\t\tint tempRecLen = 0;\n\t\tint tempLikeLen = 0;\n\t\tint tempCount = 0;\n\t\tdouble tempNDCG = 0;\n\t\tfor (int i = 0; i < dataModel.userNum; i++) {\n\t\t\t// System.out.println(\"the user is \" + i + \" , the length is \" +\n\t\t\t// dataModel.uTeRateInds[i].length);\n\t\t\tint[] tempRecLists = recommendListForOneUser(i, paraLikeThreshold, paraK, paraN, paraBelta, paraGama);\n\t\t\t// System.out.println(\"the reclist is \" + Arrays.toString(tempRecLists));\n\t\t\tint[] tempLikeLists = likeListForOneUser(i, paraLikeThreshold);\n\t\t\t// System.out.println(\"the likelist is \" + Arrays.toString(tempLikeLists));\n\t\t\tint[] tempInterSection = SetOperator.interSection(tempRecLists, tempLikeLists);\n\n\t\t\t// System.out.println(\"User \" + i + \" recommend lists: \");\n\t\t\t// SimpleTool.printIntArray(tempRecLists);\n\t\t\tif (tempInterSection != null) {\n\t\t\t\ttempSucRecLen = tempInterSection.length;\n\t\t\t\ttempRecLen = tempRecLists.length;\n\t\t\t\ttempLikeLen = tempLikeLists.length;\n\t\t\t\tif (tempRecLen > 1e-6) {\n\t\t\t\t\tprecision += (tempSucRecLen + 0.0) / tempRecLen;\n\t\t\t\t\ttempNDCG = computeNDCG(i, tempRecLists, paraMax);\n\t\t\t\t\tNDCG += tempNDCG;\n\t\t\t\t} // Of if\n\t\t\t\tif (tempLikeLen > 1e-6) {\n\t\t\t\t\trecall += (tempSucRecLen + 0.0) / tempLikeLen;\n\t\t\t\t} // Of if\n\t\t\t} else {\n\t\t\t\ttempCount++;\n\t\t\t\tcontinue;// Of if\n\t\t\t}\n\n\t\t} // Of for i\n\t\t\t// System.out.println(\"the count is: \" + tempCount);\n\t\tprecision = precision / (dataModel.userNum - tempCount);\n\t\trecall = recall / (dataModel.userNum - tempCount);\n\t\tNDCG = NDCG / (dataModel.userNum - tempCount);\n\t}", "double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}", "public static void evaluation(List<Tweet> tweets){\n\t\tEvaluator eval = new Evaluator();\n\t\tint[][] confusionMatrix = eval.computeConfusionMatrix(tweets);\n\n\t\t// Variables for calculation of the micro and macro accuracy.\n\t\tint allTp = 0;\n\t\tint allFn = 0;\n\t\tint allFp = 0;\n\t\tint allTn = 0;\n\t\tdouble macroAccuracy = 0.0;\n double macroPrecision = 0.0;\n double macroRecall = 0.0;\n double macroFscore = 0.0;\n\n\n\t\t// System.out.println(confusionMatrix.keySet());\n\t\t// Outputting the evaluation for each label.\n\t\tfor (Labels label : Labels.values()) {\n\t\t\tint tp = eval.computeTP(confusionMatrix, label);\n\t\t\tallTp = allTp + tp;\n\t\t\tint fn = eval.computeFN(confusionMatrix, label);\n\t\t\tallFn = allFn + fn;\n\t\t\tint fp = eval.computeFP(confusionMatrix, label);\n\t\t\tallFp = allFp + fp;\n\t\t\tint tn = eval.computeTN(confusionMatrix, label);\n\t\t\tallTn = allTn + tn;\n\n\t\t\tdouble precision = eval.getPrecision(tp, fp);\n\t\t\tdouble recall = eval.getRecall(tp, fn);\n double fscore = eval.getFScore(precision, recall);\n\t\t\tmacroAccuracy = macroAccuracy + eval.getAccuracy(tp, fn, fp, tn);\n\n macroPrecision += precision;\n macroRecall += recall;\n macroFscore += fscore;\n\n\t\t\tSystem.out.println(\"********* Outputting the evaluation results for \" + label.toString() + \" *********\");\n\t\t\tSystem.out.println(label.toString() + \"\\t\\t TP: \" + tp + \"\\t FN: \" + fn + \"\\t FP: \" + fp + \"\\t TN: \" + tn);\n\t\t\tSystem.out.println(\"\\t\\t Precision: \" + precision);\n\t\t\tSystem.out.println(\"\\t\\t Recall: \" + recall);\n\t\t\tSystem.out.println(\"\\t\\t FScore: \" + fscore);\n\t\t\tSystem.out.println(\"\\t\\t Accuracy: \" + eval.getAccuracy(tp, fn, fp, tn));\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\t// Outputting the accuracy for all labels.\n\t\tSystem.out.println(\"********* Outputting the macro/micro accuracy for all labels *********\");\n\t\tSystem.out.println(\"Macro-Precision: \" + macroPrecision/Labels.getSize());\n System.out.println(\"Macro-Recall: \" + macroRecall/Labels.getSize());\n System.out.println(\"Macro-Fscore: \" + macroFscore/Labels.getSize());\n\t\tSystem.out.println(\"Macro-Accuracy: \" + macroAccuracy / Labels.getSize());\n\t}", "public double computeMacroF1(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual f1 scores\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeF1Score(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public double computeMacroPrecision(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual precision values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computePrecision(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "private void calcaluteFeaturePrecisionRecall(Block b, File xmiblockFolder, int numberOfBlocks) {\n\t\tSystem.out.println(\" calcalute Precision Recall for block : \"+b.getName());\n\n\t\tFile[] distributions = getDistributionsContainingBlock(b);\n\t\t\n\t\tVector<File> remainingDistributions = getDistributionsNotContainingBlock(distributions,AdaptedModelManager.getAdaptedModel().getOwnedAdaptedArtefacts());\n\n\t\t FeatureIdentificationEvaluation featureIdentEval =new FeatureIdentificationEvaluation();\n\t\t List<File> eclipseFeatures =null;\n\t\t \n\t\t \n\t\t\teclipseFeatures = featureIdentEval.getCommonEclipseFeatures(distributions, oldCommonFeatures,remainingDistributions );\n\t\t\t\n\t\t\t// save them here to be excluded the next evaluation (for another block)\n\t\t oldCommonFeatures.addAll(eclipseFeatures);\n\t\t \n\t\t \n\t\t\t File[] eclipseFeaturesArray = new File[eclipseFeatures.size()];\n\t\t\t int j=0;\n\t\t//\t System.out.println(\"common features : \");\n\t\t\t for (File file : eclipseFeatures) {\n\t//\t\t\t System.out.println(file.getName());\n\t\t\t\t eclipseFeaturesArray[j++] = file;\n\t\t\t }\n\t\t\t\t File but4reuseFeature = xmiblockFolder.listFiles()[0]; // TODO get file with same name as block name\n if(but4reuseFeature.exists() && ! but4reuseFeature.isDirectory() && but4reuseFeature.getName().endsWith(\".xmi\")){\n\t\t\t\t\t featureIdentEval.calculateRecallAndPrecision( but4reuseFeature, eclipseFeaturesArray);\n\t\t\t\t\t \n\t\t\t\t\t precisionValues.put(b, featureIdentEval.getPrecision());\n\t\t\t\t\t recallValues.put(b, featureIdentEval.getRecall()) ;\n\t\t\t\t\t truePositiveValues.put(b, featureIdentEval.getTruePositives());\n\t\t\t\t\t falseNegativeValues.put(b, featureIdentEval.getFalseNegatives());\n\t\t\t\t\t falsePositiveValues.put(b, featureIdentEval.getFalsePositives());\n }\n \n\n\t}", "public void recallPaint() { advw.showResearchersPanel();}", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "private void updatePrecisionAndRecallAndAp(List<ScoreRetrieval> results, List<QuerieDocRelevance> queryRelevance){\n List<Double> precisionQuerieAP = new ArrayList<>();\n List<Double> precisionQuerieAPRankedTop = new ArrayList<>();\n int tp=0;\n int fp=0;\n int fn=0;\n int cont=0;\n int rankMax=10;\n \n //results.stream().map(ScoreRetrieval::getDocId).filter( docId -> querieRelevance.contains(docId)).mapToInt(List::size).sum();\n \n for(ScoreRetrieval result : results){\n if(queryRelevance.stream().filter(o -> o.getDocID()==result.getDocId()).findFirst().isPresent()){ \n tp++;\n precisionQuerieAP.add(tp/(double)(tp+fp));\n if(cont<rankMax){\n precisionQuerieAPRankedTop.add(tp/(double)(tp+fp));\n }\n }else{\n fp++;\n }\n cont++;\n }\n if(precisionQuerieAP.isEmpty()){\n apRes.add(0.0);\n }else{\n apRes.add(precisionQuerieAP.stream().mapToDouble(d->d).sum()/precisionQuerieAP.size());\n }\n if(precisionQuerieAPRankedTop.isEmpty()){\n apResRankedTopLimited.add(0.0);\n }else{\n apResRankedTopLimited.add(precisionQuerieAPRankedTop.stream().mapToDouble(d->d).sum()/precisionQuerieAPRankedTop.size());\n }\n \n \n for(QuerieDocRelevance querieRel : queryRelevance){\n if(!(results.stream().filter(q -> q.getDocId()==querieRel.getDocID()).findFirst().isPresent())){\n fn++; \n }\n }\n \n precision.add(tp/(double)(tp+fp));\n recall.add(tp/(double)(tp+fn));\n }", "public static void main(String[] args) throws Exception {\n\t\tint i;\r\n\t\tint [][]preci_recall = new int [5][6]; \r\n\r\n\t\tNGRAM ngram = new NGRAM();\r\n\t\t\r\n\t\tfor(i=0; i<5; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println((i+1) + \" th FOLD IS A TEST SET\");\r\n\t\t\t\r\n\t\t\tdouble[][] test_ngram_features = ngram.feature(i,1);\r\n\t\t\tdouble[][] train_ngram_features = ngram.feature(i,0);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"NGRAM FEATURES...OK\");\r\n\t\r\n//\t\t\t\r\n//\t\t\tLIWC liwc = new LIWC();\r\n//\t\t\t\r\n//\t\t\tdouble[][] test_liwc_features = liwc.feature(i,1,test_ngram_features.length);\r\n//\t\t\tdouble[][] train_liwc_features = liwc.feature(i,0,train_ngram_features.length);\r\n//\r\n//\t\t\tSystem.out.println(\"LIWC FEATURES..OK\");\r\n//\t\t\t\r\n//\t\t\tCOMBINE combine = new COMBINE();\r\n//\t\t\tdouble[][] train_features = combine.sum(train_liwc_features,train_ngram_features);\r\n//\t\t\tdouble[][] test_features = combine.sum(test_liwc_features,test_ngram_features);\r\n//\t\t\t\r\n//\t\t\tSystem.out.println(\"COMBINE...OK\");\r\n\t\t\r\n\t\t\tSVMLIGHT svmlight = new SVMLIGHT();\r\n\t\t\tpreci_recall[i]=svmlight.calcc(train_ngram_features, test_ngram_features);\r\n\r\n\t\t}\r\n\t\t\r\n//\t 0 : truthful TP\r\n//\t 1 : truthful TP+FP\r\n//\t 2 : truthful TP+FN\r\n//\t 3 : deceptive TP\r\n//\t 4 : deceptive TP+FP\r\n//\t 5 : deceptive TP+FN\r\n\t\t\r\n\t\tint truthful_TP_sum=0,truthful_TPFP_sum=0,truthful_TPFN_sum=0;\r\n\t\tint deceptive_TP_sum=0,deceptive_TPFP_sum=0,deceptive_TPFN_sum=0;\r\n\t\t\r\n\t\tfor(i=0;i<5;i++) {\r\n\t\t\ttruthful_TP_sum+=preci_recall[i][0];\r\n\t\t\ttruthful_TPFP_sum+=preci_recall[i][1];\r\n\t\t\ttruthful_TPFN_sum+=preci_recall[i][2];\r\n\t\t\t\r\n\t\t\tdeceptive_TP_sum+=preci_recall[i][3];\r\n\t\t\tdeceptive_TPFP_sum+=preci_recall[i][4];\r\n\t\t\tdeceptive_TPFN_sum+=preci_recall[i][5];\r\n\t\t}\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"\\n\\nTRUTHFUL_TP_SUM : \" + truthful_TP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFP_SUM : \" + truthful_TPFP_sum);\r\n\t\tSystem.out.println(\"TRUTHFUL_TPFN_SUM : \" + truthful_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE_TP_SUM : \" + deceptive_TP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFP_SUM : \" + deceptive_TPFP_sum);\r\n\t\tSystem.out.println(\"DECEPTIVE_TPFN_SUM : \" + deceptive_TPFN_sum);\r\n\t\t\r\n\t\tSystem.out.println(\"\\nTRUTHFUL PRECISION : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFP_sum));\r\n\t\tSystem.out.println(\"TRUTHFUL RECALL : \" + (double)(truthful_TP_sum)/(double)(truthful_TPFN_sum));\r\n\t\t\r\n\t\tSystem.out.println(\"DECEPTIVE PRECISION : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFP_sum));\r\n\t\tSystem.out.println(\"DECEPTIVE RECALL : \" + (double)(deceptive_TP_sum)/(double)(deceptive_TPFN_sum));\r\n\t\t\r\n\r\n\t}", "public void rightScored()\n\t{\n\t\tscoreR++;\n\t}", "void recount();", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=50-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=20-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "public synchronized void recallThreads() {\n \t\tint count = activeThreads.size();\n \t\tfor (int i = count - 1; i >= 0; i--) {\n \t\t\tHttpThread thread = (HttpThread) activeThreads.elementAt(i);\n \t\t\tthread.recall();\n \t\t}\n \t}", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=30-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "public void recalc() {\n\t\tMapping mapping = getConsumerProductMatrix();\n\t\tif (mapping == null) {\n\t\t\treturn; // there is nobody to calculate recommendation for\n\t\t}\n\t\tSparseMatrix<Float64> Ct = makeC(mapping.matrix).transpose();\n\t\tSparseMatrix<Float64> B = makeB(mapping.matrix);\n\t\tSparseMatrix<Float64> CR0 = makeCR0(mapping.matrix.getNumberOfRows());\n\n\t\tSparseMatrix<Float64> PR = null;\n\t\tSparseMatrix<Float64> CR = CR0;\n\n\t\tint iterations =\n\t\t\tConfigService.CONFIG_SERVICE.getConfig(\n\t\t\t\tServerConfigKey.RECOMMENDATION_ITERATIONS).get();\n\t\tfor (int i = 0; i < iterations; i++) {\n\t\t\tPR = CR.times(B);\n\t\t\tCR = PR.times(Ct).plus(CR0);\n\t\t}\n\n\t\tsaveRecommendations(mapping, PR);\n\t}", "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 }", "manExp15(){ \r\n\r\n\tcount++; \r\n\r\n\tSystem.out.println(count); \r\n\r\n\t}", "public double computeF1Score(Label classLabel){\n\t\tdouble r = this.computeRecall(classLabel);\n\t\tdouble p = this.computePrecision(classLabel);\n\t\treturn (2.0 * p * r)/(p+r);\n\t}", "private int scoreCounter(int result) {\n result +=1;\n return result;\n }", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "private static void SecondUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "public static int[] mucScore(LeanDocument key, LeanDocument response)\n{\n // System.out.println(\"==========================================================\");\n // System.out.println(\"Key:\\n\"+key.toStringNoSing()+\"\\n*************************\\nResponse:\\n\"+response.toStringNoSing());\n\n Iterator<TreeMap<Integer, Integer>> goldChains = key.chainIterator();\n // double mucRecall = 0.0;\n int mucRecallNom = 0;\n int mucRecallDenom = 0;\n while (goldChains.hasNext()) {\n TreeMap<Integer, Integer> keyChain = goldChains.next();\n if (keyChain.size() > 1) {\n int numInt = numIntersect(key, keyChain, response);\n\n // int numMatched = getNumMatched(key, keyChain);\n // if(numMatched>0){\n // mucRecallNom += numMatched-numInt;\n mucRecallNom += (keyChain.size() - numInt);\n // mucRecallDenom += numMatched-1;\n mucRecallDenom += keyChain.size() - 1;\n\n // System.out.println(keyChain+\"\\n\"+(keyChain.size() - numInt)+\"/\"+(keyChain.size()-1));\n // }\n }\n }\n int[] result = { mucRecallNom, mucRecallDenom };\n\n return result;\n}", "public void m49873b() {\n BoostSummaryTarget boostSummaryTarget = (BoostSummaryTarget) H();\n if (boostSummaryTarget != null) {\n boolean a = this.f40748a.a();\n BoostStatus e = this.f40749b.m42282e();\n if (e != null) {\n String multiplierString = BoostStatusExt.multiplierString(e);\n if (a) {\n boostSummaryTarget.displaySubscriberSummary(multiplierString);\n } else {\n boostSummaryTarget.displayNonSubscriberSummary(multiplierString, this.f40750c.m41124a((int) R.string.boost_summary_info_title_upsell, e), this.f40750c.m41124a((int) R.string.boost_summary_info_description_upsell, e));\n }\n this.f40751d.m35507c();\n }\n }\n }", "public void decrementTotalScore(){\n totalScore -= 1;\n }", "double countMisclassifications(Matrix features, Matrix labels)\r\n {\r\n if(features.rows() != labels.rows())\r\n throw new IllegalArgumentException(\"Illegal Argument Exception Created!!\");\r\n\tdouble mis = 0;\r\n for(int i = 0; i < features.rows(); i++)\r\n\t{\r\n Vec feat = features.row(i);\r\n Vec pred = predict(feat);\r\n Vec lab = labels.row(i);\r\n\r\n for(int j = 0; j < lab.size(); j++){\r\n \r\n if(pred.get(j) != lab.get(j))\r\n mis++;\r\n }\r\n\t}\r\n // System.out.println(\"mis \" + mis);\r\n // System.out.println(\"rowcol \" + (labels.rows()*labels.cols()));\r\n\r\n double misclassifictionRate = 100.0*(mis/(labels.rows()*labels.cols()));\r\n return misclassifictionRate;\r\n }", "public void incrementRefusals() {\n\t}", "public double calculateFScore() {\n final double divisor = calculatePrecision() + calculateRecall();\n if(divisor == 0) {\n return 0.0;\n } else {\n return 2 * ((calculatePrecision() * calculateRecall()) / (calculatePrecision() + calculateRecall()));\n }\n }", "private void updateCFRABC(int num) {\r\n if (num < 0) {\r\n window.removeAllShapes();\r\n }\r\n else {\r\n State currentState = covidCalculator.getLL().get(num);\r\n ArrayList<Race> currentRacesSorted = covidCalculator.sortByABC(\r\n currentState);\r\n\r\n for (int i = 0; i < currentRacesSorted.size(); i++) {\r\n String cfrPercentage = String.valueOf(currentRacesSorted.get(i)\r\n .getCFR());\r\n\r\n if (!cfrPercentage.equals(\"-1%\")) {\r\n TextShape cfrName = new TextShape(0, 0, cfrPercentage);\r\n cfrName.moveTo(barXPos + (spacingSize * spacingCounter),\r\n +barYPos + 25);\r\n window.addShape(cfrName);\r\n }\r\n spacingCounter++;\r\n }\r\n }\r\n lastStateMemory = num;\r\n spacingCounter = 1;\r\n }", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "private void updateCFRCFR(int num) {\r\n if (num < 0) {\r\n window.removeAllShapes();\r\n }\r\n else {\r\n State currentState = covidCalculator.getLL().get(num);\r\n ArrayList<Race> currentRacesSorted = covidCalculator.sortByCFR(\r\n currentState);\r\n\r\n for (int i = 0; i < currentRacesSorted.size(); i++) {\r\n String cfrPercentage = String.valueOf(currentRacesSorted.get(i)\r\n .getCFR());\r\n\r\n if (!cfrPercentage.equals(\"-1%\")) {\r\n TextShape cfrName = new TextShape(0, 0, cfrPercentage);\r\n cfrName.moveTo(barXPos + (spacingSize * spacingCounter),\r\n +barYPos + 25);\r\n window.addShape(cfrName);\r\n }\r\n spacingCounter++;\r\n }\r\n }\r\n lastStateMemory = num;\r\n spacingCounter = 1;\r\n }", "void tic()\n\t{\n\t\t//pop 2, avg, multi decay, push\n\t\t\n\t\tif(!rb.isEmpty())\n\t\t{\n\t\t\tdouble a = rb.dequeue(), b = rb.peek();\n\n\t\t\tdouble newItem = DECAY_RATE * 0.5 * (a+b);\n\t\t\n\t\t\trb.enqueue(newItem);\n\t\t}\n\t}", "double agression();", "public static void incrementScore() {\n\t\tscore++;\n\t}", "final private void accumulate()\n\t{\n\t\tfinal int argb = target.get().get();\n\t\taccA += ( ( argb >> 24 ) & 0xff ) * weights[ code ];\n\t\taccR += ( ( argb >> 16 ) & 0xff ) * weights[ code ];\n\t\taccG += ( ( argb >> 8 ) & 0xff ) * weights[ code ];\n\t\taccB += ( argb & 0xff ) * weights[ code ];\n\n//\t\tSystem.out.print( \"accumulating value at \" + target );\n//\t\tSystem.out.print( \"with weights [\" );\n//\t\tprintCode();\n//\t\tSystem.out.printf( \"] = %f\" + \"\\n\", weights[ code ] );\n\t}", "public abstract void BoostNerf(int boost);", "public void calcScore(int score) {\r\n\t\tif (initFinish)\r\n\t\t\tthis.score += score * this.multy;\r\n\t\t// TODO delete\r\n//\t\tSystem.out.println(\"score: \" + this.score + \"multy: \" + this.multy);\r\n\t}", "protected final void calcScore()\n {\n\n m_score = SCORE_OTHER;\n\n if (null == m_targetString)\n calcTargetString();\n }", "private void m50367F() {\n }", "private void red(){\n\t\tthis.arretes_fR();\n\t\tthis.coins_fR();\n\t\tthis.coins_a1R();\n\t\tthis.coins_a2R();\n\t\tthis.aretes_aR();\n\t\tthis.cube[13] = \"R\";\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e){\n\t\tif (TI82.sub){\n\t\t\tTI82.oldNum -= TI82.newNum;\n\t\t} else if (TI82.add){\n\t\t\tTI82.oldNum += TI82.newNum;\n\t\t} else if (TI82.mul){\n\t\t\tTI82.oldNum *= TI82.newNum;\n\t\t}\n\t\tTI82.newNum=0;\n//\t\tTI82.oldNum = TI82.oldNum + TI82.newNum;\n\t\tTI82.screen.setText(\"\"+TI82.oldNum);\n//\t\tSystem.out.println(\"Nums: \" + TI82.oldNum + \" \" + TI82.newNum);\n\t}", "public void updateScore( Realization realization ){\n\t\trealization.setScore( calcScore(realization) ) ;\n\t}", "@Override\n public void collectionProcessComplete(ProcessTrace arg0) throws ResourceProcessException,\n IOException {\n\n super.collectionProcessComplete(arg0);\n sortSimilarity(coslist);\n log(coslist);\n int rank=findRank(coslist,goldcos);\n rankList.add(rank);\n coslist = new ArrayList<Double>();\n // TODO :: compute the cosine similarity measure\n\n // TODO :: compute the rank of retrieved sentences\n\n for (Integer i : rankList) {\n System.out.println(\"\" + i);\n }\n\n // TODO :: compute the metric:: mean reciprocal rank\n double metric_mrr = compute_mrr();\n System.out.println(\" (MRR) Mean Reciprocal Rank ::\" + metric_mrr);\n }", "protected float computeModelScoreOnValidation() {\n/* 549 */ float score = computeModelScoreOnValidation(0, this.validationSamples.size() - 1);\n/* 550 */ return score / this.validationSamples.size();\n/* */ }", "@Override public void postGlobal() {\n for(int i=1;i<_chkProds.length;++i) _chkProds[i] *= _chkProds[i-1];\n }", "public int getNumAyuAtracc();", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n NaiveBayesMultinomialText naiveBayesMultinomialText1 = (NaiveBayesMultinomialText)AbstractClassifier.makeCopy(naiveBayesMultinomialText0);\n naiveBayesMultinomialText1.m_wordFrequencies = true;\n boolean boolean0 = naiveBayesMultinomialText1.getUseWordFrequencies();\n assertTrue(naiveBayesMultinomialText1.getUseWordFrequencies());\n assertTrue(boolean0);\n }", "public abstract int selfExplodingKittenDrawn();", "public void incDraws() {\n draws++;\n }", "public void updateScores(double attempt) {\r\n \tif(previousScore == 0){\r\n \t\tpreviousScore = currentScore;\r\n \t}else{\r\n \t\tbeforePreviousScore = previousScore;\r\n \t\tpreviousScore = currentScore;\r\n \t}\r\n this.currentScore = 100*(attempt \r\n\t\t\t\t- (benchmark - (maximumMark - benchmark)/NUMBEROFLEVEL))\r\n\t\t\t\t/(((maximumMark - benchmark)/NUMBEROFLEVEL)*2);\r\n }", "public void rollBackTotal( int turnQuit )\n {\n totalScore -= turnScores[turnQuit];\n }", "protected float computeModelScoreOnTraining() {\n/* 508 */ float s = computeModelScoreOnTraining(0, this.samples.size() - 1, 0);\n/* 509 */ s /= this.samples.size();\n/* 510 */ return s;\n/* */ }", "public double recallMemory() {\n return memoryValue;\n }", "private static void FirstUmpieRevire() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "protected void calculateMark() {\n //\t\tavemoisturelevel=avemoisturelevel+.5;\n //\t\tmProgressbar.setProgress((int) avemoisturelevel);\n \t\t\n \t\t//For SIMULATION ONLY REMOVE THIS CODE\n \n \t\t\n \t\tif(maxedmoisturelevel<avemoisturelevel){\n \t\tmaxedmoisturelevel=(int) avemoisturelevel;\n \t\t}\n \t\tint tonenum= (int) (avemoisturelevel/10);\n //\t\ttonegen.startTone(tonenum,100);\n //\t\taudioTrack.setPlaybackRate(sampleRate/2);\n //\t\taudioTrack.play();\n \t\tsoundPool.setRate(currentstreamID, (float) (.5+1.5*avemoisturelevel/100));\n \t\n \t\t\n \t}", "private void m20467b() {\n C6502h.CamembertauCalvados unused = this.f16562a.f16549f;\n C6502h a = C6502h.CamembertauCalvados.m21397a(this.f16563b);\n a.mo35508e(this.f16564c);\n Machecoulais.m20446b(this.f16562a.f16546c, a);\n this.f16562a.m20436a(this.f16563b, a);\n }", "public double getAccuracyWithLabFormat(String input)\n {\n\n resetWeight();\n\n BagOfWords bag =new BagOfWords(\" \");\n\n String tt=input;\n\n input = input.replaceAll(\"\\n\",\" \");\n\n for (String s:input.split(\" \"))\n {\n bag.add(s);\n }\n\n\n\n for(HashMap.Entry<String, Integer> entry : bag.getBagHashMap().entrySet())\n {\n String key = entry.getKey();\n\n for (TFIDF bag1: trainedClasses)\n {\n for (Word w:bag1.getWordsSets().getWordList())\n {\n if (w.getValue().equals(key))\n {\n bag1.setWeight(bag1.getWeight()+w.getFreq());\n bag1.setFileCount(bag1.getFileCount()+1);\n }\n }\n\n }\n\n }\n\n for (TFIDF bag1: trainedClasses)\n {\n bag1.setWeight(bag1.getWeight()/(bag1.getFileCount()+1));\n }\n\n int i= trainedClasses.size();\n\n for (TFIDF bag1: trainedClasses)\n {\n if (tt.split(\"\\n\")[0].contains(bag1.getName()))\n {\n i=Math.min(i, trainedClasses.indexOf(bag1));\n }\n\n }\n\n StringBuilder ret= new StringBuilder(\"(\" + i + \")\" + \"\\n\");\n\n trainedClasses.sort(new Comparator<TFIDF>() {\n @Override\n public int compare(TFIDF idf, TFIDF t1) {\n if (idf.getWeight()>t1.getWeight())\n return -1;\n else\n return 1;\n }\n });\n\n for (TFIDF bag1: trainedClasses)\n {\n ret.append(\" --> \").append(bag1.getName()).append(\": \").append(bag1.getWeight()).append(\"\\n\");\n }\n\n return (100/Math.pow(i+1,2));\n\n }", "public int calculScore(Deck deck)\n {\n return 0;\n }", "private void scoring(NameInfo name1Info, NameInfo name2Info, int flag) {\n\t\tString name1 = name1Info.getName();\n\t\tString name2 = name2Info.getName();\n\t\tString type1 = name1Info.getType();\n\t\tString type2 = name2Info.getType();\n\t\tif (name1.length() == 0 || name2.length() == 0) {\n\t\t\tscore = 0.0f;\n\t\t\tscoreShingle = 0.0f;\n\t\t\treason = \"There is an empty name.\";\n\t\t\treturn;\n\t\t}\n\t\tswitch (flag) {\n\t\t\n\t\tcase 1: // PER\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tfloat scorePER = getPERScore(name1Info, name2Info);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric\";\n\t\t\tif (score < scorePER) {\n\t\t\t\tscore = scorePER;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 2: // LOC\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tscore = shortMan.scoring(name1, name2);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\tfloat countryLangScore = countryMan.scoring(name1, name2);\n\t\t\tif (score < countryLangScore) {\n\t\t\t\tscore = countryLangScore;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Country-Language list.\";\n\t\t\t\tif (score < scoreShingle) {\n\t\t\t\t\tscore = scoreShingle;\n\t\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 3: // ORG\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tscore = acroMan.scoring(name1Info, name2Info);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\tif (scoreShingle > score) {\n\t\t\t\tscore = scoreShingle;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 4: // GEN\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tfloat scorePer = getPERScore(name1Info, name2Info);\n\t\t\tfloat scoreShort = shortMan.scoring(name1, name2);\n\t\t\tfloat scoreCL = countryMan.scoring(name1, name2);\n\t\t\tfloat scoreAcro = acroMan.scoring(name1Info, name2Info);\n\t\t\tif (scoreAcro > score) {\n\t\t\t\tscore = scoreAcro;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t}\n\t\t\tif (scoreCL > score) {\n\t\t\t\tscore = scoreCL;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Country-Language list.\";\n\t\t\t}\n\t\t\tif (scoreShort > score) {\n\t\t\t\tscore = scoreShort;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\t}\n\t\t\tif (scorePer > score) {\n\t\t\t\tscore = scorePer;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric\";\n\t\t\t}\n\t\t\tif (scoreShingle > score) {\n\t\t\t\tscore = scoreShingle;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t}\n\t\t\tif (acroMan.isSpecificCase()) {\n\t\t\t\tscore = scoreAcro;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 5: // Two different types\n\t\t\tif (type1.equals(\"PER\") || type2.equals(\"PER\")) {\n\t\t\t\tscore = 0.0f;\n\t\t\t\treason = \"Type: \" + type1 + \". and \" + type2 + \". cannot be compared\";\n\t\t\t} else if (type1.equals(\"LOC\") || type2.equals(\"LOC\")) {\n\t\t\t\tscore = shortMan.scoring(name1, name2);\n\t\t\t\treason = \"Type: LOC. metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\t} else if (type1.equals(\"ORG\") || type2.equals(\"ORG\")) {\n\t\t\t\tfloat orgScore = acroMan.scoring(name1Info, name2Info);\n\t\t\t\tif (score < orgScore) {\n\t\t\t\t\tscore = orgScore;\n\t\t\t\t\treason = \"Type: ORG. metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tscore = 0.0f;\n\t\t\t\treason = \"Type: \" + type1 + \". and \" + type2 + \". cannot be compared\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tscore = 0.0f;\n\t\t\treason = \"#######SHOULD NOT HAPPEN#######\";\n\t\t}\n\t\tif (name1.equalsIgnoreCase(name2))\n\t\t\tscore = 1.0f;\n\t\tif (!name1Info.getType().equals(\"PER\") && !name2Info.getType().equals(\"PER\"))\n\t\t\thandleLargeRatio(name1, name2);\n\t}", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public void lagSkudd2() {\n\t}", "public abstract double score(double tf, double docLength, double precomp);", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toSummaryString(\".arff\", true);\n assertEquals(0.0, evaluation0.unclassified(), 0.01);\n assertEquals(\".arff\\nTotal Number of Instances 0 \\n\", string0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "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 }", "protected void reevaluateForecaster(final String name, \n final WekaForecaster forecaster, final Instances trainHeader) {\n \n if (!trainHeader.equalHeaders(m_instances)) {\n JOptionPane.showMessageDialog(null, \"Data used to train this forecaster \" +\n \"is not compatible with the currently loaded data:\\n\\n\" \n + trainHeader.equalHeadersMsg(m_instances), \"Unable to reevaluate model\",\n JOptionPane.ERROR_MESSAGE);\n } else {\n if (m_runThread == null) {\n synchronized (this) {\n m_startBut.setEnabled(false);\n m_stopBut.setEnabled(true);\n }\n \n m_runThread = new ForecastingThread(forecaster, name);\n ((ForecastingThread)m_runThread).setConfigureAndBuild(false);\n \n m_runThread.setPriority(Thread.MIN_PRIORITY);\n m_runThread.start();\n }\n }\n }", "public void process()\n {\n for (int i = 0; i <= names.length-1; i++)\n {\n int x = 0;\n System.out.println(\"\");\n System.out.print(names[i] + \" had test scores of \");\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n System.out.print(scores[i][j] + \", \");\n \n x += scores[i][j];\n \n }\n System.out.print(\" Test average is \" + x/4 + \".\");\n }\n System.out.println(\"\");\n findL();\n findH();\n findAvg();\n }", "public void mo33138e() {\n this.f23891d++;\n }", "private void sketchScore() {\r\n View.sketch(score, this.getSize().width + 15, 0);\r\n }", "public void func_70295_k_() {}", "static void m1318a() {\n f1109a++;\n }", "public void calculateScore() {\n for (Sequence seq: currentSeq) {\n double wordWeight = Retriever.getWeight(seq);\n String token = seq.getToken();\n int size = seq.getRight() - seq.getLeft() + 1;\n int titleCount = getCount(token.toLowerCase(), title.toLowerCase());\n if (titleCount != 0) {\n setMatch(size);\n setTitleContains(true);\n }\n int lowerCount = getCount(token.toLowerCase(), lowerContent);\n if (lowerCount == 0) {\n// scoreInfo += \"Token: \" + token + \" Original=0 Lower=0 WordWeight=\" + wordWeight + \" wordTotal=0\\n\";\n continue;\n }\n int originalCount = getCount(token, content);\n lowerCount = lowerCount - originalCount;\n if (lowerCount != 0 || originalCount != 0) {\n setMatch(size);\n }\n double originalScore = formula(wordWeight, originalCount);\n double lowerScore = formula(wordWeight, lowerCount);\n final double weight = 1.5;\n double addedScore = weight * originalScore + lowerScore;\n// scoreInfo += \"Token: \" + token + \" Original=\" + originalScore + \" Lower=\" + lowerScore +\n// \" WordWeight=\" + wordWeight + \" wordTotal=\" + addedScore + \"\\n\";\n dependencyScore += addedScore;\n }\n currentSeq.clear();\n }", "void decCount() {\n if (refCount > 0) {\n --refCount;\n }\n }", "private void reciprocal()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.reciprocal ( );\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\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}", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n String string0 = evaluation0.toClassDetailsString(\".arff\");\n assertEquals(Double.NaN, evaluation0.unweightedMicroFmeasure(), 0.01);\n assertEquals(\".arff\\n TP Rate FP Rate Precision Recall F-Measure MCC ROC Area PRC Area Class\\n 0 0 0 0 0 0 ? ? class1\\n 0 0 0 0 0 0 ? ? class2\\nWeighted Avg. NaN NaN NaN NaN NaN NaN NaN NaN \\n\", string0);\n }", "private void replayNextOp() {\n\t\topNum++;\n\t\tif (opNum > ops.length) {\n\t\t\topNum = -1;\n\t\t\tupdate();\n\t\t} else if (!getExited()) {\n\t\t\tjavax.swing.SwingUtilities.invokeLater(doReplayNextOp);\n\t\t}\n\t}", "public abstract int preN();", "void incCount() {\n ++refCount;\n }", "public void crunch(){\n cpuBurstTime--;\n rem--;\n }", "public void mo16965a() {\n this.f9218b.mo16961a();\n }", "public void m6608Y() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"1\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "public void reduce(Text prefix, Iterator<IntWritable> iter,\n OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\nint a000_ = 0;\nint a001_ = 0;\nint a002_ = 0;\nint a003_ = 0;\nint a004_ = 0;\nint a005_ = 0;\nint a006_ = 0;\nint a007_ = 0;\nint a008_ = 0;\nint a009_ = 0;\nint a010_ = 0;\nint a011_ = 0;\nint a012_ = 0;\nint a013_ = 0;\nint a014_ = 0;\nint a015_ = 0;\nint a016_ = 0;\nint a017_ = 0;\nint a018_ = 0;\nint a019_ = 0;\nint cur_ = 0;\n\nwhile (iter.hasNext()) {\ncur_ = iter.next().get();\na011_ = a015_ - a008_;\na003_ = a000_ + a003_;\na005_ = a005_ + a006_;\na015_ = a012_ + a011_;\na008_ = a014_ + a001_;\na007_ = a005_ + a015_;\na002_ = a000_ - a009_;\na012_ = a005_ + a012_;\na010_ = a018_ + a003_;\na014_ = a014_ + a004_;\ncur_ = a002_ + a004_;\na017_ = a007_ + a009_;\na005_ = cur_ - a014_;\na000_ = a012_ - a006_;\na006_ = a013_ - a011_;\na000_ = 0 - a008_;\na006_ = a007_ + a003_;\na015_ = a014_ - a019_;\na004_ = a012_ + cur_;\na005_ = a018_ - a017_;\na007_ = a006_ + a000_;\na005_ = cur_ - a009_;\na001_ = a009_ + a008_;\na015_ = cur_ + a010_;\na013_ = a018_ * -2;\ncur_ = a013_ - a012_;\na019_ = a002_ - a001_;\na017_ = a014_ + a004_;\na005_ = a017_ - a006_;\na016_ = a019_ - a019_;\na009_ = a000_ + cur_;\na013_ = a003_ * -1;\nif (a010_ >= a004_) {\na015_ = a018_ + a015_;\na010_ = a009_ - a010_;\na012_ = a011_ - a005_;\na014_ = a002_ - a012_;\nif (a000_ != a013_) {\na004_ = a015_ + cur_;\na013_ = a019_ + a016_;\na013_ = a012_ + a009_;\na016_ = a014_ - -5;\na001_ = a002_ - a004_;\n} else {\na007_ = a013_ - a003_;\na016_ = a007_ - a018_;\na016_ = a013_ + a011_;\na013_ = a013_ - a012_;\na013_ = -1 + a006_;\ncur_ = a002_ - a017_;\na007_ = a002_ + a018_;\ncur_ = a002_ + a015_;\na003_ = a015_ + a007_;\na017_ = a005_ + a009_;\na013_ = a006_ - -2;\na008_ = a005_ - a003_;\na002_ = a017_ - a014_;\na006_ = a006_ + a010_;\na008_ = a018_ + a010_;\na000_ = a015_ + -4;\na014_ = a004_ - a010_;\na012_ = a009_ - a016_;\na008_ = a002_ - a019_;\na015_ = a007_ + a005_;\na004_ = cur_ + a018_;\na011_ = a007_ + a012_;\na007_ = 4 - a011_;\na001_ = a012_ + cur_;\na011_ = a010_ - a013_;\na003_ = a006_ - a011_;\na006_ = a012_ - a008_;\na015_ = a010_ - a013_;\na019_ = a012_ + a011_;\nif (a017_ != a015_) {\ncur_ = a010_ - cur_;\na013_ = a009_ - a002_;\na008_ = a011_ - a008_;\na019_ = a005_ - a000_;\na010_ = a019_ + a010_;\na002_ = a004_ - 1;\na017_ = a015_ - cur_;\ncur_ = 1 - a005_;\na004_ = a000_ + a003_;\na001_ = a012_ + 2;\na004_ = a003_ - 2;\na003_ = a010_ - -4;\na019_ = a014_ - a002_;\na011_ = a002_ - a007_;\na000_ = a007_ + a015_;\na018_ = a009_ + cur_;\na006_ = a003_ - a017_;\nif (a008_ == a013_) {\na005_ = a017_ + a016_;\na005_ = a005_ + a013_;\na017_ = a015_ + a007_;\na016_ = a016_ + a018_;\na016_ = a014_ - a015_;\na003_ = a019_ - a018_;\ncur_ = a010_ + a005_;\na003_ = a001_ + a010_;\na016_ = -4 + a003_;\na002_ = a017_ + a008_;\na016_ = a003_ - a009_;\na003_ = a009_ + a015_;\na016_ = a004_ - a000_;\na005_ = a015_ + cur_;\na018_ = a010_ + a003_;\na016_ = a017_ - a004_;\n} else {\na018_ = a019_ + a009_;\na015_ = a004_ + a018_;\na019_ = a005_ - a003_;\na009_ = -5 + a008_;\na010_ = a000_ + a000_;\na009_ = a009_ - a011_;\na005_ = a006_ - cur_;\na019_ = a018_ + a009_;\na014_ = a005_ + cur_;\na004_ = a010_ + a008_;\na000_ = a015_ - a018_;\na015_ = a017_ - a017_;\na008_ = a001_ + a008_;\na002_ = a009_ - a012_;\na010_ = a006_ - a012_;\na014_ = a009_ + a001_;\na016_ = a000_ - a016_;\na004_ = a018_ - a019_;\na007_ = a003_ + a011_;\na019_ = a004_ - a017_;\na015_ = a018_ - a017_;\na003_ = a000_ + a002_;\na005_ = a007_ - a014_;\na001_ = cur_ + a017_;\n}\na012_ = a012_ + cur_;\n} else {\na010_ = a018_ + a000_;\na002_ = a000_ - a003_;\na005_ = a012_ + a012_;\na015_ = a004_ + a004_;\na008_ = a013_ - a019_;\na004_ = a002_ + a015_;\na011_ = a014_ + a012_;\na004_ = a019_ + a010_;\na002_ = a018_ + a010_;\ncur_ = a017_ + a019_;\na017_ = a013_ + a005_;\na013_ = a008_ - a012_;\na004_ = a012_ + a007_;\n}\na009_ = a015_ - a016_;\na000_ = a006_ + a008_;\na003_ = a008_ - a011_;\na001_ = a016_ - a006_;\na016_ = a014_ + a016_;\na000_ = a011_ + a003_;\na004_ = a010_ + a019_;\na013_ = a008_ + cur_;\na016_ = a016_ + a015_;\n}\na010_ = a003_ + a007_;\na006_ = a009_ - a000_;\na002_ = a017_ - a001_;\na013_ = a016_ + a019_;\na013_ = a009_ - a015_;\na005_ = a002_ - a018_;\na009_ = a002_ + a007_;\na008_ = a008_ + a002_;\na007_ = a005_ + a009_;\na017_ = a019_ + a013_;\na012_ = a003_ + a004_;\na008_ = a012_ + a012_;\na003_ = a007_ + a005_;\ncur_ = a014_ + a007_;\na009_ = a016_ + a010_;\na006_ = a005_ - a003_;\na014_ = a019_ + cur_;\na006_ = a007_ + a000_;\na013_ = a011_ - a011_;\na018_ = a009_ - 1;\na002_ = a004_ - a014_;\n} else {\na004_ = a006_ - a014_;\na016_ = a017_ + 2;\na014_ = a006_ - a002_;\na002_ = a016_ + cur_;\na014_ = -3 + a018_;\n}\ncur_ = a017_ + a015_;\na005_ = a003_ - a015_;\na014_ = a019_ + a009_;\ncur_ = cur_ + a005_;\na009_ = a007_ - a004_;\ncur_ = a014_ + a006_;\na013_ = a002_ - a012_;\na002_ = a008_ + a014_;\na000_ = a006_ + a004_;\na017_ = 1 - a009_;\na012_ = a017_ + a001_;\na011_ = a009_ - a010_;\na011_ = a018_ - a014_;\na016_ = a003_ - cur_;\na013_ = cur_ + a012_;\na015_ = a012_ + a010_;\na017_ = a007_ + a017_;\na000_ = -1 + a008_;\na010_ = a008_ + a003_;\na016_ = a009_ + a010_;\na002_ = a011_ + a008_;\na016_ = a015_ + a016_;\na002_ = a012_ + a008_;\na017_ = a013_ + a004_;\n}\noutput.collect(prefix, new IntWritable(a005_));\n}", "void aprovarAnalise();", "void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }", "public static void m46510lK(boolean z) {\n AppMethodBeat.m2504i(109819);\n C4990ab.m7416i(\"MicroMsg.StoryRemuxIDKeyStat\", \"markRemuxProcessType, isForeground:\".concat(String.valueOf(z)));\n if (z) {\n C7060h.pYm.mo15419k(986, 5, 1);\n AppMethodBeat.m2505o(109819);\n return;\n }\n C7060h.pYm.mo15419k(986, 6, 1);\n AppMethodBeat.m2505o(109819);\n }", "@Override\n\tpublic void inputScore() {\n\n\t}", "public void mo7206b() {\n this.f2975f.mo7325a();\n }", "void unsetScoreAnalysis();", "public void addScore()\n {\n score += 1;\n }", "public void addFormulas() {\n countFormulas++;\n }", "public void resetRunCount() {\n\n }", "protected void recordUndoRedoMacro(DocumentMacro macro) {\n super.recordUndoRedoMacro(macro);\n }", "public void timeToRunDec()\n\t{\n\t\tthis.time_to_run -- ;\n\t}" ]
[ "0.65578175", "0.6104099", "0.6085438", "0.5951525", "0.5503211", "0.54779", "0.5434477", "0.5382558", "0.53550255", "0.53426874", "0.53392404", "0.52642435", "0.5263914", "0.5228653", "0.5161114", "0.5151101", "0.50645846", "0.5040286", "0.5033487", "0.5019717", "0.5005833", "0.50047064", "0.49766397", "0.4922103", "0.4870727", "0.48688328", "0.48649314", "0.48595142", "0.4784607", "0.4776848", "0.4754647", "0.46719065", "0.46503556", "0.4645574", "0.463855", "0.46284822", "0.46166468", "0.46100077", "0.46049133", "0.4581946", "0.4581529", "0.45771804", "0.45741665", "0.45663312", "0.4548694", "0.45372573", "0.45250756", "0.45208427", "0.45080882", "0.4497109", "0.44963187", "0.44892997", "0.4482638", "0.44793442", "0.44791487", "0.4476391", "0.44725338", "0.4468547", "0.44659922", "0.4465174", "0.4459783", "0.44588596", "0.44574952", "0.44509965", "0.44507724", "0.44480088", "0.44349217", "0.44209963", "0.4419928", "0.4414027", "0.44118726", "0.44106743", "0.44087484", "0.4407475", "0.4406172", "0.43996033", "0.43933573", "0.43906027", "0.43894133", "0.4388368", "0.4382521", "0.43759236", "0.43726125", "0.43716902", "0.43705586", "0.4367877", "0.43669474", "0.43654644", "0.4358526", "0.4352541", "0.43520656", "0.43516153", "0.4348639", "0.4348288", "0.43444306", "0.43426213", "0.43358582", "0.4335554", "0.4335521", "0.43341294" ]
0.80810374
0
Computes the accuracy (aka micro f1 score)
public double computeAccuracy(){ //count the totla number of predictions double total = sumAll(); double truePredictions = 0; //iterate all correct guesses for(Label l : labels){ truePredictions += this.computeTP(l); } return truePredictions/(total); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double calculateAccuracy() {\n final long divisor = truePositive + trueNegative + falsePositive + falseNegative;\n if(divisor == 0) {\n return 0.0;\n } else {\n return (truePositive + trueNegative) / (double)divisor;\n }\n }", "public double getAccuracy(){\n return (numOfHits/numOfGuesses);\n }", "private double findAccuracy(){\n double[] prediciton = this.learner.test(this.VS);\n ClassificationEvaluator CE = new ClassificationEvaluator(prediciton, this.VS);\n double tmp = CE.returnAccuracy(); //find accuracy\n return tmp;\n }", "public float getAccuracy() {\n return this.accuracy;\n }", "public java.lang.Float getAccuracy () {\n\t\treturn accuracy;\n\t}", "double getAbsoluteAccuracy();", "public double testAccuracy() {\r\n\t\tdouble accuracy = 0;\r\n\t\tint i = 0;\r\n\t\tdouble split = ((float)dataEntries.size()/(float)100)*70;\r\n\t\t\r\n\t\t//Filling arrays with the correct and predicted results to compare.\r\n\t\tfor (i=(int)split; i<dataEntries.size(); i++) {\r\n\t\t\t\tEntry en = dataEntries.get(i);\r\n\t\t\t\tcorrectArray.add(en.getHasCOVID19());\r\n\t\t\t\tdouble diagnosis = calcProbs(new Entry(en.getTemperature(), en.getAches(), en.getCough(), en.getSoreThroat(), en.getSoreThroat()));\r\n\t\t\t\tif (diagnosis>0.5) { predictArray.add(\"yes\"); }\r\n\t\t\t\telse { predictArray.add(\"no\"); }\r\n\t\t}\r\n\t\t\r\n\t\t//Comparing the results of \"hasCOVID19\" to each other.\r\n\t\tfor(i=0;i<correctArray.size();i++) {\r\n\t\t\tif (correctArray.get(i).equals(predictArray.get(i))) {\r\n\t\t\t\taccuracy++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Getting the result as a percentage and returning it.\r\n\t\taccuracy /= correctArray.size();\r\n\t\treturn accuracy * 100;\r\n\t}", "public double computeMacroF1(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual f1 scores\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeF1Score(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "@Override\r\n\tpublic double getAccuracy() {\n\t\treturn this.accuracy;\r\n\t}", "public double computeF1Score(Label classLabel){\n\t\tdouble r = this.computeRecall(classLabel);\n\t\tdouble p = this.computePrecision(classLabel);\n\t\treturn (2.0 * p * r)/(p+r);\n\t}", "double getRelativeAccuracy();", "protected void calculateAccuracyOfTrainFile( double threshold )\n\t{\n\t\tint result = 0, n = this.class_data.attribute_data.size();\n\t\tdouble sum, total = 0;\n\t\tAttribute temp;\n\n\t\tfor ( int i = 0; i < n; i++ )\n\t\t{\n\t\t\tsum = 0;\n\t\t\tfor ( int j = 0; j < this.attribute_list.size(); j++ )\n\t\t\t{\n\t\t\t\ttemp = this.attribute_list.get( j );\n\t\t\t\tsum += temp.attribute_data.get( i ) * temp.getWeigth();\n\t\t\t}\n\n\t\t\tif ( sum < threshold )\n\t\t\t\tresult = 0;\n\t\t\telse\n\t\t\t\tresult = 1;\n\n\t\t\tif ( result == this.class_data.attribute_data.get( i ) )\n\t\t\t\ttotal++;\n\t\t}\n\n\t\tDecimalFormat df = new DecimalFormat( \"#.##\" );\n\t\tSystem.out.println( \"Accuracy of training file ( \" + n + \" instance ) = \" + df.format( (total * 100.00 / n) ) );\n\t}", "public double accuracy() throws RankingException {\n\t\treturn this.accuracy;\n\t}", "public String getAccuracy() {\n\t\treturn accuracy;\n\t}", "protected void calculateAccuracyOfTestFile( double threshold, String test_file_name ) throws FileNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile test_file = new File( test_file_name );\n\t\t\tScanner in;\n\t\t\tString[] tokens;\n\t\t\tint total_tokens = 0, total_matched = 0, n, result;\n\t\t\tdouble sum;\n\t\t\tAttribute temp;\n\n\t\t\tin = new Scanner( test_file );\n\t\t\tin.nextLine();\n\n\t\t\twhile ( in.hasNextLine() )\n\t\t\t{\n\t\t\t\ttokens = in.nextLine().trim().split( \"\\\\s+\" );\n\t\t\t\tn = tokens.length;\n\t\t\t\tif ( n > 1 )\n\t\t\t\t{\n\t\t\t\t\ttemp = this.attribute_list.get( 0 );\n\t\t\t\t\tsum = temp.getWeigth();\n\n\t\t\t\t\tfor ( int i = 1; i < n; i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\ttemp = this.attribute_list.get( i );\n\t\t\t\t\t\tsum += Integer.parseInt( tokens[ i - 1 ] ) * temp.getWeigth();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( sum < threshold )\n\t\t\t\t\t\tresult = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tresult = 1;\n\n\t\t\t\t\tif ( Integer.parseInt( tokens[ n - 1 ] ) == result )\n\t\t\t\t\t\ttotal_matched++;\n\n\t\t\t\t\ttotal_tokens++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tDecimalFormat df = new DecimalFormat( \"#.##\" );\n\t\t\tSystem.out.println( \"Accuracy of test data ( \" + total_tokens + \" instances ) = \" + df.format( total_matched * 100.00 / total_tokens ) );\n\n\t\t\tin.close();\n\t\t}\n\t\tcatch ( FileNotFoundException e )\n\t\t{\n\t\t\tSystem.out.println( \"Cannot find test file - \" + test_file_name );\n\t\t\tthrow e;\n\t\t}\n\t}", "double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}", "protected float computeModelScoreOnTraining() {\n/* 508 */ float s = computeModelScoreOnTraining(0, this.samples.size() - 1, 0);\n/* 509 */ s /= this.samples.size();\n/* 510 */ return s;\n/* */ }", "public void setAccuracy (java.lang.Float accuracy) {\n\t\tthis.accuracy = accuracy;\n\t}", "public static double predictionAccuracy(List<CSVAttribute[]> ulTestData, List<CSVAttribute[]> validationData,\n DecisionTreeNode tree, int labelAttribute){\n\n List<CSVAttribute[]> predictedTestData = TreeModel.predict(ulTestData, tree, labelAttribute);\n\n int correct = 0;\n for (int j = 0; j < predictedTestData.size(); j++) {\n if (predictedTestData.get(j)[labelAttribute].equals(validationData.get(j)[labelAttribute])) correct++;\n }\n\n return (double) correct / (double) predictedTestData.size();\n }", "public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }", "double ComputeFT_F1Score(individual st){\n\t\tdouble sum = 0, ft;\n\t\tint i;\n\t\tdouble[] tm;\n\t\t\n\t\tint tp, tn, fp, fn;\n\n\t\tdouble precision, recall;\n\t\ttp=0;\n\t\ttn=0;\n\t\tfp=0;\n\t\tfn=0;\n\t\t\n\t\ttm=ComputeTest(st.chrom);\n\t\tfor(i = 0; i < NUMFITTEST; i++) {\n\t\t\tft = PVAL(tm[i]);\n\t\t\t\n//\t\t\tSystem.out.println(\"TM[i]:\"+ft);\n\t\t\tif(ft<0) {\t\t\t\t\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\ttn++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\tfp++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttp++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n//\t\t\t\n\t\t}\t\n//\t\t\n//\t\tSystem.out.println(\"TP:\"+tp);\n//\t\tSystem.out.println(\"FP:\"+fp);\n//\t\tSystem.out.println(\"FN:\"+fn);\n//\t\tSystem.out.println(\"TN:\"+tn);\n\t\tprecision=tp/(tp+fp);\n\t\trecall=tp/(tp+fn);\n\t\tsum=2*precision*recall/(precision+recall);\n\t\treturn sum;\n\t}", "public double averageTokenAccuracy (InstanceList ilist)\n\t{\n\t\t@Var\n\t\tdouble accuracy = 0;\n\t\tfor (int i = 0; i < ilist.size(); i++) {\n\t\t\tInstance instance = ilist.get(i);\n\t\t\tSequence input = (Sequence) instance.getData();\n\t\t\tSequence output = (Sequence) instance.getTarget();\n\t\t\tassert (input.size() == output.size());\n\t\t\tSequence predicted = maxLatticeFactory.newMaxLattice(this, input).bestOutputSequence();\n\t\t\tdouble pathAccuracy = Sequences.elementwiseAccuracy(output, predicted); \n\t\t\taccuracy += pathAccuracy;\n\t\t\tlogger.fine (\"Transducer path accuracy = \"+pathAccuracy);\n\t\t}\n\t\treturn accuracy/ilist.size();\n\t}", "public double getAverageAccuracyLoss() {\n\t\tdouble sum = 0;\r\n\t\tdouble n = accLosses.size();\r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tsum += accLosses.get(i);\r\n\t\t}\r\n\t\t\r\n\t\treturn sum/n; \r\n\t}", "public double getSvAccuracy() {\n return svAccuracy;\n }", "public abstract double score(double tf, double docLength, double precomp);", "public double AccuracyLossTestSet()\n\t{\n\t\tdouble accuracyLoss = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++) \n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++) \n\t\t\t\taccuracyLoss += AccuracyLoss(i, c); \n\t\t}\n\t\treturn accuracyLoss;\n\t}", "@Override\n \tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n \t\t\n \t}", "public double getAccuracyWithLabFormat(String input)\n {\n\n resetWeight();\n\n BagOfWords bag =new BagOfWords(\" \");\n\n String tt=input;\n\n input = input.replaceAll(\"\\n\",\" \");\n\n for (String s:input.split(\" \"))\n {\n bag.add(s);\n }\n\n\n\n for(HashMap.Entry<String, Integer> entry : bag.getBagHashMap().entrySet())\n {\n String key = entry.getKey();\n\n for (TFIDF bag1: trainedClasses)\n {\n for (Word w:bag1.getWordsSets().getWordList())\n {\n if (w.getValue().equals(key))\n {\n bag1.setWeight(bag1.getWeight()+w.getFreq());\n bag1.setFileCount(bag1.getFileCount()+1);\n }\n }\n\n }\n\n }\n\n for (TFIDF bag1: trainedClasses)\n {\n bag1.setWeight(bag1.getWeight()/(bag1.getFileCount()+1));\n }\n\n int i= trainedClasses.size();\n\n for (TFIDF bag1: trainedClasses)\n {\n if (tt.split(\"\\n\")[0].contains(bag1.getName()))\n {\n i=Math.min(i, trainedClasses.indexOf(bag1));\n }\n\n }\n\n StringBuilder ret= new StringBuilder(\"(\" + i + \")\" + \"\\n\");\n\n trainedClasses.sort(new Comparator<TFIDF>() {\n @Override\n public int compare(TFIDF idf, TFIDF t1) {\n if (idf.getWeight()>t1.getWeight())\n return -1;\n else\n return 1;\n }\n });\n\n for (TFIDF bag1: trainedClasses)\n {\n ret.append(\" --> \").append(bag1.getName()).append(\": \").append(bag1.getWeight()).append(\"\\n\");\n }\n\n return (100/Math.pow(i+1,2));\n\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n }", "public double computeMacroPrecision(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual precision values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computePrecision(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n \n }", "public void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n }", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\n\t}", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\n\t}", "private double validate(int k) {\n\t\tArrayList<Product> allData = trainData;\n\t\tshuffle(allData);\n\t\tArrayList<Double> accurs = new ArrayList<Double>();\n\t\tif (k < 1 || k > allData.size()) return -1;\n\t\tint foldLength = allData.size() / k;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tArrayList<Product> fold = new ArrayList<Product>();\n\t\t\tArrayList<Product> rest = new ArrayList<Product>();\n\t\t\tfold.addAll(allData.subList(i * foldLength, (i + 1) * foldLength));\n\t\t\trest.addAll(allData.subList(0, i * foldLength));\n\t\t\trest.addAll(allData.subList((i + 1) * foldLength, allData.size()));\n\t\t\tdouble[] predict = classify(fold, rest);\n\t\t\tdouble[] real = getLabels(fold);\n\t\t\taccurs.add(getAccuracyBinary(predict, real));\n\t\t}\n\t\tdouble accur = 0;\n\t\tfor (int i = 0; i < accurs.size(); i++) {\n\t\t\taccur += accurs.get(i);\n\t\t}\n\t\taccur /= accurs.size();\n\t\treturn accur;\n\t}", "public FormFieldsReport setAccuracy(float accuracy) {\n this.accuracy = accuracy;\n return this;\n }", "public double computeAccuracy(Node node,\n\t\t\tArrayList<ArrayList<String>> dataSet) {\n\t\tdouble accuracy = 0;\n\t\tint positiveExamples = 0;\n\t\tArrayList<String> attributes = dataSet.get(0);\n\n\t\tfor (ArrayList<String> dataRow : dataSet.subList(1, dataSet.size())) {\n\t\t\tboolean verifyData = verifyTreeRow(node, dataRow, attributes);\n\t\t\tif (verifyData) {\n\t\t\t\tpositiveExamples++;\n\t\t\t}\n\t\t}\n\t\taccuracy = (((double) positiveExamples / (double) (dataSet.size() - 1)) * 100.00);\n\t\treturn accuracy;\n\t}", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n\t}", "protected float computeModelScoreOnValidation() {\n/* 549 */ float score = computeModelScoreOnValidation(0, this.validationSamples.size() - 1);\n/* 550 */ return score / this.validationSamples.size();\n/* */ }", "public void onAccuracyChanged(Sensor arg0, int arg1) \r\n\t{\r\n\t}", "public double classifyAll(String testDataFolder)\n\t{\n\t\tFile folder = new File(testDataFolder);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tdouble accuracy = 0.0;\n\t\tint correct_classifications = 0;\n\t\tint testdata = 0;\n\t\tfor(int i=0;i<listOfFiles.length;i++){\n\t\t\tString doc = \"\";\n\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(listOfFiles[i].getAbsoluteFile()));\n\t\t\t\t\tint count = 0;\n\t\t\t\t\tint actual_count = 0;\n\t\t\t\t\tint class_=0;\n\t\t\t\t\tint[] correct = new int[numClasses];\n\t\t\t\t\tint[] test = new int[numClasses];\n\t\t\t\t\tString line = \"\";\n\t\t\t\t\tint tabIndex=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\ttestdata++;\n\t\t\t\t\t\ttabIndex = line.indexOf('\\t');\n\t\t\t\t\t\tString type = line.substring(0, tabIndex);\n\t\t\t\t\t\tString msg = line.substring(tabIndex + 1);\n\t\t\t\t\t\tmsg = msg.toLowerCase();\n\t\t\t\t\t\tif(type.equals(\"ham\")){class_ = 0;}\n\t\t\t\t\t\telse{class_ = 1;}\n\t\t\t\t\t\ttest[class_]++;\n\t\t\t\t\t\tactual_count = actual_count + class_;\n\t\t\t\t\t\tint label = classify(msg);\n\t\t\t\t\t\tcount = count + label;\n\t\t\t\t\t\t//System.out.println(label+\"/\"+class_+\" \"+count);\n\t\t\t\t\t\tif(label-class_==0){\n\t\t\t\t\t\t\tcorrect_classifications++;\n\t\t\t\t\t\t\tcorrect[class_]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tint label = classify(doc);\n\t\t\t\tif(label - class_==0){correct[class_]++;}\n\t\t\t} \n\t\t\tcatch (IOException e){e.printStackTrace();}\n\t\t}\n\t\taccuracy = Math.round(correct_classifications * 1000.0 / testdata)/1000.0;\n\t\tSystem.out.println(\"Accuracy: \"+accuracy);\n\t\treturn accuracy;\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\r\n\t}", "@Override\n public int accion() {\n return this.alcance*2/3*3;\n }", "@Override\n public void onAccuracyChanged(android.hardware.Sensor sensor, int accuracy) // Changes the accuracy of the system\n {\n }", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\n\t}", "double computeRecall(int[][] paraPredicionMatrix) {\n double tempRecall = 0.0;\n int tempTotal = 0;\n int tempAccurate = 0;\n for (int i = 0; i < paraPredicionMatrix.length; i++) {\n for (int j = 0; j < paraPredicionMatrix[i].length; j++) {\n if (formalContext.testingFormalContext[i][j] > 0) {\n tempTotal++;\n if (paraPredicionMatrix[i][j] == 1) {\n tempAccurate++;\n } // End if\n } // End if\n } // End for j\n } // End for i\n System.out.println(\"tempAccurate: \" + tempAccurate);\n System.out.println(\"tempTotal: \" + tempTotal);\n if (tempAccurate == 0) {\n return 0.0;\n } // End if\n tempRecall = (tempAccurate + 0.0) / tempTotal;\n return tempRecall;\n }", "private void getAccuracy() throws IOException {\r\n\t\tFile accuracy = new File(\".\" + _fileName + \"_\" + _level);\r\n\t\tif (! accuracy.exists()) {\r\n\t\t\taccuracy.createNewFile();\r\n\t\t} else {\r\n\r\n\t\t\tFileReader fr = new FileReader(accuracy);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\tString str;\r\n\t\t\tstr = br.readLine();\r\n\t\t\t_attempts = Integer.parseInt(str);\r\n\t\t\tstr = br.readLine();\r\n\t\t\t_fails = Integer.parseInt(str);\r\n\t\t\tstr = br.readLine();\r\n\t\t\t_highScore = Integer.parseInt(str);\r\n\r\n\t\t}\r\n\t}", "public double computeMacroRecall(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual recall values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computeRecall(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "public float[] getAccuracyStats() throws IOException{\n \n int negativeScores[] = new int[2];\n int positiveScores[] = new int[2];\n float total[] = new float[2];\n \n negativeScores = getTotalScore_Negative();\n positiveScores = getTotalScore_Positive();\n \n afinnNegative = negativeScores[0];\n afinnPositive = positiveScores[0];\n mohanNegative = negativeScores[1];\n mohanPositive = positiveScores[1];\n \n total[0] = Math.round(((afinnNegative+afinnPositive)/testSetSize)*100.0);\n total[1] = Math.round(((mohanNegative+mohanPositive)/testSetSize)*100.0);\n \n return total;\n }", "public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) \r\n\t{\n\t}", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n }", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t}", "public double getAccuracy() {\r\n if (location != null) {\r\n accuracy = location.getAccuracy();\r\n }\r\n\r\n return accuracy;\r\n }", "public abstract double score(double tf, double docLength);", "public double calculateFScore() {\n final double divisor = calculatePrecision() + calculateRecall();\n if(divisor == 0) {\n return 0.0;\n } else {\n return 2 * ((calculatePrecision() * calculateRecall()) / (calculatePrecision() + calculateRecall()));\n }\n }", "@Override\n \tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n \t}", "public void onAccuracyChanged(Sensor sensor, int accuracy)\n \t{\n \t\t\n \t}", "private double getAccuracyBinary(double[] predict, double[] real) {\n\t\tif (predict.length != real.length) return -1;\n\t\tdouble wrong = 0;\n\t\tdouble correct = 0;\n\t\tfor (int i = 0; i < predict.length; i++) {\n\t\t\tif ((predict[i] > 20 && real[i] > 20) ||\n\t\t\t(predict[i] < 20 && real[i] < 20))\n\t\t\tcorrect++;\n\t\t\telse wrong++;\n\t\t}\n\t\tdouble acur = correct / (correct + wrong);\n\t\treturn acur;\n\t}", "public void onAccuracyChanged(int sensor, int accuracy) {\n }", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\r\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\r\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void onAccuracyChanged(android.hardware.Sensor arg0, int arg1) {\n\t\t\n\t}", "@Override\r\n\t\tpublic int calculAnomaly(int total, int freq) {\n\t\t\treturn (int) Math.round(Math.log((double)total/(double)freq));\r\n\r\n\r\n\t\t}", "protected void calculateAccuracyIndicators( DataSet dataSet )\n {\n // Note that the model has been initialized\n initialized = true;\n \n // Reset various helper summations\n double sumErr = 0.0;\n double sumAbsErr = 0.0;\n double sumAbsPercentErr = 0.0;\n double sumErrSquared = 0.0;\n \n String timeVariable = getTimeVariable();\n double timeDiff = getTimeInterval();\n \n // Calculate the Sum of the Absolute Errors\n Iterator<DataPoint> it = dataSet.iterator();\n while ( it.hasNext() )\n {\n // Get next data point\n DataPoint dp = it.next();\n double x = dp.getDependentValue();\n double time = dp.getIndependentValue( timeVariable );\n double previousTime = time - timeDiff;\n \n // Get next forecast value, using one-period-ahead forecast\n double forecastValue\n = getForecastValue( previousTime )\n + getSlope( previousTime );\n \n // Calculate error in forecast, and update sums appropriately\n double error = forecastValue - x;\n sumErr += error;\n sumAbsErr += Math.abs( error );\n sumAbsPercentErr += Math.abs( error / x );\n sumErrSquared += error*error;\n }\n \n // Initialize the accuracy indicators\n int n = dataSet.size();\n \n accuracyIndicators.setBias( sumErr / n );\n accuracyIndicators.setMAD( sumAbsErr / n );\n accuracyIndicators.setMAPE( sumAbsPercentErr / n );\n accuracyIndicators.setMSE( sumErrSquared / n );\n accuracyIndicators.setSAE( sumAbsErr );\n }", "@Override\n public void onAccuracyChanged(Sensor arg0, int arg1 )\n {\n\n }", "@Override\r\n\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t}", "@Override\n public void onAccuracyChanged(Sensor arg0, int arg1) {\n\n }", "@Override\n\t\t\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\n\t\t\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "@Override\n public final void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public final void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public final void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t}" ]
[ "0.75040835", "0.7157511", "0.71508664", "0.70537615", "0.7026846", "0.68492717", "0.68298256", "0.68166524", "0.6797827", "0.6755187", "0.67368877", "0.661928", "0.6451222", "0.6340097", "0.633193", "0.62773305", "0.6220045", "0.6216099", "0.6160224", "0.61538637", "0.6014335", "0.5998994", "0.5975809", "0.595036", "0.5939741", "0.5890738", "0.5877083", "0.587181", "0.58499444", "0.58499444", "0.58499444", "0.58499444", "0.5846728", "0.5844244", "0.5813022", "0.58126175", "0.5808972", "0.5808972", "0.579292", "0.5791133", "0.57817185", "0.57705456", "0.5769422", "0.57692444", "0.57687026", "0.57527375", "0.57527375", "0.5746638", "0.57440543", "0.5743212", "0.57431585", "0.5737786", "0.5728565", "0.57261664", "0.5720522", "0.5713254", "0.5701064", "0.5692276", "0.56741136", "0.5666578", "0.56589466", "0.56554925", "0.5650991", "0.56492275", "0.5644755", "0.56353986", "0.5627701", "0.56233406", "0.5621781", "0.5621781", "0.562144", "0.562144", "0.5610855", "0.5607202", "0.5596981", "0.5594644", "0.5590942", "0.5590237", "0.5588062", "0.5586926", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55846053", "0.55844116", "0.5582108", "0.5582108", "0.5582108", "0.55820405", "0.5581513" ]
0.78071207
0
Adds a confusion matrix's cell to this confusion matrix's cells
public void add(ConfusionMatrix other){ //the confusion matrix must be of same dimesions if(other.size() != this.size()){ throw new IllegalArgumentException("cannot add confusino matrix's together. The other confusion matrix is of different dimensions"); } //make sure the labels match for(int i = 0; i < this.size(); i++){ Label lable = this.labels.get(i); Label otherLabel = other.labels.get(i); if(!lable.equals(otherLabel)){ throw new IllegalArgumentException("cannot add confusino matrix's together. The other confusion matrix has different labels"); } } //iterate the labels and add the cells for(Label row : this.labels){ for(Label col : this.labels){ int rowIx = resolveIndex(row); int colIx = resolveIndex(col); Integer cell = matrix.get(rowIx).get(colIx); Integer otherCell = other.matrix.get(rowIx).get(colIx); Integer newValue = cell+otherCell; matrix.get(rowIx).set(colIx, newValue); } }//end iterate labels }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCell(Cell cell) \n {\n cells.add(cell);\n }", "protected void addCell(Cell cell) {\n cells[size] = cell;\n ++size;\n }", "public void addCell(int row, int col, char value) {\n this.cells[row][col] = new Cell(value);\n }", "public void addCell(CIntentionCell cell)\n\t{\n\t\tcells.put(cell.getId(), cell);\n\t\tcellsByCanvasId.put(cell.getCanvasId(), cell);\n\n\t\tCalicoInputManager.addCustomInputHandler(cell.getId(), CIntentionCellInputHandler.getInstance());\n\t}", "public void addCell(Cell cell) {\r\n int cellNum = cells.size() + 1;\r\n cell.updateCellNum(cellNum);\r\n cells.add(cell);\r\n }", "public void addCell(TCell cell) {\n\tcell.Owner = this;\n\tcolorize(cell);\n\tCells.add(cell);\n }", "private void add(){\n if((cells[pointer]&0xff) >= 255){\n cells[pointer] = 0;\n } else {\n cells[pointer]++;\n }\n }", "private void addCell( String value ) {\n if ( readCol++ == 0 ) {\n rows.add( new ArrayList( ncol ) );\n }\n ((List) rows.get( rows.size() - 1 )).add( value );\n }", "void addCellContent(Cell cell, String content);", "public int addCelltoUniverse (CoreCell theCell){\r\n cellsUniverse.add(theCell);\r\n return cellsUniverse.indexOf(theCell); \r\n }", "public void addAdj(BoardCell adj) {\n\t\tadjList.add(adj);\t\t\t\t\t\t\t\t\t\t\t\t\t\t// adding the cell to the adjacency set\n\t}", "public void setCell(Cell cell)\n {\n myCell = cell;\n }", "public void registerCell(int xCord, int yCord, Cell cell) {\n grid[xCord][yCord] = cell;\n }", "void addCell(CellID cid, CellID parent){\n db.addCell(cid,parent);\n }", "void addCell(CellID cid){\n if(db == null){\n logger.log(Level.SEVERE, \"warning: backend not initialized in addCell!\");\n }\n db.addCell(cid);\n }", "public void addConfusionMatrixView(ArrayList<Integer> confusion_matrix, String title) {\n\t\t// TODO if we want to createFrame, we need to make sure that we have confusion_matrix\n\t\t// we need to input the title and confusion matrix for it \n\t\t// for the calculation it is ok\n\t\t/*\n\t\t * title = \"Ext: 1.0; Pos: 1.0; Neg: 1.0\"; confusion_matrix = new\n\t\t * ArrayList<>(); confusion_matrix.add(100); confusion_matrix.add(10);\n\t\t * confusion_matrix.add(50); confusion_matrix.add(100);\n\t\t */\n\t\tCMInternalFrame cmFrame = new CMInternalFrame(title, confusion_matrix);\n\t\tcmFrame.setVisible(true);\n\n\t\tcmDesktopPane.add(cmFrame);\n\n\t\ttry {\n\t\t\tcmFrame.setSelected(true);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public CM add(final CM cm) {\n if (cm!=null) {\n if( _matrix == null ) _matrix = cm._matrix; // Take other work straight-up\n else Utils.add(_matrix,cm._matrix);\n _rows += cm._rows;\n _errors += cm._errors;\n _skippedRows += cm._skippedRows;\n }\n return this;\n }", "@Override\n\tpublic void addCol() {\n\t\tif(this.numRows == 0){\n\t\t\tthis.numRows++;\n\t\t}\n\t\tthis.numCols++;\n\t}", "public void incrementCell(Label prediction, Label real){\n\t\tint rowIx = resolveIndex(prediction);\n\t\tint colIx = resolveIndex(real);\n\n\t\tInteger cell = matrix.get(rowIx).get(colIx);\n\t\tInteger newValue = cell+1;\n\t\tmatrix.get(rowIx).set(colIx, newValue);\n\n\t}", "public abstract void manageCell(int x, int y, int livingNeighbours);", "public void activateCluster(){\n for (int row = 0; row < matrix.length; row++) {\n// Cell[] matrix1 = matrix[i];\n for (int col = 0; col < matrix[row].length; col++) {\n Cell cell = matrix[row][col];\n // check every if null it means there is no cell at that position\n // get fist occured cell and meet it with the next one\n // run the loop while\n // while cell.getRow < cell.bestRow && cell.getCol < cell.bestCol\n if(cell != null) {\n while (cell.getRow() <= this.cellBiggestRow && cell.getCol() <= this.cellBiggestCol) {\n\n if (cell.getCol() >= matrix[row].length) {\n if (!(cell.getRow() >= matrix.length)) {\n cell.setRow(cell.getRow() + 1);\n }\n } else {\n cell.setCol(cell.getCol() + 1);\n }\n\n // if cell.getCol + 1 < matrix[row].length && matrix[row] != null\n // get the next cell and do the fight\n }\n }\n }\n }\n\n }", "public void addNB(Cell cell, int pos) {\n\t\t//\tSystem.out.println(\"cell number \"+cell.number+\" added at pos \"+pos+\", for cell \"+number);\n\t\tneighbours[pos] = cell;\n\t\tif(cell.isBomb()) {\n\t\t\tvalue++;\n\t\t}\n\t}", "public void setCurrentCell(\n\t\t\tint index )\n\t{\n\t}", "public void growCellAt(int row, int col) {\n\t\t// Complete this method\n\t\tgameGrid[row][col] = 1;\n\t}", "public void addColumn(PdfPCell cell)\n {\n table.addCell(cell);\n }", "public abstract void setCell(int row, int column, T item);", "public void testSetCell()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n board.setCell(1, 2, MineSweeperCell.FLAGGED_MINE);\r\n assertBoard(board, \"OOOO\",\r\n \"OOOO\",\r\n \"OMOO\",\r\n \"OOOO\");\r\n }", "public void InsertCell(Point2D pt, JmtCell newCell) {\r\n \t\tpt = graph.snap(pt);\r\n \t\tObject[] arg = new Object[] { newCell };\r\n \t\tgraph.getModel().insert(arg, newCell.setAttributes(pt, graph), null, null, null);\r\n \t\t// Puts new cell on back to go under blocking regions\r\n \t\tgraph.getModel().toBack(new Object[] { newCell });\r\n \t\tnewCell.resetParent();\r\n \t\tsetConnect.setEnabled(true);\r\n \t}", "public Builder addCells(Report.LocationOuterClass.MobileCell value) {\n if (cellsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureCellsIsMutable();\n cells_.add(value);\n onChanged();\n } else {\n cellsBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addCells(\n int index, Report.LocationOuterClass.MobileCell value) {\n if (cellsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureCellsIsMutable();\n cells_.add(index, value);\n onChanged();\n } else {\n cellsBuilder_.addMessage(index, value);\n }\n return this;\n }", "public org.apache.spark.mllib.linalg.distributed.BlockMatrix add (org.apache.spark.mllib.linalg.distributed.BlockMatrix other) { throw new RuntimeException(); }", "public void addNewIDtoCells() {\n\t\t//Get iterator to all the rows in current sheet\n\t\tIterator<Row> rowIteratorA = cells.iterator();\n\t\t\n\t\trowIteratorA.next();//Ignore the column names. We actually know it.\n\t\tRow row = null;\n\t\tint previousValue = -1;\n\t\tdouble key = -1;\n\t\t//For each row we will read the info. 12\n\t\twhile(rowIteratorA.hasNext()){\n\t\t\trow = rowIteratorA.next();\n\t\t\tdouble currentValue = Math.round(row.getCell(CELLQUERY).getNumericCellValue()*100)/100;\n\t\t\t//System.out.println(i++);\n\t\t\tif(currentValue!=previousValue){\n\t\t\t\tif(table.containsKey(currentValue))\n\t\t\t\t\tkey=table.get(currentValue);\n\t\t\t\telse\n\t\t\t\t\tkey=-1;\n\t\t\t}\n\t\t\trow.createCell(CELLKEY);\n\t\t\trow.getCell(CELLKEY).setCellValue(key);\n\t\t\tif(key==-1){\n\t\t\t\tSystem.err.println(\"Error: Value \"+currentValue+\" was not found in the matching table\");\n\t\t\t}\n\t\t}\n\t\tFileOutputStream dataFileOut;\n\t\ttry {\n\t\t\tdataFileOut = new FileOutputStream(\n\t\t\t\t\tcellsFile.getAbsolutePath().replace(\".xlsx\", \"out.xlsx\"));\n\t\t\t//System.out.println(dataFileOut+\" \"+cellsWorkbook);\n\t\t\t\n\t\t\tcellsWorkbook.write(dataFileOut);\n\t\t\tdataFileOut.flush();\n\t\t\tdataFileOut.close();\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\t\n\t}", "private void setCell(int x, int y, int newValue) {\n hiddenGrid[x][y] = newValue;\n }", "public void insertIntoGraph(mxICell cell) {\n mxICell parent = cell.getParent();\n mxICell source = cell.getTerminal(true);\n mxICell target = cell.getTerminal(false);\n\n // Fixes possible inconsistencies during insert into graph\n cell.setTerminal(null, false);\n cell.setTerminal(null, true);\n cell.setParent(null);\n\n if (parent != null) {\n parent.insert(cell);\n }\n\n if (source != null) {\n source.insertEdge(cell, true);\n }\n\n if (target != null) {\n target.insertEdge(cell, false);\n }\n }", "public void addBeesToMatrix() {\r\n int i;\r\n int j;\r\n int k;\r\n for (int b = 0; b < this.numberOfBees; b++) {\r\n Bee3D bee = this.beesArray[b];\r\n i = (int) (Math.abs(Math.abs(bee.getLongitude()) - Math.abs(minLO)) * distanceLongi / precission) + offset + 1;\r\n j = (int) (Math.abs(Math.abs(bee.getLatitude()) - Math.abs(minLA)) * distanceLat / precission) + offset + 1;\r\n k = (int) (Math.abs(Math.abs(bee.getHeight()) - Math.abs(minH)) / precission) + offset + 1;\r\n bee.setI(i);\r\n bee.setJ(j);\r\n bee.setK(k);\r\n if (BeesCollision[i][j][k] == null) {\r\n BeesCollision[i][j][k] = new LinkedList<>();\r\n BeesCollision[i][j][k].add(bee);\r\n } else {\r\n BeesCollision[i][j][k].add(bee);\r\n bee.setCollision(true);\r\n BeesCollision[i][j][k].getFirst().setCollision(true);\r\n }\r\n }\r\n }", "public void setGFXCell(GFXDataCell gfxCell);", "public void appendToCells(String value) {\n\t \n\t\tString[] ca = new String[cell.length + 1];\n\t\tca[0] = value;\n\t\t\n\t\tfor (int i=0; i < cell.length; i++) {\n\t\t\tca[i+1] = cell[i];\n\t\t}\n\t\t\n\t\tcell = ca;\n }", "public void testSetCell()\n {\n // Test setting a cell under ideal conditions\n assertTrue(b1.getCell(0, 0) == Cell.EMPTY);\n assertTrue(b1.setCell(0, 0, Cell.RED1));\n assertTrue(b1.getCell(0, 0) == Cell.RED1 );\n\n // If a cell is out of bounds, should fail\n assertFalse(b1.setCell(-1, 0, Cell.RED1));\n assertFalse(b1.setCell(0, -1, Cell.RED1));\n assertFalse(b1.setCell(3, 0, Cell.RED1));\n assertFalse(b1.setCell(0, 3, Cell.RED1));\n\n // If a cell is already occupied, should fail\n assertFalse(b1.setCell(0, 0, Cell.RED1));\n\n // If the board is won, should fail\n assertTrue(b1.setCell(0, 1, Cell.RED1));\n assertTrue(b1.setCell(0, 2, Cell.RED1));\n assertEquals(b1.getWhoHasWon(), Cell.RED1);\n assertFalse(b1.setCell(1, 1, Cell.RED1)); // Unoccupied\n assertFalse(b1.setCell(0, 0, Cell.RED1)); // Occupied\n\n\n\n\n }", "public void setCell(boolean cell) {\n\t\tCell = cell;\n\t}", "@Override\r\n\tpublic void setCell(Integer x, Integer y, Integer value) {\n\t\tgame[x][y] = value;\r\n\t}", "public Boolean add(Cell cell) {\n Boolean result = false;\n\n if (position == 0) {\n this.cells[position++] = cell;\n return true;\n }\n\n for (Cell current : this.cells) {\n if (current == null) {\n break;\n }\n\n if (current.isNear(cell)) {\n cells[position++] = cell;\n result = true;\n break;\n }\n }\n\n return result;\n }", "public void put(int x, int y, T cell) {\n int index = convert2d(x, y);\n if (map[index] != null) {\n cells.remove((T) map[index]);\n }\n\n map[index] = cell;\n cells.put(cell, index);\n }", "public Cell() {\r\n\t\tthis.mineCount = 0;\r\n\t\tthis.isFlagged = false;\r\n\t\tthis.isExposed = false;\r\n\t\tthis.isMine = false;\r\n\t}", "public void set_Mine_Count(int row,int col)\n{\n\tif(cell[row][col] != 9)\n\t{\n\t\tcell[row][col] += 1;\n\t}\n}", "public int setCell(int value){\n int newValue;\n if (isHit(value)){\n newValue = HIT;\n }\n else {\n newValue = MISS;\n }\n return newValue;\n }", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle addNewSwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(SWCELL$20);\n return target;\n }\n }", "public void addCellAccessMode() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"cell-access-mode\",\n null,\n childrenNames());\n }", "public abstract void setCellValue(int cellValue, int row, int col);", "public void setCell(\n final org.edna.mxv1.xsdata.XSDataCell cell) {\n this._cell = cell;\n }", "@Override\n\tpublic void addRow() {\n\t\tif(this.numCols == 0){\n\t\t\tthis.numCols++;\n\t\t}\n\t\tthis.numRows++;\n\t}", "public int getCell() {\n return this.cell;\n }", "public void add(int index, TableCell tableCell) { \n checkInsertionIndex(index);\n Objects.requireNonNull(tableCell, \"The table cell is null.\");\n tableCellList.add(index, tableCell);\n }", "public void setUsedAsTableCell(boolean isCell)\n {\n if (isCell)\n {\n removeAll();\n add(\"West\", field);\n setBackground(field.getBackground());\n field.setBorder(null);\n field.setPreferredSize(new Dimension(getMaximumSize().width, getPreferredSize().height));\n }\n }", "public void addNode() {\n if (nodeCount + 1 > xs.length)\n resize();\n nodeCount++;\n }", "public void updateDataCell();", "@Override\n\tpublic void placementcell() {\n\t\t\n\t}", "@Override\n\tpublic IMatrix add(IMatrix other) {\n\t\tif (this.getColsCount() != other.getColsCount()\n\t\t\t\t|| this.getRowsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For operation 'add' matrixes should be compatible!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = this.getColsCount();\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tthis.set(i, j, this.get(i, j) + other.get(i, j));\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "public void drawCell(int x, int y) {\n \n //Sets cell to occupied\n gameBoard[x][y] = 1;\n }", "public void add(String nickname) {\n\t\tscoreboard.put(nickname, 0);\n\t}", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "public boolean setCell(int row, int col, char value) {\n if (this.cells[row][col] instanceof Cell == false) return false;\n this.cells[row][col].setValue(value);\n return true;\n }", "public void testSetCell() {\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(9, 9);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(1, 0);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.WALL, maze1.getCell(test));\n test = new Location(0, 1);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.WALL, maze1.getCell(test));\n \n \n \n maze1.setCell(test, MazeCell.CURRENT_PATH);\n assertEquals(MazeCell.CURRENT_PATH, maze1.getCell(test));\n maze1.setCell(test, MazeCell.FAILED_PATH);\n assertEquals(MazeCell.FAILED_PATH, maze1.getCell(test));\n \n }", "private void setMediumDifficultyGridUp1(){\n\t\tmediumDifficulty1 = new SudokuGrid();\n\t\tCell[][] _matrix = {{new Cell(6), new Cell(0), new Cell(0), new Cell(0), new Cell(1), new Cell(0), new Cell(0), new Cell(7), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(8), new Cell(0), new Cell(5), new Cell(7), new Cell(0), new Cell(0), new Cell(0), new Cell(4), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(2), new Cell(0), new Cell(5), new Cell(0), new Cell(0), new Cell(6), new Cell(0), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(3), new Cell(0), new Cell(0), new Cell(0), new Cell(4), new Cell(7), new Cell(0), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(7), new Cell(0), new Cell(0), new Cell(3), new Cell(0), new Cell(8), new Cell(0), new Cell(0), new Cell(2)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(0), new Cell(9), new Cell(1), new Cell(0), new Cell(0), new Cell(0), new Cell(5), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(0), new Cell(2), new Cell(0), new Cell(0), new Cell(1), new Cell(0), new Cell(8), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(7), new Cell(0), new Cell(0), new Cell(0), new Cell(5), new Cell(3), new Cell(0), new Cell(6)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(6), new Cell(0), new Cell(0), new Cell(2), new Cell(0), new Cell(0), new Cell(0), new Cell(7)}};\n\t\tmediumDifficulty1.set_matrix(_matrix);\n\t}", "protected abstract void setCell(int x, int y, boolean state);", "public void setCellInBoard(int row, int column, char type) {\n this.myMatrix[row][column] = type;\n }", "public void addCollisionData(CollisionData col) {\n\t\tnodeList.add(col);\n\t}", "public void draw(){\n\t\t\tint x = getPreferredSize().width/2;\n\t\t\tint y = 10;\n\t\t\tif (root() != null)\n\t\t\t\tpreOrderCell(root(), x, y, root().getColor());\n\t\t\tjgraph.getGraphLayoutCache().insert(cells.values().toArray());\n\t\t\tjgraph.getGraphLayoutCache().insert(nullnodes.toArray());\n\t\t}", "public void setCellUsed(int row, int col, boolean val) {\n used[row][col] = val;\n }", "public void addNeighbor(final Cell neighbor) {\n if (neighbor != null) {\n this.neighbors.add(neighbor);\n }\n }", "protected void setCellJustif(int[] justif) {\n this.cellJustifStack.addLast(justif);\n this.isCellJustifStack.addLast(Boolean.TRUE);\n }", "public void buildInCell() {\n this.level++;\n if (this.level == 4) {\n this.setFreeSpace(false);\n }\n }", "public void setSquare(Square cell) {\n\t\tcells[cell.getRow()][cell.getColumn()] = cell; \n\t}", "public Mat2 add(Mat2 m) {\n\t\tif(this.getRows()!=m.getRows() || this.getCols()!=m.getCols()) return null;\n\t\tMat2 m2 = new Mat2(this.getRows(), this.getCols());\n\t\tfor(int i=0; i<this.getRows(); i++) {\n\t\t\tfor(int j=0; j<this.getCols(); j++) {\n\t\t\t\tm2.set(i, j, this.get(i, j)+m.get(i, j));\n\t\t\t}\n\t\t}\n\t\treturn m2;\n\t}", "public NotebookCell() {}", "private void updateCell(LifeMatrix oldMatrix, LifeMatrix newMatrix, int row, int column) throws Exception {\n\t\tboolean oldVal = oldMatrix.getCellValue(row, column);\n\t\tint numNeighbors = oldMatrix.numberOfNeighbors(row, column);\n\t\tboolean newVal = oldVal;\n\t\tif (oldVal) { // there is life in this cell\n\t\t\tif (numNeighbors < 2 || numNeighbors > 3)\n\t\t\t\tnewVal = false; // kill it!\n\t\t} else { // oldVal == false, there is no life in this cell\n\t\t\tif (numNeighbors == 3)\n\t\t\t\tnewVal = true; // A cell is born\n\t\t}\n\t\tnewMatrix.setCellValue(row, column, newVal);\n\t}", "@Override\n\tpublic void removeCell(Cell arg0) {\n\t\t\n\t}", "private void initialize() {\r\n\t\tfor (int i = -1; i < myRows; i++)\r\n\t\t\tfor (int j = -1; j < myColumns; j++) {\r\n\t\t\t\tCell.CellToken cellToken = new Cell.CellToken(j, i);\r\n\r\n\t\t\t\tif (i == -1) {\r\n\t\t\t\t\tif (j == -1)\r\n\t\t\t\t\t\tadd(new JLabel(\"\", null, SwingConstants.CENTER));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tadd(new JLabel(cellToken.columnString(), null,\r\n\t\t\t\t\t\t\t\tSwingConstants.CENTER));\r\n\t\t\t\t} else if (j == -1)\r\n\t\t\t\t\tadd(new JLabel(Integer.toString(i), null,\r\n\t\t\t\t\t\t\tSwingConstants.CENTER));\r\n\t\t\t\telse {\r\n\t\t\t\t\tcellArray[i][j] = new CellsGUI(cellToken);\r\n\r\n\t\t\t\t\tsetCellText(cellArray[i][j]);\r\n\t\t\t\t\tcellArray[i][j].addMouseListener(new MouseCellListener());\r\n\t\t\t\t\tcellArray[i][j].addKeyListener(new KeyCellListener());\r\n\t\t\t\t\tcellArray[i][j].addFocusListener(new FocusCellListener());\r\n\r\n\t\t\t\t\tadd(cellArray[i][j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle addNewNwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(NWCELL$26);\n return target;\n }\n }", "protected void setCellCount(int count) {\n this.cellCountStack.addLast(count);\n }", "public void add(int column){\n\t\tif(turn == \"blue\"){\n\t\t\tboard.AddBlue(column);\n\t\t\t\n\t\t}else{\n\t\t\tboard.AddRed(column);\n\t\t}\n\t\tthis.changeTurn();\n\t}", "public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }", "public Builder addCells(\n Report.LocationOuterClass.MobileCell.Builder builderForValue) {\n if (cellsBuilder_ == null) {\n ensureCellsIsMutable();\n cells_.add(builderForValue.build());\n onChanged();\n } else {\n cellsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle addNewNeCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(NECELL$24);\n return target;\n }\n }", "private void setCellVisited(Cell cell) {\n\n\t\tif (!isIn(cell))\n\t\t\treturn;\n\n\t\tint r = cell.r;\n\t\tint c = cell.c;\n\t\tif (maze.type == HEX) {\n\t\t\tc = c - (r + 1) / 2;\n\t\t}\n\t\ttry {\n\t\t\tvisited[r][c] = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void growCells() {\n for (Cell cell : cells) {\n cell.grow();\n }\n }", "public void setBoardWithColor(BoardCell cell) {\r\n\t\tif(cell==null) throw new NullPointerException();\r\n\t\tfor(int row=0;row<getMaxRows();row++){\r\n\t\t\tfor(int col=0;col<getMaxCols();col++){\r\n\t\t\t\tboardcell[row][col]=cell;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void add(SquareMatrix other) throws Exception{\n if (this.size() == other.size()) {\n for (int row=0; row<this.size(); row++) {\n for(int col=0; col<this.size(); col++) {\n double value = this.get(row, col) + other.get(row, col);\n this.set(row, col, value);\n }\n }\n } else {\n throw new Exception(\"Le due matrici devo avere la stessa dimensione\");\n }\n }", "public void setCell(int row, int col, double value) {\n int di = row - col;\n\n if (di == 0) {\n B[row] = value;\n } else if (di == -1) {\n C[row] = value;\n } else if (di == 1) {\n A[row] = value;\n } else {\n throw new IllegalArgumentException(\"Only the main, super, and sub diagonals can be set.\");\n }\n }", "public void addToNeighbours(Tile N) {\n \r\n neighbours.add(N);\r\n }", "public void addEdge(int i,int j){\n Matrix[i][j]=true;\n Matrix[j][i]=true;\n }", "public void addMetric(M wm){\r\n\t\tmetrics.add(wm);\r\n\t}", "public void setObstacleCell(int row, int col, boolean obstacle) {\n if (obstacle && (in_start(row, col) || in_goal(row, col)))\n return;\n\n grid[row][col].setIsObstacle(obstacle);\n\n if (row >= 1) {\n grid[row - 1][col].setVirtualWall(obstacle); // bottom cell\n\n if (col < MapConstant.MAP_Y - 1) {\n grid[row - 1][col + 1].setVirtualWall(obstacle); // bottom-right cell\n }\n\n if (col >= 1) {\n grid[row - 1][col - 1].setVirtualWall(obstacle); // bottom-left cell\n }\n }\n\n if (row < MapConstant.MAP_X - 1) {\n grid[row + 1][col].setVirtualWall(obstacle); // top cell\n\n if (col < MapConstant.MAP_Y - 1) {\n grid[row + 1][col + 1].setVirtualWall(obstacle); // top-right cell\n }\n\n if (col >= 1) {\n grid[row + 1][col - 1].setVirtualWall(obstacle); // top-left cell\n }\n }\n\n if (col >= 1) {\n grid[row][col - 1].setVirtualWall(obstacle); // left cell\n }\n\n if (col < MapConstant.MAP_Y - 1) {\n grid[row][col + 1].setVirtualWall(obstacle); // right cell\n }\n }", "public Couple cellContent(int x, int y);", "public BoardCell(BoardCell existingBoardCell){\n xCor=existingBoardCell.getXCor();\n yCor=existingBoardCell.getYCor();\n }", "public void addOtherMatrix(Matrix other) {\n if (other.rows != rows || other.columns != columns) {\n return;\n }\n matrixVar = matrixVar + other.matrixVar;\n }", "public void setCell(Object value, int col, int row) {\n ((DefaultTableModel) getModel()).setValueAt(value, row, col);\n }", "public Matrix add(Matrix other) {\n if (this.cols != other.cols || this.rows != other.rows)\n throw new RuntimeException(\"Illegal matrix dimensions\");\n\n Matrix result = new Matrix(this.rows, this.cols);\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n result.data[i][j] = this.data[i][j] + other.data[i][j];\n }\n }\n\n return result;\n }", "public Cell getCell() {\n\t\treturn cell;\n\t}", "public void connect(Hashtable<String, ArrayList<Node>> cells, Executable target) {\n Coordinate.CellIterator itr = coordinate.getCellIterator();\n while (itr.hasNext()) {\n String idx = itr.next();\n ArrayList<Node> nodes = cells.get(idx);\n if (nodes == null) continue;\n for (Node node : nodes) {\n if (coordinate.SquaredDistance(node.coordinate, coordinate) > Config.LEGAL_SQUARE_DISTANCE || node.equals(this)) {\n// System.out.println(coordinate.toString() + \" \"\n// + node.coordinate.toString() + \"\" + coordinate.SquaredDistance(node.coordinate, coordinate));\n continue;\n }\n connected.add(node);\n node.getConnected().add(this);\n// if (Config.WILL_DRAW) {\n// target.push(c -> {\n// renderEdgeTo(c, node);\n// });\n// }\n }\n }\n }", "public void add_(JType value) {\n TH.THTensor_(add)(this, this, value);\n }" ]
[ "0.65796226", "0.6276893", "0.6208598", "0.6206423", "0.61975235", "0.61722785", "0.57545286", "0.5738538", "0.5719245", "0.5695664", "0.55745506", "0.5420806", "0.5371451", "0.53689784", "0.5343194", "0.53416646", "0.53083163", "0.52516687", "0.52504975", "0.52389854", "0.52370447", "0.52238387", "0.5197437", "0.51965773", "0.51285386", "0.5101375", "0.51005113", "0.50980276", "0.5051241", "0.50490797", "0.5042912", "0.5033472", "0.5033295", "0.5031747", "0.50292087", "0.50043464", "0.50035423", "0.4986425", "0.49654114", "0.49643832", "0.49593183", "0.49555212", "0.49553958", "0.4939713", "0.49279857", "0.49226528", "0.49095654", "0.4906609", "0.4900224", "0.48978654", "0.48962617", "0.48953408", "0.48678777", "0.48596177", "0.48463094", "0.48434198", "0.4839488", "0.48241383", "0.48186556", "0.48159128", "0.4812593", "0.48103407", "0.4809605", "0.47909272", "0.47818953", "0.47799313", "0.47794396", "0.47790545", "0.47776112", "0.47764575", "0.47764358", "0.47709194", "0.47674915", "0.47660023", "0.47585416", "0.4752125", "0.47509918", "0.4749776", "0.47454864", "0.4735143", "0.47314414", "0.47288728", "0.4725165", "0.47251618", "0.4721183", "0.47132102", "0.471321", "0.47108504", "0.46984273", "0.4698057", "0.46935", "0.468817", "0.46851283", "0.46793488", "0.4678", "0.46757028", "0.46744046", "0.46708125", "0.4663342", "0.46584937" ]
0.7039138
0
fuegt den Mouselistner hinzu
public void mouseClicked(MouseEvent e) { // Methode um MausEvent zu untersuchen clickCounter++; if (clickCounter % 2 == 0) { menu.setVisible(false); // bei 2 klicks geht das menü wieder zu } else { popMenu(); // das popMenu wird aufgerufen } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void mouseLeft() {\n\t\t\n\t}", "public void mouseLeft() {\n\n\t}", "public void mousePressed() {\n }", "void onLeftMouseButtonReleased(double mouseX, double mouseY);", "public void mouseClicked(int mouseX, int mouseY, int mouse) {}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "public MouseHandler(TicTacToePanel ticTacToePanel) {\n\t}", "@Override\n public void mouseMoved(MouseEvent e){\n \n }", "@Override\n public void mouseMoved(MouseEvent arg0) {\n \n }", "public void mouseMoved(MouseEvent e){}", "@Override\n public void mouseMoved(MouseEvent e) {\n\n }", "@Override\n public void mouseMoved(MouseEvent e) {}", "@Override\n public void mouseMoved(MouseEvent e) {\n }", "@Override\n public void mousePressed(MouseEvent e) {\n }", "private void setMouseListener() {\n lstvList.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n if (event.getClickCount() == 2) {\n try {\n showBike(lstvList.getSelectionModel().getSelectedItem());\n } catch (IOException ex) {\n \n }\n }\n }\n });\n }", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "@Override\r\n\tpublic void onMouseDown(Widget who, int x, int y) {\n\r\n\t}", "public void mouseEntered (MouseEvent e) {}", "@Override\r\n public void mouseMoved(MouseEvent e) {\n }", "@Override\n public void mousePressed(MouseEvent arg0) {\n \n }", "public void mousePressed (MouseEvent event) {}", "public void mouseMoved(MouseEvent e) {}", "public void mouseMoved(MouseEvent e) {}", "@Override\n public void mousePressed(MouseEvent me) {\n mouse_x = me.getX();\n mouse_y = me.getY();\n super.mousePressed(me);\n }", "@Override\n\tpublic void mouseEntered() {\n\t\t\n\t}", "public void mouseClicked( MouseEvent event ){}", "@Override\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void leftClick(MouseEvent e) {\n\n\t}", "void configureMouseListener();", "public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mousePressed(MouseEvent e)\n { }", "public void mouseMoved(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {\r\n }", "@Override\r\n public void mouseMoved(MouseEvent e) {\r\n\r\n }", "@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override \n\tpublic void mouseMoved(MouseEvent e){\n\t}", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "public void mousePressed(MouseEvent e) {\n }", "public void mousePressed(MouseEvent event)\r\n {\n }", "void mousePressed(double x, double y, MouseEvent e );", "@Override\n public void mousePressed(MouseEvent e){\n }", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\r\n\t\t\t}", "@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\n\r\n\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t}", "void mouseClicked(double x, double y, MouseEvent e );", "@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}", "public void mousePressed( MouseEvent event ){}", "public void mouseClicked(MouseEvent event){}", "@Override\r\n public void mousePressed(MouseEvent e) {\n }", "@Override\n\tpublic void mouseDown(MouseEvent arg0) {\n\n\t}", "@Override\n public void mousePressed(MouseEvent e) {\n\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n }", "@Override\n public void mouseAction( MouseEvent me )\n {\n \n }", "@Override\n public void addMouseListener(MouseListener l) { }", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\n\t}", "@Override\n public void mousePressed(MouseEvent e){\n \n }", "public void mousePressed(MouseEvent e) {\n\n }", "void onMouseClicked(MouseEventContext mouseEvent);", "@Override\r\n\tpublic void onMouseMove(Widget who, int x, int y) {\n\r\n\t}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "@Override\n public void mousePressed(MouseEvent e)\n {\n }", "@Override\n public void mousePressed(MouseEvent e)\n {\n }" ]
[ "0.76315296", "0.7566984", "0.7421835", "0.7412998", "0.7323666", "0.72419", "0.72419", "0.72419", "0.72419", "0.72419", "0.72419", "0.72419", "0.72419", "0.72419", "0.72419", "0.72408617", "0.72408617", "0.72408617", "0.72408617", "0.72408617", "0.72408617", "0.72408617", "0.7240121", "0.7230669", "0.7226582", "0.722189", "0.7214806", "0.71911305", "0.7175999", "0.7163214", "0.7156989", "0.7152488", "0.7152488", "0.7152488", "0.7151741", "0.71502215", "0.7149746", "0.7147426", "0.71464694", "0.7144383", "0.7144383", "0.71437114", "0.7142466", "0.7141833", "0.7138839", "0.7133199", "0.7128681", "0.7126948", "0.7126948", "0.7126833", "0.71255255", "0.71238065", "0.7116565", "0.7111915", "0.7111915", "0.71066004", "0.71053654", "0.71016335", "0.70978665", "0.70951426", "0.70942587", "0.70893663", "0.70893663", "0.70893663", "0.70893663", "0.70893663", "0.70893663", "0.70893663", "0.70893663", "0.70893663", "0.70893663", "0.70893663", "0.70808643", "0.70722497", "0.7069726", "0.706601", "0.706601", "0.70644456", "0.7062524", "0.706155", "0.7060964", "0.705813", "0.70538986", "0.7053553", "0.7053553", "0.7053553", "0.7053553", "0.70534164", "0.70494664", "0.7046597", "0.7046597", "0.7046284", "0.7044198", "0.70439446", "0.7042613", "0.7040305", "0.7040305", "0.7040305", "0.7040305", "0.7040215", "0.7040215" ]
0.0
-1
fuegt dem Button dem ActionListener hinzu
@Override public void actionPerformed(ActionEvent e) { // ueberprueft das Event fuer den Button if (e.getSource() == alarm && alarm.getText().equals("Alarm setzen")) { // schaut ob der geklickte Button den gleichen Text hat wieder der Alarmbutton abfrageFenster(); // bei Uebereinstimmung wird Abfragefenster aufgerufen } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tgetControleur(). saisirOuvrage() ;}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) \n\t\t{\n\t\t\t\n\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n\t public void actionPerformed(ActionEvent e){\n\t }", "@Override\n public void actionPerformed(ActionEvent e) {\n String comando = e.getActionCommand();\n\n if (comando == \"Novo labirinto\")\n this.btnNovoLabirinto();\n else if (comando == \"Abrir labirinto\")\n this.btnAbrirLabirinto();\n else if (comando == \"Salvar labirinto\")\n this.btnSalvarLabirinto();\n else // comando==\"Executar labirinto\"\n this.btnExecutarLabirinto();\n }", "void enablButtonListener();", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) \n\t\t{\n\t\t\t\n\t\t}", "@Override\r\n \t\tpublic void actionPerformed(ActionEvent e) {\n \t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgetControleur(). saisirParution() ;}", "@Override\n public void actionPerformed(ActionEvent ev) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "abstract void botonAyuda_actionPerformed(ActionEvent e);", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}", "abstract void boton1Jugador_actionPerformed(ActionEvent e);", "abstract void botonEnviar_actionPerformed(ActionEvent e);", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t}", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "public void actionPerformed(ActionEvent arg0) {\n myButtonActionPerformed(arg0);\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) \n\t{\n\t\t\n\t\tJButton button = (JButton)e.getSource();\n\t\t\n\t\tif(button.equals(buttonInvia))\n\t\t{\n\t\t\tareaRisposta.setText(this.getTestoRisposta(areaDomanda.getText()));\t\t\n\t\t}\t\t\t\t\n\t\telse\n\t\t\tif(button.equals(buttonReset))\n\t\t\t{\n\t\t\t\tareaDomanda.setText(\"\");\n\t\t\t\tareaRisposta.setText(\"\");\n\t\t\t}\n\t\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n\n }", "@Override\n\tpublic void actionPerformed(\n\t\t\tActionEvent e)\n\t\t{\n\t\t\t\n\t\t}", "@Override\n protected void actionPerformed(GuiButton button)\n {\n super.actionPerformed(button);\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}" ]
[ "0.7829347", "0.7829347", "0.77738297", "0.7740102", "0.7740102", "0.7740102", "0.7740102", "0.77316654", "0.77316654", "0.77316654", "0.7663147", "0.7663147", "0.7660001", "0.7647663", "0.7640884", "0.76294714", "0.7593648", "0.75828946", "0.7577736", "0.75407636", "0.75379723", "0.7536885", "0.7510258", "0.7510258", "0.7510258", "0.7510258", "0.7510258", "0.7510258", "0.7508852", "0.75010514", "0.7495415", "0.7495415", "0.7495415", "0.7485992", "0.7473771", "0.7467285", "0.7467285", "0.7458914", "0.7458914", "0.7458914", "0.7458914", "0.7458914", "0.7458914", "0.7458914", "0.7458914", "0.7458914", "0.7458914", "0.7421937", "0.74170333", "0.74170136", "0.74170136", "0.74170136", "0.74143684", "0.74143684", "0.74143684", "0.74143684", "0.74143684", "0.74143684", "0.74143684", "0.74143684", "0.74143684", "0.739264", "0.7392634", "0.7391992", "0.7386138", "0.73818445", "0.73818445", "0.73818445", "0.73818445", "0.73818445", "0.73818445", "0.73818445", "0.73818445", "0.73818445", "0.73818445", "0.73818445", "0.73730665", "0.7363362", "0.7363362", "0.73612285", "0.73588586", "0.7358432", "0.7357698", "0.73562527", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506", "0.73525506" ]
0.0
-1
ueberprueft was passiert wenn man den anhalten Button drueckt, wenn ja setzt er alles wieder zurueck
@Override public void actionPerformed(ActionEvent e) { // ueberprueft das Event fuer den Button if (e.getSource() == anhalten) { // vergleicht ob gleiches Objekt alarmgesetzt = false; contentPanel.setBackground(Color.WHITE); contentPanel.remove(anhalten); contentPanel.add(alarm); jf.validate(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void settingBtnClick() {\n\t}", "@Override\n\tpublic void setButtonAction() {\n\t}", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "public void sButton() {\n\n\n\n }", "@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "public abstract void initButton(int buttonIndex);", "@Override\n public void onClick(View v) {\n set();\n }", "public void submit_intsatpos(View button) {\n }", "void configureButtonListener();", "void buttonPressed(ButtonType type);", "@Override\n\tpublic void setOnClick() {\n\n\t}", "protected abstract void pressedOKButton( );", "@Override\n protected void actionPerformed(GuiButton button)\n {\n super.actionPerformed(button);\n }", "public static void setButton(String nameOfButton,int x,int y,int width,int heigth, JFrame frame) {\r\n //tozi metod suzdava butonut s negovite parametri - ime,koordinati,razmeri,frame\r\n\t JButton Button = new JButton(nameOfButton);\r\n\t Button.setBounds(x, y, width, heigth);\r\n\t colorOfButton(153,204,255,Button); //izpolzvam metodite ot po-gore\r\n\t colorOfTextInButton(60,0,150,Button);\r\n\t frame.getContentPane().add(Button);\r\n Button.addActionListener(new ActionListener(){ \r\n \tpublic void actionPerformed(ActionEvent e){ \r\n\t frame.setVisible(false);\r\n\t if(nameOfButton == \"Action\") { //kogato imeto na butona suvpada sus Stringa \"Action\",to tova e nashiqt janr\r\n\t \t Genre action = new Genre(\"Action\", //chrez klasa Genre zadavam vseki buton kakuv nov prozorec shte otvori\r\n\t \t\t\t \"Black Panther (2018)\", //kakvi filmi shte sudurja vseki janr \r\n\t \t\t\t \"Avengers: Endgame (2019)\",\r\n\t \t\t\t \" Mission: Impossible - Fallout (2018)\",\r\n\t \t\t\t \"Mad Max: Fury Road (2015)\",\r\n\t \t\t\t \"Spider-Man: Into the Spider-Verse (2018)\", \"MoviesWindow.png\" //kakvo fonovo izobrajenie shte ima\r\n);\r\n\t\t \t\r\n\t\t \taction.displayWindow(); \r\n//chrez metoda showWindow(); ,koito vseki obekt ot klasa Genre ima, otvarqme sledvashtiq(posleden) prozorec\r\n\t\t \t\r\n\t\t \t\r\n\t }else if (nameOfButton == \"Comedy\") { //i taka za vsichki filmovi janri\r\n\t \t Genre comedy = new Genre(\"Comedy\",\r\n\t \t\t\t \"The General (1926)\",\r\n\t \t\t\t \"It Happened One Night (1934)\",\r\n\t \t\t\t \"Bridesmaids (2011)\",\r\n\t \t\t\t \"Eighth Grade (2018)\",\r\n\t \t\t\t \"We're the Millers (2013)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \tcomedy.displayWindow();\r\n\t }else if (nameOfButton == \"Drama\") {\r\n\t \t Genre drama2 = new Genre(\"Drama\",\r\n\t \t\t\t \"Parasite (Gisaengchung) (2019)\",\r\n\t\t \t\t\t \" Moonlight (2016)\",\r\n\t\t \t\t\t \" A Star Is Born (2018)\",\r\n\t\t \t\t\t \" The Shape of Water (2017)\",\r\n\t\t \t\t\t \" Marriage Story (2019)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \tdrama2.displayWindow();\r\n\t }else if (nameOfButton == \"Fantasy\") {\r\n\t \t Genre fantasy2 = new Genre(\"Fantasy\",\r\n\t \t\t\t \"The Lord of the Rings Trilogy\",\r\n\t \t\t\t \"Metropolis (2016)\",\r\n\t \t\t\t \"Gravity (2013)\",\r\n\t \t\t\t \" Pan's Labyrinth (2006)\",\r\n\t \t\t\t \"The Shape of Water (2017)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \tfantasy2.displayWindow();\r\n\t }else if (nameOfButton == \"Horror\") {\r\n\t \t Genre horror = new Genre(\"Horror\",\r\n\t \t\t\t \" Host (2020)\",\r\n\t \t\t\t \" Saw (2004)\",\r\n\t \t\t\t \" The Birds (1963)\",\r\n\t \t\t\t \" Dawn of the Dead (1978)\",\r\n\t \t\t\t \" Shaun of the Dead (2004)\",\"MoviesWindow.png\");\r\n\t\t \t\r\n\t\t \thorror.displayWindow();\r\n\t }else if (nameOfButton == \"Romance\") {\r\n\t \tGenre romance2 = new Genre(\"Romance\",\r\n\t \t\t\t\"Titanic (1997)\",\r\n\t \t\t\t\"La La Land(2016)\",\r\n\t \t\t\t\"The Vow (2012)\",\r\n\t \t\t\t\"The Notebook (2004)\",\r\n\t \t\t\t\"Carol (2015)\",\"MoviesWindow.png\");\r\n\t \t\r\n\t \tromance2.displayWindow();\r\n\t \t\r\n\t \t\r\n\t \t\r\n\t }else if (nameOfButton == \"Mystery\") {\r\n\t \t Genre mystery = new Genre(\"Mystery\",\r\n\t \t\t\t \" Knives Out (2019)\",\r\n\t \t\t\t \" The Girl With the Dragon Tattoo (2011)\",\r\n\t \t\t\t \" Before I Go to Sleep (2014)\",\r\n\t \t\t\t \" Kiss the Girls (1997)\",\r\n\t \t\t\t \" The Girl on the Train (2016)\",\"MoviesWindow.png\"\r\n\t \t\t\t );\r\n\t\t \t\r\n\t\t \tmystery.displayWindow();\r\n\t }\r\n\r\n \t}\r\n });\r\n\t}", "private void setButton(boolean a) {\n//Vo hieu hoac co hieu luc cho cac JButton\n this.btnCourseAdd.setEnabled(a);\n this.btnCourseDelete.setEnabled(a);\n this.btnCourseEdit.setEnabled(a);\n this.btnCourseSave.setEnabled(!a);\n this.btnCourseReport.setEnabled(!a);\n this.btnCourseReset.setEnabled(!a);\n this.btnCourseClose.setEnabled(a);\n }", "Button getBtn();", "@Override\n public void onClick(View v) {\n buttonSetLocation();\n }", "@FXML\n void setBtnCancelOnClick() {\n this.setDisableLocation(true);\n this.setDisableContent(true);\n this.setDisablePrice(true);\n this.setDisableAds(true);\n this.setDisableSelectedButtons(true);\n this.tableViewAds.setDisable(false);\n\n this.lblStatusValue.setText(\"The operation was canceled.\");\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t\t}", "public void buttonClicked();", "public void setButton() {\n pan.add(playButton);\n }", "private void setUpButton() {\n // Find view\n Button button = (Button) findViewById(R.id.this_weekend_dialog_match_button);\n // Set click mListener\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mListener.onMatchMadeDialogSeen();\n dismiss();\n }\n });\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t}", "private void onSetClick(View v) {\n Button temp = (Button)v;\n /*if the button is for bent over rows: set to 3\n rack chins, seated cable rows, seated dumbbell press: set to 12\n dumbbell rows, uprights row: set to 15\n close grip pull downs, side lateral raises: set to 20\n */\n if(v.getId() == R.id.bsE1S1 ||v.getId() == R.id.bsE1S2 || v.getId() == R.id.bsE1S3 ||\n v.getId() == R.id.bsE1S4 ||v.getId() == R.id.bsE1S5 || v.getId() == R.id.bsE1S6) {\n\n if (temp.getText().equals(\"\")) {\n temp.setText(\"3\");\n } else if ((Integer.parseInt(temp.getText().toString())) > 0) {\n temp.setText(String.valueOf(Integer.parseInt(temp.getText().toString()) - 1));\n } else {\n temp.setText(\"3\");\n }\n }\n else if(v.getId() == R.id.bsE5S1 || v.getId() == R.id.bsE5S2 ||\n v.getId() == R.id.bsE8S1 || v.getId() == R.id.bsE8S2 || v.getId() == R.id.bsE8S3) {\n if (temp.getText().equals(\"\")) {\n temp.setText(\"20\");\n } else if ((Integer.parseInt(temp.getText().toString())) > 0) {\n temp.setText(String.valueOf(Integer.parseInt(temp.getText().toString()) - 1));\n } else {\n temp.setText(\"20\");\n }\n }\n else if(v.getId() == R.id.bsE4S1 || v.getId() == R.id.bsE4S2 ||\n v.getId() == R.id.bsE7S1 || v.getId() == R.id.bsE7S2) {\n if (temp.getText().equals(\"\")) {\n temp.setText(\"15\");\n } else if ((Integer.parseInt(temp.getText().toString())) > 0) {\n temp.setText(String.valueOf(Integer.parseInt(temp.getText().toString()) - 1));\n } else {\n temp.setText(\"15\");\n }\n }\n else {\n if (temp.getText().equals(\"\")) {\n temp.setText(\"12\");\n } else if ((Integer.parseInt(temp.getText().toString())) > 0) {\n temp.setText(String.valueOf(Integer.parseInt(temp.getText().toString()) - 1));\n } else {\n temp.setText(\"12\");\n }\n }\n }", "@FXML\n void setBtnEditOnClick() {\n isEdit = true;\n isAdd = false;\n isDelete = false;\n }", "void enablButtonListener();", "private void designBtnActionPerformed(ActionEvent evt) {\n }", "@Override\n public void onClick(View theView) {\n setUp();\n\n\n }", "private void handleButton(JButton button)\n\t{\n\t\tif(button.getText().equals(\"0\")){\n\t\t\tbutton.setText(\"\");\n\t\t\tbutton.setBackground(Color.WHITE);\n\t\t\tbutton.setOpaque(true);\n\t\t} else{\n\t\t\tbutton.setBackground(Color.lightGray);\n\t\t\tbutton.setOpaque(true);\n\t\t}\n\t}", "private JButton getBtnPotvrdiUnos() {\r\n\t\tif (btnPotvrdiUnos == null) {\r\n\t\t\tbtnPotvrdiUnos = new JButton(\"Potvrdi unos\");\r\n\t\t\tbtnPotvrdiUnos.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\tGUIKontroler.dodajUtakmicu((Integer) spinnerPogSlobodnaDom.getValue(), \r\n\t\t\t\t\t\t\t(Integer) spinnerPogSlobodnaGos.getValue(), \r\n\t\t\t\t\t\t\t(Integer) spinnerBrSlobodnihDom.getValue(),(Integer) spinnerBrSlobodnihGos.getValue(), \r\n\t\t\t\t\t\t\t(Integer) spinnerPogDvojkeDom.getValue(), (Integer) spinnerPogDvojkeGos.getValue(), \r\n\t\t\t\t\t\t\t(Integer) spinnerBrSutevaZaDvaDom.getValue(),(Integer) spinnerBrSutevaZaDvaGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerPogTrojkeDom.getValue(),(Integer) spinnerPogTrojkeGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerBrSutevaZaTriDom.getValue(),(Integer) spinnerBrSutevaZaTriGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerSkokoviDom.getValue(),(Integer) spinnerSkokoviGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerOduzeteDom.getValue(),(Integer) spinnerOduzeteGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerIzgubljeneDom.getValue(),(Integer) spinnerIzgubljeneGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerAsistencijeDom.getValue(),(Integer) spinnerAsistencijeDom.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerBlokadeDom.getValue(),(Integer) spinnerBlokadeGos.getValue(),\r\n\t\t\t\t\t\t\t(Integer) spinnerFauloviDom.getValue(),(Integer) spinnerFauloviGos.getValue(),\r\n\t\t\t\t\t\t\t(Tim) comboBoxDomaci.getSelectedItem(),(Tim) comboBoxGosti.getSelectedItem());\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tGUIKontroler.upisiUDatoteku();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdispose();\r\n\t\t\t\t\t\r\n\t\t\t\t\tGUIKontroler.prikaziInfoProzorZaUspesanUnosUtakmice((Tim) comboBoxDomaci.getSelectedItem(),\r\n\t\t\t\t\t\t\t(Tim) comboBoxGosti.getSelectedItem());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbtnPotvrdiUnos.setSize(new Dimension(118, 23));\r\n\t\t\tbtnPotvrdiUnos.setMaximumSize(new Dimension(118, 23));\r\n\t\t\tbtnPotvrdiUnos.setMinimumSize(new Dimension(118, 23));\r\n\t\t\tbtnPotvrdiUnos.setPreferredSize(new Dimension(118, 23));\r\n\t\t\tbtnPotvrdiUnos.setVisible(false);\r\n\t\t}\r\n\t\treturn btnPotvrdiUnos;\r\n\t}", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "@Override\n\tpublic void pressed(PushButton button) {\n\t\tvm.getConfigurationPanel().getButton(index);\n\t\t\n\t}", "@Override\n\tprotected void setOnClickForButtons() {\n\t\tthis.buttons[0].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getActivity(), MainScreenActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\tMainFunctions.selectedOption = 1;\n\t\t\t\tdestroyServices();\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\t/* message box - onclick event */\n\t\tthis.buttons[1].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdestroyServices();\n\t\t\t\tMainFunctions.selectedOption = 2;\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\t/* one tick sound */\n\t\tfor (int i = 0; i < this.totalButtons; i++){\n\t\t\tfinal String desc = buttons[i].getTag().toString();\n\t\t\tbuttons[i].setOnFocusChangeListener(new View.OnFocusChangeListener() {\n\t\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\t\tif (hasFocus) {\n\t\t\t\t\t\tLog.i(TAG, \"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tlogFunctions.logTextFile(\"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tspeakButton(desc, 1.0f, 1.0f);\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 void gamereset() {\n Button tmp = (Button) findViewById(R.id.resetbutton);\n tmp.setVisibility(View.VISIBLE);\n }", "public abstract void buttonPressed();", "public void cambiarFondobtnPagoTarjeta(){\n btnPagoTarjeta.setBackgroundResource(R.drawable.btn_met_pgo_seleccion);\n btnPagoBancolo.setChecked(false);\n btnPagoNequi.setChecked(false);\n btnPagoPSE.setChecked(false);\n }", "private void setUpButton(final String sendValue, int ID) {\n final Button button = (Button)findViewById(ID);\n\n button.setEnabled(true);\n button.setOnTouchListener(new OnTouchListener() {\n\n public boolean onTouch(View arg0, MotionEvent arg1) {\n if (arg1.getAction() == MotionEvent.ACTION_DOWN) {\n button.setPressed(true);\n sendData(sendValue);\n }\n\n else if (arg1.getAction() == MotionEvent.ACTION_UP) {\n button.setPressed(false);\n }\n\n else if (button.isPressed()) {\n sendData(sendValue);\n }\n\n return true;\n }\n });\n }", "private void setButtons(boolean en){\n btnQuit.setEnabled(!en);\n btnResign.setEnabled(en);\n btnNewGame.setEnabled(!en);\n }", "@Test\n public void testSetButtonConfirmarClicked() {\n }", "private void settingNormalButton(Button button1, Button button2, Button button3) {\n button1.setBackgroundResource(R.drawable.my_btn_bg);\n button1.setTextColor(getResources().getColor(R.color.test_dark_blue));\n button2.setBackgroundResource(R.drawable.my_btn_bg);\n button2.setTextColor(getResources().getColor(R.color.test_dark_blue));\n button3.setBackgroundResource(R.drawable.my_btn_bg);\n button3.setTextColor(getResources().getColor(R.color.test_dark_blue));\n }", "@SuppressLint({\"ResourceAsColor\", \"SetTextI18n\"})\n private void setUi()\n {\n totalTextView.setText(String.valueOf(orederObj.getTotal()));\n paymentStatusTextView.setText(orederObj.getPaymentStatus());\n paymentMethodTextView.setText(orederObj.getPaymentMode());\n\n String title=orederObj.getOrderId();\n orderIdTextView.setText(title);\n\n\n //Toast.makeText(getContext(),orederObj.getStatus(),Toast.LENGTH_LONG).show();\n String status=orederObj.getStatus();\n Toast.makeText(getContext(),status,Toast.LENGTH_LONG).show();\n if(status.equals(\"Preparing\"))\n {\n //setting button color\n readyButton.setBackground(getResources().getDrawable(buttonstyle2));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle2));\n\n preparingButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.button_blue);\n doneButton.setTextColor(R.color.button_blue);\n\n\n }\n else if(status.equals(\"Ready\"))\n {\n //ui change part\n readyButton.setBackground(getResources().getDrawable(buttonstyle1));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle2));\n\n readyButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.white);\n doneButton.setTextColor(R.color.button_blue);\n\n //db part\n\n\n }\n else if(status.equals(\"Done\"))\n {\n //ui change part\n readyButton.setBackground(getResources().getDrawable(buttonstyle1));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle1));\n\n readyButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.white);\n doneButton.setTextColor(R.color.white);\n\n\n\n }\n\n if(orederObj.getPaymentStatus().equals(\"Paid\"))\n {\n paymetButton.setText(\"Paid\"); //this check and update\n }\n\n\n //this is to butoon\n paymetButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //paymetButton.setText(\"Paid\");\n if(orederObj.getPaymentStatus().equals(\"Paid\"))\n {\n Toast.makeText(getActivity(),\"Already Paid\",Toast.LENGTH_LONG).show();\n\n }\n else\n {\n updatePayment(orederObj.getOrderId(),\"Paid\");\n paymetButton.setText(\"Paid\"); //this check and update\n }\n\n\n }\n });\n\n\n //button to handle cancel part\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n cancelOrder(orederObj.getOrderId(),\"Cancel\");\n }\n });\n\n\n ///oder handling part\n\n preparingButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n readyButton.setBackground(getResources().getDrawable(buttonstyle2));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle2));\n\n preparingButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.button_blue);\n doneButton.setTextColor(R.color.button_blue);\n\n updateStatus(orederObj.getOrderId(),\"Preparing\");\n\n\n }\n });\n\n\n readyButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n readyButton.setBackground(getResources().getDrawable(buttonstyle1));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle2));\n\n readyButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.white);\n doneButton.setTextColor(R.color.button_blue);\n\n updateStatus(orederObj.getOrderId(),\"Ready\");\n\n\n }\n });\n\n\n doneButton.setOnClickListener(new View.OnClickListener() {\n @RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onClick(View view) {\n readyButton.setBackground(getResources().getDrawable(buttonstyle1));\n preparingButton.setBackground(getResources().getDrawable(buttonstyle1));\n doneButton.setBackground(getResources().getDrawable(buttonstyle1));\n\n readyButton.setTextColor(R.color.white);\n preparingButton.setTextColor(R.color.white);\n doneButton.setTextColor(R.color.white);\n\n updateStatus(orederObj.getOrderId(),\"Done\");\n orederObj.setStatus(\"Done\"); //setting to object\n storeHistory(orederObj); //this is calling the function\n\n }\n });\n\n\n //this is to set the food list of order\n List<String> fName=orederObj.convertFoodName();\n List<String> fQty=orederObj.convertFoodQty();\n\n String name=\"Order List:\\n\";\n int i;\n for (i=0;i<fName.size();i++)\n {\n name=name+\"\\t\"+fName.get(i)+\"\\t:\"+fQty.get(i)+\"\\n\";\n }\n\n foodName.setText(name);\n\n\n String note=\"Note:\";\n //this part is to set the note\n if(orederObj.getNotes()!=null)\n {\n note=note+orederObj.getNotes();\n noteTextView.setText(note);\n }\n else\n {\n note=note+\"Empty\";\n noteTextView.setText(note);\n }\n\n\n\n\n }", "@Override\n public void onClick(View view) {\n Button trykket = null;\n for (int i = 0; i < 30 ; i++) {\n if (view==buttons.get(i)){\n trykket=buttons.get(i);\n }\n }\n assert trykket != null;\n gæt(trykket);\n\n //vi afslutter spiller hvis det er slut eller vundet.\n if(logik.erSpilletSlut()){\n if(logik.erSpilletTabt()){\n // die.start();\n slutspilllet(false);\n }\n if(logik.erSpilletVundet()) slutspilllet(true);\n }\n\n }", "protected void actionPerformed(GuiButton par1GuiButton)\n {\n for (int var2 = 0; var2 < this.options.keyBindings.length; ++var2)\n {\n ((GuiButton)this.controlList.get(var2)).displayString = this.options.getOptionDisplayString(var2);\n }\n\n if (par1GuiButton.id == 200)\n {\n this.mc.displayGuiScreen(this.parentScreen);\n }\n else\n {\n this.buttonId = par1GuiButton.id;\n par1GuiButton.displayString = \"> \" + this.options.getOptionDisplayString(par1GuiButton.id) + \" <\"; // what is this even for.. it gets overwritten in drawScreen\n }\n }", "private static void buttonSetup() {\n \n // For all buttons except clear and equals=, update display\n for(JButton i:buttonOrder) {\n if(i.equals(clear) || i.equals(equals))\n continue;\n i.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if(displayString.toString().equals(\"ERROR\")) {\n displayString.replace(0, displayString.length(), i.getText());\n numField.setText(displayString.toString());\n } else {\n displayString.append(i.getText());\n numField.setText(displayString.toString());\n }\n }\n });\n }\n \n // Clears display\n clear.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n displayString.delete(0, displayString.length());\n numField.setText(displayString.toString());\n }\n });\n \n // Clears display, shows result\n equals.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n equationParse(displayString);\n }\n });\n }", "private void devBtnActionPerformed(ActionEvent evt) {\n }", "private ButtonPane()\r\n\t\t\t{ super(new String[]{\"OK\",\"Cancel\"},1,2); }", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "private void setButtons()\n\t{\n\t\tstartSim = new JButton(\"Start Sim\");\n\t\tstartSim.addActionListener(this);\n\t\tpauseSim = new JButton(\"Pause Sim\");\n\t\tpauseSim.addActionListener(this);\n\t\taddEat = new JButton(\"Add Eatery\");\n\t\taddEat.addActionListener(this);\n\t\tsubEat = new JButton(\"Subtract Eatery\");\n\t\tsubEat.addActionListener(this);\n\t\taddCash = new JButton(\"Add Cashier\");\n\t\taddCash.addActionListener(this);\n\t\tsubCash = new JButton(\"Subtract Cashier\");\n\t\tsubCash.addActionListener(this);\n\t}", "public int getButtonID(){return i_ButtonID;}", "String handleButtonPress(Button button);", "public void setButtonText(String str){\r\n SWINGButton.setText(str);\r\n }", "@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}", "private void setupButtons() {\n\t\tsetupCreateCourse();\n\t\tsetupRemoveCourse();\n\t\tsetupCreateOffering();\n\t\tsetupRemoveOffering();\n\t\tsetupAddPreReq();\n\t\tsetupRemovePreReq();\n\t\tsetupBack();\n\t}", "private void setupUpdateButton() {\n\n /* Get the button */\n Button updateButton = this.getStatusUpdateButton();\n\n /* Setup listener */\n View.OnClickListener updateButtonClicked = new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n statusUpdater.updateStatus();\n }\n };\n\n /* Set listener to button */\n updateButton.setOnClickListener(updateButtonClicked);\n }", "@FXML\n void setBtnDeleteLocationOnClick() {\n this.btnAdd.setDisable(true);\n this.btnEdit.setDisable(true);\n this.setDisableSelectedButtons(false);\n this.comboBoxLocation.setDisable(false);\n this.tableViewAds.setDisable(true);\n this.selectOptionAddEdit(false, false, true, false);\n }", "public void onButtonPressed(int slot) {\n onCommands.get(slot).execute() ; //NPE is eliminated by setting all values to a default NoCommand! Good practice.\n undoCommand = onCommands.get(slot); //stash this command into this reference\n }", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "private void createButton(){\n addButton();\n addStartButton();\n }", "public void SetCommBtn(ParamButton btn, String text) {\n btn.setDrawable(R.drawable.fs_rect_up, R.drawable.fs_rect_dn);\n if (text != null) {\n btn.setText(text);\n }\n btn.setPadding(0, 3, 0, 0);\n btn.setTextColor(-1);\n btn.setGravity(17);\n btn.setTextSize(0, 28.0f);\n }", "@Override\n\tprotected void InitButtonListener() {\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickOK();\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnPlus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickPlus();\n\t\t\t\tCursurIndex = 2;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnMinus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickMinus();\n\t\t\t\tCursurIndex = 1;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t}", "public void set(Object requestor, String field, JButton comp);", "private void updateButton(JButton button) {\n\t\tbutton.setFocusPainted(comboBox.isEditable());\n\t}", "private void initButton(Button button, String tekst, String styleClass, int columnIndex,\n int rowIndex, float sizeX, float sizeY) {\n button.setText(tekst);\n button.getStyleClass().add(styleClass);\n button.setMinWidth(sizeX);\n button.setMinHeight(sizeY);\n this.buttonGrid.add(button, columnIndex, rowIndex);\n }", "private void setButtons(boolean iVal)\n {\n buttonLogin.setEnabled(iVal);\n buttonLogin.setClickable(iVal);\n buttonSignup.setEnabled(iVal);\n buttonSignup.setClickable(iVal);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) { // ueberprueft das Event fuer den Button\r\n\t\t\t\tif (e.getSource() == alarm \r\n\t\t\t\t\t\t&& alarm.getText().equals(\"Alarm setzen\")) { // schaut ob der geklickte Button den gleichen Text hat wieder der Alarmbutton\r\n\t\t\t\t\tabfrageFenster(); // bei Uebereinstimmung wird Abfragefenster aufgerufen\r\n\t\t\t\t}\r\n\t\t\t}", "protected void buttonPressed(int buttonId) {\r\n if (buttonId == IDialogConstants.OK_ID) {\r\n value = text.getText();\r\n } else {\r\n value = null;\r\n }\r\n super.buttonPressed(buttonId);\r\n }", "private void initializeSetColorButton() {\n\n setColorTextLabel = new JLabel(\"Set New Color\");\n setColorTextLabel.setBounds(250, 250,150, 25);\n setColorTextLabel.setFont(new Font(\"Arial\", Font.PLAIN, 20));\n this.add(setColorTextLabel);\n\n greenButton = new JButton();\n greenButton.setBackground(java.awt.Color.green);\n greenButton.setBounds(400, 250, 60, 25);\n this.add(greenButton);\n\n redButton = new JButton();\n redButton.setBackground(java.awt.Color.red);\n redButton.setBounds(460, 250, 60, 25);\n this.add(redButton);\n\n yellowButton = new JButton();\n yellowButton.setBackground(java.awt.Color.yellow);\n yellowButton.setBounds(520, 250, 60, 25);\n this.add(yellowButton);\n\n blueButton = new JButton();\n blueButton.setBackground(java.awt.Color.blue);\n blueButton.setBounds(580, 250, 60, 25);\n this.add(blueButton);\n\n setColorTextLabel.setVisible(false);\n greenButton.setVisible(false);\n blueButton.setVisible(false);\n redButton.setVisible(false);\n yellowButton.setVisible(false);\n }", "private void buttonInitiation() {\n submit = new JButton(\"Submit\");\n submit.setBounds(105, 250, 90, 25);\n this.add(submit);\n goBack = new JButton(\"Return to Main Menu\");\n goBack.setBounds(205, 250, 200, 25);\n this.add(goBack);\n }", "@Override\n public final void initButtons(int x, int y, int addy){\n \n String data = s_datapath;\n addButton(data + \"SM_NeuesSpiel\" + s_typ, x, y, 1);\n addButton(data + \"OM_SpielSpeichern\" + s_typ, x, y + addy, 2);\n addButton(data + \"SM_SpielLaden\" + s_typ, x, y + addy * 2, 3);\n //addButton(data,x, y + addy*3, 4);\n addButton(data + \"Menu_Element_Blank\" + s_typ, x,/*715*/ y + addy * 4, 5);\n addButton(data + \"SM_SpielBeenden\" + s_typ, x,/*845*/ y + addy * 5, 6);\n }", "public void addListenerOnButton() {\n\n\t\t//koppel de button code aan een widget en voeg een onclicklistener toe\n\t\tsettings = (Button) findViewById(R.id.settings);\n\n\t\tsettings.setOnClickListener(new OnClickListener() {\n\t\t\t//koppel de button aan een nieuw xml scherm wat opent\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Settings.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\n\t\t});\n\n\t\tsearch = (Button) findViewById(R.id.search);\n\n\t\tsearch.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Search.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\t\t});\n\t\tterug = (Button) findViewById(R.id.terug);\n\n\t\tterug.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tsetResult(RESULT_OK, intent);\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t});\n\n\n\t}", "@Override\r\n\tprotected ActionListener updateBtnAction() {\n\t\treturn null;\r\n\t}", "private void setButtons(){\n cancelButton = findViewById(R.id.memory_theme_cancel);\n saveButton = findViewById(R.id.memory_theme_save);\n\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setSound.startButtonNoise(MemoryThemeActivity.this);\n finish();\n }\n });\n\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n final SharedPreferences.Editor editor = sp.edit();\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setSound.startButtonNoise(MemoryThemeActivity.this);\n editor.putInt(PreferenceKeys.MEMORY_THEME, saveTheme);\n editor.putInt(PreferenceKeys.MEMORY_THEME_COLOR, color);\n editor.putInt(PreferenceKeys.MEMORY_THEME_BOARDER, boarder);\n editor.putInt(PreferenceKeys.MEMORY_THEME_STYE, style);\n editor.apply();\n Intent intent = new Intent(MemoryThemeActivity.this, MemoryActivity.class);\n startActivity(intent);\n }\n });\n }", "private void adaptButtonFacade(AbstractButton button)\n\t{\n\t\tString text = null;\n\t\tIcon icon = null;\n\t\tboolean selected = false;\n\n\t\tif (fullScreenSupport.isFullScreen())\n\t\t{\n\t\t\ttext = FullScreenConstants.TEXT_MAXIMIZE;\n\t\t\ticon = FullScreenConstants.ICON_MAXIMIZE;\n\t\t\tselected = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttext = FullScreenConstants.TEXT_RESTORE;\n\t\t\ticon = FullScreenConstants.ICON_MAXIMIZE_RESTORE;\n\t\t\tselected = true;\n\t\t}\n\t\t\n\t\tif (button instanceof JMenuItem)\n\t\t{\n\t\t\tbutton.setSelected(selected);\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\tif (!button.getText().equals(\"\"))\n\t\t\t{\n\t\t\t\tbutton.setText(text);\n\t\t\t}\n\t\t\tif (button.getIcon() != null)\n\t\t\t{\n\t\t\t\tbutton.setIcon(icon);\n\t\t\t}\n\t\t\tbutton.setToolTipText(text);\n\t\t}\t\t\n\t}", "public void buttonAction(ButtonClass button){\n //Sets the chosenButton to most recently chosen button\n chosenButton = button;\n chosenGame = chosenButton.getSmallGame();\n allClickedButtons.add(chosenButton);\n nextGamePosition = chosenButton.getButtonPosition();\n checkAndUpdateIfSmallGameWin(chosenGame);\n updateBigGameBoardForNextMove();\n }", "public void buttonPress(ActionEvent event) {\r\n Button clickedButton = (Button) event.getSource();\r\n String selectedButton = clickedButton.getId();\r\n System.out.print(selectedButton);\r\n \r\n // If the user correctly guesses the winning button\r\n if (correctButtonName.equals(selectedButton)) {\r\n \r\n //Displays a popup alerting the user that they won the game.\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"You Win!\");\r\n alert.setHeaderText(\"Congratulations, you found the treasure!\");\r\n alert.setContentText(\"Would you like to play again?\");\r\n ButtonType okButton = new ButtonType(\"Play again\");\r\n ButtonType noThanksButton = new ButtonType(\"No Thanks!\");\r\n alert.getButtonTypes().setAll(okButton, noThanksButton);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n \r\n //If the user selects \"Play again\" a new button will be randomly selected\r\n if (result.get() == okButton ){\r\n //Chooses a random button from the list of buttons\r\n correctButtonName = buttonList[(int)(Math.random() * buttonList.length)];\r\n }\r\n //If the user does not select \"Play again\", the application will be closed\r\n else {System.exit(0);}\r\n \r\n }\r\n \r\n //If the user chooses any button except for the winning button\r\n else if (!selectedButton.equals(correctButtonName)) {\r\n \r\n //Displays a popup alerting the user that they did not find the treasure.\r\n Alert alert2 = new Alert(Alert.AlertType.INFORMATION);\r\n alert2.setTitle(\"No treasure!\");\r\n alert2.setHeaderText(\"There was no treasure found on that island\");\r\n alert2.setContentText(\"Would you like to continue searching for treasure?\");\r\n ButtonType ayeCaptain = new ButtonType (\"Continue Searching\");\r\n ButtonType noCaptain = new ButtonType (\"Quit\");\r\n alert2.getButtonTypes().setAll(ayeCaptain,noCaptain);\r\n Optional<ButtonType> result2 = alert2.showAndWait();\r\n \r\n if (result2.get() == ayeCaptain){\r\n //The search for treasure continues!\r\n }\r\n else{ \r\n System.exit(0);\r\n }\r\n }\r\n }", "public ButtonHolderActionBarView(SpeelveldController speelveldController)\n throws RemoteException {\n this.speelveldController = speelveldController;\n this.speler = speelveldController.getSpeler();\n this.karakter = this.speler.getKarakter();\n\n container = new StackPane();\n gebruikEigenschap = new Button();\n exitbutton = new Button();\n spelregels = new Button();\n opslaanknop = new Button();\n goudbutton = new Button();\n bouwbutton = new Button();\n eindebeurtbutton = new Button();\n\n this.speler.addObserver(this);\n this.karakter.addObserver(this);\n\n this.buttonGrid.setHgap(10);\n this.buttonGrid.setVgap(10);\n this.buttonGrid.setPadding(new Insets(22.5, 0, 22.5, 0));\n\n initButton(gebruikEigenschap, \"Eigenschap\", \"button-primary\", 1, 1, 160f, 55f);\n initButton(bouwbutton, \"Bouwen\", \"button-primary\", 2, 1, 160f, 55f);\n initButton(goudbutton, \"Bonusgoud\", \"button-primary\", 1, 2, 160f, 55f);\n initButton(eindebeurtbutton, \"Einde beurt\", \"button-danger\", 2, 2, 160f, 55f);\n initButton(opslaanknop, \"Opslaan\", \"button-success\", 1, 3, 160f, 55f);\n initButton(exitbutton, \"Afsluiten\", \"button-danger\", 2, 3, 160f, 55f);\n\n opslaanknop.setOnAction(event1 -> this.speelveldController.cmdOpslaan());\n goudbutton.setOnAction(event -> this.speelveldController.cmdBonusGoud());\n bouwbutton.setOnAction(event -> this.speelveldController.cmdBouwGebouw());\n eindebeurtbutton.setOnAction(event -> this.speelveldController.cmdEindeBeurt());\n gebruikEigenschap.setOnAction(event -> this.speelveldController.cmdGebruikEigenschap());\n exitbutton.setOnAction(event -> System.exit(0));\n\n isKarakterBonusable();\n\n buttonholder = new Rectangle(0, 0, 350, 250);\n buttonholder.setFill(Color.rgb(57, 57, 57));\n this.container.getChildren().addAll(buttonholder, buttonGrid);\n }", "public void setMatchButton(JButton matchButton) {\n if (beginMatchButton != null) {\n ActionListener[] listeners = beginMatchButton.getActionListeners();\n for (ActionListener lis : listeners) {\n beginMatchButton.removeActionListener(lis);\n }\n }\n beginMatchButton = matchButton;\n beginMatchButton.addActionListener(new java.awt.event.ActionListener() {\n @Override\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n if (FieldAndRobots.getInstance().areRobotsNotESTOPPED()) {\n beginMatchButton.setEnabled(false);\n\n resetButton.setEnabled(false);\n\n autonomousTime.setEditable(false);\n teleoperatedTime.setEditable(false);\n\n switcherButton.setEnabled(false);\n\n stopMatchButton.setEnabled(true);\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n\n SetAllTeamFieldsEditable(false);\n\n GovernThread game = GovernThread.getInstance();\n if (game != null) {\n game.start();\n }\n } else {\n if (Main.getInstance().getMainFrame() != null) {\n JOptionPane.showMessageDialog(Main.getInstance().getMainFrame(),\n \"Error - a robot is still ESTOPPED. You must Reset the match(to un-ESTOP them) before continuing.\",\n \"Robot ESTOPPED Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n }\n }\n });\n }", "public void setNewButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_newButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setNewButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "@FXML\n void setBtnAddEditLocationOnClick() {\n this.setDisableLocation(false);\n this.setDisableContent(true);\n this.setDisablePrice(true);\n this.setDisableSelectedButtons(false);\n this.setDisableAds(true);\n this.tableViewAds.setDisable(true);\n this.cleanDetailsFields();\n this.selectOptionAddEdit(false, false, true, false);\n\n if (isEdit) {\n this.comboBoxLocation.setDisable(false);\n }\n }", "protected abstract boolean up(int button);", "public void setDoneButton(){\n\t\tbtnConfirmOrNext.setText(\"Done\");\n\t\tbtnStop.setVisible(false); // no more stop quiz since quiz is done\n\t}", "private void setCurrentDateOnButton() {\n\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t//set current date to registration button\n\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t\t//set current date to FCRA registration button\n\t\t\tbtnFcraDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t}", "protected void resetSideButtons(){\n mFightButton.setText(\"FIGHT\");\n mPokemonButton.setText(\"POKEMON\");\n mBagButton.setText(\"BAG\");\n mRunButton.setText(\"RUN\");\n mFightButton.setBackgroundColor(PokemonApp.FIGHT_COLOR);\n mPokemonButton.setBackgroundColor(PokemonApp.POKEMON_COLOR);\n mBagButton.setBackgroundColor(PokemonApp.BAG_COLOR);\n mRunButton.setBackgroundColor(PokemonApp.RUN_COLOR);\n }", "public void setEditButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_editButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_editButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_editButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setEditButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public void onClick(Widget sender) {\n if(sender.equals(this.deleteButton)) {\n\t\t\tthis.removeObject();\n\t\t} else if(sender.equals(this.backButton)) {\n\t\t\tthis.backObject();\n\t\t} else if(sender.equals(this.frontButton)) {\n\t\t\tthis.frontObject();\n\t\t} else if(sender.equals(this.saveButton)) {\n\t\t\tthis.saver.saveDocument(this.canvas);\n }else if(sender.equals(this.selectButton)) {\n this.action.setAction(Action.SELECT);\n\t\t} else if(sender.equals(this.pencilButton)) {\n this.unSelect();\n this.action.setAction(Action.PENCIL);\n\t\t} else if(sender.equals(this.lineButton)) {\n this.unSelect();\n this.action.setAction(Action.LINE);\n\t\t} else if(sender.equals(this.rectButton)) {\n this.unSelect();\n this.action.setAction(Action.RECTANGLE);\n\t\t} else if(sender.equals(this.circleButton)) {\n this.unSelect();\n this.action.setAction(Action.CIRCLE);\n\t\t} else if(sender.equals(this.ellipseButton)) {\n this.unSelect();\n this.action.setAction(Action.ELLIPSE);\n\t\t} else if(sender.equals(this.polylineButton)) {\n this.unSelect();\n this.action.setAction(Action.POLYLINE);\n } else if(sender.equals(this.textButton)) {\n this.unSelect();\n this.action.setAction(Action.TEXTBOX);\n } else if(sender.equals(this.strokeButton)) {\n this.showPopUpStroke();\n\t\t} else if(sender.equals(this.fill)) {\n this.showPopupColorFill(true);\n } else if(sender.equals(this.stroke)) {\n this.showPopupColorFill(false);\n }\n\t\t\n\t}", "@Override\n\t\tpublic void onClick(Widget sender) {\n\t\t\t\n\t\t}", "void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}", "public void editButtonClicked() {\n setButtonsDisabled(false, true, true);\n setAllFieldsAndSliderDisabled(false);\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n adaptee.btnReset_actionPerformed(e);\r\n\t}", "public Button(){\n id=1+nbrButton++;\n setBounds(((id-1)*getDimX())/(Data.getNbrLevelAviable()+1),((id-1)*getDimY())/(Data.getNbrLevelAviable()+1),getDimX()/(2*Data.getNbrLevelAviable()),getDimY()/(2*Data.getNbrLevelAviable()));\n setText(id+\"\");\n setFont(Data.getFont());\n addMouseListener(this);\n setVisible(true);\n }", "protected void onPostInitUI() {\n if (hasPositiveButton()) {\n getPositiveButton().addClickHandler(new ClickHandler() {\n\n @Override\n public void onClick(ClickEvent event) {\n onPositiveButtonClicked();\n }\n });\n }\n if (hasNegativeButton()) {\n getNegativeButton().addClickHandler(new ClickHandler() {\n\n @Override\n public void onClick(ClickEvent event) {\n onNegativeButtonClicked();\n }\n });\n }\n }", "@Override\n public void onClick(View v) {\n switch(v.getId()) {\n case R.id.button1:\n display.setText(button1.getText());\n button1.setBackgroundColor(Color.BLUE);\n reset(1);\n tuningF = getNoteFrequency(1, tuning);\n tuningIndex = 1;\n break;\n case R.id.button2:\n display.setText(button2.getText());\n button2.setBackgroundColor(Color.BLUE);\n reset(2);\n tuningF = getNoteFrequency(2, tuning);\n tuningIndex = 2;\n break;\n case R.id.button3:\n display.setText(button3.getText());\n button3.setBackgroundColor(Color.BLUE);\n reset(3);\n tuningF = getNoteFrequency(3, tuning);\n tuningIndex = 3;\n break;\n case R.id.button4:\n display.setText(button4.getText());\n button4.setBackgroundColor(Color.BLUE);\n reset(4);\n tuningF = getNoteFrequency(4, tuning);\n tuningIndex = 4;\n break;\n case R.id.button5:\n display.setText(button5.getText());\n button5.setBackgroundColor(Color.BLUE);\n reset(5);\n tuningF = getNoteFrequency(5, tuning);\n tuningIndex = 5;\n break;\n case R.id.button6:\n display.setText(button6.getText());\n button6.setBackgroundColor(Color.BLUE);\n reset(6);\n tuningF = getNoteFrequency(6, tuning);\n tuningIndex = 6;\n break;\n }\n }", "private void onClickReset(ActionEvent e) {\n\n }", "public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagZhaopin = !bFlagZhaopin;\r\n\t\t\t\t zhaopin_btn.setChecked(bFlagZhaopin);\r\n\t\t\t }", "private void setUpLoanBtn() {\r\n if (findViewById(R.id.btn_calculate_loan) != null)\r\n {\r\n /* This is the \"Calculate loan\" button. Its functionality is to update the table values\r\n * below it.\r\n */\r\n Button calcLoanBtn = (Button) findViewById(R.id.btn_calculate_loan);\r\n calcLoanBtn.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n onCalcLoanBtnClicked();\r\n }\r\n });\r\n }\r\n }", "public void setButtonPressed(int button) {\n buttonHeldTime = 0;\n pressedButton = button;\n pressed = true;\n }", "private void setFollowingButton(int buttonText) {\n followingButton.setText(getString(buttonText));\n\n }", "public void onButtonBPressed();", "private void setAddButtonUI() {\n addButton = new JButton(\"Add\");\n addButton.setForeground(new Color(247, 37, 133));\n addButton.addActionListener(this);\n addButton.setContentAreaFilled(false);\n addButton.setFocusPainted(false);\n addButton.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n addButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n }" ]
[ "0.7740323", "0.7253883", "0.7211896", "0.6863234", "0.6840984", "0.6804468", "0.6756589", "0.6721899", "0.6666703", "0.66475016", "0.66311353", "0.6627089", "0.6582346", "0.6571542", "0.6535695", "0.65036094", "0.6499677", "0.6499643", "0.6486229", "0.64858353", "0.6478737", "0.6468829", "0.64612806", "0.6453663", "0.6429284", "0.64278847", "0.64273787", "0.64063877", "0.63980544", "0.6379319", "0.63790053", "0.63743305", "0.6372983", "0.63612676", "0.63455373", "0.634448", "0.6342651", "0.6340764", "0.63315976", "0.6325919", "0.6324246", "0.63215816", "0.63194597", "0.6308375", "0.62934965", "0.62780267", "0.62732863", "0.6272383", "0.6268419", "0.62681186", "0.6267979", "0.6267863", "0.6267195", "0.6267146", "0.6265984", "0.62651205", "0.6251519", "0.62436557", "0.62420696", "0.62388813", "0.62355447", "0.6223719", "0.62230474", "0.622029", "0.6210931", "0.62066114", "0.62060165", "0.61974543", "0.61954117", "0.6185022", "0.6181847", "0.61745095", "0.61708754", "0.617029", "0.6167683", "0.6163014", "0.61568695", "0.6148678", "0.61431277", "0.6142804", "0.61421907", "0.6137724", "0.61349756", "0.6134038", "0.61303127", "0.61268324", "0.61245465", "0.6123242", "0.612166", "0.61202645", "0.61189586", "0.6116642", "0.6104554", "0.6103843", "0.61000025", "0.6098363", "0.6097163", "0.6087652", "0.6085252", "0.60773104", "0.607714" ]
0.0
-1
ueberprueft was passiert wenn man den OK Button drueckt
@Override public void actionPerformed(ActionEvent e) { if (e.getSource() == bestaetigung) { contentPanel.setBackground(Color.RED); int hours = (int) stunden.getValue(); int minutes = (int) minuten.getValue(); // wandelt die Zeit von eine Integer zu einem Dateobject um SimpleDateFormat wecker = new SimpleDateFormat("HH:mm"); Date da = new Date(); Calendar cal = new GregorianCalendar(); cal.set(Calendar.HOUR_OF_DAY, hours); cal.set(Calendar.MINUTE, minutes); da = cal.getTime(); // Formatiert das Datum, zu einer Zeitangabe anhalten.setText("Alarm " + wecker.format(da) + " anhalten!"); // wenn Alarmausgefuehrt wurde wird alles wieder zum Ausgangszustand gesetzt alarmgesetzt = true; contentPanel.remove(alarm); contentPanel.add(anhalten); jf.validate(); abfrage.dispose(); setTime(da); checkTime(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void okButtonClicked();", "protected abstract boolean onOkClicked();", "protected abstract void pressedOKButton( );", "void onOkButtonPressed();", "@Override\r\n\tprotected void onOkSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Ok button implementation\");\r\n\t}", "protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}", "private void onOK() {\n isOkClicked = true;\n dispose();\n }", "protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}", "public void OnOkClick()\r\n {\r\n\r\n }", "private void onOkButtonPressed() {\n\t\tconfirm = true;\n\t\tif (template.getAskDimension()) {\n\t\t\ttry {\n\t\t\t\twidth = Integer.parseInt(widthInputField.getFieldString());\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\theight = Integer.parseInt(heightInputField.getFieldString());\n\t\t\t\theightInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\theightInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\tif(!confirm)\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (template.getAskLoading()) {\n\t\t\tint result = savefileChooser.showOpenDialog(this);\n\t\t\tif (result != JFileChooser.APPROVE_OPTION) {\n\t\t\t\tconfirm = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\n\t}", "protected void okPressed() {\r\n \t\tArrayList resources= new ArrayList(10);\r\n \t\tfindCheckedResources(resources, (IContainer)fTree.getInput());\r\n \t\tif (fWorkingSet == null)\r\n \t\t\tfWorkingSet= new WorkingSet(getText().getText(), resources.toArray());\r\n \t\telse if (fWorkingSet instanceof WorkingSet) {\r\n \t\t\t// Add not accessible resources\r\n \t\t\tIResource[] oldResources= fWorkingSet.getResources();\r\n \t\t\tfor (int i= 0; i < oldResources.length; i++)\r\n \t\t\t\tif (!oldResources[i].isAccessible())\r\n \t\t\t\t\tresources.add(oldResources[i]);\r\n \r\n \t\t\t((WorkingSet)fWorkingSet).setName(getText().getText());\r\n \t\t\t((WorkingSet)fWorkingSet).setResources(resources.toArray());\r\n \t\t}\r\n \t\tsuper.okPressed();\r\n \t}", "@FXML public void handleOk() {\n\t\tSystem.out.println(\"OK clicked!\");\n\t\t\n\t\tif (checkParameters().equals(ErrorCode.BatchSize)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Batch Size]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.ConfidenceFactor)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Confidence Factor]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.MinNumObj)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Min Num Obj]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumDecimalPlaces)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Decimal Places]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumFolds)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Folds]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Seed)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Seed]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Fine)) {\n\t\t\tsaveParameters();\n\t\t\tClassifiersWindowsManager.stage.close();\n\t\t}\n\t}", "private JButton getBtnOK() {\n if (btnOK == null) {\n btnOK = new JButton();\n btnOK.setText(\" OK \");\n btnOK.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n selected = true;\n setVisible(false);\n }\n });\n getRootPane().setDefaultButton(btnOK);\n }\n return btnOK;\n }", "private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }", "public void cmdOk() {\n\n\t\tif (!m_actionscombo.isValueInModel()) {\n\t\t\tString msg = I18N.getLocalizedMessage(\"Invalid Action Name\");\n\t\t\tString title = I18N.getLocalizedMessage(\"Error\");\n\t\t\tJOptionPane.showMessageDialog(null, msg, title, JOptionPane.ERROR_MESSAGE);\n\t\t} else\n\t\t\tsuper.cmdOk();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttext.setText(ok.getText());\n\t\t\t}", "protected void okPressed()\n\t{\n\t\t((NewProjectComposite) this.getDialogArea()).updateProject(project);\n\t\tsuper.okPressed();\n\t}", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n actualizarEntidad(this.entidad);\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "void CloseOkDialog();", "protected GuiTestObject okbutton() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"okbutton\"));\n\t}", "@FXML\n\tprivate void handleOk() {\n\t\tif (isValidInput()) {\n\t\t\tsaveCurrentAcknowledgment();\n\t\t\t\n\t\t\tif (isNew) {\n\t\t\t\tmain.getDbHelper().insertAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\n\t\t\t} else {\n\t\t\t\tmain.getDbHelper().updateAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\t\n\t\t\t}\n\t\t\t\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "@Override\n\tpublic void okPressed() {\n\t\t_text = _noteTextField.getText();\n\t\tsetReturnCode(OK);\n\t\tclose();\n\t}", "void setOk();", "@FXML\n\tprivate void handleOk() {\n\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\n\t}", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "public JButton getOkButton(){\n\t\treturn okButton;\n\t}", "@FXML\n private void handleOk() {\n if (isInputValid()) {\n gem.setGemName(gemNameField.getText());\n gem.setGemValue(Integer.parseInt(gemValueField.getText()));\n gem.setDescription(gemDescripField.getText());\n\n okClicked = true;\n dialogStage.close();\n }\n }", "void okButton_actionPerformed(ActionEvent e) {\n setItskey(keyTextField.getText());\n setItsvalue(valueTextField.getText());\n setUserAction(OK);\n setVisible(false);\n }", "void okButton_actionPerformed(ActionEvent e)\n\t{\n\t\tpropertiesEditPanel.saveChanges();\n\t\tcloseDlg();\n\t\tokPressed = true;\n }", "public boolean isOkClicked() {\r\n\t\treturn okClicked;\r\n\t}", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}", "public boolean isOkClicked(){\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tupdateOkState();\r\n\t\t\t}", "private BButton getBtnOK() {\r\n\t\tif (btnOK == null) {\r\n\t\t\tbtnOK = new BButton();\r\n\t\t\tbtnOK.setText(\"OK\");\r\n\t\t\tbtnOK.setPreferredSize(new Dimension(100, 29));\r\n\t\t}\r\n\t\treturn btnOK;\r\n\t}", "@FXML\n\tprivate void handleOk() {\n\t\ttry {\n\t\t\ttypeDAO.supprimerType(new Type(listIdType.get(comboboxtype.getSelectionModel().getSelectedIndex()),\"\",\"\"));\n\t\t\tnew Popup(\"Type \"+comboboxtype.getValue()+\" supprimer !\");\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\t}", "public boolean isOkClicked() {\n return okClicked;\n }", "public boolean isOkClicked() {\n return okClicked;\n }", "private javax.swing.JButton getBtnOK() {\r\n\tif (ivjBtnOK == null) {\r\n\t\ttry {\r\n\t\t\tivjBtnOK = new javax.swing.JButton();\r\n\t\t\tivjBtnOK.setName(\"BtnOK\");\r\n\t\t\tivjBtnOK.setText(\"OK\");\r\n\t\t\t// user code begin {1}\r\n\t\t\t// user code end\r\n\t\t} catch (java.lang.Throwable ivjExc) {\r\n\t\t\t// user code begin {2}\r\n\t\t\t// user code end\r\n\t\t\thandleException(ivjExc);\r\n\t\t}\r\n\t}\r\n\treturn ivjBtnOK;\r\n}", "@Action\n public void acOk() {\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord1, -1e5, 1e5)) {\n return;\n }\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord2, -1e5, 1e5)) {\n return;\n }\n if (checkTextField(jtfName)) {\n return;\n }\n getTempObj().setType(jcbType.getSelectedIndex());\n getTempObj().setCoord1(getDoubleFromFormattedTextField(jftfCoord1));\n getTempObj().setCoord2(getDoubleFromFormattedTextField(jftfCoord2));\n getTempObj().setName(jtfName.getText());\n setChangeObj(true);\n }", "private JButton getJButtonOk() {\n\t\tif (jButtonOk == null) {\n\t\t\tjButtonOk = new JButton();\n\t\t\tjButtonOk.setText(\"I agree\");\n\t\t\tjButtonOk.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tok = true;\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButtonOk;\n\t}", "private void okAction()\r\n\t{\r\n\t\tString navn = txfInput[0].getText().trim();\r\n\r\n\t\tint telefonNr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttelefonNr = Integer.parseInt(txfInput[1].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString vej = txfInput[2].getText().trim();\r\n\r\n\t\tint nr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tnr = Integer.parseInt(txfInput[3].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString etage = txfInput[4].getText().trim();\r\n\r\n\t\tint postNr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tpostNr = Integer.parseInt(txfInput[5].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString by = txfInput[6].getText().trim();\r\n\t\tString land = txfInput[7].getText().trim();\r\n\r\n\t\tif (navn.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Navn er tom\");\r\n\t\t\treturn;\r\n\t\t} else if (telefonNr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Telefon nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\telse if (vej.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Vej er tom\");\r\n\t\t\treturn;\r\n\t\t} else if (nr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (postNr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Post Nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (by.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"By er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (land.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Land er tom\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tFirma firma = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfirma = lvwFirmaer.getSelectionModel().getSelectedItem();\r\n\t\t} catch (NullPointerException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\r\n\t\tLedsager ledsager = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tledsager = lvwLedsagere.getSelectionModel().getSelectedItem();\r\n\t\t} catch (NullPointerException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif (deltager != null)\r\n\t\t{\r\n\t\t\tService.updateDeltager(deltager, firma, ledsager, navn, telefonNr, null, vej, nr, etage, postNr, by, land);\r\n\t\t} else\r\n\t\t{\r\n\t\t\tService.createDeltager(navn, telefonNr, null, vej, nr, etage, postNr, by, land);\r\n\t\t}\r\n\r\n\t\tthis.hide();\r\n\t}", "private JButton getJButtonOK() {\n\t\tif (jButtonOK == null) {\n\t\t\tjButtonOK = new JButton();\n\t\t\tjButtonOK.setLocation(new Point(100, 200));\n\t\t\tjButtonOK.setText(\"OK\");\n\t\t\tjButtonOK.addActionListener( new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tcloseFrameSobre();\n\t\t\t\t}\n\t\t\t});\n\t\t\tjButtonOK.setSize(new Dimension(100, 30));\n\t\t}\n\t\treturn jButtonOK;\n\t}", "@Override\n\tpublic boolean performOk() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\t// Set the values from the fields\n\t\tpreferenceStore.setValue(DEFAULT_PASSWORD_LENGTH, spiLength.getSelection());\n\t\tpreferenceStore.setValue(USE_LOWERCASE_LETTERS, btnUseLowercase.getSelection());\n\t\tpreferenceStore.setValue(USE_UPPERCASE_LETTERS, btnUserUppercase.getSelection());\n\t\tpreferenceStore.setValue(USE_DIGITS, btnUseDigits.getSelection());\n\t\tpreferenceStore.setValue(USE_SYMBOLS, btnUseSymbols.getSelection());\n\t\tpreferenceStore.setValue(USE_EASY_TO_READ, btnUseEaseToRead.getSelection());\n\t\tpreferenceStore.setValue(USE_HEX_ONLY, btnUseHexOnly.getSelection());\n\n\t\t// Return true to allow dialog to close\n\t\treturn true;\n\t}", "public JButton getOkButton() {\n return okButton;\n }", "public void clickedOk(View view) {\n \t\n \t// validate the data set\n \tif (!getData()) return;\n \t\n \t// confirm values that are in range, but possibly wrong\n \tif (!confirmData(0)) return;\n \t\n \t// success\n \t\treturnResult(Activity.RESULT_OK);\n }", "public void handleActionOk() {\n\t\tsuper.handleActionOk();\n\t\tnewModeOkApply();\n\t\tthis.getDocumentView().close();\n\t}", "JButton saveButton() {\r\n JButton button = new JButton(\"Save\");\r\n Font buttonsFront = new Font(\"Serif\", Font.PLAIN, 17);\r\n button.setFont(buttonsFront);\r\n button.setPreferredSize(new Dimension(80,30));\r\n\r\n button.addActionListener(new ActionListener() {\r\n\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n int flag = 0;\r\n for(int i =0;i<CHACK.length;i++){\r\n if(CHACK[i] == 0)\r\n flag = 1;\r\n }\r\n if(flag == 0){\r\n // TODO Auto-generated method stub\r\n Object[] options ={ \"Yes\", \"No\" };\r\n //yes = 0 no = 1\r\n int m = JOptionPane.showOptionDialog(null, \"Save?\", \"tips\",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n System.out.println(m);\r\n if (m==0) {\r\n getCompanyInfoFromText(); //write in\r\n //go back to Init Page\r\n frame.dispose();\r\n new init();\r\n\r\n }\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"Place make sure every input is already checked! \", \"Warning\",JOptionPane.WARNING_MESSAGE);\r\n }\r\n\r\n }\r\n });\r\n return button;\r\n }", "@FXML\n\tprivate void handleOk() {\n\t\tif (isInputValid()) {\n\t\t\titem.setDate(DateUtil.parse(dateField.getText()));\n\t\t\titem.setCategory(categoryField.getSelectionModel().getSelectedItem());\n\t\t\titem.setUse(useField.getText());\n\t\t\t\n\t\t\tString textBefore = amountField.getText();\n\t\t\tString textAfter = null;\n\t\t\tif(textBefore.contains(\",\")) {\n\t\t\t\ttextAfter = textBefore.replace(\",\", \".\");\n\t\t\t} else {\n\t\t\t\ttextAfter = textBefore;\n\t\t\t}\n\t\t\titem.setAmount(Double.parseDouble(textAfter));\n\t\t\titem.setDistributionKind(distributionKindField.getText());\n\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "@Override\n public JButton get_default_button()\n {\n return BT_OK;\n }", "public void okPressed() {\r\n\t\t\r\n\t\tif (albumname.getText().trim().toString().equals(\"\")) {\r\n\t\t\t\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Error\");\r\n\t\t\talert.setContentText(\"Must enter an album name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\r\n\t\tString albumName = albumname.getText().trim().toString();\r\n\t\t\r\n\t\tif (checkForDuplicateAlbumNames(albumName)==true) {\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Duplicate Names\");\r\n\t\t\talert.setContentText(\"An album already has that name. \\n Enter a new name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tAlbum newalbum = new Album(albumName);\r\n\t\tAlbumsController.getCurrentUser().addAlbumToUser(newalbum);\r\n\t\tLoginController.saveData(LoginController.users);\r\n\t\t\r\n\t\t\r\n\t\t//go to albums controller and load corresponding fxml\r\n\t\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Albums.fxml\"));\r\n\t\t\t\ttry{\r\n\t\t\t\t\tParent parent = (Parent) loader.load();\r\n\t\t\t\t\tAlbumsController controller = loader.<AlbumsController>getController();\r\n\t\t\t\t\tScene scene = new Scene(parent);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// ok is the button pressed action event\r\n\t\t\t\t\tStage stage = (Stage) ((Node) ok).getScene().getWindow();\r\n\t\t\t\t\tcontroller.start(stage,AlbumsController.getCurrentUser());\r\n\t\t\t\t\tstage.setScene(scene);\r\n\t\t\t\t\tstage.centerOnScreen();\r\n\t\t\t\t\tstage.show();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception exception) {\r\n\t\t\t\t\texception.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "private RButton getOkButton() {\n if (okButton == null) {\n okButton = new RButton();\n okButton.setText(\"<%= ivy.cms.co(\\\"/Buttons/ok\\\") %>\");\n okButton.setName(\"okButton\");\n }\n return okButton;\n }", "private JButton getOkButton() {\n\t\tif (okButton == null) {\n\t\t\tokButton = new JButton();\n\t\t\tokButton.setText(\"OK\");\n\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tdoOK();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okButton;\n\t}", "public static void okButtonAction(ActionContext actionContext){\n World world = World.getInstance();\n Thing form = actionContext.getObject(\"form\");\n Shell shell = actionContext.getObject(\"shell\");\n \n Thing dataObject = world.getThing(\"xworker.app.test.dataObject.thing.Sex\");\n form.doAction(\"setDataObject\", actionContext, \"dataObject\", dataObject);\n shell.pack();\n }", "public void enableOkButton() {\n okButton.setEnabled(true);\n }", "private JButton getJButtonOK() {\r\n\t\tif (jButtonOK == null) {\r\n\t\t\tjButtonOK = new JButton();\r\n\t\t\tjButtonOK.setText(BOTONCREAR);\r\n\t\t\tjButtonOK.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tcambiarPass();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonOK;\r\n\t}", "private JButton getOkButton() {\n if (okButton == null) {\n okButton = new JButton();\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n canceled = false;\n dispose();\n }\n });\n }\n return okButton;\n }", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n \temployee.setId(Integer.parseInt(idLabel.getText()));\r\n \temployee.setFirstName(firstNameField.getText());\r\n \temployee.setLastName(lastNameField.getText());\r\n \temployee.setIndustry(industryField.getText());\r\n \temployee.setWorkType(workTypeField.getText());\r\n \temployee.setAddress(addressField.getText());\r\n \t\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "public void actionPerformed(ActionEvent e) {\n\t\toptionPane.setValue(okString);\n\t}", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Pressed OK\",\n Toast.LENGTH_SHORT).show();\n }", "void ShowOkDialog(String title, String message, OnClickListener listener);", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "private JButton getOkButton() {\r\n\t\tif (okButton == null) {\r\n\t\t\ttry {\r\n\t\t\t\tokButton = new JButton();\r\n\t\t\t\tokButton.setText(\"OK\");\r\n\t\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t} catch (java.lang.Throwable e) {\r\n\t\t\t\t// TODO: Something\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn okButton;\r\n\t}", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t\t}", "private JButton getJButtonOK() {\r\n\t\tif (jButtonOK == null) {\r\n\t\t\tjButtonOK = new JButton();\r\n\t\t\tjButtonOK.setBounds(new Rectangle(40, 215, 90, 30));\r\n\t\t\tjButtonOK.setText(\"确定\");\r\n\t\t\tjButtonOK.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tjColorChooser.setVisible(false);\r\n\t\t\t\t\tchooserColor = color;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonOK;\r\n\t}", "protected boolean hasPositiveButton() {\n return false;\n }", "@FXML\n private void handleOk() {\n System.out.println(\"handleOk AdresEditController\");\n if (isInputValid()) {\n //aby udalo sie select\n adres.setPrev_adres_id(adres.getAdres_id());\n\n adres.setAdres_id(Integer.parseInt(adres_id_textField.getText()));\n adres.setWojewodztwo(wojewodztwo_textField.getText());\n adres.setMiejscowosc(miejscowosc_textField.getText());\n adres.setUlica(ulica_textField.getText());\n adres.setKraj(kraj_textField.getText());\n adres.setKod_pocztowy(kod_pocztowy_textField.getText());\n\n adres.update();\n\n okClicked = true;\n dialogStage.close();\n }\n }", "public boolean onOkClicked() {\n try {\n if (form.isValid()) {\n String userName = form.getFieldValue(SysUser.USER_NAME_PROPERTY);\n String userAccount = form.getFieldValue(SysUser.USER_ACCOUNT_PROPERTY);\n String passWord = form.getFieldValue(SysUser.USER_PASSWORD_PROPERTY);\n String cPassWord = form.getFieldValue(\"cPassWord\");\n if (!passWord.equals(cPassWord)) {\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setValue(\"\");\n form.getField(\"cPassWord\").setValue(\"\");\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setFocus(true);\n addModel(\"msg\", \"密码不一致\");\n } else if (SysUserDao.getInstance().canCreate(getSysUser().getObjectContext(), userAccount)) {\n if (SysUserDao.getInstance().createSysUser(getSysUser().getObjectContext(), userName, userAccount, passWord)) {\n setRedirect(UserListPage.class);\n } else {\n addModel(\"msg\", \"失败\");\n }\n } else {\n form.getField(SysUser.USER_ACCOUNT_PROPERTY).setFocus(true);\n addModel(\"msg\", \"账号已存在\");\n }\n }\n } catch (Exception e) {\n logger.error(e.getLocalizedMessage(), e);\n }\n return true;\n }", "private void onOK() {\n show.setText(null);\n String s = (new ArithmeticExpressions(text.getText()).checkExpression());\n System.out.println(s);\n show.setText(s);\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t}", "public void ok() {\n btOK().push();\n }", "@Override\r\n\tprotected void okPressed() {\r\n\t\tcomputeResult();\r\n\t\tObject obj[] = getResult();\r\n\t\t\r\n\t\tif (obj != null && obj.length > 0) {\r\n\t\t\tif (ensureXSDTypeNamespaceMappings ( obj[0] ) == false) {\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\thandleAddImport ( obj[0] );\r\n\t\t\t\r\n\t\t\t// only if we have a mapping do we dismiss the dialog\r\n\t\t\tsuper.okPressed();\r\n\t\t}\r\n\t\t\r\n\t}", "private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}", "public void setAsDoneDialog() {\n okButton.setText(\"Done\");\n cancelButton.setVisible(false);\n }", "protected void closeDialogOk() {\n dispose();\n }", "public void clickOnSuccessOkBtn() throws Exception {\r\n\t\r\n\t\t\tclickOnButton(btnOKSuccess);\r\n\t\t\tlog(\"clicked on OK button and object is:-\" + btnOKSuccess.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionListener() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDiagnosticChain diagnosticChain = new BasicDiagnostic();\n\t if (isValid(diagnosticChain)) {\n\t \t okFlag = true;\n\t\t okPressed();\n\t\t }else{\n\t\t \t Message messageDialog = new Message(EditTask.this.getShell());\n\t\t \t messageDialog.setMessage(Util.getErrorMessage(diagnosticChain));\n\t\t \t messageDialog.open();\n\t\t }\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t});\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t}", "public void confirmStudentUpdate(){\n\n String title =\"Confirm student information update\";\n String HeaderText = \"Confirm inserted data\";\n String ContentText = \"Are you sure you want to update this student's information?\";\n\n AlertHandler ah = new AlertHandler();\n\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n updateStudent();\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }", "private JButton getOkButton() {\r\n\t\tif (okButton == null) {\r\n\t\t\tokButton = new JButton();\r\n\t\t\tokButton.setText(\"OK\");\r\n\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() { \r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdouble minValue = Double.parseDouble(minTextField.getText());\r\n\t\t\t\t\t\tdouble maxValue = Double.parseDouble(maxTextField.getText());\r\n\t\t\t\t\t\tif (minValue <= maxValue) {\r\n\t\t\t\t\t\t\tif (mode == RULES_BASIS_SUPPORT_MODE) {\r\n\t\t\t\t\t\t\t\tif (minValue >= rulesBasis.getMinSupport() && maxValue <= rulesBasis.getMaxSupport()) {\r\n\t\t\t\t\t\t\t\t\tnew TableVisualization(\r\n\t\t\t\t\t\t\t\t\t\t\trulesBasis.filterRulesBySupport(minValue, maxValue), relCtxEd);\r\n\t\t\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\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\telse if (mode == RULES_BASIS_CONFIDENCE_MODE) {\r\n\t\t\t\t\t\t\t\tif (minValue >= rulesBasis.getMinConfidence() && maxValue <= rulesBasis.getMaxConfidence()) {\r\n\t\t\t\t\t\t\t\t\tnew TableVisualization(\r\n\t\t\t\t\t\t\t\t\t\t\trulesBasis.filterRulesByConfidence(minValue, maxValue), relCtxEd);\r\n\t\t\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\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\telse if (mode == INTENTS_BASIS_SUPPORT_MODE) {\r\n\t\t\t\t\t\t\t\tif (minValue >= intentsBasis.getMinSupport() && maxValue <= intentsBasis.getMaxSupport()) {\r\n\t\t\t\t\t\t\t\t\tnew IntentsTableVisualization(\r\n\t\t\t\t\t\t\t\t\t\t\tintentsBasis.filterIntentsBySupport(minValue, maxValue), relCtxEd);\r\n\t\t\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\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} else {\r\n\t\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (NumberFormatException ex) {\r\n\t\t\t\t\t\tDatabaseFunctions.showMessageDialog(\"Incorrect values\");\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 okButton;\r\n\t}", "@Test\n\tpublic void testClickOnOkayButton() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getOkayButton().click();\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputApplied();\n\t}", "public void setOk() {\n underline.setSelected(false);\n bold.setSelected(false);\n italics.setSelected(false);\n Ok.setSelected(true); /*FAULT:: Ok.setSelected(false); */\n }", "public JButtonOperator btOK() {\n if (_btOK==null) {\n _btOK = new JButtonOperator(this, Bundle.getStringTrimmed(\"org.openide.Bundle\", \"CTL_OK\"));\n }\n return _btOK;\n }", "@FXML private void okButtonActivity() {\n if (activeUser != null && !activeUser.getUsername().equals(recipe.getAuthor())){\n okButton.setDisable(false);\n }\n }", "private void mIesireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mIesireActionPerformed\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa parasiti aplicatia?\", \"Confirmare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "@FXML\n\tprivate void handleOk(){\n\t\tif(isInputValid()){\n\t\t\tproduct.setName(nameField.getText());\n\t\t\tproduct.setAmountAvailable(Integer.parseInt(amountAvailableField.getText()));\n\t\t\tproduct.setAmountSold(Integer.parseInt(amountSoldField.getText()));\n\t\t\tproduct.setPriceEach(Integer.parseInt(priceEachField.getText()));\n\t\t\tproduct.setPriceMake(Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints and then subtracts\n\t\t\tproduct.setProfit(Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints, subtracts, and then multiplies\n\t\t\tproduct.setMoney((Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()))*Integer.parseInt(amountSoldField.getText()));\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\t\n\t\t}\n\t}", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n video.setName(nameField.getText());\r\n video.setUrl(urlField.getText());\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "private JButton addOKButton(){\n\t\tJButton okButton = new JButton(\"OK\");\n\t\tokButton.addActionListener(arg0 -> {\n\t\t\tinfo = new ChannelInfo(nameT.getText(), passwordT.getText(), null);\n\t\t\tsetVisible(false);\n\t\t});\n\t\treturn okButton;\n\t}", "private JButton addOKButton(String actionCommand) {\n JButton button = new JButton(\"OK\");\n button.setActionCommand(\"OK \" + actionCommand);\n return button;\n }", "public void handleYesConfirmButtonAction(ActionEvent event) {\n if (updateItemPane.isVisible()){\n deleteItem();\n this.clearUpdateItemFields();\n }\n else if(updateCopyPane.isVisible()){\n deleteCopy();\n this.clearUpdateCopyFields();\n }\n maskPane.setVisible(false);\n confirmPane.setVisible(false);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this\");\n }", "@Override\r\n public String getOKTitle() {\r\n return \"Set\";\r\n }", "private void btnConfirmActionPerformed(java.awt.event.ActionEvent evt) {\n }" ]
[ "0.8289567", "0.79705924", "0.7943569", "0.7880943", "0.78112847", "0.7763558", "0.77170193", "0.7713041", "0.76869285", "0.7480628", "0.7370619", "0.73628557", "0.7301772", "0.7245243", "0.72159374", "0.7195927", "0.7192628", "0.7184463", "0.71680266", "0.7156288", "0.712935", "0.7128986", "0.7124116", "0.7097147", "0.70485926", "0.7047017", "0.7046414", "0.7036932", "0.7027412", "0.70121807", "0.7003297", "0.7003297", "0.7003297", "0.7003297", "0.7001622", "0.6998426", "0.69820595", "0.69820595", "0.69820595", "0.69820595", "0.69820595", "0.6978361", "0.69613665", "0.6952026", "0.6946656", "0.6946656", "0.6934032", "0.6932079", "0.6931196", "0.6912903", "0.6906803", "0.68740094", "0.6868428", "0.6867579", "0.6862089", "0.68600404", "0.68564284", "0.6851922", "0.6850983", "0.68362254", "0.6829746", "0.68233436", "0.6795512", "0.6787263", "0.67678547", "0.67636776", "0.6762885", "0.6759987", "0.6736813", "0.67214125", "0.67035705", "0.6698299", "0.6696479", "0.669516", "0.6683939", "0.66525614", "0.6629194", "0.66204906", "0.6613841", "0.6611864", "0.6611685", "0.66088253", "0.66004586", "0.6599236", "0.65838885", "0.65753216", "0.6571697", "0.6566993", "0.65642047", "0.65489763", "0.65350467", "0.65299773", "0.6524191", "0.6517562", "0.65129554", "0.6489685", "0.6480665", "0.64804417", "0.6471251", "0.6460976", "0.6455026" ]
0.0
-1
Setzt die Weckzeit, wird von abfrageFenster aufgerufen.
public void setTime(Date date) { this.wecker = date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setzeSchiffe() {\n\t\tthis.setzeSchiffe = true;\n\t}", "public void setWuerfel(Wuerfel wuerfel) {\n\t\tif(wuerfel==null){\n\t\t\tthrow new RuntimeException(\"Es muss ein wuerfel geben! \");\n\t\t}\n\t\tthis.wuerfel = wuerfel;\n\t}", "public void setzeAllePunkteanzeigenSichtbar() \n {\n anzeige.punkteLinksSichtbarSetzen( true );\n anzeige.punkteRechtsSichtbarSetzen( true );\n }", "public void setzeNurRechtePunkteanzeigeSichtbar() \n {\n anzeige.punkteLinksSichtbarSetzen( false );\n anzeige.punkteRechtsSichtbarSetzen( true );\n }", "public void setzeAllePunkteanzeigenUnsichtbar() \n {\n anzeige.punkteLinksSichtbarSetzen( false );\n anzeige.punkteRechtsSichtbarSetzen( false );\n }", "@Override\n\tpublic void setLinienFarbe(Farbe farbe) {\n\n\t}", "public void farbeSetzen(String farbe) {\r\n\t\t//farbeSetzen(zuFarbeKonvertieren(farbe));\r\n\t}", "public void setzeNurLinkePunkteanzeigeSichtbar() \n {\n anzeige.punkteLinksSichtbarSetzen( true );\n anzeige.punkteRechtsSichtbarSetzen( false );\n }", "public void setFarbe(FarbEnum farbe) {\n\t\tif(farbe==null){\n\t\t\tthrow new RuntimeException(\"Waehle eine Farbe !\");\n\t\t}\n\t\tthis.farbe = farbe;\n\t}", "public void setzeEigenenStein(int spielzug){\t\t\n\t\t//Setze eigenen Stein\n\t\tfor(int i=0; i<6; i++) {\n\t\t\tif(spielfeld[spielzug][i].equals(\"_\")){\n\t\t\t\tspielfeld[spielzug][i] = eigenerStein;\n\t\t\t\teigenerPunkt.setLocation(spielzug, i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\n\t}", "@Override\n\tpublic void setFuellFarbe(Farbe farbe) {\n\n\t}", "public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}", "public void setzePunkteanzeigeRechts( int neuerPunktestand ) \n {\n anzeige.punkteRechtsSetzen( neuerPunktestand );\n }", "public void setzePunkteanzeigeFarbe( String farbe ) \n { \n anzeige.setzeFarbePunktestand( farbe ); \n }", "public void set()\n\t{\n\t\tbitHolder.setValue(1);\n\t}", "@Override\n\tpublic void setTow(float tow) {\n\t\t\n\t}", "public void setzeGegnerStein(int gegnerZug){\t\n\t\t//Falls eigener Agent startet wird -1 uebergeben\n\t\tif(gegnerZug >= 0){\t\t\t\t\n\t\t\tfor(int i=0; i<6; i++) {\n\t\t\t\tif(spielfeld[gegnerZug][i].equals(\"_\")){\n\t\t\t\t\tspielfeld[gegnerZug][i] = gegnerStein;\n\t\t\t\t\tgegnerPunkt.setLocation(gegnerZug, i);\n\t\t\t\t\tbreak;\n\t\t\t\t} //end if\n\t\t\t} //end for\t\t\t\t\n\t\t} \t\t\n\t}", "public void steuern() {\n\t\teinlesenUndInitialisieren();\n\t\tausgabe();\n\t}", "public MaschinenVerwaltung() {\r\n setMaschinenListe();\r\n setEinKopfMaschinenListe();\r\n setZweiBisAchtKopfMaschine();\r\n setZehnUndMehrKopfMaschine();\r\n }", "public void besetze(int spalte, int spieler)\n\t{\n\t\tswitch (spalte)\n\t\t{\n\t\tcase 0:\n\t\t\t_spalte0 = spieler;\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\t_spalte1 = spieler;\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\t_spalte2 = spieler;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tthrow new IllegalArgumentException(String.valueOf(spalte));\n\t\t}\n\t}", "@Override\r\n\tpublic void setHelbidea(String helbidea) {\n\t\tsuper.setHelbidea(helbidea);\r\n\t}", "public void set(int index, Object wert) {\r\n\t\t// Das Element an der Stelle index \r\n\t\t//soll auf den Wert wert gesetzt werden\r\n\t\tgeheim[index] = wert;\r\n\t}", "public void setFhBezeichnung(String fhBezeichnung) {\n\t\tthis.fhBezeichnung = fhBezeichnung;\n\t}", "@Override\n public void aktion(Hauptobjekt h) {\n System.out.println(\"Hin\");\n h.setAktuellerZustand(new ZweiterZustand());\n }", "private void setupSpalteAnzMitarbeiter() {\r\n\t\t// legt fest, welches Attribut von Arbeitspaket in dieser Spalte angezeigt wird\r\n\t\tspalteAnzMitarbeiter.setCellValueFactory(new PropertyValueFactory<>(\"mitarbeiteranzahl\"));\r\n\r\n\t\t// lässt die Zelle mit Hilfe der Klasse EditCell bei Tastatureingabe bearbeitbar\r\n\t\t// machen\r\n\t\tspalteAnzMitarbeiter.setCellFactory(\r\n\t\t\t\tEditCell.<ArbeitspaketTableData, Integer>forTableColumn(new MyIntegerStringConverter()));\r\n\r\n\t\t// überschreibt den alten Attributwert mit der User-Eingabe\r\n\t\tspalteAnzMitarbeiter.setOnEditCommit(event -> {\r\n\t\t\tfinal Integer value = event.getNewValue() != null ? event.getNewValue() : event.getOldValue();\r\n\t\t\tevent.getTableView().getItems().get(event.getTablePosition().getRow()).setMitarbeiteranzahl(value);\r\n\t\t\ttabelle.refresh();\r\n\t\t});\r\n\t}", "public void setzeHintergrundgrafik( String pfad ) \n {\n ea.edu.FensterE.getFenster().hintergrundSetzen( new Bild(0,0,pfad) );\n }", "public void setFsk(int fsk) throws FilmDatenException \r\n\t{\r\n\t\tif(fsk == 0) this.fsk = fsk;\r\n\t\telse if (fsk == 6) this.fsk = fsk;\r\n\t\telse if (fsk == 12) this.fsk = fsk;\r\n\t\telse if (fsk == 16) this.fsk = fsk;\r\n\t\telse if (fsk == 18) this.fsk = fsk;\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Fehler!!! in setFSK \"+\"Der Wert: \"+fsk+\" ist kein Gültigerwert\");\r\n\t\t\tthrow new FilmDatenException();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}", "@Override\r\n\tpublic void setUw(UnitWorks uw) {\n\t\t\r\n\t}", "private void setupSpalteAufwand() {\r\n\t\t// legt fest, welches Attribut von Arbeitspaket in dieser Spalte angezeigt wird\r\n\t\tspalteAufwand.setCellValueFactory(new PropertyValueFactory<>(\"aufwand\"));\r\n\r\n\t\t// lässt die Zelle mit Hilfe der Klasse EditCell bei Tastatureingabe bearbeitbar\r\n\t\t// machen\r\n\t\tspalteAufwand.setCellFactory(\r\n\t\t\t\tEditCell.<ArbeitspaketTableData, Integer>forTableColumn(new MyIntegerStringConverter()));\r\n\r\n\t\t// überschreibt den alten Attributwert mit der User-Eingabe\r\n\t\tspalteAufwand.setOnEditCommit(event -> {\r\n\t\t\tfinal Integer value = event.getNewValue() != null ? event.getNewValue() : event.getOldValue();\r\n\t\t\tevent.getTableView().getItems().get(event.getTablePosition().getRow()).setAufwand(value);\r\n\t\t\ttabelle.refresh();\r\n\t\t});\r\n\t}", "protected void aktualisierenFirst() {\r\n\t\taktualisieren();\r\n\t\tfarbeSetzen(\"Weiss\");\r\n\t}", "private void set(){\n resetBuffer();\n }", "public void setFilial(int filial);", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "public void setdat()\n {\n }", "public RuimteFiguur() {\n kleur = \"zwart\";\n }", "private void setupSpalteFez() {\r\n\t\t// legt fest, welches Attribut von Arbeitspaket in dieser Spalte angezeigt wird\r\n\t\tspalteFez.setCellValueFactory(new PropertyValueFactory<>(\"fez\"));\r\n\r\n\t\t// lässt die Zelle mit Hilfe der Klasse EditCell bei Tastatureingabe bearbeitbar\r\n\t\t// machen\r\n\t\tspalteFez.setCellFactory(\r\n\t\t\t\tEditCell.<ArbeitspaketTableData, Integer>forTableColumn(new MyIntegerStringConverter()));\r\n\r\n\t\t// überschreibt den alten Attributwert mit der User-Eingabe\r\n\t\tspalteFez.setOnEditCommit(event -> {\r\n\t\t\tfinal Integer value = event.getNewValue() != null ? event.getNewValue() : event.getOldValue();\r\n\t\t\tevent.getTableView().getItems().get(event.getTablePosition().getRow()).setFez(value);\r\n\t\t\ttabelle.refresh();\r\n\t\t});\r\n\t}", "public void initialisieren(String neuerName, int neuesAlter, float neuesGewicht, String neuesUrsprungsland, boolean neuGefaehrlich) {\n // deshalb kann man hier auch ohne super arbeiten\n initialisieren(\"Affe\", neuerName, neuesAlter, neuesGewicht, neuesUrsprungsland, neuGefaehrlich);\n }", "public FarenheitToCelsiusMethod_Request_FromCode setFahrenheit(int fahrenheit) {\n\t\tgetRoot().element(\"Fahrenheit\")\n\t\t\t\t.text(Integer.toString(fahrenheit));\n\t\treturn this;\n\t}", "public void setzePosition(Position neuePosition)\n {\n if(position != null) {\n feld.raeumen(position);\n }\n position = neuePosition;\n feld.platziere(this, neuePosition);\n }", "public final void setFuelUpgrade(int fuelUp){fuelUpgrade = fuelUp;}", "public void erzaehlWas() {\n // Das Gleiche was jedes Tier sagt.\n super.erzaehlWas();\n\n // Zusaetzliche Aussage des Affen\n System.out.println(\"Affen sind einfach die besten Tiere.\");\n }", "public final void setFuel(int f) {\n fuel = f;\n }", "public void setZeitstempel(Timestamp zeitstempel) {\n\t\tthis.zeitstempel = zeitstempel;\n\t}", "protected void setToDefault(){\n\n\t}", "@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}", "protected void setFitness(float fit)\t{\tfitness = fit;\t\t}", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "public void setBeheerder(boolean beheerder) {\n\t\tthis.beheerder = beheerder;\n\t}", "private void setupSpalteFaz() {\r\n\t\t// legt fest, welches Attribut von Arbeitspaket in dieser Spalte angezeigt wird\r\n\t\tspalteFaz.setCellValueFactory(new PropertyValueFactory<>(\"faz\"));\r\n\r\n\t\t// lässt die Zelle mit Hilfe der Klasse EditCell bei Tastatureingabe bearbeitbar\r\n\t\t// machen\r\n\t\tspalteFaz.setCellFactory(\r\n\t\t\t\tEditCell.<ArbeitspaketTableData, Integer>forTableColumn(new MyIntegerStringConverter()));\r\n\r\n\t\t// überschreibt den alten Attributwert mit der User-Eingabe\r\n\t\tspalteFaz.setOnEditCommit(event -> {\r\n\t\t\tfinal Integer value = event.getNewValue() != null ? event.getNewValue() : event.getOldValue();\r\n\t\t\tevent.getTableView().getItems().get(event.getTablePosition().getRow()).setFaz(value);\r\n\t\t\ttabelle.refresh();\r\n\t\t});\r\n\t}", "public void setElement(WebElement element) {\n\t\t\r\n\t}", "public void set(String toSet) throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Setting \" + this + \" to \" + toSet);\n\t\t\n\t\twaitForElement().click();\n\t\tVoodooUtils.pause(1000);\n\t\tVoodooUtils.focusWindow(1);\n\t\tnew VoodooControl(\"a\", \"XPATH\", \"//a[contains(text(), '\" + toSet + \"')]\").click();\n\t\tVoodooUtils.focusWindow(0);\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t}", "public void setEntfernung(float entf)\r\n\t{\r\n\t\tthis.entfernung=entf;\r\n\t}", "protected void zetPassagierInTrein(Reiziger passagier, Trein trein) {\r\n trein.setPassagier(passagier);\r\n }", "public void loescheEintrag() {\n\t\tzahl = 0;\n\t\tistEbenenStart = false;\n\t}", "public void azzera() { setEnergia(0.0); }", "private void setzeBeschriftungen(){ \t\t\t\n\t\tif (jRBtnLinie.isSelected()) {\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// wenn linie gewählt ist: ..\n\t\t\tjLPositionX1.setText(\"Startpunkt x:\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// .. verschiedene labels für die textfelder anpassen für parameter-werte (x1,y1,x2,y2) [y1 bleibt immer gleich]\n\t\t\tjLPositionX2.setText(\"Endpunkt x:\");\n\t\t\tjLPositionY2.setText(\" y:\");\n\t\t} else {\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// wenn rechteck, oval, kreis:..\n\t\t\tjLPositionX1.setText(\"Position x:\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ... labels anpassen auf parameter-werte (x1, y1, breite, höhe) [y1 bleibt immer gleich]\t\t\t\t\n\t\t\tjLPositionX2.setText(\"Breite:\");\n\t\t\tjLPositionY2.setText(\"Höhe:\");\n\t\t}\n\t}", "@Override\r\n\tpublic void benachrichtigeBeobachter() {\n\t\tfor (int i = 0; i < beobachter.size(); i++) {\r\n\t\t\tBeobachter b = (Beobachter)beobachter.get(i);\r\n\t\t\tb.aktualisieren(temperatur, feuchtigkeit, luftdruck);\r\n\t\t}\r\n\t}", "public void setMitarbeiter(TreeMap<Integer, Mitarbeiter> mitarbeiter)\r\n\t{\r\n\tthis.mitarbeiter = mitarbeiter;\r\n\t}", "void setAnzahlVerkauft(String anzahlVerkauft);", "public FilialeVerkaufenEntscheidung(Unternehmenskette kette, Filiale filiale) {\r\n\t\tsuper(kette);\r\n\t\tthis.filiale = filiale;\r\n\t\tnew MitarbeiterEntlassenEntscheidung(kette, filiale, filiale.holeMitarbeiter());\r\n\t}", "public void setBunga(int tipeBunga){\n }", "public final void setFriday(final TimeSlot friday) {\n this.friday = friday;\n }", "public void setzePunkteanzeigeLinks( int neuerPunktestand ) \n {\n anzeige.punkteLinksSetzen( neuerPunktestand );\n }", "@Override\n public void setWeight(double w) {\n this.weight = w;\n\n }", "public void verarbeite() {\n\t\t\r\n\t}", "public void setW(boolean w) {\n\tthis.w = w;\n }", "public void setLetztesErgebnis(Spiel letztesErgebnis) {\n this.letztesErgebnis = letztesErgebnis;\n }", "public void setFE(int newFE){\n this._FE=newFE;\n }", "private void setWeight(float weight){\n this.weight = weight;\n }", "private void sterben()\n {\n lebendig = false;\n if(position != null) {\n feld.raeumen(position);\n position = null;\n feld = null;\n }\n }", "public void setZweck(String zweck) throws RemoteException;", "@Override\n\tpublic void setWaterBill(int waterBill) {\n\t}", "public void fjernAlle() {\n listehode.neste = null;\n antall = 0;\n }", "public final void setZicht(java.math.BigDecimal zicht)\n\t{\n\t\tsetZicht(getContext(), zicht);\n\t}", "public void setFhBeschreibung(String fhBeschreibung) {\n\t\tthis.fhBeschreibung = fhBeschreibung;\n\t}", "@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}", "public void setStueck(int stueckNeu) {\r\n\t\tstueck = stueckNeu;\r\n\t}", "public void setWaist(double waist) {\n this.waist = waist;\n }", "public void setToDefualts(){\n\t\tchangeInPlayerHealth = 0;\n\t\tchangeInPlayerScore = 0;\n\t\tchangInBatteryCharge = 0;\n\t\tpuaseForAnimation = false;\n\t}", "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}", "@Override\n\tpublic void setRestaurant(RestaurantChung restaurant) {\n\t\t\n\t}", "public void setWaterFee(Integer waterFee) {\n this.waterFee = waterFee;\n }", "void setPassedHabit(Habit passedHabit);", "public void SetWealth(int w)\n{\n\twealth=w;\n}", "@Override\n\tpublic void verkaufen() {\n\t\tif( (bestand - abgenommeneMenge) < 0)\n\t\t\tthis.setBestand(0);\n\t\telse\n\t\t\tthis.setBestand(this.getBestand() - abgenommeneMenge);\n//\t\tSystem.out.println(\"Bestand danach:\" + bestand);\n\t}", "public void besucherZuordnen(Spieler besucher) {\n\t\tboolean hinsetzen = false;\n\t\twhile (!hinsetzen) {\n\t\t\tfor (Tisch it : this.tische) {\n\t\t\t\tif (it.AnzahlTeilnehmer() < 8) {\n\t\t\t\t\tit.hinsetzen(besucher);\n\t\t\t\t\tbesucher.setTischNr(this.tische.indexOf(it));\n\t\t\t\t\tbesucher.setCasino(this);\n\t\t\t\t\tit.getDealer().setCasino(this);\n\t\t\t\t\thinsetzen = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!hinsetzen) {\n\t\t\t\ttischAufstellen(new Tisch());\n\t\t\t}\n\t\t}\n\t}", "public synchronized void bearbeiten(int artikelnummer, double preis, String bezeichnung) throws ArtikelExistiertNichtException{\n\t\tArtikel artikel = getArtikel(artikelnummer);\n\t\tartikel.setPreis(preis);\n\t\tartikel.setBezeichnung(bezeichnung);\n\t}", "public void liftUp(){\n set(m_defaultLiftSpeedUp);\n }", "@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\r\n\tpublic void verteidigen(Lebewesen lebewesen) {\n\t}", "public SPIEL( int breite , int hoehe , boolean punkteLinks , boolean punkteRechts , boolean maus ) \n {\n //Zaehler fuer Tick, Tack, ...\n zaehler = 0;\n anzeige = new AnzeigeE( breite , hoehe );\n //animationsManager = AnimationsManager.getAnimationsManager();\n \n //Punkteanzeige\n anzeige.punkteLinksSichtbarSetzen( punkteLinks );\n anzeige.punkteRechtsSichtbarSetzen( punkteRechts );\n \n //Maus ggf. aktivieren\n if ( maus ) \n {\n anzeige.klickReagierbarAnmelden( this , true );\n }\n \n //Tastatur\n anzeige.tastenReagierbarAnmelden( this );\n \n //Ticker\n //Alle 500 Millisekunden (=Jede halbe Sekunde) ein Tick\n //anzeige.tickerAnmelden(this, 500); \n }", "public void set(boolean bol);", "public final void setHavaitutFrekvenssit(final int[] frekvenssit) {\r\n this.havaitutFrekvenssit = frekvenssit;\r\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void setDefilade(int defiladeState);", "public void setEnqueteur(Enqueteur enqueteur)\r\n/* */ {\r\n/* 65 */ this.enqueteur = enqueteur;\r\n/* */ }", "@Override\r\n\tpublic void setWeight(double weight) {\n\t\t\r\n\t}", "public void setWeight(int w){\n\t\tweight = w;\n\t}", "public void setToDefault();", "public final void set () {\t\n\t\tsymbol = null;\t\n\t\tmksa = underScore; factor = 1;\n\t\tvalue = 0./0.;\t\t\t// NaN\n\t\toffset = 0.;\n\t}" ]
[ "0.6999611", "0.6960267", "0.6749578", "0.6558269", "0.6521861", "0.642283", "0.6422199", "0.6406374", "0.6388972", "0.6242343", "0.62296915", "0.6221031", "0.6220616", "0.6132489", "0.61188185", "0.6118753", "0.60286134", "0.5947308", "0.5942495", "0.59421295", "0.59129286", "0.5901091", "0.5898963", "0.58892226", "0.5861022", "0.58280885", "0.58251417", "0.582143", "0.58082426", "0.57801723", "0.5771564", "0.57642186", "0.57555854", "0.57498115", "0.573696", "0.57255894", "0.57111526", "0.5678998", "0.5676236", "0.56743014", "0.56643784", "0.5664069", "0.56503576", "0.5650292", "0.5649262", "0.5645913", "0.5636814", "0.5636742", "0.563428", "0.5630183", "0.5623677", "0.5617061", "0.5607276", "0.5605528", "0.5596085", "0.55913013", "0.5590003", "0.558198", "0.5567724", "0.5551882", "0.55513513", "0.5546562", "0.5539325", "0.5538299", "0.5535556", "0.55282503", "0.5520574", "0.55124587", "0.55056936", "0.5502354", "0.54997087", "0.54922956", "0.54892814", "0.54784346", "0.54744923", "0.54715455", "0.5471436", "0.54667217", "0.5459534", "0.54551965", "0.5444311", "0.54433805", "0.5443241", "0.5436778", "0.54352474", "0.54322743", "0.54321104", "0.5430462", "0.54262984", "0.54235476", "0.541929", "0.5418734", "0.5416995", "0.53986907", "0.53984314", "0.5397004", "0.5390896", "0.5384983", "0.5383227", "0.53780764", "0.53745395" ]
0.0
-1
Erstellt ein JPopMenu mit zwei Items: "Info", "Beenden"
public void popMenu() { this.menu = new JPopupMenu(); menu.setLocation(jf.getLocation()); this.beenden = new JMenuItem("Beenden"); this.info = new JMenuItem("Info"); menu.add(beenden); beenden.addActionListener(new ActionListener() { // vergleicht ob gleiches Objekt, bei ActionEvent fuer Beenden @Override public void actionPerformed(ActionEvent e) { if (e.getSource() == beenden) { System.exit(0); } } }); menu.add(info); info.addActionListener(new ActionListener() { //vergleicht ob gleiches Objekt, ActionEvent fuer Info @Override public void actionPerformed(ActionEvent e) { if (e.getSource() == info) { menu.setVisible(false); JOptionPane .showMessageDialog(null, "Dies ist eine Uhr mit einstellbaren Wecker\nVersion 1.0"); } } }); menu.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displaySelectedItemPopin(final Entity item) {\n\t\tif (selectedItemPopin == null) {\n\t\t\tselectedItemPopin = new Table();\n//\t\t\tselectedItemPopin.setDebug(true);\n\n\t\t\t// Add an empty click listener to capture the click so that the InputSingleton doesn't handle it\n\t\t\tselectedItemPopin.setTouchable(Touchable.enabled);\n\t\t\tselectedItemPopin.addListener(new ClickListener() {});\n\t\t\t\n\t\t\t// Place the popin and add the background texture\n\t\t\tselectedItemPopin.setPosition(GameScreen.SCREEN_W/2, GameScreen.SCREEN_H/2);\n\t\t\tNinePatchDrawable ninePatchDrawable = new NinePatchDrawable(SceneAssets.popinNinePatch);\n\t\t\tselectedItemPopin.setBackground(ninePatchDrawable);\n\t\t\t\n\t\t\tselectedItemPopin.align(Align.top);\n\t\t\t\n\t\t\t// 1 - Title\n\t\t\titemTitle = new Label(\"Title\", PopinService.hudStyle());\n\t\t\tselectedItemPopin.add(itemTitle).top().align(Align.top).pad(20, 0, 20, 0);\n\t\t\tselectedItemPopin.row().align(Align.center);\n\t\t\t\n\t\t\t// 2 - Description\n\t\t\titemDesc = new Label(\"Description\", PopinService.hudStyle());\n\t\t\titemDesc.setWrap(true);\n\t\t\tselectedItemPopin.add(itemDesc).growY().width(900).left().pad(0, 20, 0, 20);\n\t\t\tselectedItemPopin.row();\n\t\t\t\n\t\t\t// 3 - Action buttons\n\t\t\tTable buttonTable = new Table();\n\t\t\t\n\t\t\t// 3.1 - Close button\n\t\t\tfinal TextButton closeBtn = new TextButton(\"Close\",PopinService.buttonStyle());\t\t\t\n\t\t\t// continueButton listener\n\t\t\tcloseBtn.addListener(new ChangeListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t\t\thideSelectedItemPopin();\n\t\t\t\t}\n\t\t\t});\n\t\t\tbuttonTable.add(closeBtn).pad(0, 20,0,20);\n\t\t\t\n\t\t\tselectedItemPopin.add(buttonTable).pad(20, 0, 20, 0);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfinal ItemComponent itemComponent = Mappers.itemComponent.get(item);\n\t\t\n\t\t// Update the content\n\t\titemTitle.setText(itemComponent.getItemLabel());\n\t\titemDesc.setText(itemComponent.getItemDescription());\n\t\t\n\t\t// Place the popin properly\n\t\tselectedItemPopin.pack();\n\t\tselectedItemPopin.setPosition(GameScreen.SCREEN_W/2 - selectedItemPopin.getWidth()/2, GameScreen.SCREEN_H/2 - selectedItemPopin.getHeight()/2);\n\t\n\t\tthis.stage.addActor(selectedItemPopin);\n\t}", "private void addMenuItems() {\n PopupMenu popup = new PopupMenu();\n MenuItem defaultItem = new MenuItem(\"Exit\");\n \n defaultItem.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n System.out.println(\"Exiting...\");\n System.exit(0);\n }\n });\n \n popup.add(defaultItem);\n \n this.trayicon.setPopupMenu(popup);\n }", "public void createItemListPopupMenu() {\n\n\t\tremoveAll();\n\t\tadd(addMenuItem);\n\t\tadd(editMenuItem);\n\t\tadd(deleteMenuItem);\n\t\tadd(moveUpMenuItem);\n\t\tadd(moveDownMenuItem);\n\t\taddSeparator();\n\t\tadd(midiLearnMenuItem);\n\t\tadd(midiUnlearnMenuItem);\n\t\taddSeparator();\n\t\tadd(sendMidiMenuItem);\n\t}", "public void addNomesJMenu() {\n List<SaveModel> saveList = SaveDAO.retreveSaveName();\n for (SaveModel s : saveList) {\n savesRecetes.add(new JMenuItem(s.getSaveName()));\n }\n\n }", "public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == info) {\r\n\t\t\t\t\tmenu.setVisible(false);\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\t\t\"Dies ist eine Uhr mit einstellbaren Wecker\\nVersion 1.0\");\r\n\t\t\t\t}\r\n\t\t\t}", "private void popUp() {\n\tpop = new RoomPopUp(this);\n\tnoPopUp = false;\n }", "private void popupModify() {\n\t\tboolean doNotShow = false;\n\t\tif (this instanceof Umlenkrolle && ((Umlenkrolle) this).isFree()) {\n\t\t\tdoNotShow = true;\n\t\t} else if (this instanceof DoppelUmlenkrolle) {\n\t\t\tdoNotShow = true;\n\t\t}\n\t\taufzugschacht.mainFrameShowOptionsFrame(this, doNotShow);\n\t}", "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }", "private void jMenuItemTemasAyudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemTemasAyudaActionPerformed\n JOptionPane.showMessageDialog(this, \"Leer informe\",\n this.getTitle(), JOptionPane.INFORMATION_MESSAGE);\n}", "private void showPopUpMenu() {\n\t\tPopupMenu popup = new PopupMenu(getActivity(), moreButton);\n\t\tpopup.getMenuInflater().inflate(R.menu.popup_menu, popup.getMenu());\n\n\t\tpopup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\n\t\t\t\tif (item.getTitle().equals(\"About\")) {\n\t\t\t\t\tUtils.startActivity(\n\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\tcom.allpoint.activities.tablet.AboutActivity_.class,\n\t\t\t\t\t\t\tfalse, false, false);\n\t\t\t\t} else {\n\t\t\t\t\tshowSettingFrag();\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\tpopup.show();// showing popup menu\n\t}", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tMessageDialog.openInformation(parent.getShell(), \"info\", ((ToolItem)e.getSource()).getText());\n\t\t\t}", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tMessageDialog.openInformation(parent.getShell(), \"info\", ((ToolItem)e.getSource()).getText());\n\t\t\t}", "void ajouterMenu(){\r\n\t\t\tJMenuBar menubar = new JMenuBar();\r\n\t \r\n\t JMenu file = new JMenu(\"File\");\r\n\t file.setMnemonic(KeyEvent.VK_F);\r\n\t \r\n\t JMenuItem eMenuItemNew = new JMenuItem(\"Nouvelle Partie\");\r\n\t eMenuItemNew.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t\r\n\t \t\t\r\n\t \t\t\r\n\t \tnew NouvellePartie();\r\n\t }\r\n\t });\r\n\t file.add(eMenuItemNew);\r\n\t \r\n\t JMenuItem eMenuItemFermer = new JMenuItem(\"Fermer\");\r\n\t eMenuItemFermer.setMnemonic(KeyEvent.VK_E);\r\n\t eMenuItemFermer.setToolTipText(\"Fermer l'application\");\r\n\t \r\n\t eMenuItemFermer.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t System.exit(0);\r\n\t }\r\n\t });\r\n\r\n\t file.add(eMenuItemFermer);\r\n\r\n\t menubar.add(file);\r\n\t \r\n\t JMenu aide = new JMenu(\"?\");\r\n\t JMenuItem eMenuItemRegle = new JMenuItem(\"Règles\");\r\n\t aide.add(eMenuItemRegle);\r\n\t menubar.add(aide);\r\n\r\n\t final String regles=\"<html><p>Le but est de récupérer les 4 objets Graal puis de retourner au château.</p>\"\t\r\n\t +\"<p>Après avoir récupéré un objet, chaque déplacement vous enlève autant de vie que le poids de l'objet</p></html>\";\r\n\t eMenuItemRegle.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t//default title and icon\r\n\t \t\t\tJOptionPane.showMessageDialog(gameFrame,\r\n\t \t\t\t regles,\"Règles du jeu\", JOptionPane.INFORMATION_MESSAGE);\r\n\t \t\t\t\r\n\t }\r\n\t });\r\n\t \t\r\n\t\t\t\r\n\t this.setJMenuBar(menubar);\t\r\n\t\t}", "private JMenuItem getItemComecar() {\r\n\t\tif (itemComecar == null) {\r\n\t\t\titemComecar = new JMenuItem(\"Iniciar Jogo\");\r\n\t\t}\r\n\t\treturn itemComecar;\r\n\t}", "public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}", "@Override\n\t\tpublic void popupMenuWillBecomeVisible(PopupMenuEvent e) {\n\n\t\t}", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "public void createSwitchButtonPopupMenu() {\n\n\t\tremoveAll();\n\t\tadd(midiLearnMenuItem);\n\t\tadd(midiUnlearnMenuItem);\n\t}", "public void addSubMenus() {\n configMenu.remove(colorMI);\r\n configMenu.remove(sizeMI);\r\n\r\n // set color and size as JMenu\r\n colorMenu = new JMenu(\"Color\");\r\n sizeMenu = new JMenu(\"Size\");\r\n\r\n // set new JMenuItem\r\n redColor = new JMenuItem(\"Red\");\r\n greenColor = new JMenuItem(\"Green\");\r\n blueColor = new JMenuItem(\"Blue\");\r\n sixteenSize = new JMenuItem(\"16\");\r\n twentySize = new JMenuItem(\"20\");\r\n twentyfourSize = new JMenuItem(\"24\");\r\n\r\n // add menu item to menu\r\n colorMenu.add(redColor);\r\n colorMenu.add(greenColor);\r\n colorMenu.add(blueColor);\r\n sizeMenu.add(sixteenSize);\r\n sizeMenu.add(twentySize);\r\n sizeMenu.add(twentyfourSize);\r\n\r\n // add menu\r\n configMenu.add(colorMenu);\r\n configMenu.add(sizeMenu);\r\n }", "public void printMenu()\n {\n String menu = (\"------------- Menu -------------\\nDisplay collection\\nCheck out materials\\nQuit\\n--------------------------------\\nPlease click one of the buttons to the right\");\n jTextPane1.setText(menu);\n jButton1.enableInputMethods(true);\n jButton2.enableInputMethods(true);\n jButton3.enableInputMethods(true);\n jButton4.enableInputMethods(false);\n }", "private JMenuItem getSauvegardejMenuItem() {\r\n\t\tif (SauvegardejMenuItem == null) {\r\n\t\t\tSauvegardejMenuItem = new JMenuItem();\r\n\t\t\tSauvegardejMenuItem.setText(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.setIcon(new ImageIcon(getClass().getResource(\"/sauvegarde_petit.png\")));\r\n\t\t\tSauvegardejMenuItem.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tSauvegardejMenuItem.setActionCommand(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"Sauvegarde\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Sauvegarde();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn SauvegardejMenuItem;\r\n\t}", "public void createPopupMenu() {\n\t\tJPopupMenu popup = new JPopupMenu();\r\n\t\tmenuItem = new JMenuItem(\"刷新频道\");\r\n\t\tmenuItem.addActionListener(this);\r\n\t\tpopup.add(menuItem);\r\n\r\n\t\thideMenuItem = new JMenuItem(\"隐藏公共频道\");\r\n\t\thideMenuItem.addActionListener(this);\r\n\t\tpopup.add(hideMenuItem);\r\n\t\t// Add listener to the text area so the popup menu can come up.\r\n\t\tMouseListener popupListener = new PopupListener(popup);\r\n\t\tcommonArea.addMouseListener(popupListener);\r\n\t\tmyMsgArea.addMouseListener(popupListener);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPopMenuPrincipal = new javax.swing.JPopupMenu();\n Notificaciones = new javax.swing.JMenuItem();\n Usuario = new javax.swing.JMenuItem();\n Multas = new javax.swing.JMenuItem();\n Configuración = new javax.swing.JMenuItem();\n Ayuda = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JPopupMenu.Separator();\n SalirSesion = new javax.swing.JMenuItem();\n jBotonSearch = new javax.swing.JButton();\n jBotonMenu = new javax.swing.JButton();\n jButtonUbi = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jPanel4 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jPanel6 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n jPopMenuPrincipal.setBackground(new java.awt.Color(68, 217, 230));\n jPopMenuPrincipal.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jPopMenuPrincipal.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(68, 217, 230)));\n\n Notificaciones.setBackground(new java.awt.Color(68, 217, 230));\n Notificaciones.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n Notificaciones.setText(\"Notificaciones\");\n Notificaciones.setBorder(null);\n Notificaciones.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n NotificacionesActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(Notificaciones);\n Notificaciones.getAccessibleContext().setAccessibleName(\"JMenuItem1\");\n\n Usuario.setBackground(new java.awt.Color(68, 217, 230));\n Usuario.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n Usuario.setText(\"Usuario\");\n Usuario.setBorder(null);\n Usuario.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n UsuarioActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(Usuario);\n\n Multas.setBackground(new java.awt.Color(68, 217, 230));\n Multas.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n Multas.setText(\"Multas\");\n Multas.setBorder(null);\n Multas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n MultasActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(Multas);\n\n Configuración.setBackground(new java.awt.Color(68, 217, 230));\n Configuración.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n Configuración.setText(\"Configuración\");\n Configuración.setBorder(null);\n Configuración.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ConfiguraciónActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(Configuración);\n\n Ayuda.setBackground(new java.awt.Color(68, 217, 230));\n Ayuda.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n Ayuda.setText(\"Ayuda\");\n Ayuda.setBorder(null);\n Ayuda.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n AyudaActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(Ayuda);\n\n jSeparator1.setForeground(new java.awt.Color(255, 255, 255));\n jPopMenuPrincipal.add(jSeparator1);\n\n SalirSesion.setBackground(new java.awt.Color(68, 217, 230));\n SalirSesion.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n SalirSesion.setText(\"Cerrar sesión\");\n SalirSesion.setBorder(null);\n SalirSesion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SalirSesionActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(SalirSesion);\n\n setBackground(new java.awt.Color(255, 255, 255));\n setMaximumSize(new java.awt.Dimension(350, 500));\n setMinimumSize(new java.awt.Dimension(350, 500));\n setPreferredSize(new java.awt.Dimension(350, 500));\n\n jBotonSearch.setBackground(new java.awt.Color(216, 215, 214));\n jBotonSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/searchicon.png\"))); // NOI18N\n jBotonSearch.setBorder(null);\n jBotonSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBotonSearchActionPerformed(evt);\n }\n });\n\n jBotonMenu.setBackground(new java.awt.Color(68, 217, 230));\n jBotonMenu.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jBotonMenu.setForeground(new java.awt.Color(255, 255, 255));\n jBotonMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/IconoMenuAzul.png\"))); // NOI18N\n jBotonMenu.setBorder(null);\n jBotonMenu.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jBotonMenuMouseClicked(evt);\n }\n });\n jBotonMenu.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBotonMenuActionPerformed(evt);\n }\n });\n\n jButtonUbi.setBackground(new java.awt.Color(222, 0, 0));\n jButtonUbi.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/BotonUbi.png\"))); // NOI18N\n jButtonUbi.setBorder(null);\n jButtonUbi.setBorderPainted(false);\n jButtonUbi.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonUbiActionPerformed(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(216, 216, 216)));\n\n jLabel1.setBackground(new java.awt.Color(255, 255, 255));\n jLabel1.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel1.setText(\"Zona de carga o descarga\");\n\n jLabel2.setBackground(new java.awt.Color(255, 255, 255));\n jLabel2.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel2.setText(\"Zona ORA\");\n\n jLabel3.setBackground(new java.awt.Color(255, 255, 255));\n jLabel3.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel3.setText(\"Zona reservada a residentes\");\n\n jPanel2.setBackground(new java.awt.Color(255, 250, 0));\n jPanel2.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jPanel3.setBackground(new java.awt.Color(0, 98, 255));\n jPanel3.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jPanel4.setBackground(new java.awt.Color(74, 177, 9));\n jPanel4.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jPanel5.setBackground(new java.awt.Color(165, 164, 150));\n jPanel5.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jPanel6.setBackground(new java.awt.Color(158, 67, 37));\n jPanel6.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jLabel4.setBackground(new java.awt.Color(255, 255, 255));\n jLabel4.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel4.setText(\"Zona libre\");\n\n jLabel5.setBackground(new java.awt.Color(255, 255, 255));\n jLabel5.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel5.setText(\"Zona de plazas especiales\");\n\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/PParking.jpg\"))); // NOI18N\n jButton3.setBorder(null);\n\n jLabel6.setBackground(new java.awt.Color(255, 255, 255));\n jLabel6.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel6.setText(\"Parquimetro\");\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 .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addComponent(jLabel3)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\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.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(8, 8, 8)\n .addComponent(jLabel2)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/RepuB.png\"))); // NOI18N\n jButton1.setBorder(null);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/ZonaAmarilla.png\"))); // NOI18N\n jButton2.setBorder(null);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jBotonMenu, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\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 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 113, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jBotonSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(105, 105, 105)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(42, 42, 42)\n .addComponent(jButtonUbi, javax.swing.GroupLayout.PREFERRED_SIZE, 22, 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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jBotonMenu, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jBotonSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 191, Short.MAX_VALUE)\n .addComponent(jButtonUbi, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(90, 90, 90)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(119, 119, 119))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(58, 58, 58)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n }", "public Menu() { //Menu pannel constructor\n\t\tmenuBar = new JMenuBar();\n\t\tmenu = new JMenu(\"Menu\");\n\t\tabout = new JMenu(\"About\");\n\t\tabout.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Ragnarock Web Browser 2017\\nIvan Mykolenko\\u00AE\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\thistory = new JMenu(\"History\");\n\t\thistory.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"history\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"History\");\n\t\t\t\tlayer.show(userViewPort, \"History\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 2;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tbookmarks = new JMenu(\"Bookmarks\");\n\t\tbookmarks.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"bookmarks\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"Bookmarks\");\n\t\t\t\tlayer.show(userViewPort, \"Bookmarks\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 3;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tsettingsMenuItem = new JMenuItem(\"Settings\", KeyEvent.VK_X);\n\t\tsettingsMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcreateSettings();\n\t\t\t\tsettings.setVisible(true);\n\t\t\t}\n\t\t});\n\t\texitMenuItem = new JMenuItem(\"Exit\");\n\t\texitMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tbackButton = new JButton(\"Back\");\n\t\tremoveButton = new JButton(\"Remove\");\n\t\tmenu.add(settingsMenuItem);\n\t\tmenu.add(exitMenuItem);\n\t\tmenuBar.add(menu);\n\t\tmenuBar.add(history);\n\t\tmenuBar.add(bookmarks);\n\t\tmenuBar.add(about);\n\t\tmenuBar.add(Box.createHorizontalGlue()); // Changing backButton's alignment to right\n\t\tsettings = new JDialog();\n\t\tadd(menuBar);\n\t\tsaveButton = new JButton(\"Save\");\n\t\tclearHistory = new JButton(\"Clear History\");\n\t\tclearBookmarks = new JButton(\"Clear Bookmarks\");\n\t\tbuttonsPanel = new JPanel();\n\t\tpanel = new JPanel();\n\t\turlField = new JTextField(15);\n\t\tedit = new JLabel(\"Edit Homepage:\");\n\t\tviewMode = 1;\n\t\tlistModel = new DefaultListModel<String>();\n\t\tlist = new JList<String>(listModel);\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);\n\t\tlist.setLayoutOrientation(JList.VERTICAL);\n\t}", "private void popupModify2te() {\n\t\tRolle rolle = (Rolle) this;\n\t\taufzugschacht.mainFrameShowOptionsFrame(rolle.getRolle2teUmschlingung(), true);\n\t}", "IMenu getMainMenu();", "private void resourceActionWindow (ButtonImage button){\n JPopupMenu depositList = new JPopupMenu(\"Deposits\");\n DepositMenu subMenu = new DepositMenu(gui, \"Send to\", selectedResource, Command.SEND_DEPOSIT_ID, 0);\n depositList.add(subMenu);\n button.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent e) {\n depositList.show(button , e.getX(), e.getY());\n }\n });\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings2) {\r\n\r\n //\"po co kalibracja?\"\r\n Intent intentKalInfo = new Intent(Main2Activity.this,PopUp2.class);\r\n startActivity(intentKalInfo);\r\n\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "private void popupMenuAbout() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAboutDialog aboutDialog = new AboutDialog(parent.getShell(), SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\n\t\taboutDialog.open();\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.more_information) {\n\t\t\tthis.showInfo();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPopMenuPrincipal = new javax.swing.JPopupMenu();\n jNotificaciones = new javax.swing.JMenuItem();\n jUsuario = new javax.swing.JMenuItem();\n jMultas = new javax.swing.JMenuItem();\n jConfiguracion = new javax.swing.JMenuItem();\n jAyuda = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JPopupMenu.Separator();\n jSalirSesion = new javax.swing.JMenuItem();\n jBotonMenu = new javax.swing.JButton();\n jBotonSearch = new javax.swing.JButton();\n jButtonAparcar = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jPanel4 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jPanel6 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n\n jPopMenuPrincipal.setBackground(new java.awt.Color(68, 217, 230));\n jPopMenuPrincipal.setForeground(new java.awt.Color(255, 255, 255));\n jPopMenuPrincipal.setBorder(null);\n jPopMenuPrincipal.setBorderPainted(false);\n\n jNotificaciones.setBackground(new java.awt.Color(68, 217, 230));\n jNotificaciones.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jNotificaciones.setText(\"Notificaciones\");\n jNotificaciones.setBorder(null);\n jNotificaciones.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jNotificacionesActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(jNotificaciones);\n\n jUsuario.setBackground(new java.awt.Color(68, 217, 230));\n jUsuario.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jUsuario.setText(\"Usuario\");\n jUsuario.setBorder(null);\n jUsuario.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jUsuarioActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(jUsuario);\n\n jMultas.setBackground(new java.awt.Color(68, 217, 230));\n jMultas.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jMultas.setText(\"Multas\");\n jMultas.setBorder(null);\n jMultas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMultasActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(jMultas);\n\n jConfiguracion.setBackground(new java.awt.Color(68, 217, 230));\n jConfiguracion.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jConfiguracion.setText(\"Configuracion\");\n jConfiguracion.setBorder(null);\n jConfiguracion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jConfiguracionActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(jConfiguracion);\n\n jAyuda.setBackground(new java.awt.Color(68, 217, 230));\n jAyuda.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jAyuda.setText(\"Ayuda\");\n jAyuda.setBorder(null);\n jAyuda.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jAyudaActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(jAyuda);\n\n jSeparator1.setForeground(new java.awt.Color(255, 255, 255));\n jPopMenuPrincipal.add(jSeparator1);\n\n jSalirSesion.setBackground(new java.awt.Color(68, 217, 230));\n jSalirSesion.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jSalirSesion.setText(\"Cerrar sesión\");\n jSalirSesion.setBorder(null);\n jSalirSesion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jSalirSesionActionPerformed(evt);\n }\n });\n jPopMenuPrincipal.add(jSalirSesion);\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n jBotonMenu.setBackground(new java.awt.Color(68, 217, 230));\n jBotonMenu.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jBotonMenu.setForeground(new java.awt.Color(255, 255, 255));\n jBotonMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/IconoMenuAzul.png\"))); // NOI18N\n jBotonMenu.setBorder(null);\n jBotonMenu.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jBotonMenuMouseClicked(evt);\n }\n });\n jBotonMenu.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBotonMenuActionPerformed(evt);\n }\n });\n\n jBotonSearch.setBackground(new java.awt.Color(216, 215, 214));\n jBotonSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/searchicon.png\"))); // NOI18N\n jBotonSearch.setBorder(null);\n jBotonSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBotonSearchActionPerformed(evt);\n }\n });\n\n jButtonAparcar.setBackground(new java.awt.Color(68, 217, 230));\n jButtonAparcar.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 15)); // NOI18N\n jButtonAparcar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/iconoL1.png\"))); // NOI18N\n jButtonAparcar.setBorder(null);\n jButtonAparcar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonAparcarActionPerformed(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(216, 216, 216)));\n\n jLabel1.setBackground(new java.awt.Color(255, 255, 255));\n jLabel1.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel1.setText(\"Zona de carga o descarga\");\n\n jLabel2.setBackground(new java.awt.Color(255, 255, 255));\n jLabel2.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel2.setText(\"Zona ORA\");\n\n jLabel3.setBackground(new java.awt.Color(255, 255, 255));\n jLabel3.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel3.setText(\"Zona reservada a residentes\");\n\n jPanel2.setBackground(new java.awt.Color(255, 250, 0));\n jPanel2.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jPanel3.setBackground(new java.awt.Color(0, 98, 255));\n jPanel3.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jPanel4.setBackground(new java.awt.Color(74, 177, 9));\n jPanel4.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jPanel5.setBackground(new java.awt.Color(165, 164, 150));\n jPanel5.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jPanel6.setBackground(new java.awt.Color(158, 67, 37));\n jPanel6.setPreferredSize(new java.awt.Dimension(15, 15));\n\n javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);\n jPanel6.setLayout(jPanel6Layout);\n jPanel6Layout.setHorizontalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n jPanel6Layout.setVerticalGroup(\n jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 15, Short.MAX_VALUE)\n );\n\n jLabel4.setBackground(new java.awt.Color(255, 255, 255));\n jLabel4.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel4.setText(\"Zona libre\");\n\n jLabel5.setBackground(new java.awt.Color(255, 255, 255));\n jLabel5.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel5.setText(\"Zona de plazas especiales\");\n\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/PParking.jpg\"))); // NOI18N\n jButton3.setBorder(null);\n\n jLabel6.setBackground(new java.awt.Color(255, 255, 255));\n jLabel6.setFont(new java.awt.Font(\"Bitstream Vera Sans\", 0, 8)); // NOI18N\n jLabel6.setText(\"Parquimetro\");\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 .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addComponent(jLabel3)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\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.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(8, 8, 8)\n .addComponent(jLabel2)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/iconoL2.png\"))); // NOI18N\n jButton1.setBorder(null);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/iconoL4.png\"))); // NOI18N\n jButton2.setBorder(null);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/iconoR4.png\"))); // NOI18N\n jButton4.setBorder(null);\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 12, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(174, 174, 174))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jBotonMenu, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jBotonSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(110, 110, 110)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(71, 71, 71)\n .addComponent(jButtonAparcar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jBotonMenu, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jBotonSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(132, 132, 132)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButtonAparcar, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)))\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 88, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n }", "MenuItem getMenuItemClose();", "public static JPopupMenu createPopupMenu() {\n final JPopupMenu popup = new JPopupMenu();\n popup.setBackground(GUI.themeColorTwo);\n\n JMenuItem deleteItem = new JMenuItem(new AbstractAction(\"Delete\") {\n @Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showMessageDialog(GUI.frame, \"Delete selected\");\n System.out.println(\"deleting item\");\n }\n });\n deleteItem.setBackground(GUI.themeColor);\n deleteItem.setForeground(Color.white);\n popup.add(deleteItem);\n JMenuItem pinItem = new JMenuItem(new AbstractAction(\"Pin\") {\n @Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showMessageDialog(GUI.frame, \"Pin selected\");\n System.out.println(\"pinning item\");\n }\n });\n pinItem.setBackground(GUI.themeColorTwo);\n pinItem.setForeground(Color.white);\n popup.add(pinItem);\n\n return popup;\n }", "@SuppressWarnings(\"serial\")\n\tprivate void mouseClickedElement(MouseEvent evt) {\n\n\t\t// if the right mouse button is clicked and no button is selected,\n\t\t// create a popup-menu\n\t\tif (evt.getButton() == Constants.RIGHT_MOUSE_BUTTON && !aufzugschacht.mainFrameIsAnyButtonSelected) {\n\t\t\tJPopupMenu popup = new JPopupMenu(\"Label\");\n\t\t\tJMenuItem delete = null;\n\t\t\tdelete = new JMenuItem(new AbstractAction(\"L\" + Constants.OE_K + \"schen\", new ImageIcon(Helper.getFileURL(Constants.DELETE_ICON))) {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tpopupDelete();\n\t\t\t\t}\n\t\t\t});\n\t\t\tJMenuItem parameter = null;\n\t\t\tparameter = new JMenuItem(new AbstractAction(\"Parameter\", new ImageIcon(Helper.getFileURL(Constants.MODIFY_ICON))) {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tpopupModify();\n\t\t\t\t}\n\t\t\t});\n\t\t\tJMenuItem parameter2te = null;\n\t\t\tparameter2te = new JMenuItem(new AbstractAction(\"Parameter (zweite Umschlingung)\", new ImageIcon(Helper.getFileURL(Constants.MODIFY_ICON))) {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tpopupModify2te();\n\t\t\t\t}\n\t\t\t});\n\t\t\tJMenuItem deactivate = null;\n\t\t\tdeactivate = new JMenuItem(new AbstractAction(\"Deaktivieren\", new ImageIcon(Helper.getFileURL(Constants.DEACTIVATE_ICON))) {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tpopupDeactivate();\n\t\t\t\t}\n\t\t\t});\n\t\t\tJMenuItem activate = null;\n\t\t\tactivate = new JMenuItem(new AbstractAction(\"Aktivieren\", new ImageIcon(Helper.getFileURL(Constants.ACTIVATE_ICON))) {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tpopupActivate();\n\t\t\t\t}\n\t\t\t});\n\t\t\tJMenuItem seilAnders = null;\n\t\t\tseilAnders = new JMenuItem(new AbstractAction(\"Seilverlauf \" + Constants.AE_K + \"ndern\", new ImageIcon(Helper.getFileURL(Constants.CHANGE_ICON))) {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tpopupChangeSeil();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// every element but the rope holder has paramters to modify\n\t\t\tif (!(this instanceof Seilaufhaenger)) {\n\t\t\t\tpopup.add(parameter);\n\t\t\t\tif (this instanceof Rolle) {\n\t\t\t\t\tRolle rolle = (Rolle) this;\n\t\t\t\t\tif (rolle.isDoppelteUmschlingung()) {\n\t\t\t\t\t\tpopup.add(parameter2te);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this instanceof Umlenkrolle) {\n\t\t\t\t\tRolle rolle = (Rolle) this;\n\t\t\t\t\tif (rolle.isActivated())\n\t\t\t\t\t\tpopup.add(deactivate);\n\t\t\t\t\telse\n\t\t\t\t\t\tpopup.add(activate);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Rolle anders umschlingen\n\t\t\tif (this instanceof Rolle) {\n\t\t\t\tRolle rolle = (Rolle) this;\n\t\t\t\tif (!rolle.isDoppelteUmschlingung() && rolle.getSeilElement(true) != null && rolle.getSeilElement(true).getPrev() != null\n\t\t\t\t\t\t&& rolle.getSeilElement(true).getPrev().getElement() instanceof Rolle && rolle.getSeilElement(true).getNext() != null\n\t\t\t\t\t\t&& rolle.getSeilElement(true).getNext().getElement() instanceof Rolle) {\n\t\t\t\t\tpopup.add(seilAnders);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpopup.add(delete);\n\n\t\t\t// shows the menu if it has any entries\n\t\t\tpopup.show(this, evt.getX(), evt.getY());\n\t\t}\n\t\t// other clicks are given to the parent\n\t\telse if (isDoubleClickedElement(evt) && this instanceof Kabine) {\n\t\t\tif (aufzugschacht.kabinenRolleExists()) {\n\t\t\t\taufzugschacht.switchToDoppelKabinenRolle();\n\t\t\t} else if (aufzugschacht.kabinenDoppelRolleExists()) {\n\t\t\t\taufzugschacht.switchToKabinenRolle();\n\t\t\t}\n\t\t} else if (!aufzugschacht.mainFrameIsAnyButtonSelected) {\n\t\t\tif (this instanceof Rolle) {\n\t\t\t\tRolle thisRolle = (Rolle) this;\n\t\t\t\taufzugschacht.mainFrameActivateTabbedPane(thisRolle);\n\t\t\t}\n\t\t\tif (this instanceof DoppelUmlenkrolle) {\n\t\t\t\tDoppelUmlenkrolle thisRolle = (DoppelUmlenkrolle) this;\n\t\t\t\taufzugschacht.mainFrameActivateTabbedPane(thisRolle.getRolle1());\n\t\t\t}\n\t\t} else\n\t\t\taufzugschacht.mouseClickedArea(evt);\n\t}", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "private void codigoInicial() {\r\n itemPanels = new itemPanel[5];\r\n itemPanels[0] = new itemPanel(null, null, false);\r\n itemPanels[1] = new itemPanel(null, null, false);\r\n itemPanels[2] = new itemPanel(null, null, false);\r\n itemPanels[3] = new itemPanel(null, null, false);\r\n itemPanels[4] = new itemPanel(null, null, false);\r\n\r\n setSize(1082, 662);\r\n jpaneMenu.setBackground(AtributosGUI.color_principal);\r\n setLocationRelativeTo(null);\r\n\r\n\r\n java.awt.Color color_primario = AtributosGUI.color_principal;\r\n\r\n jpanePerfil.setBackground(color_primario);\r\n jpaneHorario.setBackground(color_primario);\r\n jpaneCursos.setBackground(color_primario);\r\n jpaneTramites.setBackground(color_primario);\r\n jpaneSalud.setBackground(color_primario);\r\n jpaneMenuItems.setBackground(color_primario);\r\n\r\n jlblCursos.setFont(AtributosGUI.item_label_font);\r\n jlblHorario.setFont(AtributosGUI.item_label_font);\r\n jlblPerfil.setFont(AtributosGUI.item_label_font);\r\n jlblSalud.setFont(AtributosGUI.item_label_font);\r\n jlblTramites.setFont(AtributosGUI.item_label_font);\r\n\r\n jlblCursos.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblHorario.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblPerfil.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblSalud.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblTramites.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n\r\n jpaneActiveCursos.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveHorario.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActivePerfil.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveSalud.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveTramites.setBackground(AtributosGUI.item_Off_panel_active);\r\n\r\n \r\n\r\n }", "private static void submenu() {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\n\t\tpublic void closeMenu() {\n\t\t}", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "public void startMenu() {\n setTitle(\"Nier Protomata\");\n setSize(ICoord.LAST_COL + ICoord.ADD_SIZE,\n ICoord.LAST_ROW + ICoord.ADD_SIZE);\n \n setButton();\n }", "public JMenuItem getNegrita() {return negrita;}", "@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "@Override\n public void menuSelected(MenuEvent e) {\n \n }", "private void initComponents() {\n\n jPopupMenu = new javax.swing.JPopupMenu();\n jMenuItemNewKeyFrame = new javax.swing.JMenuItem();\n jMenuItemNewTransition = new javax.swing.JMenuItem();\n jMenuItemPaste = new javax.swing.JMenuItem();\n\n jMenuItemNewKeyFrame.setText(\"New KeyFrame\");\n jMenuItemNewKeyFrame.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jMenuItemNewKeyFrameMouseReleased(evt);\n }\n });\n jPopupMenu.add(jMenuItemNewKeyFrame);\n\n jMenuItemNewTransition.setText(\"New Transition\");\n jMenuItemNewTransition.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jMenuItemNewTransitionMouseReleased(evt);\n }\n });\n jPopupMenu.add(jMenuItemNewTransition);\n\n jMenuItemPaste.setText(\"Paste\");\n jMenuItemPaste.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jMenuItemPasteMouseReleased(evt);\n }\n });\n jPopupMenu.add(jMenuItemPaste);\n\n setBackground(new java.awt.Color(255, 255, 255));\n setComponentPopupMenu(jPopupMenu);\n setOpaque(true);\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n formMousePressed(evt);\n }\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n formMouseClicked(evt);\n }\n });\n addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentResized(java.awt.event.ComponentEvent evt) {\n formComponentResized(evt);\n }\n });\n addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n formPropertyChange(evt);\n }\n });\n }", "public void onMenuNew() {\n handleMenuOpen(null);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tPopupMenu popup = new PopupMenu(context, v);\n\t\t\t\tMenuInflater inflater = popup.getMenuInflater();\n\t\t\t\tMenu menu = popup.getMenu();\n\n\t\t\t\tinflater.inflate(R.menu.popupmenu, menu);\n\t\t\t\t// popup.inflate(R.menu.popupmenutestmenu);\n\t\t\t\tpopup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\t\tcase R.id.popup_reInfo:\n\t\t\t\t\t\t\tmainAct.ResetInfo(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_upload:\n\t\t\t\t\t\t\tmainAct.addImage(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_del:\n\t\t\t\t\t\t\tmainAct.delete(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopup.show();\n\t\t\t}", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "@Override\n\t\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\t\tcase R.id.popup_reInfo:\n\t\t\t\t\t\t\tmainAct.ResetInfo(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_upload:\n\t\t\t\t\t\t\tmainAct.addImage(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_del:\n\t\t\t\t\t\t\tmainAct.delete(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "private JMenuItem getMailjMenuItem() {\r\n\t\tif (MailjMenuItem == null) {\r\n\t\t\tMailjMenuItem = new JMenuItem();\r\n\t\t\tMailjMenuItem.setText(\" Envoyer un mail au support\");\r\n\t\t\tMailjMenuItem.setActionCommand(\"Envoyer un mail au support\");\r\n\t\t\tMailjMenuItem.setIcon(new ImageIcon(getClass().getResource(\"/mail_envoyer_petit.png\")));\r\n\t\t\tMailjMenuItem.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tMailjMenuItem.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"Envoyer un mail au support\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_SendMail();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn MailjMenuItem;\r\n\t}", "private void info(ActionEvent x) {\n\t\tProject p = this.list.getSelectedValue();\n\t\tif (p != null) {\n\t\t\tcontroller.moreinfo(p.getName());\n\t\t}\n\t}", "public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }", "protected void setupPopupMenu( JPopupMenu popup )\n {\n JMenuItem showGridMenuItem = new JMenuItem( \"Toggle Grid\" );\n showGridMenuItem.addActionListener(\n new ActionListener()\n {\n @Override\n public void actionPerformed( ActionEvent e )\n {\n setShowGrid( !isShowGrid() );\n }\n } );\n popup.add( showGridMenuItem );\n }", "public String getActivationMenu();", "private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}", "@DISPID(1610743814) //= 0x60020006. The runtime will prefer the VTID if present\r\n @VTID(13)\r\n java.lang.String popupItemMenu(\r\n uic.prominent.ScreenLogging.wsh.FolderItem pfi,\r\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object vx,\r\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object vy);", "public interface InterfaceOnCreatePopUpMenuMain {\n\n public void InterFaceonInflatePopUp(View view, PopupMenu popupMenu, int position);\n}", "@Override\r\n\tpublic void clicked(ItemMenuIcon icon, Player p) {\n\t\t\r\n\t}", "private void makeStockMenu() {\r\n\t\tJMenu stockMnu = new JMenu(\"Inventario\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Inventario\")) {\r\n\t\t\tisAccesible = true;\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarInventario\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Articulo\");\r\n\t\t\t\taddItem.setMnemonic('a');\r\n\t\t\t\taddItem.setToolTipText(\"Agregar rapidamente un nuevo articulo\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddStockItem(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tstockMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"world.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'v', \"Ver el inventario\",\r\n\t\t\t\t\tKeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), Stock.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t\tstockMnu.addSeparator();\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Kardex\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ver Kardex\", \r\n\t\t\t\t\timageLoader.getImage(\"kardexSingle.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'k', \"Ver el kardex\", null,\r\n\t\t\t\t\tKardex.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tstockMnu.setMnemonic('i');\r\n\t\t\tadd(stockMnu);\r\n\t\t}\r\n\t}", "private JMenuItem getExplorerjMenuItem() {\r\n\t\tif (ExplorerjMenuItem == null) {\r\n\t\t\tExplorerjMenuItem = new JMenuItem();\r\n\t\t\tExplorerjMenuItem.setText(\"Explorer\");\r\n\t\t\tExplorerjMenuItem.setActionCommand(\"Explorer\");\r\n\t\t\tExplorerjMenuItem.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tExplorerjMenuItem.setIcon(new ImageIcon(getClass().getResource(\"/loupe.png\")));\r\n\t\t\tExplorerjMenuItem.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"Explorer\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOpenWithDefaultViewer.open(GestionRepertoire.RecupRepTravail());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn ExplorerjMenuItem;\r\n\t}", "private void jMenu_AboutMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu_AboutMouseClicked\n new About().setVisible(true);\n }", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "protected void addMenuItems(JPopupMenu menu, ActionListener listener) {\r\n JMenuItem menuItem;\r\n menuItem = new JMenuItem(\"Store cluster\", GUIFactory.getIcon(\"new16.gif\"));\r\n menuItem.setActionCommand(STORE_CLUSTER_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Launch new session\", GUIFactory.getIcon(\"launch_new_mav.gif\"));\r\n menuItem.setActionCommand(LAUNCH_NEW_SESSION_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem); \r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Delete public cluster\", GUIFactory.getIcon(\"delete16.gif\"));\r\n menuItem.setActionCommand(SET_DEF_COLOR_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Save cluster...\", GUIFactory.getIcon(\"save16.gif\"));\r\n menuItem.setActionCommand(SAVE_CLUSTER_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menuItem = new JMenuItem(\"Save all clusters...\", GUIFactory.getIcon(\"save16.gif\"));\r\n menuItem.setActionCommand(SAVE_ALL_CLUSTERS_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n setOverallMaxMenuItem = new JMenuItem(\"Set Y to overall max...\", GUIFactory.getIcon(\"Y_range_expand.gif\"));\r\n setOverallMaxMenuItem.setActionCommand(SET_Y_TO_EXPERIMENT_MAX_CMD);\r\n setOverallMaxMenuItem.addActionListener(listener);\r\n setOverallMaxMenuItem.setEnabled(false);\r\n menu.add(setOverallMaxMenuItem);\r\n \r\n setClusterMaxMenuItem = new JMenuItem(\"Set Y to cluster max...\", GUIFactory.getIcon(\"Y_range_expand.gif\"));\r\n setClusterMaxMenuItem.setActionCommand(SET_Y_TO_CLUSTER_MAX_CMD);\r\n setClusterMaxMenuItem.addActionListener(listener);\r\n menu.add(setClusterMaxMenuItem);\r\n\r\n menuItem = new JMenuItem(\"Toggle reference line...\");\r\n menuItem.setActionCommand(TOGGLE_REF_LINE_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Broadcast Matrix to Gaggle\", GUIFactory.getIcon(\"gaggle_icon_16.gif\"));\r\n menuItem.setActionCommand(BROADCAST_MATRIX_GAGGLE_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menuItem = new JMenuItem(\"Broadcast Gene List to Gaggle\", GUIFactory.getIcon(\"gaggle_icon_16.gif\"));\r\n menuItem.setActionCommand(BROADCAST_NAMELIST_GAGGLE_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menuItem = new JMenuItem(\"Broadcast Matrix to Genome Browser\", GUIFactory.getIcon(\"gaggle_icon_16.gif\"));\r\n menuItem.setActionCommand(BROADCAST_MATRIX_GENOME_BROWSER_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n }", "public void jMenuHelpAbout_actionPerformed(ActionEvent e) {\n }", "private JPopupMenu getJPopupMenuCamaras() {\r\n\t\tif (jPopupMenuCamaras == null) {\r\n\t\t\tjPopupMenuCamaras = new JPopupMenu();\r\n\t\t\tjPopupMenuCamaras.add(getJMenuItemEliminarCamara());\r\n\t\t\tjPopupMenuCamaras.add(getJMenuItemAgregarCamara());\r\n\t\t\tjPopupMenuCamaras.add(getJMenuItemPropiedadesCamara());\r\n\t\t\tjPopupMenuCamaras.add(getJMenuItemAgregarMidifProps());\r\n\t\t\t\r\n\t\t}\r\n\t\treturn jPopupMenuCamaras;\r\n\t}", "@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}", "private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }", "private void popupWindowOfOptions(View v) {\n \t \n \t\tOrderManager.clearOption();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nMenuDbId = _Order.MENU_ID;\n \tint nMenuResourceId = MenuManager.getResourceIdByDbId(nMenuDbId);\n \tMenu mMenu = MenuManager.getMenuByResourceId(nMenuResourceId);\n \t\n \tint nTempIdForCurrentOrder = IdManager.getRandomId();\n \tIdManager.setTemporaryId(nTempIdForCurrentOrder);\n \tResourceManager.put(nTempIdForCurrentOrder, _Order);\n \t\n try {\n \t\n \tint nPopupHeight = 760;\n \t\tint nPopupWith = 520;\n \t\n \tint nSubTitleHeight = 40;\n \tint nOptionListLayoutHeight = 210;\n \t\n \tString strMenuNameEng = mMenu.NAME_ENG;\n \tString strMenuNameOth = mMenu.NAME_OTH;\n \t\n \t// Popup layout\n LinearLayout popLayout = new LinearLayout(this);\n popLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n popLayout.setGravity(Gravity.CENTER);\n popLayout.setBackgroundColor(0x22000000);\n \n \t // Inner layout\n \t LinearLayout innerLayout = new LinearLayout(this);\n \t innerLayout.setLayoutParams(new LayoutParams(nPopupWith-20,nPopupHeight-20));\n \t innerLayout.setPadding(10,10,10,10);\n \t innerLayout.setOrientation(LinearLayout.VERTICAL);\n \t innerLayout.setGravity(Gravity.CENTER);\n \t innerLayout.setBackgroundColor(0xddffffff);\n \t\t \n \t\t // title eng\n \t\t TextView tvTitleEng = new TextView(this);\n \t\t tvTitleEng.setGravity(Gravity.CENTER);\n \t\t tvTitleEng.setText(strMenuNameEng);\n \t\t tvTitleEng.setTextColor(0xff000000);\n \t\t tvTitleEng.setTextSize(23);\n \t\t tvTitleEng.setHeight(50);\n \t\t tvTitleEng.setWidth(470);\n \t\t \n \t\t // title oth\n \t\t TextView tvTitleOth = new TextView(this);\n \t\t tvTitleOth.setGravity(Gravity.TOP|Gravity.CENTER);\n \t\t tvTitleOth.setText(strMenuNameOth);\n \t\t tvTitleOth.setTextColor(0xff000000);\n \t\t tvTitleOth.setTextSize(13);\n \t\t tvTitleOth.setHeight(55);\n \t\t tvTitleOth.setWidth(470);\n \t\t \n \t\t // common option title\n \t\t TextView tvCO = new TextView(this);\n \t\t tvCO.setText(\"* Common Option\");\n \t\t tvCO.setPadding(10,0,0,0);\n \t\t tvCO.setTextSize(15);\n \t\t tvCO.setTextColor(0xff5f2d09);\n \t\t tvCO.setHeight(nSubTitleHeight);\n \t\t tvCO.setWidth(470);\n \t\t \n \t\t // common option layout\n \t\t ScrollView svCO = new ScrollView(this);\n \t\t svCO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llCO = new LinearLayout(this);\n \t\t llCO.setLayoutParams(new LayoutParams(470,LayoutParams.WRAP_CONTENT));\n \t\t llCO.setPadding(15,10,10,10);\n \t\t llCO.setOrientation(LinearLayout.VERTICAL);\n \t\t llCO.setGravity(Gravity.TOP);\n \t\t \n \t\t showCommonOptions (mMenu, llCO);\n \t\t \t\n \t\t \tsvCO.addView(llCO);\n \t\t \t\n \t\t\t // specific option title\n \t\t\t \n \t\t TextView tvSO = new TextView(this);\n \t\t tvSO.setPadding(10,0,0,0);\n \t\t tvSO.setText(\"* Specific Option\");\n \t\t tvSO.setTextSize(15);\n \t\t tvSO.setTextColor(0xff5f2d09);\n \t\t tvSO.setHeight(nSubTitleHeight);\n \t\t tvSO.setWidth(470);\n \t \n \t\t ScrollView svSO = new ScrollView(this);\n \t\t svSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llSO = new LinearLayout(this);\n \t\t llSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t llSO.setPadding(15,10,10,10);\n \t\t llSO.setOrientation(LinearLayout.VERTICAL);\n \t\t llSO.setGravity(Gravity.TOP);\n \t\n \t\t showSpecificOptions (mMenu, llSO);\n \t\t \n \t\t svSO.addView(llSO);\n \t\t \n \t\t // button group\n \t\t \n \t\t int nButtonHeight = 50;\n \t\t int nButtonWidth = 100;\n \t\t \n \t\t LinearLayout llButtonGroup = new LinearLayout(this);\n \t\t llButtonGroup.setLayoutParams(new LayoutParams(470,80));\n \t\t llButtonGroup.setPadding(10, 0, 10, 4);\n \t\t llButtonGroup.setOrientation(LinearLayout.HORIZONTAL);\n \t\t llButtonGroup.setGravity(Gravity.CENTER|Gravity.BOTTOM);\n \t\t \n \t\t // confirm button\n \t \n \t \tint nConfirmId = IdManager.getRandomId();\n \t\t Button btnConfirm = new Button(this);\n \t\t btnConfirm.setId(nConfirmId);\n \t\t btnConfirm.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnConfirm.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnConfirm.setText(CaptionManager.getCaption().CONFIRM);\n \t\t btnConfirm.setTextSize(13);\n \t\t \n \t\t // add options to an order\n \t\t btnConfirm.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \t\n \t\t\t \tOrder currentOrder = (Order)ResourceManager.get(IdManager.getTemporaryId());\n \t\t\t \t\n \t\t\t \tArrayList<Order> orderList = addOptionsToOrder(currentOrder);\n \t\t\t \tOrderManager.requestUpdateOptions(currentOrder,orderList);\n \t \t\t\t\tloadOrderBoard();\n \t \t\t\t\tOrderManager.clearOption();\n \t \t\t\t\t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // cancel button\n \t\t Button btnCancel = new Button(this);\n \t\t btnCancel.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnCancel.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnCancel.setText(CaptionManager.getCaption().CANCEL);\n \t\t btnCancel.setTextSize(13);\n \t\t btnCancel.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \tOrderManager.clearOption();\n \t\t\t \t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // detail button\n \t\t final int nTempId = 808080;\n \t\t Mapper.put(Integer.valueOf(nTempId), mMenu);\n \t\t \n \t\t Button btnDetail = new Button(this);\n \t\t btnDetail.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnDetail.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnDetail.setText(CaptionManager.getCaption().DETAIL);\n \t\t btnDetail.setTextSize(13);\n \t\t btnDetail.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \n \t\t\t \tMenu menu = (Menu)Mapper.get(Integer.valueOf(808080));\n \t\t\t \tint nMenuRscId = menu.RESOURCE_ID;\n \t\t\t \tpopupWindowDetail(nMenuRscId);\n \t\t\t }\n \t\t });\n \t\t\t \n \t llButtonGroup.addView(btnConfirm);\n \t llButtonGroup.addView(btnCancel);\n \t llButtonGroup.addView(btnDetail);\n \t \n \t\t innerLayout.addView(tvTitleEng);\n \t innerLayout.addView(tvTitleOth);\n \t innerLayout.addView(tvCO);\n \t innerLayout.addView(svCO);\n \t innerLayout.addView(tvSO);\n \t innerLayout.addView(svSO);\n \t innerLayout.addView(llButtonGroup);\n \t \n popLayout.addView(innerLayout);\n\n // show popup\n _PopupWindowOfOptions = new PopupWindow(popLayout, nPopupWith, nPopupHeight, true);\n _PopupWindowOfOptions.showAtLocation(popLayout, Gravity.CENTER, 0, 0);\n \t\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private JMenuItem getMniBack() {\r\n\t\tif (mniBack == null) {\r\n\t\t\tmniBack = new JMenuItem();\r\n\t\t\tmniBack.setText(\"Back\");\r\n\t\t\tmniBack.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tbtnBack.doClick();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn mniBack;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n popupMenu = new javax.swing.JPopupMenu();\n Remover = new javax.swing.JMenuItem();\n abc = new javax.swing.JMenuItem();\n jPanel1 = new javax.swing.JPanel();\n jButtonLimparTela = new javax.swing.JButton();\n jBAbrirGrafo = new javax.swing.JButton();\n jTNomeGrafo = new javax.swing.JTextField();\n jBFechar = new javax.swing.JButton();\n jBDijkstra = new javax.swing.JButton();\n jBKruskal = new javax.swing.JButton();\n jBPrim = new javax.swing.JButton();\n jButtonMalgrange = new javax.swing.JButton();\n jButtonTopologica = new javax.swing.JButton();\n jButtonFulkerson = new javax.swing.JButton();\n jButtonProfundidade = new javax.swing.JButton();\n\n Remover.setText(\"Remover\");\n Remover.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RemoverActionPerformed(evt);\n }\n });\n popupMenu.add(Remover);\n\n abc.setText(\"Cor\");\n popupMenu.add(abc);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentResized(java.awt.event.ComponentEvent evt) {\n formComponentResized(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(153, 204, 255));\n jPanel1.setComponentPopupMenu(popupMenu);\n jPanel1.setPreferredSize(new java.awt.Dimension(400, 10));\n\n jButtonLimparTela.setText(\"Limpar Tela\");\n jButtonLimparTela.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonLimparTelaActionPerformed(evt);\n }\n });\n\n jBAbrirGrafo.setText(\"Abrir Grafo\");\n jBAbrirGrafo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAbrirGrafoActionPerformed(evt);\n }\n });\n\n jTNomeGrafo.setEnabled(false);\n\n jBFechar.setText(\"Fechar\");\n jBFechar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBFecharActionPerformed(evt);\n }\n });\n\n jBDijkstra.setText(\"Dijkstra\");\n jBDijkstra.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBDijkstraActionPerformed(evt);\n }\n });\n\n jBKruskal.setText(\"Kruskal\");\n jBKruskal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBKruskalActionPerformed(evt);\n }\n });\n\n jBPrim.setText(\"Prim\");\n jBPrim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBPrimActionPerformed(evt);\n }\n });\n\n jButtonMalgrange.setText(\"Malgrange\");\n jButtonMalgrange.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonMalgrangeActionPerformed(evt);\n }\n });\n\n jButtonTopologica.setText(\"Topológica\");\n jButtonTopologica.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonTopologicaActionPerformed(evt);\n }\n });\n\n jButtonFulkerson.setText(\" Fulkerson\");\n jButtonFulkerson.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonFulkersonActionPerformed(evt);\n }\n });\n\n jButtonProfundidade.setText(\"Profundidade\");\n jButtonProfundidade.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonProfundidadeActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jBAbrirGrafo)\n .addGap(18, 18, 18)\n .addComponent(jTNomeGrafo, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButtonLimparTela)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jBFechar))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jBDijkstra)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jBKruskal)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jBPrim)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonMalgrange)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonTopologica)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonProfundidade)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonFulkerson)\n .addGap(0, 18, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBAbrirGrafo)\n .addComponent(jTNomeGrafo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonLimparTela)\n .addComponent(jBFechar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 358, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBDijkstra)\n .addComponent(jBKruskal)\n .addComponent(jBPrim)\n .addComponent(jButtonMalgrange)\n .addComponent(jButtonTopologica)\n .addComponent(jButtonProfundidade)\n .addComponent(jButtonFulkerson))\n .addGap(70, 70, 70))\n );\n\n setSize(new java.awt.Dimension(623, 492));\n setLocationRelativeTo(null);\n }", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenu.getPopupMenu().show(menu, menu.getX()+menu.getWidth(), menu.getHeight());\n\t\t\t\tui_ShowAnimal6 animal6 = new ui_ShowAnimal6();\n\t\t\t\tsplitPane.setRightComponent(panel_1.add(animal6.getContentPane()));\n\t\t\t}", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }", "private void displayMenu() {\n\t\tint option = MenuView.getMenuOption(\n\t\t\t\"Welcome \" + movieGoer.getName() + \"!\",\n\t\t\t\"View movie showtimes\",\n\t\t\t\"Book a ticket\",\n\t\t\t\"View movie details\",\n\t\t\t\"List top 5 movies\",\n\t\t\t\"View booking history\",\n\t\t\t\"Exit\"\n\t\t);\n\t\t\n\t\tswitch (option) {\n\t\t\tcase 1:\n\t\t\t\tNavigationController.load(new ShowTimeController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tNavigationController.load(new BookingController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tNavigationController.load(new MovieController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tNavigationController.load(new TopMoviesController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tNavigationController.load(new BookingHistoryController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tNavigationController.goBack();\n\t\t\t\tbreak;\n\t\t}\n\t}", "void changeMenuItemName(String itemName, byte type, String msgPlus);", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n mi_popup = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jMenu1.setText(\"File\");\n\n mi_popup.setText(\"Popup\");\n mi_popup.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n mi_popupActionPerformed(evt);\n }\n });\n jMenu1.add(mi_popup);\n\n jMenuBar1.add(jMenu1);\n\n setJMenuBar(jMenuBar1);\n\n pack();\n }", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "@SuppressLint(\"RestrictedApi\")\n private void onGameSettingClicked() {\n PopupMenu popup = new PopupMenu(this, this.mGameSetting);\n popup.getMenuInflater().inflate(R.menu.game_setting_menu, popup.getMenu());\n\n popup.setOnMenuItemClickListener(item -> {\n switch (item.getItemId()){\n case R.id.game_setting_sync:\n Toast.makeText(this, \"Game sync successfully \", Toast.LENGTH_SHORT).show();\n break;\n case R.id.game_setting_add_players:\n Intent intent = new Intent(this, Players.class);\n startActivity(intent);\n break;\n case R.id.game_signIn:\n Toast.makeText(this, \"Sign in successfully ! \", Toast.LENGTH_SHORT).show();\n break;\n }\n\n return true;\n });\n\n MenuPopupHelper menuHelper = new MenuPopupHelper(this, (MenuBuilder) popup.getMenu(), this.mGameSetting);\n menuHelper.setForceShowIcon(true);\n menuHelper.show();\n }", "public void popup(String a){\n pop.setLayout(null);\n ControlAction c = new ControlAction();\n pop.setBounds(420, 320, 460, 160);\n pop.setBorder(new LineBorder(Color.BLACK, 2));\n //condition for showing popup message\n if(a.startsWith(\"1\")){\n mas.setText(\"Selamat Anda Telah Melakukan Peminjaman\");\n nolocker.setText(\"No. Locker Anda Yaitu 17\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(true);\n }else if(a.equals(WARN1)){\n mas.setText(\"Maaf Anda Telah Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.equals(WARN2)){\n mas.setText(\"Maaf Anda Belum Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.contains(\"BUKA\")){\n mas.setText(\"Anda Ingin Mengakhiri Peminjaman ?\");\n yes.setVisible(true);\n String key = a.substring(4);\n yes.setActionCommand(\"YES\"+key);\n no.setVisible(true);\n nolocker.setVisible(false);\n }else if(a.equals(NO)){\n mas.setText(\"Loker Anda Telah Terbuka\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n } \n mas.setFont(new Font(\"arial\", Font.BOLD, 20));\n mas.setOpaque(false);\n mas.setForeground(Color.BLACK);\n Dimension si1 = mas.getPreferredSize();\n mas.setBounds(10, 40, si1.width, si1.height);\n nolocker.setFont(new Font(\"arial\", Font.BOLD, 20));\n nolocker.setOpaque(false);\n nolocker.setForeground(Color.BLACK);\n Dimension si3 = nolocker.getPreferredSize();\n nolocker.setBounds(10, 70, si3.width, si3.height);\n //close button handling\n close.addActionListener(c);\n close.setActionCommand(EXIT);\n Dimension si2 = close.getPreferredSize();\n close.setBounds(420, 10, si2.width, si2.height);\n close.setBorder(BorderFactory.createEmptyBorder());\n close.setContentAreaFilled(false);\n //yes button handling\n yes.addActionListener(c);\n Dimension si4 = yes.getPreferredSize();\n yes.setBounds(100, 100, si4.width, si4.height);\n yes.setBorder(BorderFactory.createEmptyBorder());\n yes.setContentAreaFilled(false);\n //no button handling\n no.addActionListener(c);\n no.setActionCommand(NO);\n Dimension si5 = no.getPreferredSize();\n no.setBounds(250, 100, si5.width, si5.height);\n no.setBorder(BorderFactory.createEmptyBorder());\n no.setContentAreaFilled(false);\n //add to card3 top most layer\n card3.add(pop,6,0);\n }", "private void showPriorityPopUp() {\n PopupMenu popup = new PopupMenu(rootView.getContext(), rootView.findViewById(R.id.img_overflow));\n //Inflating the Popup using xml file\n popup.getMenuInflater().inflate(R.menu.post_priority_menu, popup.getMenu());\n\n //registering popup with OnMenuItemClickListener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n public boolean onMenuItemClick(MenuItem item) {\n Toast.makeText(rootView.getContext(), \"You Clicked : \" + item.getTitle(), Toast.LENGTH_SHORT).show();\n return true;\n }\n });\n\n popup.show();//showing popup menu\n }", "@Override\n public void showLorenzoActionPopUp(String string) {\n\n }", "public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {\n \t\t\t\t\n \t\t\t}", "private void loadGUI() {\n JMenuItem tmp;\n Font font = new Font(\"Arial\", Font.ITALIC, 10);\n \n // Project menu\n projectMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected project\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n projectMenu.add(tmp);\n projectMenu.addSeparator();\n \n properties = new JMenuItem(\"Properties\");\n properties.addActionListener(this);\n projectMenu.add(properties);\n \n reimport = new JMenuItem(\"Re-Import Files\");\n reimport.addActionListener(this);\n projectMenu.add(reimport);\n \n removeProject = new JMenuItem(\"Remove project\");\n removeProject.addActionListener(this);\n projectMenu.add(removeProject);\n \n // Directory menu\n dirMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected directory\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n dirMenu.add(tmp);\n dirMenu.addSeparator();\n \n removeDir = new JMenuItem(\"Remove from project\");\n removeDir.addActionListener(this);\n dirMenu.add(removeDir);\n \n deleteDir = new JMenuItem(\"Delete from disk\");\n deleteDir.addActionListener(this);\n dirMenu.add(deleteDir);\n \n renameDir = new JMenuItem(\"Rename\");\n renameDir.addActionListener(this);\n dirMenu.add(renameDir);\n \n // File menu\n fileMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected file\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n fileMenu.add(tmp);\n fileMenu.addSeparator();\n \n removeFile = new JMenuItem(\"Remove from project\");\n removeFile.addActionListener(this);\n fileMenu.add(removeFile);\n \n deleteFile = new JMenuItem(\"Delete from disk\");\n deleteFile.addActionListener(this);\n fileMenu.add(deleteFile);\n \n renameFile = new JMenuItem(\"Rename\");\n renameFile.addActionListener(this);\n fileMenu.add(renameFile);\n\t\n\t // sutter2k: need to tap in here for preview in browser\n miLaunchBrowser= new JMenuItem(\"Preview in Browser\");\n miLaunchBrowser.addActionListener(this);\n fileMenu.add(miLaunchBrowser);\n\t\n // Menu to show when multiple nodes are selected\n multipleSelMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Multiple selection\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n multipleSelMenu.add(tmp);\n multipleSelMenu.addSeparator();\n \n removeMulti = new JMenuItem(\"Remove from project\");\n removeMulti.addActionListener(this);\n multipleSelMenu.add(removeMulti);\n \n deleteMulti = new JMenuItem(\"Delete from disk\");\n deleteMulti.addActionListener(this);\n multipleSelMenu.add(deleteMulti);\n \n }", "public void initGui() {\r\n\t\tSpieler sieger = dasSpiel.getSieger();\r\n\t\tPopupGUI siegerAnzeigen = new PopupGUI(dasSpiel);\r\n\t\tString anzeige = sieger.getName() + \", hat das Spiel gewonnen! Du kannst nun keine Aktionen mehr durchfuehren ausser dir die Karte anzuschauen.\";\r\n\t\tfor (int i = 0; i < dasSpiel.getSpielerListe().size(); i++) {\r\n\t\t\tsiegerAnzeigen.textAnzeigen(anzeige, dasSpiel.getSpielerListe().get(i));\r\n\t\t}\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_pop_up, menu);\n return true;\n }", "@Override\r\n\t\tpublic void popupMenuWillBecomeInvisible(PopupMenuEvent arg0) {\n\t\t\t\r\n\t\t}", "public static void initializePopup(){\n\n popup = new PopupMenu();\n\n // Initialize menu items\n MenuItem exitItem = new MenuItem(\"Exit\");\n MenuItem pauseItem = new MenuItem(\"Pause\");\n MenuItem resumeItem = new MenuItem(\"Resume\");\n\n // Exit listener\n exitItem.addActionListener(arg0 -> System.exit(0));\n\n // Pause listener\n pauseItem.addActionListener(arg0 -> {\n paused = true;\n pauseItem.setEnabled(false);\n resumeItem.setEnabled(true);\n });\n\n // Resume listener\n resumeItem.addActionListener(arg0 -> {\n paused = false;\n pauseItem.setEnabled(true);\n resumeItem.setEnabled(false);\n });\n\n resumeItem.setEnabled(false);\n\n popup.add(resumeItem);\n popup.add(pauseItem);\n popup.add(exitItem);\n }", "Menu getMenuHelp();", "@Override\n public void onClick(View v) {\n PopupMenu popup = new PopupMenu(DogAddInfoActivity.this, button1);\n //Inflating the Popup using xml file\n popup.getMenuInflater()\n .inflate(R.menu.popup_menu, popup.getMenu());\n\n //registering popup with OnMenuItemClickListener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n public boolean onMenuItemClick(MenuItem item) {\n Toast.makeText(\n DogAddInfoActivity.this,\n \"You Clicked : \" + item.getTitle(),\n Toast.LENGTH_SHORT\n ).show();\n breedtext.setText(item.toString());\n return true;\n }\n });\n popup.show();\n }", "@Override\r\npublic void menuDeselected(MenuEvent arg0) {\n\t\r\n}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }", "private static void returnMenu() {\n\t\t\r\n\t}", "public String getParentMenu();", "private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "private void initWayPopup() {\r\n wayMenuItem = new MenuItem[5];\r\n wayMenuItem[0] = new MenuItem(\"Minim path\");\r\n wayMenuItem[1] = new MenuItem(\"Maxim path\");\r\n wayMenuItem[2] = new MenuItem(\"Next path\");\r\n wayMenuItem[3] = new MenuItem(\"Prev path\");\r\n wayMenuItem[4] = new MenuItem(\"Select all\");\r\n\r\n /* Init the popup */\r\n wayPopupMenu = new PopupMenu();\r\n\r\n wayPopupMenu.add(wayMenuItem[0]);\r\n wayPopupMenu.add(wayMenuItem[1]);\r\n wayPopupMenu.addSeparator();\r\n wayPopupMenu.add(wayMenuItem[2]);\r\n wayPopupMenu.add(wayMenuItem[3]);\r\n wayPopupMenu.addSeparator();\r\n wayPopupMenu.add(wayMenuItem[4]);\r\n\r\n wayPopupMenu.addActionListener(this);\r\n\r\n this.add(wayPopupMenu);\r\n }", "private void initComponents() {\r\n jPopupMenuCrosstabReporteElement = new javax.swing.JPopupMenu();\r\n jMenuItemElementProperties = new javax.swing.JMenuItem();\r\n jMenuItemCrosstabProperties = new javax.swing.JMenuItem();\r\n jMenuItemCellProperties = new javax.swing.JMenuItem();\r\n jCheckBoxMenuItemDefaultCellEdit = new javax.swing.JCheckBoxMenuItem();\r\n jSeparator1 = new javax.swing.JSeparator();\r\n jMenuItemCut = new javax.swing.JMenuItem();\r\n jMenuItemCopy = new javax.swing.JMenuItem();\r\n jMenuItemPaste = new javax.swing.JMenuItem();\r\n jMenuItemDelete = new javax.swing.JMenuItem();\r\n jSeparator3 = new javax.swing.JSeparator();\r\n jMenuItemCopyStyle = new javax.swing.JMenuItem();\r\n jMenuItemPasteStyle = new javax.swing.JMenuItem();\r\n jMenuItemTransformStaticText = new javax.swing.JMenuItem();\r\n jMenuItemPattern = new javax.swing.JMenuItem();\r\n jSeparator4 = new javax.swing.JSeparator();\r\n jPopupMenuCrosstab = new javax.swing.JPopupMenu();\r\n jMenuItemCrosstabProperties1 = new javax.swing.JMenuItem();\r\n jMenuItemCellProperties1 = new javax.swing.JMenuItem();\r\n jCheckBoxMenuItemDefaultCellEdit1 = new javax.swing.JCheckBoxMenuItem();\r\n jMenuItemPaste1 = new javax.swing.JMenuItem();\r\n\r\n jMenuItemElementProperties.setText(it.businesslogic.ireport.util.I18n.getString(\"elementProperties\",\"Element properties\"));\r\n jMenuItemElementProperties.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemElementPropertiesActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemElementProperties);\r\n\r\n jMenuItemCrosstabProperties.setText(\"Crosstab properties\");\r\n jMenuItemCrosstabProperties.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemCrosstabPropertiesActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemCrosstabProperties);\r\n\r\n jMenuItemCellProperties.setText(\"Cell properties\");\r\n jMenuItemCellProperties.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemCellPropertiesActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemCellProperties);\r\n\r\n jCheckBoxMenuItemDefaultCellEdit.setText(\"Edit When-No-Data default cell\");\r\n jCheckBoxMenuItemDefaultCellEdit.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jCheckBoxMenuItemDefaultCellEditActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jCheckBoxMenuItemDefaultCellEdit);\r\n\r\n jPopupMenuCrosstabReporteElement.add(jSeparator1);\r\n\r\n jMenuItemCut.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/cut.png\")));\r\n jMenuItemCut.setText(\"Cut\");\r\n jMenuItemCut.setEnabled(false);\r\n jMenuItemCut.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemCutActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemCut);\r\n\r\n jMenuItemCopy.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/copy.png\")));\r\n jMenuItemCopy.setText(\"Copy\");\r\n jMenuItemCopy.setEnabled(false);\r\n jMenuItemCopy.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemCopyActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemCopy);\r\n\r\n jMenuItemPaste.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/paste.png\")));\r\n jMenuItemPaste.setText(\"Paste\");\r\n jMenuItemPaste.setEnabled(false);\r\n jMenuItemPaste.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemPasteActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemPaste);\r\n\r\n jMenuItemDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/delete.png\")));\r\n jMenuItemDelete.setText(\"Delete\");\r\n jMenuItemDelete.setEnabled(false);\r\n jMenuItemDelete.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemDeleteActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemDelete);\r\n\r\n jPopupMenuCrosstabReporteElement.add(jSeparator3);\r\n\r\n jMenuItemCopyStyle.setEnabled(false);\r\n jMenuItemCopyStyle.setLabel(\"Copy style\");\r\n jMenuItemCopyStyle.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemCopyStyleActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemCopyStyle);\r\n\r\n jMenuItemPasteStyle.setEnabled(false);\r\n jMenuItemPasteStyle.setLabel(\"Paste style\");\r\n jMenuItemPasteStyle.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemPasteStyleActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemPasteStyle);\r\n\r\n jMenuItemTransformStaticText.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F3, 0));\r\n jMenuItemTransformStaticText.setLabel(\"Transform in Textfield\");\r\n jMenuItemTransformStaticText.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemTransformStaticTextActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemTransformStaticText);\r\n\r\n jMenuItemPattern.setText(\"Field pattern\");\r\n jMenuItemPattern.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemPatternActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstabReporteElement.add(jMenuItemPattern);\r\n\r\n jPopupMenuCrosstabReporteElement.add(jSeparator4);\r\n\r\n jMenuItemCrosstabProperties1.setText(\"Crosstab properties\");\r\n jMenuItemCrosstabProperties1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemCrosstabPropertiesActionPerformed1(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstab.add(jMenuItemCrosstabProperties1);\r\n\r\n jMenuItemCellProperties1.setText(\"Cell properties\");\r\n jMenuItemCellProperties1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemCellPropertiesActionPerformed1(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstab.add(jMenuItemCellProperties1);\r\n\r\n jCheckBoxMenuItemDefaultCellEdit1.setText(\"Edit When-No-Data default cell\");\r\n jCheckBoxMenuItemDefaultCellEdit1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jCheckBoxMenuItemDefaultCellEdit1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstab.add(jCheckBoxMenuItemDefaultCellEdit1);\r\n\r\n jMenuItemPaste1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/paste.png\")));\r\n jMenuItemPaste1.setText(\"Paste\");\r\n jMenuItemPaste1.setEnabled(false);\r\n jMenuItemPaste1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItemPasteActionPerformed1(evt);\r\n }\r\n });\r\n\r\n jPopupMenuCrosstab.add(jMenuItemPaste1);\r\n\r\n setLayout(null);\r\n\r\n setBackground(new java.awt.Color(204, 204, 204));\r\n setFocusCycleRoot(true);\r\n addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\r\n public void mouseDragged(java.awt.event.MouseEvent evt) {\r\n formMouseDragged(evt);\r\n }\r\n public void mouseMoved(java.awt.event.MouseEvent evt) {\r\n formMouseMoved(evt);\r\n }\r\n });\r\n addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusGained(java.awt.event.FocusEvent evt) {\r\n formFocusGained(evt);\r\n }\r\n });\r\n addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyPressed(java.awt.event.KeyEvent evt) {\r\n formKeyPressed(evt);\r\n }\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n formKeyTyped(evt);\r\n }\r\n });\r\n addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n formMouseClicked(evt);\r\n }\r\n public void mousePressed(java.awt.event.MouseEvent evt) {\r\n formMousePressed(evt);\r\n }\r\n public void mouseReleased(java.awt.event.MouseEvent evt) {\r\n formMouseReleased(evt);\r\n }\r\n });\r\n\r\n }", "private void showBondPopupMenu(final @NotNull Person head, final @NotNull Person tail, final int x, final int y)\n {\n final @NotNull JPopupMenu popupMenu = new JPopupMenu();\n final boolean isParentOrChild = model.isParentOrChild(head, tail);\n final boolean areMarried = model.areMarried(head, tail);\n final boolean canMarry = model.isNotMarried(head)\n && model.isNotMarried(tail)\n && !isParentOrChild;\n if ( canMarry )\n {\n final @NotNull JMenuItem jmiMarry = new JMenuItem(\"Marry To...\");\n jmiMarry.addActionListener(new MarryToPopupListener(head, tail));\n popupMenu.add(jmiMarry);\n }\n else\n {\n if ( areMarried )\n {\n final @NotNull JMenuItem jmiDivorce = new JMenuItem(\"Divorce\");\n jmiDivorce.addActionListener( new DivorcePopupListener(head, tail) );\n popupMenu.add(jmiDivorce);\n }\n }\n //\n final boolean canParent = !isParentOrChild && !areMarried;\n if ( canParent )\n {\n final @NotNull JMenuItem jmiSetParent = new JMenuItem(\"Create Parent -> Child Bond\");\n final @NotNull JMenuItem jmiSetChild = new JMenuItem(\"Create Child -> Parent Bond\");\n jmiSetParent.addActionListener(new BegetPopupListener(head, tail));\n jmiSetChild.addActionListener(new BegetPopupListener(tail, head));\n popupMenu.add(jmiSetChild);\n popupMenu.add(jmiSetParent);\n }\n else\n {\n if ( isParentOrChild )\n {\n final @NotNull JMenuItem jmiDropParent = new JMenuItem(\"Remove Parentship\");\n jmiDropParent.addActionListener(new RemoveParentshipListener(head, tail));\n popupMenu.add(jmiDropParent);\n }\n }\n // Show popup menu\n popupMenu.show(this, x, y);\n }", "public void mouseClicked(MouseEvent e) { // Methode um MausEvent zu untersuchen\r\n\t\t\t\tclickCounter++;\r\n\t\t\t\tif (clickCounter % 2 == 0) { \r\n\t\t\t\t\tmenu.setVisible(false); // bei 2 klicks geht das menü wieder zu\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpopMenu(); // das popMenu wird aufgerufen\r\n\t\t\t\t}\r\n\t\t\t}" ]
[ "0.6386943", "0.63059396", "0.6251407", "0.6143855", "0.6138557", "0.6124725", "0.61206055", "0.61152655", "0.61112595", "0.61027443", "0.60762244", "0.60624206", "0.60624206", "0.6037194", "0.60260135", "0.6022513", "0.60074", "0.599691", "0.5990411", "0.59593606", "0.5958977", "0.5951264", "0.5913796", "0.5913433", "0.58917475", "0.5885296", "0.5858067", "0.5849905", "0.5816398", "0.57807153", "0.5779082", "0.5778039", "0.5774524", "0.5774143", "0.5767688", "0.5764969", "0.5758339", "0.5746106", "0.5733255", "0.5713271", "0.57101184", "0.57078516", "0.5694859", "0.5689219", "0.568652", "0.5686419", "0.5679511", "0.56710863", "0.5670041", "0.5661586", "0.56566817", "0.5651927", "0.56478494", "0.5646611", "0.564636", "0.5635732", "0.5631848", "0.56239825", "0.56206006", "0.5615746", "0.5606681", "0.56004214", "0.55977947", "0.55870223", "0.5585995", "0.5579581", "0.5577136", "0.55759364", "0.5572294", "0.5570773", "0.5567505", "0.55632156", "0.5560929", "0.5560883", "0.556073", "0.5557203", "0.5551727", "0.5551386", "0.5548252", "0.55462766", "0.55428374", "0.5531154", "0.55310804", "0.55269444", "0.5525739", "0.55231255", "0.55226654", "0.5522418", "0.55210555", "0.55210197", "0.5520799", "0.5520545", "0.5520022", "0.5518985", "0.55172044", "0.5515504", "0.5515444", "0.5511517", "0.55101436", "0.55058956" ]
0.80952126
0
vergleicht ob gleiches Objekt, bei ActionEvent fuer Beenden
@Override public void actionPerformed(ActionEvent e) { if (e.getSource() == beenden) { System.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }", "@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void performAction(Event e) {\n\r\n\t}", "@Override\r\n\tpublic void novo(ActionEvent actionEvent) {\n\t\t\r\n\t}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }", "@Override\r\n\tpublic void filtrar(ActionEvent actionEvent) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void insertObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "protected abstract void action(Object obj);", "@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n\t public void actionPerformed(ActionEvent e){\n\t }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}", "@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "public void actionPerformed( ActionEvent event )\n {\n \n }", "@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}", "@Override\n public void actionPerformed(ActionEvent ev) {\n }", "@Override\r\n\tpublic void searchObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void viewReference(ActionEvent actionEvent) {\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this,'P'));\r\n\t\t\t}", "@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n if (e.getActionCommand().startsWith(\"roomobject:\")) {\r\n //split its actioncommand to find out which lamp it was for\r\n String[] tokens = e.getActionCommand().split(\"roomobject:\");\r\n //try to find a room object with this name\r\n GenRoomObject o = (GenRoomObject)roomObjects.get(tokens[1]);\r\n //if found\r\n if (o!=null) {\r\n //toggle corresponding room object\r\n toggleRoomObject(o.address, o.byteValue);\r\n }\r\n }\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n }", "@Override\r\n\tpublic void handle(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void setAction() {\n\t}", "@Override\n\tpublic void action() {\n\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n public void actionPerformed(ActionEvent e)\r\n {\n \r\n }", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) \n\t\t{\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void exportar(ActionEvent actionEvent) {\n\t\t\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\n\t}", "@Override\r\n public void initAction() {\n \r\n }", "public abstract void onAction();", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}", "@Override\n\tpublic void preProcessAction(GwtEvent e) {\n\t\t\n\t}", "@Override\r\n \t\tpublic void actionPerformed(ActionEvent e) {\n \t\t}", "ActionEvent createActionEvent();", "@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}", "@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}", "@Override\r\n public void actionPerformed(ActionEvent nomeDoEvento) {\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t}", "@Override public void handle(ActionEvent e)\n\t {\n\t }", "@Override\n public void actionPerformed(ActionEvent e) {\n handleAction();\n }", "String getOnAction();", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}" ]
[ "0.6872356", "0.6849726", "0.67534286", "0.6748836", "0.6748836", "0.6744491", "0.6690484", "0.6590006", "0.65343326", "0.65293616", "0.65194297", "0.6503898", "0.6469492", "0.6469492", "0.6469492", "0.6465016", "0.6465016", "0.6465016", "0.6465016", "0.6461624", "0.6461624", "0.6461624", "0.6420542", "0.6413716", "0.6407803", "0.63873494", "0.63596255", "0.63197273", "0.6314801", "0.631009", "0.63003755", "0.63003755", "0.628101", "0.628089", "0.6268208", "0.62646544", "0.62646544", "0.6250753", "0.62405914", "0.62321395", "0.62317926", "0.6223912", "0.62235063", "0.6205741", "0.6193759", "0.6183482", "0.6174404", "0.6158284", "0.61577296", "0.6156161", "0.61530536", "0.61530536", "0.6152805", "0.6148928", "0.6148928", "0.614584", "0.614584", "0.614584", "0.614584", "0.614584", "0.614584", "0.614584", "0.614584", "0.614584", "0.614584", "0.614512", "0.61181533", "0.61157644", "0.6112809", "0.6112809", "0.6112809", "0.60873735", "0.60491604", "0.6042155", "0.60416186", "0.60416186", "0.60416186", "0.60416186", "0.60416186", "0.60416186", "0.60416186", "0.60416186", "0.60416186", "0.60416186", "0.60416186", "0.60388976", "0.6031405", "0.6027786", "0.60245645", "0.6021666", "0.6012103", "0.600835", "0.600051", "0.599926", "0.59963", "0.59958994", "0.59946966", "0.59946966", "0.59946966", "0.59946966", "0.59946966" ]
0.0
-1
vergleicht ob gleiches Objekt, ActionEvent fuer Info
@Override public void actionPerformed(ActionEvent e) { if (e.getSource() == info) { menu.setVisible(false); JOptionPane .showMessageDialog(null, "Dies ist eine Uhr mit einstellbaren Wecker\nVersion 1.0"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this,'P'));\r\n\t\t\t}", "String getOnAction();", "@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }", "protected abstract void action(Object obj);", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this, 'H'));\r\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}", "@AutoEscape\n\tpublic String getActionInfo();", "@Override\r\n\tpublic void performAction(Event e) {\n\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this, 'R'));\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSystem.out.print(\"Action: \" + e.getActionCommand() + \"\\n\");\n\t\t\t\t}", "@Override\r\n\tpublic void insertObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t\t\tlogme.debug(String.format(\"Generating details for component %s\", ourComponent));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Get class membership\n\n\t\t\t\t\t\t\t\t\t// Get object properties\n\n\t\t\t\t\t\t\t\t\t// Get data properties\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Get problems\n\n\t\t\t\t\t\t\t\t\tprocessMessageQueue();\n\t\t\t\t\t\t\t\t}", "@Override\r\n\tpublic void filtrar(ActionEvent actionEvent) {\n\t\t\r\n\t}", "private void info(ActionEvent x) {\n\t\tProject p = this.list.getSelectedValue();\n\t\tif (p != null) {\n\t\t\tcontroller.moreinfo(p.getName());\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }", "@Override\r\n\tpublic void novo(ActionEvent actionEvent) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic String getText(Object object) {\r\n\t\tString label = ((Action) object).getKind();\r\n\t\treturn label == null || label.length() == 0 ? getString(\"_UI_Action_type\")\r\n\t\t\t\t: getString(\"_UI_Action_type\") + \" \" + label;\r\n\t}", "public void viewReference(ActionEvent actionEvent) {\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tSet <IRI> individuals = controller.getKnownIndividuals();\n\t\t\t\tfor (IRI item : individuals){\n\t\t\t\t\tcontroller.logappendInfo(item.toString());\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\r\n\tpublic void exportar(ActionEvent actionEvent) {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "public A getAction() {\r\n\t\treturn action;\r\n\t}", "@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}", "public void setActionInfo(String actionInfo);", "public void actionPerformed( ActionEvent event )\n {\n \n }", "@Override\n\tpublic void action() {\n\n\t}", "public abstract void onAction();", "public void actionPerformed(ActionEvent e) {\n if (e.getActionCommand().startsWith(\"roomobject:\")) {\r\n //split its actioncommand to find out which lamp it was for\r\n String[] tokens = e.getActionCommand().split(\"roomobject:\");\r\n //try to find a room object with this name\r\n GenRoomObject o = (GenRoomObject)roomObjects.get(tokens[1]);\r\n //if found\r\n if (o!=null) {\r\n //toggle corresponding room object\r\n toggleRoomObject(o.address, o.byteValue);\r\n }\r\n }\r\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void HandleEvent(int action) {\n\t\tsetActiveAction(action);\n\t\tSystem.out.println(\"action is :\" + action);\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "public int getAction()\n {\n return m_action;\n }", "@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}", "@Override\n\t public void actionPerformed(ActionEvent e){\n\t }", "public interface ObjectAction {\n\t/**\n\t * Get menu filter associated with the tool\n\t */\n\tpublic ObjectMenuFilter getMenuFilter();\n\n\t/**\n\t * Sets menu filter for the tool\n\t */\n\tpublic void setMenuFilter(ObjectMenuFilter filter);\n\n\t/**\n\t * Get tool type\n\t */\n\tpublic int getToolType();\n\n\t/**\n\t * Check if this action is applicable to given node\n\t * \n\t * @param node\n\t * node object\n\t * @return true if applicable\n\t */\n\tpublic boolean isApplicableForNode(AbstractNode node);\n}", "@Override\r\n public void actionPerformed(ActionEvent nomeDoEvento) {\n }", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n public void actionPerformed(ActionEvent ev) {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}", "@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void handleGetItemDetailsButtonAction(ActionEvent event) {\n String itemID = updateItemItemID.getText();\n try{\n //get the details from mgr\n HashMap itemInfo = updateMgr.getItemInfo(itemID);\n //display on the fields\n updateItemTitle.setText((String)itemInfo.get(Table.BOOK_TITLE));\n updateItemAuthor.setText((String)itemInfo.get(Table.BOOK_AUTHOR));\n updateItemDescription.setText((String)itemInfo.get(Table.BOOK_DESCRIPTION));\n updateItemPublishDate.setText(formatDateString((Calendar)itemInfo.get(Table.BOOK_DATE)));\n updateItemISBN.setText((String)itemInfo.get(Table.BOOK_ISBN));\n updateItemGenre.setText((String)itemInfo.get(Table.BOOK_GENRE));\n //enable item info pane\n updateItemInfoPane.setDisable(false);\n this.tempItemID = itemID;\n }\n catch(ItemNotFoundException | SQLException | ClassNotFoundException e){\n this.displayWarning(\"Error\", e.getMessage());\n } catch (Exception ex) {\n this.displayWarning(\"Error\", ex.getMessage());\n } \n }", "@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}", "@Override\r\n\tpublic void searchObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "void actionChanged( final ActionAdapter action );", "private void addAgentAction(Event e) {\n AgentActionEvent event = (AgentActionEvent) e;\n int time = this.getEnvironment().getTime();\n\n this.addCycle(time);\n\n var packet = event.getPacket();\n var agentId = event.getAgent().getID();\n\n switch (event.getAction()) {\n case AgentActionEvent.PICK: {\n var action = new PacketAction(packet.getX(), packet.getY(),\n PacketAction.Mode.Pickup, agentId);\n this.historyPackets.get(time).add(action);\n this.addRowTable(time, agentId, action.toString());\n break;\n }\n case AgentActionEvent.PUT: {\n var action = new PacketAction(event.getToX(), event.getToY(),\n PacketAction.Mode.Drop, agentId);\n this.historyPackets.get(time).add(action);\n this.addRowTable(time, agentId, action.toString());\n break;\n }\n case AgentActionEvent.DELIVER: {\n var action = new PacketAction(event.getToX(), event.getToY(),\n PacketAction.Mode.Delivery, agentId);\n this.historyPackets.get(time).add(action);\n this.addRowTable(time, agentId, action.toString());\n break;\n }\n case AgentActionEvent.STEP: {\n var action = new AgentMove(event.getFromX(), event.getFromY(),\n event.getToX(), event.getToY(), agentId);\n this.historyMoves.get(time).add(action);\n this.addRowTable(time, agentId, action.toString());\n break;\n }\n }\n\n repaint();\n }", "@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n\n }", "@Override\r\n\tpublic void saveAction(Person p) {\n\t\tSystem.out.println(this.getClass().getCanonicalName());\r\n\t}", "public SoHandleEventAction getAction() { return eventAction; }", "@Override\n\tpublic String getAction() {\n\t\treturn action;\n\t}", "public int getAction() {\n return action;\n }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "@Override\n\tpublic void showAction(int id) {\n\t\t\n\t}", "@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}", "@Override\n\t\tpublic void onAction(ForgePlayer player, NBTTagCompound data)\n\t\t{\n\t\t}", "@Override\n public void actionOccured(Perspective perspective, ActionDescription action) {\n\n }", "public abstract Action getAction();", "public void executeAction( String actionInfo );", "protected void addActionPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_GraphElement_action_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_GraphElement_action_feature\", \"_UI_GraphElement_type\"),\n\t\t\t\t HenshinPackage.Literals.GRAPH_ELEMENT__ACTION,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "public int getAction() {\n return action_;\n }", "@Override\r\n public void actionPerformed(ActionEvent e)\r\n {\n \r\n }", "@Override\n public void onAction(RPObject player, RPAction action) {\n }", "@Override\n\tpublic void action(Object... objects) {\n\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\tString desc = \"【游戏开始】\";\n\t\tmap.put(\"description\", desc);\n\t\tResult info = new Result(CommonIdentifier.Game_Start,map);\n\t\tsuper.notifyObservers(info);\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tJButton clicked=(JButton)e.getSource();\n\t\tif(clicked == mostrarinfo)\n\t\t{\n\t\t\t//textPanel.appendText(\"Good Bye\\n\");\n\t\t\tif(arrayListener!=null)\n\t\t\t{\n\t\t\t\tarrayListener.arrayEminetted(this.myList);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@FXML public void showInfo(ActionEvent e){\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\talert.setTitle(\"Picture Information\");\n\t\talert.setHeaderText(\"Current Photo Information\");\n\t\talert.setContentText(listOfPhotos.get(photoNumber).printAttributes());\n\n\t\talert.showAndWait();\n\t}", "@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}" ]
[ "0.6517341", "0.64716005", "0.63128877", "0.62997603", "0.6299556", "0.6272257", "0.6248392", "0.6218906", "0.6218906", "0.6216742", "0.6212176", "0.62061155", "0.6198738", "0.6188525", "0.6188525", "0.6188525", "0.6182102", "0.6171886", "0.61428624", "0.61383575", "0.60979414", "0.60914713", "0.6057123", "0.6050055", "0.6039882", "0.6028477", "0.6022763", "0.59877396", "0.59809613", "0.5972922", "0.5972922", "0.5972922", "0.5972922", "0.59687304", "0.59660673", "0.59660673", "0.59660673", "0.5964946", "0.5964517", "0.59610033", "0.5953746", "0.59348977", "0.59250194", "0.5924864", "0.5920478", "0.5917356", "0.5909464", "0.5886928", "0.5885435", "0.58760726", "0.5873947", "0.5863309", "0.5855478", "0.5844112", "0.58414316", "0.58414316", "0.5822787", "0.5822787", "0.5821209", "0.5801399", "0.579939", "0.579939", "0.57985777", "0.57834727", "0.57831943", "0.5781843", "0.57793975", "0.576068", "0.5758304", "0.57558745", "0.57518137", "0.5751428", "0.5750588", "0.5749446", "0.5744222", "0.57429945", "0.57408357", "0.57334745", "0.57282734", "0.5710693", "0.57086897", "0.5703658", "0.57009363", "0.57001734", "0.56985813", "0.5694543", "0.56917596", "0.5690493", "0.5690493", "0.5690493", "0.5674461", "0.56734484", "0.5671342", "0.56686825", "0.5666244", "0.56590515", "0.56561893", "0.5651596", "0.5651596", "0.5651596", "0.5651596" ]
0.0
-1
Ruft nur den Konstruktor auf und legt das Design fest
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException, InterruptedException { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); new Start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "protected Doodler() {\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "public contrustor(){\r\n\t}", "private UsineJoueur() {}", "private DittaAutonoleggio(){\n \n }", "@Override\n protected void init() {\n }", "private stendhal() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "protected FanisamBato(){\n\t}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\tpublic void init() {}", "public void init() {\r\n\t\t// to override\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n public void init() {\n\n super.init();\n\n }", "@Override\n public void init() {}", "private Rekenhulp()\n\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 public void init() {\n\n }", "public AntrianPasien() {\r\n\r\n }", "@Override\n public void init() {\n }", "@Override // opcional\n public void init(){\n\n }", "protected void init() {\n // to override and use this method\n }", "protected Approche() {\n }", "private Infer() {\n\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "protected Asignatura()\r\n\t{}", "protected Product() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "private TMCourse() {\n\t}", "public AbstractGenerateurAbstractSeule() {\r\n\t\tsuper();\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public Oddeven() {\n initComponents();\n }", "public SgaexpedbultoImpl()\n {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public Empfänger() {\t\t\t\t\t// std. Konstruktor\r\n\t\t}", "private ControleurAcceuil(){ }", "@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\tpublic void erstellen() {\n\t\t\n\t}", "public MijnKlasse()\r\n\t\t{\r\n\t\t\tmijnMethode();\r\n\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void init() {\n }", "public SlanjePoruke() {\n }", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public Husdjurshotell(){}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public DesigningSec() {\n initComponents();\n }", "@Override\n\tpublic void init() {\n\t}", "@Override public void init()\n\t\t{\n\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "protected Product()\n\t{\n\t}", "public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }", "public Kullanici() {}", "public Pasien() {\r\n }", "public dokter() {\n initComponents();\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public void inizializza() {\n\n /* invoca il metodo sovrascritto della superclasse */\n super.inizializza();\n\n }", "public OOP_207(){\n\n }", "private RepositorioAtendimentoPublicoHBM() {\r\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}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public UConnecte() {\n\t\tsuper();\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "private IngenicoDisplay(){\n\n }", "protected CayenneWidgetFactory() {\n super();\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public EnsembleLettre() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}" ]
[ "0.7222706", "0.7053437", "0.698248", "0.6763441", "0.6707373", "0.6705389", "0.6662979", "0.6651694", "0.66433626", "0.66314095", "0.6631105", "0.660841", "0.66070443", "0.6592838", "0.65698624", "0.65603113", "0.65440613", "0.65439636", "0.6543081", "0.6537042", "0.65312064", "0.6525416", "0.6525416", "0.6525416", "0.65204906", "0.6508574", "0.65081227", "0.64907163", "0.6489432", "0.6488854", "0.64849424", "0.64843", "0.6475984", "0.64727324", "0.64726603", "0.64648324", "0.6459814", "0.6435214", "0.6435214", "0.64282644", "0.6427052", "0.641812", "0.64125764", "0.64025193", "0.64025193", "0.64025193", "0.64025193", "0.64025193", "0.6393615", "0.6379804", "0.6378928", "0.6378928", "0.6378928", "0.6376221", "0.63743615", "0.63730466", "0.6372387", "0.6366564", "0.6366564", "0.6366564", "0.6366564", "0.6366564", "0.6366564", "0.63554674", "0.6355464", "0.63542014", "0.6351959", "0.634374", "0.6339461", "0.63337845", "0.6333751", "0.6333751", "0.6333751", "0.6332932", "0.632614", "0.63250315", "0.630495", "0.6302541", "0.62928087", "0.62735856", "0.62713885", "0.6267592", "0.6266867", "0.6266317", "0.6261239", "0.6258318", "0.6253443", "0.62520415", "0.62520415", "0.62418896", "0.624172", "0.6234965", "0.62317", "0.62236184", "0.6219363", "0.62171155", "0.6214667", "0.62128216", "0.62067646", "0.6193091", "0.6193091" ]
0.0
-1
Usage of this element for creating or updating a NIC is deprecated, use "vnic_profile" instead. It is preserved because it is still in use by the `initialization` element, as a holder for IP addresses and other network details.
@Link Network network();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LabNetworkProfile networkProfile();", "public static void UpdateNetworkVirtualization(AppiumDriver driver, String networkProfile) {\r\n\r\n\t\t\tHashMap<Object, Object> params = new HashMap<>();\r\n\r\n\t\t\tparams.put(\"profile\", networkProfile);\r\n\r\n\t\t\tdriver.executeScript(\"mobile:vnetwork:update\", params);\r\n\r\n\t\t}", "WithCreate withNetworkProfile(LabNetworkProfile networkProfile);", "@NonNull\n public static Ikev2VpnProfile fromVpnProfile(@NonNull VpnProfile profile)\n throws GeneralSecurityException {\n final Builder builder;\n if (profile.ikeTunConnParams == null) {\n builder = new Builder(profile.server, profile.ipsecIdentifier);\n builder.setAllowedAlgorithms(profile.getAllowedAlgorithms());\n\n switch (profile.type) {\n case TYPE_IKEV2_IPSEC_USER_PASS:\n builder.setAuthUsernamePassword(\n profile.username,\n profile.password,\n certificateFromPemString(profile.ipsecCaCert));\n break;\n case TYPE_IKEV2_IPSEC_PSK:\n builder.setAuthPsk(decodeFromIpsecSecret(profile.ipsecSecret));\n break;\n case TYPE_IKEV2_IPSEC_RSA:\n final PrivateKey key;\n if (profile.ipsecSecret.startsWith(PREFIX_KEYSTORE_ALIAS)) {\n final String alias =\n profile.ipsecSecret.substring(PREFIX_KEYSTORE_ALIAS.length());\n key = getPrivateKeyFromAndroidKeystore(alias);\n } else if (profile.ipsecSecret.startsWith(PREFIX_INLINE)) {\n key = getPrivateKey(profile.ipsecSecret.substring(PREFIX_INLINE.length()));\n } else {\n throw new IllegalArgumentException(\"Invalid RSA private key prefix\");\n }\n\n final X509Certificate userCert =\n certificateFromPemString(profile.ipsecUserCert);\n final X509Certificate serverRootCa =\n certificateFromPemString(profile.ipsecCaCert);\n builder.setAuthDigitalSignature(userCert, key, serverRootCa);\n break;\n default:\n throw new IllegalArgumentException(\"Invalid auth method set\");\n }\n } else {\n builder = new Builder(profile.ikeTunConnParams);\n }\n\n builder.setProxy(profile.proxy);\n builder.setBypassable(profile.isBypassable);\n builder.setMetered(profile.isMetered);\n builder.setMaxMtu(profile.maxMtu);\n if (profile.isRestrictedToTestNetworks) {\n builder.restrictToTestNetworks();\n }\n\n if (profile.excludeLocalRoutes && !profile.isBypassable) {\n Log.w(TAG, \"ExcludeLocalRoutes should only be set in the bypassable VPN\");\n }\n\n builder.setLocalRoutesExcluded(profile.excludeLocalRoutes && profile.isBypassable);\n builder.setRequiresInternetValidation(profile.requiresInternetValidation);\n\n builder.setAutomaticNattKeepaliveTimerEnabled(profile.automaticNattKeepaliveTimerEnabled);\n builder.setAutomaticIpVersionSelectionEnabled(profile.automaticIpVersionSelectionEnabled);\n\n return builder.build();\n }", "interface WithNetworkProfile {\n /**\n * Specifies the networkProfile property: The network profile for the lab, typically applied via a lab plan.\n * This profile cannot be modified once a lab has been created..\n *\n * @param networkProfile The network profile for the lab, typically applied via a lab plan. This profile\n * cannot be modified once a lab has been created.\n * @return the next definition stage.\n */\n WithCreate withNetworkProfile(LabNetworkProfile networkProfile);\n }", "@NonNull\n public VpnProfile toVpnProfile() throws IOException, GeneralSecurityException {\n final VpnProfile profile = new VpnProfile(\"\" /* Key; value unused by IKEv2VpnProfile(s) */,\n mIsRestrictedToTestNetworks, mExcludeLocalRoutes, mRequiresInternetValidation,\n mIkeTunConnParams, mAutomaticNattKeepaliveTimerEnabled,\n mAutomaticIpVersionSelectionEnabled);\n profile.proxy = mProxyInfo;\n profile.isBypassable = mIsBypassable;\n profile.isMetered = mIsMetered;\n profile.maxMtu = mMaxMtu;\n profile.areAuthParamsInline = true;\n profile.saveLogin = true;\n // The other fields should come from mIkeTunConnParams if it's available.\n if (mIkeTunConnParams != null) {\n profile.type = VpnProfile.TYPE_IKEV2_FROM_IKE_TUN_CONN_PARAMS;\n return profile;\n }\n\n profile.type = mType;\n profile.server = getServerAddr();\n profile.ipsecIdentifier = getUserIdentity();\n profile.setAllowedAlgorithms(mAllowedAlgorithms);\n switch (mType) {\n case TYPE_IKEV2_IPSEC_USER_PASS:\n profile.username = mUsername;\n profile.password = mPassword;\n profile.ipsecCaCert =\n mServerRootCaCert == null ? \"\" : certificateToPemString(mServerRootCaCert);\n break;\n case TYPE_IKEV2_IPSEC_PSK:\n profile.ipsecSecret = encodeForIpsecSecret(mPresharedKey);\n break;\n case TYPE_IKEV2_IPSEC_RSA:\n profile.ipsecUserCert = certificateToPemString(mUserCert);\n profile.ipsecSecret =\n PREFIX_INLINE + encodeForIpsecSecret(mRsaPrivateKey.getEncoded());\n profile.ipsecCaCert =\n mServerRootCaCert == null ? \"\" : certificateToPemString(mServerRootCaCert);\n break;\n default:\n throw new IllegalArgumentException(\"Invalid auth method set\");\n }\n\n return profile;\n }", "com.google.cloud.compute.v1.NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder(int index);", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"true\", value = \"Is capable of nic hot unplug (no reboot required)\")\n\n public Boolean getNicHotUnplug() {\n return nicHotUnplug;\n }", "com.google.cloud.compute.v1.NetworkInterface getNetworkInterfaces(int index);", "public void setCnicNo(String value) {\n setAttributeInternal(CNICNO, value);\n }", "public void setNicHotUnPlug(java.lang.Boolean nicHotUnPlug) {\r\n this.nicHotUnPlug = nicHotUnPlug;\r\n }", "public static void startNetworkVirtualization(AppiumDriver driver, String networkProfile) {\r\n\r\n\t\t\tHashMap<Object, Object> params = new HashMap<>();\r\n\r\n\t\t\tparams.put(\"profile\", networkProfile);\r\n\r\n\t\t\tdriver.executeScript(\"mobile:vnetwork:start\", params);\r\n\r\n\t\t}", "public NetworkProfile networkProfile() {\n return this.networkProfile;\n }", "java.util.List<com.google.cloud.compute.v1.NetworkInterface> getNetworkInterfacesList();", "public void setNicHotPlug(java.lang.Boolean nicHotPlug) {\r\n this.nicHotPlug = nicHotPlug;\r\n }", "public Builder setNetwork(com.google.cloud.networkmanagement.v1beta1.NetworkInfo value) {\n if (networkBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n stepInfo_ = value;\n onChanged();\n } else {\n networkBuilder_.setMessage(value);\n }\n stepInfoCase_ = 17;\n return this;\n }", "public Builder setSnIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n snIp_ = value;\n onChanged();\n return this;\n }", "public Builder setSnIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n snIp_ = value;\n onChanged();\n return this;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/networks\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<NetworkList, Network> listNetwork();", "public void setNaziv(String naziv) {\n\t\tthis.naziv = naziv;\n\t}", "UpdateNetworkResponse updateVirtualisedNetworkResource(\n UpdateNetworkRequest updateNetworkRequest, PoP poP);", "public boolean removeNicCard(String vmuuid, String networkName) throws HyperVException;", "public String getNsProfileId() {\n return nsProfileId;\n }", "public native void setIptcProfile(ProfileInfo profile)\n\t\t\tthrows MagickException;", "@Override\n\tpublic String getNetworkType()\n\t{\n\t\treturn DeviceNetworkType.UEI;\n\t}", "public void setNaziv(String naziv) {\r\n\t\tthis.naziv = naziv;\r\n\t}", "public com.profitbricks.rest.domain.Nic assignNicToLoadBalancer(String dataCenterId, String loadBalancerId, String nicId) throws RestClientException, IOException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {\n PBObject payload = new PBObject();\n payload.setId(nicId);\n\n return client.create(getUrlBase().concat(\"datacenters\").concat(\"/\").concat(dataCenterId).concat(\"/\").concat(\"loadbalancers\").concat(\"/\").concat(loadBalancerId).concat(\"/\").\n concat(\"balancednics\"), payload, com.profitbricks.rest.domain.Nic.class, 202);\n }", "public java.lang.Boolean getNicHotUnPlug() {\r\n return nicHotUnPlug;\r\n }", "static NNICFragment newInstance(Non_Negative_Integer_Counts_Trial NNIC) {\n // make a bundle to actually store object in\n Bundle args = new Bundle();\n // put NNIC in with key \"NNIC\"\n args.putSerializable(\"NNIC\", NNIC);\n\n // make a new fragment of this type\n NNICFragment nnicfragment = new NNICFragment();\n // set the fragment arguments to the bundle\n nnicfragment.setArguments(args);\n // return the fragment\n return nnicfragment;\n }", "interface WithConnectionProfile {\n /**\n * Specifies the connectionProfile property: The connection profile for the lab. This controls settings such\n * as web access to lab resources or whether RDP or SSH ports are open..\n *\n * @param connectionProfile The connection profile for the lab. This controls settings such as web access to\n * lab resources or whether RDP or SSH ports are open.\n * @return the next definition stage.\n */\n Update withConnectionProfile(ConnectionProfile connectionProfile);\n }", "public Profile(String imei, String softwareVersion, String simCountryIso, String simOperator, String simOperatorName, String simSerialNumber,\n String imsiNumber, String macAddress, String ipAddress, ArrayList<String> networksSSID, String osVersion,\n String sdkVersion, ArrayList<String> googleAccounts, ArrayList<String> memorizedAccounts, String deviceName,\n String screenResolution, String keyboardLanguage, ArrayList<String> inputMethods, ArrayList<String> installedApplications) {\n\n this.imei = imei;\n this.softwareVersion = softwareVersion;\n this.simCountryIso = simCountryIso;\n this.simOperator = simOperator;\n this.simOperatorName = simOperatorName;\n this.simSerialNumber = simSerialNumber;\n this.imsiNumber = imsiNumber;\n this.macAddress = macAddress;\n this.ipAddress = ipAddress;\n this.networksSSID = networksSSID;\n this.osVersion = osVersion;\n this.sdkVersion = sdkVersion;\n this.googleAccounts = googleAccounts;\n this.memorizedAccounts = memorizedAccounts;\n this.deviceName = deviceName;\n this.screenResolution = screenResolution;\n this.keyboardLanguage = keyboardLanguage;\n this.inputMethods = inputMethods;\n this.installedApplications = installedApplications;\n this.changedInformation = \"\";\n }", "int saveNetworkInterface(NetworkInterface networkInterface);", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"true\", value = \"Is capable of nic hot plug (no reboot required)\")\n\n public Boolean getNicHotPlug() {\n return nicHotPlug;\n }", "public interface NetDev {\n int ONLINE = 1;\n int OFFLINE = 2;\n\n String deviceID = null;\n String ipAddress = null;\n int port = 0;\n String username = null;\n String password = null;\n String passwordPriviledgedMode = null;\n int state = 0;\n ArrayList<Config> configs = null;\n long backupPeriod = 0; // in seconds?\n}", "@NonNull\n @RequiresFeature(PackageManager.FEATURE_IPSEC_TUNNELS)\n public Ikev2VpnProfile build() {\n return new Ikev2VpnProfile(\n mType,\n mServerAddr,\n mUserIdentity,\n mPresharedKey,\n mServerRootCaCert,\n mUsername,\n mPassword,\n mRsaPrivateKey,\n mUserCert,\n mProxyInfo,\n mAllowedAlgorithms,\n mIsBypassable,\n mIsMetered,\n mMaxMtu,\n mIsRestrictedToTestNetworks,\n mExcludeLocalRoutes,\n mRequiresInternetValidation,\n mIkeTunConnParams,\n mAutomaticNattKeepaliveTimerEnabled,\n mAutomaticIpVersionSelectionEnabled);\n }", "public void addVMinterfPair(String intrfcLabel, String ipAddress) {\n\r\n this.intrfces.add(new VMinterface(intrfcLabel, ipAddress));\r\n }", "@Override\n public String getName() {\n return \"NAT\";\n }", "public Builder setSnIpBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n snIp_ = value;\n onChanged();\n return this;\n }", "public Builder setSnIpBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n snIp_ = value;\n onChanged();\n return this;\n }", "java.util.List<? extends com.google.cloud.compute.v1.NetworkInterfaceOrBuilder>\n getNetworkInterfacesOrBuilderList();", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.NetworkInfo getNetwork() {\n if (stepInfoCase_ == 17) {\n return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance();\n }", "public DefaultCniNetworkInner() {\n }", "@ZAttr(id=562)\n public void unsetVirtualIPAddress() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraVirtualIPAddress, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.NetworkInfoOrBuilder getNetworkOrBuilder() {\n if (stepInfoCase_ == 17) {\n return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance();\n }", "public interface OnDeviceProfileChangeListener {\n\n /**\n * Called when the device profile is reassigned. Note that for layout and measurements, it\n * is sufficient to listen for inset changes. Use this callback when you need to perform\n * a one time operation.\n */\n void onDeviceProfileChanged(DeviceProfile dp);\n }", "NetworkInterface getNetworkInterface(int id);", "public NetworkInfo getActiveNetworkInfo() {\n\treturn null;\r\n}", "public com.profitbricks.rest.domain.Nic updateNic(String dataCenterId, String serverId, String nicId, Object nic) throws RestClientException, IOException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {\n return client.update(getUrlBase().concat(\"datacenters\").concat(\"/\").concat(dataCenterId).concat(\"/\")\n .concat(parentResource).concat(\"/\").concat(serverId).concat(\"/\")\n .concat(resource).concat(\"/\").concat(nicId), nic, com.profitbricks.rest.domain.Nic.class, 202);\n }", "public java.lang.Boolean getNicHotPlug() {\r\n return nicHotPlug;\r\n }", "public String getNip() {\n\treturn this.nip;\n }", "public String getNIF() { return this.NIF; }", "void onDeviceProfileChanged(DeviceProfile dp);", "public void setNatPolicy(NatPolicy policy);", "public java.lang.String getSnIp() {\n java.lang.Object ref = snIp_;\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 snIp_ = s;\n return s;\n }\n }", "public java.lang.String getSnIp() {\n java.lang.Object ref = snIp_;\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 snIp_ = s;\n return s;\n }\n }", "public void setNmi(int nmi){\n this.nmi=nmi;\n }", "public interface NetworkConfig {\n\n @NonNull\n String getBaseUrl();\n\n void updateBaseUrl();\n\n String getAuthUsername();\n\n String getAuthPassword();\n}", "public com.google.protobuf.ByteString\n getSnIpBytes() {\n java.lang.Object ref = snIp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n snIp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSnIpBytes() {\n java.lang.Object ref = snIp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n snIp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getSnIp() {\n java.lang.Object ref = snIp_;\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 snIp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSnIp() {\n java.lang.Object ref = snIp_;\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 snIp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static void noNetworkZone(AppiumDriver driver, String bandwidthin) {\r\n\r\n\t\t\tHashMap<Object, Object> params = new HashMap<>();\r\n\r\n\t\t\tparams.put(\"bandwidth.in\", bandwidthin);\r\n\r\n\t\t\tdriver.executeScript(\"mobile:vnetwork:start\", params);\r\n\r\n\t\t}", "java.lang.String getSnIp();", "java.lang.String getSnIp();", "Update withConnectionProfile(ConnectionProfile connectionProfile);", "@Deprecated\n public V1SeccompProfile getSeccompProfile() {\n return this.seccompProfile!=null ?this.seccompProfile.build():null;\n }", "com.google.protobuf.ByteString\n getSnIpBytes();", "com.google.protobuf.ByteString\n getSnIpBytes();", "public void setVIP(boolean VIP);", "public String targetNicResourceId() {\n return this.targetNicResourceId;\n }", "public void setCsp_Nif(java.lang.String csp_Nif) {\n this.csp_Nif = csp_Nif;\n }", "public com.google.protobuf.ByteString\n getSnIpBytes() {\n java.lang.Object ref = snIp_;\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 snIp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSnIpBytes() {\n java.lang.Object ref = snIp_;\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 snIp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static KubevirtNetwork parseKubevirtNetwork(String resource) {\n JsonObject json = JsonObject.readFrom(resource);\n String name = parseResourceName(resource);\n JsonObject annots = json.get(\"metadata\").asObject().get(\"annotations\").asObject();\n if (annots.get(NETWORK_CONFIG) == null) {\n // SR-IOV network does not contain network-config field\n return null;\n }\n String networkConfig = annots.get(NETWORK_CONFIG).asString();\n if (networkConfig != null) {\n KubevirtNetwork.Builder builder = DefaultKubevirtNetwork.builder();\n\n JsonObject configJson = JsonObject.readFrom(networkConfig);\n String type = configJson.get(TYPE).asString().toUpperCase(Locale.ROOT);\n Integer mtu = configJson.get(MTU).asInt();\n String gatewayIp = configJson.getString(GATEWAY_IP, \"\");\n boolean defaultRoute = configJson.getBoolean(DEFAULT_ROUTE, false);\n\n if (!type.equalsIgnoreCase(FLAT.name())) {\n builder.segmentId(configJson.getString(SEGMENT_ID, \"\"));\n }\n\n String cidr = configJson.getString(CIDR, \"\");\n\n JsonObject poolJson = configJson.get(IP_POOL).asObject();\n if (poolJson != null) {\n String start = poolJson.getString(START, \"\");\n String end = poolJson.getString(END, \"\");\n builder.ipPool(new KubevirtIpPool(\n IpAddress.valueOf(start), IpAddress.valueOf(end)));\n }\n\n if (configJson.get(HOST_ROUTES) != null) {\n JsonArray routesJson = configJson.get(HOST_ROUTES).asArray();\n Set<KubevirtHostRoute> hostRoutes = new HashSet<>();\n if (routesJson != null) {\n for (int i = 0; i < routesJson.size(); i++) {\n JsonObject route = routesJson.get(i).asObject();\n String destinationStr = route.getString(DESTINATION, \"\");\n String nexthopStr = route.getString(NEXTHOP, \"\");\n\n if (StringUtils.isNotEmpty(destinationStr) &&\n StringUtils.isNotEmpty(nexthopStr)) {\n hostRoutes.add(new KubevirtHostRoute(\n IpPrefix.valueOf(destinationStr),\n IpAddress.valueOf(nexthopStr)));\n }\n }\n }\n builder.hostRoutes(hostRoutes);\n }\n\n if (configJson.get(DNSES) != null) {\n JsonArray dnsesJson = configJson.get(DNSES).asArray();\n Set<IpAddress> dnses = new HashSet<>();\n if (dnsesJson != null) {\n for (int i = 0; i < dnsesJson.size(); i++) {\n String dns = dnsesJson.get(i).asString();\n if (StringUtils.isNotEmpty(dns)) {\n dnses.add(IpAddress.valueOf(dns));\n }\n }\n }\n builder.dnses(dnses);\n }\n\n builder.networkId(name).name(name).type(KubevirtNetwork.Type.valueOf(type))\n .mtu(mtu).gatewayIp(IpAddress.valueOf(gatewayIp))\n .defaultRoute(defaultRoute).cidr(cidr);\n\n return builder.build();\n }\n return null;\n }", "public void setIp(String value) {\n set(24, value);\n }", "public void setProfileImage(ProfileImage profileImage) {\n this.profileImage = profileImage;\n }", "public interface ProfilePINEnable\n {\n /**\n * no need input pin\n */\n String NEEDLESS_INPUT = \"0\";\n\n /**\n * need input pin\n */\n String NEED_INPUT = \"1\";\n }", "void setClientProfile(ClientProfile profile)\n throws IOException, SoapException;", "public void updateProfile(Profile newProfile) throws Exception {\n // If the two profiles are exactly the same, an update isn't required\n if (this.equals(newProfile))\n return;\n\n String logString = newProfile.getImei() + \": \";\n // Check all attributes, updating them whenever they differ\n if (!softwareVersion.equals(newProfile.getSoftwareVersion())) {\n ProfileDBManager.updateSoftwareVersion(this.imei, newProfile.getSoftwareVersion());\n logString = logString + \"Old SW Version - \" + softwareVersion + \" | New SW Version - \" + newProfile.getSoftwareVersion() + \".\";\n }\n\n if (!simOperator.equals(newProfile.getSimOperator())) {\n ProfileDBManager.updateSimOperator(this.imei, newProfile.getSimOperator());\n logString = logString + \"Old SIM Operator - \" + simOperator + \" | New SIM Operator - \" + newProfile.getSimOperator() + \".\";\n }\n\n if (!simOperatorName.equals(newProfile.getSimOperatorName())) {\n ProfileDBManager.updateSimOperatorName(this.imei, newProfile.getSimOperatorName());\n logString = logString + \"Old SIM Operator Name - \" + simOperatorName + \" | New SIM Operator Name - \" + newProfile.getSimOperatorName() + \".\";\n }\n\n if(!simSerialNumber.equals(newProfile.getSimSerialNumber())) {\n ProfileDBManager.updateSimSerialNumber(this.imei, newProfile.getSimSerialNumber());\n logString = logString + \"Old SIM Serial Number - \" + simSerialNumber + \" | New SIM Serial Number - \" + newProfile.getSimSerialNumber() + \".\";\n }\n\n if(!simCountryIso.equals(newProfile.getSimCountryIso())) {\n ProfileDBManager.updateSimCountryIso(this.imei, newProfile.getSimCountryIso());\n logString = logString + \"Old SIM Country ISO - \" + simCountryIso + \" | New SIM Country ISO - \" + newProfile.getSimCountryIso() + \".\";\n }\n\n if(!imsiNumber.equals(newProfile.getImsiNumber())) {\n ProfileDBManager.updateImsiNumber(this.imei, newProfile.getImsiNumber());\n logString = logString + \"Old IMSI Number - \" + imsiNumber + \" | New IMSI Number - \" + newProfile.getImsiNumber() + \".\";\n }\n\n if (!ipAddress.equals(newProfile.getIpAddress())) {\n ProfileDBManager.updateIpAddress(this.imei, newProfile.getIpAddress());\n logString = logString + \"Old IP Address Location - \" + ipAddress + \" | New IP Address Location - \" + newProfile.getIpAddress() + \".\";\n }\n\n if(!osVersion.equals(newProfile.getOsVersion())) {\n ProfileDBManager.updateOsVersion(this.imei, newProfile.getOsVersion());\n logString = logString + \"Old OS Version - \" + osVersion + \" | New OS Version - \" + newProfile.getOsVersion() + \".\";\n }\n\n if(!sdkVersion.equals(newProfile.getSdkVersion())) {\n ProfileDBManager.updateSdkVersion(this.imei, newProfile.getSdkVersion());\n logString = logString + \"Old SDK Version - \" + sdkVersion + \" | New SDK Version - \" + newProfile.getSdkVersion() + \".\";\n }\n\n if(!deviceName.equals(newProfile.getDeviceName())) {\n ProfileDBManager.updateDeviceName(this.imei, newProfile.getDeviceName());\n logString = logString + \"Old Device Name - \" + deviceName + \" | New Device Name - \" + newProfile.getDeviceName() + \".\";\n }\n\n if(!keyboardLanguage.equals(newProfile.getKeyboardLanguage())) {\n ProfileDBManager.updateKeyboardLanguage(this.imei, newProfile.getKeyboardLanguage());\n logString = logString + \"Old Keyboard Language - \" + keyboardLanguage + \" | New Keyboard Language - \" + newProfile.getKeyboardLanguage() + \".\";\n }\n\n if(!networksSSID.equals(newProfile.getNetworksSSID())) {\n ProfileDBManager.updateNetworksSSID(this.imei, newProfile.getNetworksSSID());\n logString = logString + \"Old Networks - \" + networksSSID.toString() + \" | New Networks - \" + newProfile.getNetworksSSID().toString() + \".\";\n }\n\n if(!googleAccounts.equals(newProfile.getGoogleAccounts())) {\n ProfileDBManager.updateGoogleAccounts(this.imei, newProfile.getGoogleAccounts());\n logString = logString + \"Old Google Accounts - \" + googleAccounts.toString() + \" | New Google Accounts - \" + newProfile.getGoogleAccounts().toString() + \".\";\n }\n\n if(!memorizedAccounts.equals(newProfile.getMemorizedAccounts())) {\n ProfileDBManager.updateMemorizedAccounts(this.imei, newProfile.getMemorizedAccounts());\n logString = logString + \"Old Accounts - \" + memorizedAccounts.toString() + \" | New Accounts - \" + newProfile.getMemorizedAccounts().toString() + \".\";\n }\n\n if(!inputMethods.equals(newProfile.getInputMethods())) {\n ProfileDBManager.updateInputMethods(this.imei, newProfile.getInputMethods());\n logString = logString + \"Old Input Methods - \" + inputMethods.toString() + \" | New Input Methods - \" + newProfile.getInputMethods().toString() + \".\";\n }\n\n if(!installedApplications.equals(newProfile.getInstalledApplications())) {\n ProfileDBManager.updateInstalledApplications(this.imei, newProfile.getInstalledApplications());\n logString = logString + \"Old Applications - \" + installedApplications.toString() + \" | New Applications - \" + newProfile.getInstalledApplications().toString() + \".\";\n }\n\n if (ServerUtils.SERVER_DEPLOY) LogManager.getInstance().logInfo(logString);\n System.out.println(logString);\n }", "public void connect_NoPERequest(BOOL newIV){\n NoPERequest = newIV;\n }", "interface WithConnectionProfile {\n /**\n * Specifies the connectionProfile property: The connection profile for the lab. This controls settings such\n * as web access to lab resources or whether RDP or SSH ports are open..\n *\n * @param connectionProfile The connection profile for the lab. This controls settings such as web access to\n * lab resources or whether RDP or SSH ports are open.\n * @return the next definition stage.\n */\n WithCreate withConnectionProfile(ConnectionProfile connectionProfile);\n }", "public com.profitbricks.rest.domain.Nic createNic(String dataCenterId, String serverId, com.profitbricks.rest.domain.Nic nic) throws RestClientException, IOException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {\n return client.create(getUrlBase().concat(\"datacenters\").concat(\"/\").concat(dataCenterId).concat(\"/\")\n .concat(parentResource).concat(\"/\").concat(serverId).concat(\"/\")\n .concat(resource), nic, com.profitbricks.rest.domain.Nic.class, 202);\n }", "public void setNPI(int value) {\r\n this.npi = value;\r\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.NetworkInfo getNetwork() {\n if (networkBuilder_ == null) {\n if (stepInfoCase_ == 17) {\n return (com.google.cloud.networkmanagement.v1beta1.NetworkInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 17) {\n return networkBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.NetworkInfo.getDefaultInstance();\n }\n }", "Update withVirtualMachineProfile(VirtualMachineProfile virtualMachineProfile);", "public String getNiceServerIP(){\n\t\treturn(niceServerAddress);\n\t}", "public String[] getIntefaceNetwork() {\n\t\treturn null;\n\t}", "interface WithVirtualMachineProfile {\n /**\n * Specifies the virtualMachineProfile property: The profile used for creating lab virtual machines..\n *\n * @param virtualMachineProfile The profile used for creating lab virtual machines.\n * @return the next definition stage.\n */\n Update withVirtualMachineProfile(VirtualMachineProfile virtualMachineProfile);\n }", "private void addProfile(ProfileInfo profileInfo)\r\n\t{\r\n\t\taddProfile(profileInfo.getProfileName(), \r\n\t\t\t\tprofileInfo.getUsername(), \r\n\t\t\t\tprofileInfo.getServer(),\r\n\t\t\t\tprofileInfo.getPort());\r\n\t}", "public NPCI(Address source) {\n version = 1;\n control = BigInteger.valueOf(0);\n\n control = control.setBit(5);\n destinationNetwork = 0xFFFF;\n hopCount = 0xFF;\n\n setSourceAddress(source);\n }", "public static void cloneProfile(Profile profile)\n throws IOException\n {\n String newName = \n (String) JOptionPane.showInputDialog(MainFrame.getInstance(),\n \"Enter new profile name\");\n if (newName == null)\n return;\n newName = newName.trim();\n if (newName.length() == 0)\n return;\n\n // Does a profile with this name already exist?\n if (ProfileManager.getInstance().getProfile(newName) != null)\n {\n JOptionPane.showMessageDialog(MainFrame.getInstance(),\n \"A profile with that name already exists.\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n return;\n }\n \n Profile newProfile = new Profile(newName, profile.getAddress(),\n profile.getPort(), profile.getUserName(), profile.getPassword(),\n profile.getParameters());\n try\n {\n ProfileManager.getInstance().updateProfile(newProfile);\n TreePanel.getInstance().addProfile(newProfile);\n }\n catch (SQLException e)\n {\n // This should never happen.\n }\n }", "VirtualMachineProfile virtualMachineProfile();", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/networks/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Network> replaceNetwork(\n @Path(\"name\") String name, \n @Body Network body);", "public EthernetStaticIP() {\n }", "@Override\n\t\tpublic String buildBasicIp() {\n\t\t\treturn buildIp();\n\t\t}", "public String getNetworkname() {\n return networkname;\n }", "public String getNetworkId() {\n return this.networkId;\n }", "@Override\n public boolean isValid(VdsNetworkInterface iface, ConstraintValidatorContext context) {\n NetworkBootProtocol bootProtocol = iface.getBootProtocol();\n String address = iface.getAddress();\n\n if (bootProtocol != null && bootProtocol == StaticIp) {\n if (isNullOrEmpty(address)) {\n context.disableDefaultConstraintViolation();\n context.buildConstraintViolationWithTemplate(\"NETWORK_ADDR_MANDATORY_IN_STATIC_IP\")\n .addNode(\"address\").addConstraintViolation();\n return false;\n }\n }\n\n if (!Config.<String> GetValue(ConfigValues.ManagementNetwork).equals(iface.getNetworkName())\n && !isNullOrEmpty(iface.getGateway())) {\n context.disableDefaultConstraintViolation();\n context.buildConstraintViolationWithTemplate(\"NETWORK_ATTACH_ILLEGAL_GATEWAY\")\n .addNode(\"gateway\").addConstraintViolation();\n return false;\n }\n\n return true;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/networks\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<NetworkList, Network> listNetwork(\n @QueryMap ListNetwork queryParameters);", "protected void addVpcWithIVpc_software_amazon_awscdk_services_ec2_IVpc_AsReferencePropertyDescriptor(\n\t\t\tObject object) {\n\t\titemPropertyDescriptors.add(createItemPropertyDescriptor(\n\t\t\t\t((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),\n\t\t\t\tgetString(\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_vpcWithIVpc_software_amazon_awscdk_services_ec2_IVpc_AsReference_feature\"),\n\t\t\t\tgetString(\"_UI_PropertyDescriptor_description\",\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_vpcWithIVpc_software_amazon_awscdk_services_ec2_IVpc_AsReference_feature\",\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_type\"),\n\t\t\t\tAwsworkbenchPackage.Literals.APPLICATION_LOAD_BALANCER_BUILDER_ELASTICLOADBALANCINGV2__VPC_WITH_IVPC_SOFTWARE_AMAZON_AWSCDK_SERVICES_EC2_IVPC_AS_REFERENCE,\n\t\t\t\ttrue, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));\n\t}", "public interface VirtualisedNetworkResourceManagementInterface {\n\n /**\n * This operation allows an authorized consumer functional block to request the allocation of\n * virtualised network resources as indicated by the consumer functional block.\n *\n * @param allocateNetworkRequest\n * @return allocateNetworkResponse\n */\n AllocateNetworkResponse allocateVirtualisedNetworkResource(\n AllocateNetworkRequest allocateNetworkRequest, PoP poP) throws AdapterException;\n\n /**\n * This operation allows querying information about instantiated virtualised network resources.\n *\n * @param queryNetworkRequest\n * @return queryNetworkResponse\n */\n QueryNetworkResponse queryVirtualisedNetworkResource(\n QueryNetworkRequest queryNetworkRequest, PoP poP) throws AdapterException;\n\n /**\n * This operation allows updating the information of an instantiated virtualised network resource.\n *\n * @param updateNetworkRequest\n * @return updateNetworkResponse\n */\n UpdateNetworkResponse updateVirtualisedNetworkResource(\n UpdateNetworkRequest updateNetworkRequest, PoP poP);\n\n /**\n * This operation allows de-allocating and terminating one or more instantiated virtualised\n * network resource(s). When the operation is done on multiple ids, it is assumed to be\n * best-effort, i.e. it can succeed for a subset of the ids, and fail for the remaining ones.\n *\n * @param terminateNetworkRequest\n * @return terminateNetworkResponse\n */\n TerminateNetworkResponse terminateVirtualisedNetworkResource(\n TerminateNetworkRequest terminateNetworkRequest, PoP poP) throws AdapterException;\n}" ]
[ "0.5642759", "0.54543215", "0.5179424", "0.5147432", "0.5098345", "0.4874008", "0.48355776", "0.48298663", "0.4828929", "0.4796199", "0.4740224", "0.4720077", "0.4667576", "0.45990032", "0.45020434", "0.4500292", "0.44973958", "0.44973958", "0.44889483", "0.44754386", "0.44622236", "0.44299322", "0.4428444", "0.44203362", "0.44101307", "0.44034895", "0.43911088", "0.43891686", "0.43839556", "0.4381448", "0.43789363", "0.4343768", "0.4315577", "0.43137598", "0.4311637", "0.4308691", "0.43051437", "0.42939565", "0.42939565", "0.42891374", "0.42870063", "0.42861933", "0.42409685", "0.4236367", "0.4210039", "0.4189871", "0.41741478", "0.41706538", "0.41658765", "0.41658482", "0.4151912", "0.41484934", "0.41430226", "0.41363597", "0.41363597", "0.4126613", "0.4115182", "0.41138312", "0.41138312", "0.41061765", "0.41061765", "0.40938762", "0.4093618", "0.4093618", "0.4090473", "0.408632", "0.40855947", "0.40855947", "0.4079803", "0.40788296", "0.40766597", "0.407555", "0.407555", "0.40725273", "0.40717554", "0.40591773", "0.4050662", "0.40504155", "0.4048191", "0.40479457", "0.40398514", "0.4033301", "0.40313226", "0.40252513", "0.4016165", "0.40113738", "0.4010238", "0.40069076", "0.39940846", "0.3993344", "0.39922386", "0.39891422", "0.39862666", "0.39828348", "0.3982433", "0.39776582", "0.39749065", "0.39715534", "0.39701527", "0.3966766", "0.39644265" ]
0.0
-1
Constructor of class Playlist.
public Playlist(String titel, ArrayList<Nummer> albumNummers) { this.titel = titel; this.albumNummers = albumNummers; this.berekenDuur(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Playlist()\n\t{\n\t\tthis(\"UNTITLED\");\n\t}", "public Playlist(String name){\n this.name = name;\n this.duration = new Time(0, 0);\n this.playSongs = new Song[MAX_SONGS_PLAYLIST];\n \n }", "public Playlist(String titel) {\n this.titel = titel;\n }", "public PlayList() {\n\t\tthis.name = \"Untitled\";\n\t\tsongList = new ArrayList<Song>();\n\t}", "public Playlist(String playListName){\n\tgenresList = new Genre[6];\n\tsongList = new Song[30];\n\tthis.playListName = playListName;\n\t}", "public PlaylistFragment() {\n }", "public PlayList() {\n\t\tsongList = new ArrayList<Song>();\n\t}", "public Songs() {\n }", "public Playlist(String songName, String artistName, int albumCoverId) {\n\n mSongName = songName;\n mArtistName = artistName;\n mAlbumCoverId = albumCoverId;\n }", "public MusicPlayer() {\n\t\t// initialize all instance variables\n\t\tplaylist = new BinaryHeapA(new Song[0]);\n\t\tfavoritelist = new BinaryHeapA(new Song[0]);\n\t\tisPlaylist = true;\n\t\tsortOrder = 0;\n\t\tisPlaying = false;\n\t\tcurrentSongIndex = 0;\n\t\trepeat = true;\n\t\tshuffle = false;\n\t\tshuffleOrder = new ArrayList<Song>();\n\t\tshuffleSongIndex = -1;\n\t}", "public Song() {}", "public AudioList(){}", "public AutoPlaylist(AutoPlaylist playlist) {\n this(\n playlist.playlistId,\n playlist.playlistName,\n playlist.maximumEntries,\n playlist.sortMethod,\n playlist.truncateMethod,\n playlist.truncateAscending,\n playlist.sortAscending,\n playlist.matchAllRules);\n\n this.rules = new Rule[playlist.rules.length];\n for (int i = 0; i < this.rules.length; i++) {\n this.rules[i] = new Rule(playlist.rules[i]);\n }\n }", "public Playlist(ArrayList<Nummer> albumNummers) {\n this.albumNummers = albumNummers;\n }", "public Music()\n {\n this(0, \"\", \"\", \"\", \"\", \"\");\n }", "public ListViewAdapter(List<SongModel> songs) {\n this.list = songs;\n }", "public static PlaylistFragment newInstance() {\n PlaylistFragment fragment = new PlaylistFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public Song(String title, String artist) {\r\n this.title = title;\r\n this.artist = artist;\r\n }", "public SongArray(){\n }", "public Player()\r\n {\r\n playerItem = new ArrayList();\r\n }", "public Player()\n {\n playerItem = new ArrayList();\n }", "public SongRecord(){\n\t}", "public Song(String artist, String title) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = 0;\r\n\t\tthis.seconds = 0;\r\n\t}", "public MusicFilter(List<Music> songs)\n {\n this.songs = songs;\n }", "public MusicLibrary() {\n\t\tthis.idMap = new HashMap<String, Song>();\n\t\tthis.titleMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.artistMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.tagMap = new TreeMap<String, TreeSet<String>>(new StringComparator());\n\t\t//this.artistList = new ArrayList<>();\n\t}", "public SongAdapter(Context context, ArrayList<Song> songs) {\n super(context, 0, songs);\n }", "public SoundTrack(String title, String artist, String language){\n this.artist = artist; // assigns passed variable to instance variable\n this.language = language; // assigns passed variable to instance variable\n this.title = title; // assigns passed variable to instance variable\n }", "public Song(String t, String alb, String art, String y){\n title = t;\n album = alb;\n artist = art;\n year = y; \n }", "public MusicModel() {\n this(90000);\n }", "public PlaylistViewHolder(View itemView) {\n super(itemView);\n\n this.imageView1 = itemView.findViewById(R.id.imageView1);\n this.imageView2 = itemView.findViewById(R.id.imageView2);\n this.imageView3 = itemView.findViewById(R.id.imageView3);\n this.imageView4 = itemView.findViewById(R.id.imageView4);\n this.imageView5 = itemView.findViewById(R.id.imageView5);\n this.imageView6 = itemView.findViewById(R.id.imageView6);\n\n this.imageViews = new ImageView[] {imageView1, imageView2, imageView3, imageView4, imageView5, imageView6};\n\n this.playlistTitleTextView = itemView.findViewById(R.id.playlistTitleTextView);\n this.playlistDescriptionTextView = itemView.findViewById(R.id.playlistDescriptionTextView);\n }", "public Lista() {\r\n }", "private MyAlbumList() {\n albums = new ArrayList<Album>();\n }", "private Lists() { }", "public static PlaylistFragment newInstance(PlaylistItem playlist) {\n PlaylistFragment fragment = new PlaylistFragment();\n Bundle args = new Bundle();\n args.putSerializable(ARG_PLAYLIST, playlist);\n fragment.setArguments(args);\n return fragment;\n }", "public Play() {\n }", "public ListItems() {\n itemList = new ArrayList();\n }", "public VSListIterator()\n {\n }", "public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}", "public Episode(){\n \n }", "public Track() {\r\n }", "public MyPod()\n {\n color = \"black\";\n memory = 4;\n \n songLibrary[0] = new Song();\n songLibrary[1] = new Song();\n songLibrary[2] = new Song();\n \n \n \n }", "public TaskList(){}", "public List()\n\t{\n\t\tthis(null, null);\n\t}", "public Song(Song s) {\r\n\t\tthis.title = getTitle();\r\n\t\tthis.artist = getArtist();\r\n\t\tthis.minutes = getMinutes();\r\n\t\tthis.seconds = getSeconds();\r\n\t\ts = new Song(this.title, this.artist, this.minutes, this.seconds);\r\n\t}", "public TaskList() {\n }", "public Multi_Player()\r\n {\r\n \r\n }", "Song() {\n\t\tmEnsemble = ensemble;\n\t\tmTitle = \"Strawberry Fields\";\n\t\tmYearReleased = 1969;\n\t}", "public AddSong(String title) {\n id = title;\n initComponents();\n }", "public Video() {\n\t}", "public Album() {\n }", "public void addPlaylist(Playlist p)\n\t{\n\t\tplaylists.add(p);\n\t}", "public Song(String artist, String title, int minutes, int seconds) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = minutes;\r\n\t\tthis.seconds = seconds;\r\n\t}", "public Library(String n, int i) { \r\n super(n);\r\n id = i;\r\n albums = new HashSet<Album>();\r\n\r\n }", "public Player(){}", "public Player(){}", "public DLList() {\r\n init();\r\n }", "public TaskList() {\n this.listItems = new ArrayList<>();\n }", "public SongSublist(ArrayList<SongEntry> orig)\n {\n duration = 0;\n originalObjects = orig;\n subs = new ArrayList<SongEntry>();\n }", "public Player() {\n this(\"\", \"\", \"\");\n }", "public static void loadPlaylist()\n {\n if (JSoundsMainWindowViewController.alreadyPlaying)\n JSoundsMainWindowViewController.stopSong();\n \n JSoundsMainWindowViewController.shutDownPlayer();\n JSoundsMainWindowViewController.isPlaylist=true;\n JSoundsMainWindowViewController.playlistOrderBy(true, false, false);\n }", "public FootballPlayerV3()\n {\n }", "public FilesystemEntryBean(String artist, String album, String song){\n this.artist = artist;\n this.album = album;\n this.song = song;\n\n isSong = (song != null && !song.trim().isEmpty());\n isAlbum = !isSong && (album != null && !album.trim().isEmpty());\n isArtist = !isSong && !isAlbum && (artist != null && !artist.trim().isEmpty());\n\n if (isArtist) {\n playActionUrl = null;\n listActionUrl = LIST_BASE_URL + \"/\" + artist;\n name = artist;\n }\n if (isAlbum) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album;\n listActionUrl = LIST_BASE_URL + \"/\" +artist + \"/\" + album;\n name = album;\n }\n if (isSong) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album + \"/\" + song;\n listActionUrl = null;\n name = song;\n }\n }", "public MovieList() {\r\n\t\thead = null;\r\n\t\ttail = null;\r\n\t\tsize = 0;\r\n\t}", "public FileListFragment() {\n }", "public RecentItem() {\n }", "public ItemListFragment() {\n }", "public AbstractPlayer() {\r\n }", "public list() {\r\n }", "public void setPlaylists(ArrayList<Playlist> p)\n\t{\n\t\tplaylists = p;\n\t}", "public PlaylistActionListener(PlaylistPanel p) { \n\t\t// initializing variables\n\t\tthis.panel = p;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n \tpublic List() {\r\n \t\titems = (T[]) new Object[INIT_LEN];\r\n \t\tnumItems = 0;\r\n \t\tcurrentObject = 0;\r\n \t}", "public YouTubeWidget() {\n super();\n }", "public ListQueue() {\n \n }", "public LinkedLists() {\n }", "public PlayerAdapter(Context context, List<Player> playerList) {\n this.context = context;\n this.playerList = playerList;\n }", "private void populatePlayList()\r\n {\r\n \tCursor songs = playlist.getSongs();\r\n \tcurAdapter = new SimpleCursorAdapter(this, R.layout.song_item, songs, new String[]{Library.KEY_ROWID}, new int[] {R.id.SongText});\r\n \tcurAdapter.setViewBinder(songViewBinder);\r\n \tsetListAdapter(curAdapter);\r\n }", "public MyList() {\n this(\"List\");\n }", "public CD(String song1, String song2, String song3, String song4, String song5) {\n songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n songs.add(song3);\n songs.add(song4);\n songs.add(song5);\n currentindex = songs.size();\n }", "public Library()\r\n\t{\r\n\t\titems = new ArrayList<Book>();\r\n\t}", "public Tracklist(Activity context, List<Track> track) {\n super(context, R.layout.layout_track,track);\n\n this.context = context;\n this.track = track;\n }", "public Player(){\r\n\r\n }", "public Lista()\n {\n empty=true;\n next = null;\n }", "public ArbolSplay() {\n super();\n }", "public MultiList(){}", "public TodoList() {\n todoItems = new ArrayList<TodoItem>();// declares and assigns todoItems to the todo list\n }", "public Item(){}", "private Item(){}", "public Autoplay() {\n }", "public InvalidPlayExcepcion() {\n }", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public LinkedList() {\n\t\tthis(\"list\");\n\t}", "public PlayerServices(){\n playerList = new ArrayList<>();\n }", "public AudioFragment() {\n }", "public PlayListDialog( Frame owner ) {\n\t\tsuper(owner);\n\t\tinitialize();\n\t}", "public Player(){\n\n }", "public ShoppingListItem() {}", "protected MyAbstractList() {\n }", "public QueueAdapter() {\n list = new ArrayList<>();\n }", "public Library(String name, int id) {\n super(name); // invoking superclass constructor\n this.ID = id;\n this.albums = new HashSet<Album>();\n }", "public MusicPlayer() {\n player = new BasicPlayer();\n controller = (BasicController) player;\n volume = -1.0; // indicates that gain has yet to be initialized\n }" ]
[ "0.8331799", "0.79544073", "0.7677294", "0.7592523", "0.75807774", "0.75096345", "0.72801983", "0.7204148", "0.7094951", "0.70266527", "0.69848555", "0.6944506", "0.68248767", "0.6787294", "0.6716192", "0.6624368", "0.64863276", "0.6425135", "0.6404971", "0.63449675", "0.634338", "0.628873", "0.62773085", "0.6219145", "0.61263305", "0.60891324", "0.60566676", "0.605305", "0.6042789", "0.5992658", "0.59787554", "0.59726524", "0.5944992", "0.5943185", "0.5942367", "0.5936416", "0.589403", "0.5886862", "0.5880082", "0.58711183", "0.5868037", "0.58670604", "0.58606726", "0.5857918", "0.58422923", "0.5823197", "0.5809899", "0.5800922", "0.57970005", "0.5791844", "0.5791168", "0.5789048", "0.578824", "0.5781855", "0.5781855", "0.5774322", "0.5768898", "0.5760607", "0.5758311", "0.57524663", "0.57493407", "0.57256055", "0.5719487", "0.57069254", "0.57035154", "0.570305", "0.569893", "0.5695982", "0.5689683", "0.5686311", "0.5684841", "0.5684362", "0.567819", "0.56708187", "0.566583", "0.56630087", "0.56562555", "0.56550884", "0.56540483", "0.56497383", "0.5646612", "0.56366533", "0.5631708", "0.5629234", "0.5628584", "0.5626959", "0.56241995", "0.5616177", "0.5614127", "0.5608625", "0.560496", "0.56026936", "0.5596461", "0.5596422", "0.5590048", "0.5566638", "0.5549781", "0.55481195", "0.5542477", "0.5538971" ]
0.70244074
10
Constructor of class Playlist, with only a title as input.
public Playlist(String titel) { this.titel = titel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Playlist()\n\t{\n\t\tthis(\"UNTITLED\");\n\t}", "public Playlist(String name){\n this.name = name;\n this.duration = new Time(0, 0);\n this.playSongs = new Song[MAX_SONGS_PLAYLIST];\n \n }", "public Song(String artist, String title) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = 0;\r\n\t\tthis.seconds = 0;\r\n\t}", "public Playlist(String titel, ArrayList<Nummer> albumNummers) {\n this.titel = titel;\n this.albumNummers = albumNummers;\n this.berekenDuur();\n }", "public Song(String title, String artist) {\r\n this.title = title;\r\n this.artist = artist;\r\n }", "public Playlist(String playListName){\n\tgenresList = new Genre[6];\n\tsongList = new Song[30];\n\tthis.playListName = playListName;\n\t}", "public PlayList() {\n\t\tthis.name = \"Untitled\";\n\t\tsongList = new ArrayList<Song>();\n\t}", "public SoundTrack(String title, String artist, String language){\n this.artist = artist; // assigns passed variable to instance variable\n this.language = language; // assigns passed variable to instance variable\n this.title = title; // assigns passed variable to instance variable\n }", "public Playlist(String songName, String artistName, int albumCoverId) {\n\n mSongName = songName;\n mArtistName = artistName;\n mAlbumCoverId = albumCoverId;\n }", "public AddSong(String title) {\n id = title;\n initComponents();\n }", "public Title(String title)\r\n {\r\n this();\r\n if( title != null )\r\n add(title);\r\n }", "public Song() {}", "public PlaylistFragment() {\n }", "public Song(String t, String alb, String art, String y){\n title = t;\n album = alb;\n artist = art;\n year = y; \n }", "public Songs() {\n }", "public Music()\n {\n this(0, \"\", \"\", \"\", \"\", \"\");\n }", "public MusicPlayer() {\n\t\t// initialize all instance variables\n\t\tplaylist = new BinaryHeapA(new Song[0]);\n\t\tfavoritelist = new BinaryHeapA(new Song[0]);\n\t\tisPlaylist = true;\n\t\tsortOrder = 0;\n\t\tisPlaying = false;\n\t\tcurrentSongIndex = 0;\n\t\trepeat = true;\n\t\tshuffle = false;\n\t\tshuffleOrder = new ArrayList<Song>();\n\t\tshuffleSongIndex = -1;\n\t}", "public AutoPlaylist(AutoPlaylist playlist) {\n this(\n playlist.playlistId,\n playlist.playlistName,\n playlist.maximumEntries,\n playlist.sortMethod,\n playlist.truncateMethod,\n playlist.truncateAscending,\n playlist.sortAscending,\n playlist.matchAllRules);\n\n this.rules = new Rule[playlist.rules.length];\n for (int i = 0; i < this.rules.length; i++) {\n this.rules[i] = new Rule(playlist.rules[i]);\n }\n }", "Song(Ensemble pEnsemble, String pTitle) {\n\t\tthis.mEnsemble = pEnsemble;\n\t\tthis.mTitle = pTitle;\n\t\tmYearReleased = 0;\n\t}", "public Song(String title, String artist, String genre) {\n\t\tthis.setTitle(title);\n\t\tthis.setArtist(artist);\n\t\tthis.setGenre(genre);\n\t}", "public Song(String artist, String title, int minutes, int seconds) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = minutes;\r\n\t\tthis.seconds = seconds;\r\n\t}", "public BasicInfoSong(int id, String title) {\n this.id = id;\n this.title = title;\n }", "public Playlist(ArrayList<Nummer> albumNummers) {\n this.albumNummers = albumNummers;\n }", "public Media(String title, String year){\n\t\tthis.title = title;\n\t\tthis.year = year;\n\t}", "public PlayList() {\n\t\tsongList = new ArrayList<Song>();\n\t}", "public ListTemplate(String subTitle) {\n super();\n this.subTitle = subTitle;\n }", "public void createPlayList(String title, String description) {\n if (!playListPanels.containsKey(title)) {//if this playlist doesn't exist.\n PlayListPanel newPlayListPanel = new PlayListPanel(emptyPlayListImage, title, description, this, this);\n playListPanels.put(title, newPlayListPanel);\n }\n }", "public Movie(String title) {\n\t\tthis.title = title;\n\t\tthis.left = this.right = null;\n\t}", "public ShowList(String title) {\n id = title;\n initComponents();\n updateListModel();\n }", "public Title(final String text) {\n this(text, null, null, TextDirection.UNSPECIFIED);\n }", "public Book(final String title) {\n this.title = title;\n }", "public Film(String title, Date releaseDate, int length){\n this.title = title;\n this.releaseDate = releaseDate;\n this.length = length;\n }", "public QuestionaireImpl(String title) throws IllegalArgumentException {\n\t\tthis(title, QuestionFactory.createCollection());\n\t}", "public HomeworkListEntry(String title) {\n\t\t// the only parts needed\n\t\tthis.homeworkTitle = title;\n\t\tthis.setIsTitle(true);\n\t\t\n\t\t// everything else unused\n\t\tthis.id = UNUSED_INT;\n\t\tthis.dueDate = UNUSED_LONG;\n\t\tthis.subjectID = UNUSED_INT;\n\t\tthis.isCompleted = false;\n\t\tthis.finalGrade = null;\n\t\tthis.subjectImageResource = UNUSED_INT;\n\t\tthis.setSpacer(false);\n\t\tthis.isOverdue = false;\n\t}", "public Movie(String id, String title) {\n mId = id;\n mTitle = title;\n }", "public OnlineResource(String url, String title) { \r\n super(title);\r\n this.url = url;\r\n \r\n }", "public Course(int id, String title) {\n this.id = id;\n this.title = title;\n }", "public YoutubeVideo(String title, String author) {\n this(title, author, null);\n }", "public AudioList(){}", "public static PlaylistFragment newInstance() {\n PlaylistFragment fragment = new PlaylistFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public ListViewAdapter(List<SongModel> songs) {\n this.list = songs;\n }", "public Song(Song s) {\r\n\t\tthis.title = getTitle();\r\n\t\tthis.artist = getArtist();\r\n\t\tthis.minutes = getMinutes();\r\n\t\tthis.seconds = getSeconds();\r\n\t\ts = new Song(this.title, this.artist, this.minutes, this.seconds);\r\n\t}", "public Chapter(String title) {\n setTitle(this, title);\n }", "public Song(String name, String artist, String album, String year) {\n this.name = name;\n this.artist = artist;\n this.album = album;\n this.year = year;\n }", "Song() {\n\t\tmEnsemble = ensemble;\n\t\tmTitle = \"Strawberry Fields\";\n\t\tmYearReleased = 1969;\n\t}", "public Sequence(String title) { this(title, new Vector<Step>(), \"\"); }", "public SongRecord(){\n\t}", "public MusicLibrary() {\n\t\tthis.idMap = new HashMap<String, Song>();\n\t\tthis.titleMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.artistMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.tagMap = new TreeMap<String, TreeSet<String>>(new StringComparator());\n\t\t//this.artistList = new ArrayList<>();\n\t}", "public Player() {\n this(\"\", \"\", \"\");\n }", "public Meny(String title){\n \tthis.title = title;\n }", "public Title()\r\n {\r\n startTag=\"TITLE\";\r\n endTag=\"/TITLE\"; \r\n }", "public TitleIconItem(){}", "public MusicFilter(List<Music> songs)\n {\n this.songs = songs;\n }", "public Albums(String title, int copiesAvailable, String artist, String songs) {\n\t\tsuper (title, copiesAvailable);\n\t\tthis.artist = artist;\n\t\tthis.songs = songs;\n\t}", "public Title(final String text, final String id) {\n this(text, id, null, TextDirection.UNSPECIFIED);\n }", "public DreamJob (String title) {\r\n System.out.println(\"Message from: DreamJob(String title)\");\r\n this.title = title;\r\n\t}", "public SongArray(){\n }", "public Window(String title) {\n this.title = title;\n }", "public Title() {\n super();\n initComponents();\n }", "public Song(String title, String artistName, String genre, int rating, Time time){\n\t\tthis.title=title;\n\t\tthis.artistName=artistName;\n\t\tthis.genre=genre;\n\t\tthis.rating=rating;\n\t\tthis.time=time;\n\t}", "public List(String vTittle, int vText, int imageResourceId) {\n mTittleItem = vTittle;\n mTextItem = vText;\n mImageResourceId = imageResourceId;\n }", "public Song(String title, String artist, String year, String genre) {\n this.title = title;\n this.artist = artist;\n this.year = year;\n this.genre = genre;\n heardPercentCS = 0.;\n heardPercentMath = 0.;\n heardPercentEng = 0.;\n heardPercentOther = 0.;\n heardPercentSE = 0.;\n heardPercentNE = 0.;\n heardPercentUS = 0.;\n heardPercentOut = 0.;\n heardPercentMusic = 0.;\n heardPercentSports = 0.;\n heardPercentReading = 0.;\n heardPercentArt = 0.;\n }", "public FilesystemEntryBean(String artist, String album, String song){\n this.artist = artist;\n this.album = album;\n this.song = song;\n\n isSong = (song != null && !song.trim().isEmpty());\n isAlbum = !isSong && (album != null && !album.trim().isEmpty());\n isArtist = !isSong && !isAlbum && (artist != null && !artist.trim().isEmpty());\n\n if (isArtist) {\n playActionUrl = null;\n listActionUrl = LIST_BASE_URL + \"/\" + artist;\n name = artist;\n }\n if (isAlbum) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album;\n listActionUrl = LIST_BASE_URL + \"/\" +artist + \"/\" + album;\n name = album;\n }\n if (isSong) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album + \"/\" + song;\n listActionUrl = null;\n name = song;\n }\n }", "public Song(String name, int duration)\r\n\t{\r\n\t\tsetName(name);\r\n\t\tsetDuration(duration);\r\n\t}", "public Video(String nombre) {\n super(nombre);\n }", "public Series (String t, String s){\n title = t;\n studio = s;\n rating = \"PG\";\n}", "public String publicPlaylistX(String title, int grade){\r\n\t\tString message=\"\";\r\n\t\tboolean ctrl=false;\r\n\r\n\t\tif(playlist[(playlist.length -1)]!=null){\r\n\t\t\tmessage = \" *Lo sentimos. Se ha alcanzado nuestro MAXIMO numero de PLAYLIST*\";\r\n\t\t\tctrl=true; //As the entire playlist's arraylist is full, it is unnecessary to run the for\r\n\t\t}\r\n\t\tfor(int i=0; i<user.length && !ctrl; i++){\r\n\t\t\tif(playlist[i]==null){\r\n\t\t\t\tplaylist[i]= new PublicPlaylist(title, grade);\r\n\t\t\t\tctrl=true;\r\n\t\t\t\tmessage = \"Se ha creado la Playlist Publica\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn message;\r\n\t}", "public Library(String n, int i) { \r\n super(n);\r\n id = i;\r\n albums = new HashSet<Album>();\r\n\r\n }", "public History(String str, String str2, String str3) {\n super(str, str2, str3, null);\n j.b(str, \"title\");\n this.title = str;\n this.subtitle = str2;\n this.referrer = str3;\n }", "public RecentItem() {\n }", "public static PlaylistFragment newInstance(PlaylistItem playlist) {\n PlaylistFragment fragment = new PlaylistFragment();\n Bundle args = new Bundle();\n args.putSerializable(ARG_PLAYLIST, playlist);\n fragment.setArguments(args);\n return fragment;\n }", "public Episode(){\n \n }", "public Chapter(){\r\n title = \"\";\r\n body = \"\";\r\n }", "public Model(CoreSession session, String parentPath, String title)\n throws ClientException {\n \tthis.session = session;\n this.doc = session.createDocumentModel(parentPath, title,\n PAGENAV.type());\n this.doc.setPropertyValue(\"dc:title\", title);\n }", "public Song(\n String title,\n String artist,\n String year,\n String genre,\n double heardPercentCS,\n double heardPercentMath,\n double heardPercentEng,\n double heardPercentOther,\n double heardPercentSE,\n double heardPercentNE,\n double heardPercentUS,\n double heardPercentOut,\n double heardPercentMusic,\n double heardPercentSports,\n double heardPercentReading,\n double heardPercentArt,\n double likePercentCS,\n double likePercentMath,\n double likePercentEng,\n double likePercentOther,\n double likePercentSE,\n double likePercentNE,\n double likePercentUS,\n double likePercentOut,\n double likePercentMusic,\n double likePercentSports,\n double likePercentReading,\n double likePercentArt) {\n this.title = title;\n this.artist = artist;\n this.year = year;\n this.genre = genre;\n this.heardPercentCS = heardPercentCS;\n this.heardPercentMath = heardPercentMath;\n this.heardPercentEng = heardPercentEng;\n this.heardPercentOther = heardPercentOther;\n this.heardPercentSE = heardPercentSE;\n this.heardPercentNE = heardPercentNE;\n this.heardPercentUS = heardPercentUS;\n this.heardPercentOut = heardPercentOut;\n this.heardPercentMusic = heardPercentMusic;\n this.heardPercentSports = heardPercentSports;\n this.heardPercentReading = heardPercentReading;\n this.heardPercentArt = heardPercentArt;\n this.likePercentCS = likePercentCS;\n this.likePercentMath = likePercentMath;\n this.likePercentEng = likePercentEng;\n this.likePercentOther = likePercentOther;\n this.likePercentSE = likePercentSE;\n this.likePercentNE = likePercentNE;\n this.likePercentUS = likePercentUS;\n this.likePercentOut = likePercentOut;\n this.likePercentMusic = likePercentMusic;\n this.likePercentSports = likePercentSports;\n this.likePercentReading = likePercentReading;\n this.likePercentArt = likePercentArt;\n }", "public SeriesModel(String title, LinkedHashMap<String, Episode> episodes) {\n\t\tsuper(title, episodes);\n\t}", "public StacLink title(String title) {\n this.title = title;\n return this;\n }", "public MusicTrack(TrackType t,String name, String videoURL,String shortURL) {\n\t\tthis.title = name;\n\t\tthis.videoURL = videoURL;\n\t\ttype = t;\n\t\tthis.shortURL = shortURL;\n\t\ttrackID = currentTrackID;\n\t\tcurrentTrackID++;\n\t\tif (shortURL.contains(\"//soundcloud.com/\"))\n\t\t\tisVideo = false;\n\t}", "public Songs(String songName, String singer, String singerUrl, String bgimage, String avatar, String keyMp3, String mp3Url, String songUrl, String fileName, int isUserLocal) {\n super();\n this.songName = songName;\n this.singer = singer;\n this.singerUrl = singerUrl;\n this.bgimage = bgimage;\n this.avatar = avatar;\n this.keyMp3 = keyMp3;\n this.mp3Url = mp3Url;\n this.songUrl = songUrl;\n this.fileName = fileName;\n this.isUserLocal = isUserLocal;\n }", "public Movie(String title, MovieCategory category) {\n this.title = title;\n this.movieCategory = movieCategory;\n }", "public Library(String name, int id) {\n super(name); // invoking superclass constructor\n this.ID = id;\n this.albums = new HashSet<Album>();\n }", "public Player()\n {\n playerItem = new ArrayList();\n }", "public Media(String title, int copiesAvailable){\n\t\tthis.title = title;\n\t\tthis.copiesAvailable = copiesAvailable;\n\n\t}", "public Player()\r\n {\r\n playerItem = new ArrayList();\r\n }", "protected Feed(String url, List<String> userTitle, Settings settings) {\n\t\tthis.url = url;\n\t\tthis.items = Collections.synchronizedSet(new HashSet<FeedItem>());\n\t\tthis.userTitle = new ArrayList<>(userTitle);\n\t\tthis.settings = settings;\n\t}", "public Video(Integer id,String titulo) {\n\t\tthis(id, titulo, 0.0, 0);\n\t}", "public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}", "public void addPlaylist(Playlist p)\n\t{\n\t\tplaylists.add(p);\n\t}", "public MusicModel() {\n this(90000);\n }", "public StoryMakerStory(String title, String author) {\n\t\tif (title == null) {\n\t\t\tthrow new IllegalArgumentException(ExceptionMessages.NULL_TITLE);\n\t\t}\n\t\tif (title.isEmpty()) {\n\t\t\tthrow new IllegalArgumentException(ExceptionMessages.EMPTY_TITLE);\n\t\t}\n\t\tif (author == null) {\n\t\t\tthrow new IllegalArgumentException(ExceptionMessages.NULL_AUTHOR);\n\t\t}\n\t\tif (author.isEmpty()) {\n\t\t\tthrow new IllegalArgumentException(ExceptionMessages.EMPTY_AUTHOR);\n\t\t}\n\n\t\tthis.title = title;\n\t\tthis.author = author;\n\t\tthis.pages = new ArrayList<Page>();\n\t\tthis.setting = new DisplaySetting();\n\t}", "public PodcastModel(int id, URL url) {\n super();\n this.id = id;\n this.url = url;\n }", "public ShopListItem(CharSequence title, int distance){\n this.title = title;\n this.distance = distance;\n }", "public Chapter(String title, Text text) {\n setTitle(this, title);\n setText(text);\n }", "public Track() {\r\n }", "public Task(String title, int time)\n {\n try\n {\n check(time);\n\n setTitle(title);\n setTime(time);\n setActive(false);\n }\n catch (IllegalArgumentException e)\n {\n System.out.println(\"Incorrect data for a one-time tasks\");\n throw e;\n }\n }", "public Book(String title, String genre)\n {\n bookTitle = title;\n bookGenre = genre;\n }", "public Chapter(String title, String body){\r\n this.title = title;\r\n this.body = body;\r\n }", "public Film() {\n\t}", "public Attribute(String title) {\n \t\tthis.title = title;\n \t\tconflictMagnitude = 0;\n \t}", "public Series( String t, String s, String r){\n title = t;\n studio = s;\n rating = r;\n}" ]
[ "0.7656243", "0.75169057", "0.72230077", "0.7123734", "0.7118723", "0.70099837", "0.6690359", "0.667235", "0.66182756", "0.65997744", "0.64952135", "0.64736384", "0.6447781", "0.6384029", "0.63764316", "0.6328528", "0.6309393", "0.62840545", "0.6251482", "0.61880296", "0.6139189", "0.60260916", "0.6016109", "0.6010963", "0.6002984", "0.59736484", "0.5933948", "0.5928604", "0.5908567", "0.5893883", "0.58776635", "0.5852158", "0.58501583", "0.5844625", "0.5843537", "0.57811946", "0.576433", "0.5721965", "0.5717641", "0.5713151", "0.5700123", "0.5687113", "0.5679035", "0.5677563", "0.5640257", "0.5632665", "0.562952", "0.560342", "0.5601154", "0.5599074", "0.55803376", "0.55761105", "0.55546296", "0.555338", "0.55431", "0.5525007", "0.55000514", "0.54907805", "0.54838425", "0.5483577", "0.54817975", "0.5470113", "0.5468425", "0.54411083", "0.5430427", "0.5423914", "0.5421588", "0.5414471", "0.5408436", "0.539827", "0.53884614", "0.53876686", "0.53681976", "0.5361111", "0.53566724", "0.535395", "0.5353313", "0.53494966", "0.53451544", "0.53392446", "0.5333814", "0.5327516", "0.5324961", "0.53224105", "0.53199184", "0.5301736", "0.53006196", "0.52953017", "0.52931726", "0.5292113", "0.5286636", "0.5272464", "0.52716863", "0.52633625", "0.5258818", "0.5240997", "0.52349806", "0.5234817", "0.52331245", "0.5231161" ]
0.8254443
0
Constructor of class Playlist, with only albumNummers as input.
public Playlist(ArrayList<Nummer> albumNummers) { this.albumNummers = albumNummers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Playlist(String titel, ArrayList<Nummer> albumNummers) {\n this.titel = titel;\n this.albumNummers = albumNummers;\n this.berekenDuur();\n }", "public Playlist(String playListName){\n\tgenresList = new Genre[6];\n\tsongList = new Song[30];\n\tthis.playListName = playListName;\n\t}", "public Playlist(String songName, String artistName, int albumCoverId) {\n\n mSongName = songName;\n mArtistName = artistName;\n mAlbumCoverId = albumCoverId;\n }", "public Playlist(String titel) {\n this.titel = titel;\n }", "public Playlist(String name){\n this.name = name;\n this.duration = new Time(0, 0);\n this.playSongs = new Song[MAX_SONGS_PLAYLIST];\n \n }", "public Library(String n, int i) { \r\n super(n);\r\n id = i;\r\n albums = new HashSet<Album>();\r\n\r\n }", "public Playlist()\n\t{\n\t\tthis(\"UNTITLED\");\n\t}", "public Albums(String title, int copiesAvailable, String artist, String songs) {\n\t\tsuper (title, copiesAvailable);\n\t\tthis.artist = artist;\n\t\tthis.songs = songs;\n\t}", "public Music()\n {\n this(0, \"\", \"\", \"\", \"\", \"\");\n }", "public Song(String t, String alb, String art, String y){\n title = t;\n album = alb;\n artist = art;\n year = y; \n }", "public Songs() {\n }", "private MyAlbumList() {\n albums = new ArrayList<Album>();\n }", "public MusicFilter(List<Music> songs)\n {\n this.songs = songs;\n }", "public Album(String albumName)\n {\n photo = new ArrayList<Photo>();\n\n this.albumName = albumName;\n this.totalPics = 0;\n\n }", "public Album() {\n }", "public Song(String name, String artist, String album, String year) {\n this.name = name;\n this.artist = artist;\n this.album = album;\n this.year = year;\n }", "public PlaylistFragment() {\n }", "public Song(String title, String artist) {\r\n this.title = title;\r\n this.artist = artist;\r\n }", "public Song() {}", "public Library(String name, int id) {\n super(name); // invoking superclass constructor\n this.ID = id;\n this.albums = new HashSet<Album>();\n }", "public Album(String albumName, String bandName) { \n\t\ttitle = albumName;\n\t\tband = bandName;\n\t}", "public SongArray(){\n }", "public Album(String album, String bandName, int stock) {\n\t\ttitle = album;\n\t\tband = bandName;\n\t\tnumStocked = stock;\n\t}", "public PlayList() {\n\t\tthis.name = \"Untitled\";\n\t\tsongList = new ArrayList<Song>();\n\t}", "public Song(String artist, String title) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = 0;\r\n\t\tthis.seconds = 0;\r\n\t}", "public MusicLibrary() {\n\t\tthis.idMap = new HashMap<String, Song>();\n\t\tthis.titleMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.artistMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.tagMap = new TreeMap<String, TreeSet<String>>(new StringComparator());\n\t\t//this.artistList = new ArrayList<>();\n\t}", "public PlayList() {\n\t\tsongList = new ArrayList<Song>();\n\t}", "public CD(String song1, String song2, String song3, String song4, String song5) {\n songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n songs.add(song3);\n songs.add(song4);\n songs.add(song5);\n currentindex = songs.size();\n }", "Song() {\n\t\tmEnsemble = ensemble;\n\t\tmTitle = \"Strawberry Fields\";\n\t\tmYearReleased = 1969;\n\t}", "public AudioList(){}", "public MusicPlayer() {\n\t\t// initialize all instance variables\n\t\tplaylist = new BinaryHeapA(new Song[0]);\n\t\tfavoritelist = new BinaryHeapA(new Song[0]);\n\t\tisPlaylist = true;\n\t\tsortOrder = 0;\n\t\tisPlaying = false;\n\t\tcurrentSongIndex = 0;\n\t\trepeat = true;\n\t\tshuffle = false;\n\t\tshuffleOrder = new ArrayList<Song>();\n\t\tshuffleSongIndex = -1;\n\t}", "public Album(Parcel in) {\n\t\tID = in.readInt();\n\t\tname = in.readString();\n\t\trelease = new Date(in.readLong());\n\t\tmbid = in.readString();\n\t\turl = in.readString();\n\t\timg_small = in.readString();\n\t\timg_medium = in.readString();\n\t\timg_large = in.readString();\n\t\timg_xlarge = in.readString();\n\t\tisNew = (in.readInt() == 1) ? true : false;\n\t\tisStarred = (in.readInt() == 1) ? true : false;\n\t\tartist = in.readParcelable(this.getClass().getClassLoader());\n\t}", "public AutoPlaylist(AutoPlaylist playlist) {\n this(\n playlist.playlistId,\n playlist.playlistName,\n playlist.maximumEntries,\n playlist.sortMethod,\n playlist.truncateMethod,\n playlist.truncateAscending,\n playlist.sortAscending,\n playlist.matchAllRules);\n\n this.rules = new Rule[playlist.rules.length];\n for (int i = 0; i < this.rules.length; i++) {\n this.rules[i] = new Rule(playlist.rules[i]);\n }\n }", "public AlbumSeriesRecord() {\n super(AlbumSeries.ALBUM_SERIES);\n }", "public Album(Album other) {\r\n if (other.isSetId()) {\r\n this.id = other.id;\r\n }\r\n if (other.isSetName()) {\r\n Set<String> __this__name = new HashSet<String>();\r\n for (String other_element : other.name) {\r\n __this__name.add(other_element);\r\n }\r\n this.name = __this__name;\r\n }\r\n if (other.isSetArtists()) {\r\n Set<String> __this__artists = new HashSet<String>();\r\n for (String other_element : other.artists) {\r\n __this__artists.add(other_element);\r\n }\r\n this.artists = __this__artists;\r\n }\r\n if (other.isSetRelease_date()) {\r\n Set<String> __this__release_date = new HashSet<String>();\r\n for (String other_element : other.release_date) {\r\n __this__release_date.add(other_element);\r\n }\r\n this.release_date = __this__release_date;\r\n }\r\n if (other.isSetGenres()) {\r\n Set<String> __this__genres = new HashSet<String>();\r\n for (String other_element : other.genres) {\r\n __this__genres.add(other_element);\r\n }\r\n this.genres = __this__genres;\r\n }\r\n if (other.isSetTrack_names()) {\r\n Set<String> __this__track_names = new HashSet<String>();\r\n for (String other_element : other.track_names) {\r\n __this__track_names.add(other_element);\r\n }\r\n this.track_names = __this__track_names;\r\n }\r\n if (other.isSetText()) {\r\n this.text = other.text;\r\n }\r\n }", "public Songs(String songName, String singer, String singerUrl, String bgimage, String avatar, String keyMp3, String mp3Url, String songUrl, String fileName, int isUserLocal) {\n super();\n this.songName = songName;\n this.singer = singer;\n this.singerUrl = singerUrl;\n this.bgimage = bgimage;\n this.avatar = avatar;\n this.keyMp3 = keyMp3;\n this.mp3Url = mp3Url;\n this.songUrl = songUrl;\n this.fileName = fileName;\n this.isUserLocal = isUserLocal;\n }", "public SongRecord(){\n\t}", "public Music(String...files){\n musicFiles = new ArrayList<AudioFile>();\n for(String file: files){\n musicFiles.add(new AudioFile(file));\n }\n }", "public MusicModel() {\n this(90000);\n }", "public Track(Long id, Short number, String name, Short length, Long albumId) {\n\t\tthis.id = id;\n\t\tthis.number = number;\n\t\tthis.name = name;\n\t\tthis.length = length;\n\t\tthis.albumId = albumId;\n\t}", "public MyPod()\n {\n color = \"black\";\n memory = 4;\n \n songLibrary[0] = new Song();\n songLibrary[1] = new Song();\n songLibrary[2] = new Song();\n \n \n \n }", "public Song(\n String title,\n String artist,\n String year,\n String genre,\n double heardPercentCS,\n double heardPercentMath,\n double heardPercentEng,\n double heardPercentOther,\n double heardPercentSE,\n double heardPercentNE,\n double heardPercentUS,\n double heardPercentOut,\n double heardPercentMusic,\n double heardPercentSports,\n double heardPercentReading,\n double heardPercentArt,\n double likePercentCS,\n double likePercentMath,\n double likePercentEng,\n double likePercentOther,\n double likePercentSE,\n double likePercentNE,\n double likePercentUS,\n double likePercentOut,\n double likePercentMusic,\n double likePercentSports,\n double likePercentReading,\n double likePercentArt) {\n this.title = title;\n this.artist = artist;\n this.year = year;\n this.genre = genre;\n this.heardPercentCS = heardPercentCS;\n this.heardPercentMath = heardPercentMath;\n this.heardPercentEng = heardPercentEng;\n this.heardPercentOther = heardPercentOther;\n this.heardPercentSE = heardPercentSE;\n this.heardPercentNE = heardPercentNE;\n this.heardPercentUS = heardPercentUS;\n this.heardPercentOut = heardPercentOut;\n this.heardPercentMusic = heardPercentMusic;\n this.heardPercentSports = heardPercentSports;\n this.heardPercentReading = heardPercentReading;\n this.heardPercentArt = heardPercentArt;\n this.likePercentCS = likePercentCS;\n this.likePercentMath = likePercentMath;\n this.likePercentEng = likePercentEng;\n this.likePercentOther = likePercentOther;\n this.likePercentSE = likePercentSE;\n this.likePercentNE = likePercentNE;\n this.likePercentUS = likePercentUS;\n this.likePercentOut = likePercentOut;\n this.likePercentMusic = likePercentMusic;\n this.likePercentSports = likePercentSports;\n this.likePercentReading = likePercentReading;\n this.likePercentArt = likePercentArt;\n }", "public Album(String albumName, User user) {\n\t\tthis.albumName = albumName;\n\t\tthis.user = user;\n\t\tthis.pictures = new ArrayList<Picture>();\n\t}", "public AlbumRatings(LinkedList<Album> albumRatings) {\r\n this.albumRatings = albumRatings;\r\n }", "public ListViewAdapter(List<SongModel> songs) {\n this.list = songs;\n }", "public MusicCollection(String name,Song... songs)\n {\n this.songs = new ArrayList<Song>();\n for(Song tempSong : songs) {\n if ( !this.songs.contains(tempSong) )\n this.songs.add(tempSong);\n else\n System.out.println(\"this file is already in this collection.\");\n }\n player = new MusicPlayer();\n this.name = name;\n }", "Song(Ensemble pEnsemble, String pTitle) {\n\t\tthis.mEnsemble = pEnsemble;\n\t\tthis.mTitle = pTitle;\n\t\tmYearReleased = 0;\n\t}", "public SoundTrack(String title, String artist, String language){\n this.artist = artist; // assigns passed variable to instance variable\n this.language = language; // assigns passed variable to instance variable\n this.title = title; // assigns passed variable to instance variable\n }", "public FilesystemEntryBean(String artist, String album, String song){\n this.artist = artist;\n this.album = album;\n this.song = song;\n\n isSong = (song != null && !song.trim().isEmpty());\n isAlbum = !isSong && (album != null && !album.trim().isEmpty());\n isArtist = !isSong && !isAlbum && (artist != null && !artist.trim().isEmpty());\n\n if (isArtist) {\n playActionUrl = null;\n listActionUrl = LIST_BASE_URL + \"/\" + artist;\n name = artist;\n }\n if (isAlbum) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album;\n listActionUrl = LIST_BASE_URL + \"/\" +artist + \"/\" + album;\n name = album;\n }\n if (isSong) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album + \"/\" + song;\n listActionUrl = null;\n name = song;\n }\n }", "public SongAdapter(Context context, ArrayList<Song> songs) {\n super(context, 0, songs);\n }", "@Test\n public void testSetlibrary() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n library.setlibrary(new ArrayList<Song>());\n assertTrue(library.getlibrary().isEmpty());\n\n }", "public Mcs(){\n user = new User[MAX_USER];\n poolSong = new Song[MAX_SONG];\n thePlayLists = new PlayList[MAX_PLAYLIST];\n numUser = 0;\n numSongs = 0;\n numPlayList = 0;\n }", "public AlbumAdapter(@NonNull Context context, ArrayList<Album> albums) {\n super(context, 0, albums);\n }", "public static AlbumListFragment newInstance(boolean isPlaylist) {\n AlbumListFragment fragment = new AlbumListFragment();\n fragment.isPlaylist = isPlaylist;\n return fragment;\n }", "public void setList(ArrayList<Song> theSongs) {\n songs1 = theSongs;\n songsNumber = songs1.size();\n }", "public SongSublist(ArrayList<SongEntry> orig)\n {\n duration = 0;\n originalObjects = orig;\n subs = new ArrayList<SongEntry>();\n }", "private AlbumPanel createAlbumPanel(ArrayList<MP3Info> albumMusicsInfo) {\n MP3Info firstMP3Info = albumMusicsInfo.get(0);\n AlbumPanel album = null;\n String description = \"Album contains \" + albumMusicsInfo.size() + \" songs\";\n try {//creating an album panel with its listener\n album = new AlbumPanel(firstMP3Info.getImage(), firstMP3Info.getAlbum(), description, albumMusicsInfo, this, this);\n } catch (InvalidDataException | IOException | UnsupportedTagException e) {\n JOptionPane.showMessageDialog(null, \"Error reading mp3 file image\", \"An Error Occurred\", JOptionPane.ERROR_MESSAGE);\n }\n return album;\n }", "public Song(String songAddress) {\n\t\t\tthis.songAddress = songAddress;\n\t\t}", "public CDAdapter(List<CDAlbum> myCollection, Activity something) {\n this.myCollection = myCollection;\n main = something;\n }", "public Song(String title, String artist, String year, String genre) {\n this.title = title;\n this.artist = artist;\n this.year = year;\n this.genre = genre;\n heardPercentCS = 0.;\n heardPercentMath = 0.;\n heardPercentEng = 0.;\n heardPercentOther = 0.;\n heardPercentSE = 0.;\n heardPercentNE = 0.;\n heardPercentUS = 0.;\n heardPercentOut = 0.;\n heardPercentMusic = 0.;\n heardPercentSports = 0.;\n heardPercentReading = 0.;\n heardPercentArt = 0.;\n }", "public Song(String artist, String title, int minutes, int seconds) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = minutes;\r\n\t\tthis.seconds = seconds;\r\n\t}", "public AudioFragment() {\n }", "public Media(String title, String year){\n\t\tthis.title = title;\n\t\tthis.year = year;\n\t}", "public PlaylistViewHolder(View itemView) {\n super(itemView);\n\n this.imageView1 = itemView.findViewById(R.id.imageView1);\n this.imageView2 = itemView.findViewById(R.id.imageView2);\n this.imageView3 = itemView.findViewById(R.id.imageView3);\n this.imageView4 = itemView.findViewById(R.id.imageView4);\n this.imageView5 = itemView.findViewById(R.id.imageView5);\n this.imageView6 = itemView.findViewById(R.id.imageView6);\n\n this.imageViews = new ImageView[] {imageView1, imageView2, imageView3, imageView4, imageView5, imageView6};\n\n this.playlistTitleTextView = itemView.findViewById(R.id.playlistTitleTextView);\n this.playlistDescriptionTextView = itemView.findViewById(R.id.playlistDescriptionTextView);\n }", "public Song(Song s) {\r\n\t\tthis.title = getTitle();\r\n\t\tthis.artist = getArtist();\r\n\t\tthis.minutes = getMinutes();\r\n\t\tthis.seconds = getSeconds();\r\n\t\ts = new Song(this.title, this.artist, this.minutes, this.seconds);\r\n\t}", "public AddSong(String title) {\n id = title;\n initComponents();\n }", "public CoverFlowAdapter(ArrayList<MediaObject> myDataset, MainActivity activity, MyApplication application) {\n mDataset = myDataset;\n this.activity = activity;\n this.application = application;\n }", "public Media(String title, int copiesAvailable){\n\t\tthis.title = title;\n\t\tthis.copiesAvailable = copiesAvailable;\n\n\t}", "public MultiMedia(String title,\n int year, List<Director> directorsList,\n List<Actors> actorsList) {\n\n this.title = title;\n this.year = year;\n this.directorsList = directorsList;\n this.actorsList = actorsList;\n\n }", "public Player(){\r\n cards = new ArrayList<String>();\r\n indexes = new ArrayList<Integer>();\r\n }", "public Player() {\n this(\"\", \"\", \"\");\n }", "public Library()\r\n\t{\r\n\t\titems = new ArrayList<Book>();\r\n\t}", "public Song(String title, String artist, String genre) {\n\t\tthis.setTitle(title);\n\t\tthis.setArtist(artist);\n\t\tthis.setGenre(genre);\n\t}", "public BasicInfoSong(int id, String title) {\n this.id = id;\n this.title = title;\n }", "@Test\r\n\tpublic void testAddSongs() {\r\n\t\tfor (Song song : songs) {\r\n\t\t\taLibrary.addItem(song);\r\n\t\t}\r\n\t\tassertEquals(aLibrary.getPlayables().size(),songs.size());\r\n\t\tassertEquals(aList.getView().getItems().size(),songs.size());\r\n\t\tassertFalse(aLibrary.containsItem(song5));\r\n\t\tassertFalse(aList.getView().getItems().contains(song5));\r\n\t}", "public Artist(String name, Genre mainGenre) {\n this.name = name;\n this.cataloue = new ArrayList<Record>();\n this.mainGenre = mainGenre;\n }", "private void InicializarListaAlbums() {\n\n GestorAlbums gestorAlbums = new GestorAlbums(this.getActivity());\n albums = gestorAlbums.AsignarAlbum();\n }", "public PhotoStore(Activity parent, String albumName) {\r\n\t\tthis.albumName = albumName;\t\r\n\t\tthis.parent = parent;\r\n\t}", "public MusicPlayer() {\n player = new BasicPlayer();\n controller = (BasicController) player;\n volume = -1.0; // indicates that gain has yet to be initialized\n }", "public FootballPlayerV3()\n {\n }", "public Gallery() {\r\n }", "public void setSongList(ArrayList<Song> songList) {\n\t\tthis.songList = songList;\n\t}", "public static PlaylistFragment newInstance() {\n PlaylistFragment fragment = new PlaylistFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "private SoundPlayer(String mp3) {\n\t\tfile = new File(mp3);\n\t}", "public PhotoAlbum(String name, String filename) {\n\t\tthis.name = name;\n\t\tthis.photos = new ArrayList<Photo>();\n\t\tloadFromFile(filename);\n\t}", "public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }", "public Song parserSong(JSONObject jsonTrack) throws JSONException {\n if (jsonTrack == null) return null;\n Song song = new Song();\n song.setArtworkUrl(jsonTrack.optString(SongEntry.ARTWORK_URL, null));\n song.setCommentCount(jsonTrack.optInt(SongEntry.COMMENT_COUNT, 0));\n song.setDescription(jsonTrack.optString(SongEntry.DESCRIPTION, \"\"));\n song.setDownloadable(jsonTrack.optBoolean(SongEntry.DOWNLOADABLE, false));\n song.setDownloadUrl(jsonTrack.optString(SongEntry.DOWNLOAD_URL, \"\"));\n song.setDuration(jsonTrack.optInt(SongEntry.DURATION, 0));\n song.setGenre(jsonTrack.optString(SongEntry.GENRE, \"\"));\n song.setId(jsonTrack.optInt(SongEntry.ID, 0));\n song.setKind(jsonTrack.optString(SongEntry.KIND, \"\"));\n song.setLikesCount(jsonTrack.optInt(SongEntry.LIKES_COUNT, 0));\n song.setPermalinkUrl(jsonTrack.optString(SongEntry.PERMALINK, \"\"));\n song.setPlaybackCount(jsonTrack.optInt(SongEntry.PLAYBACK_COUNT, 0));\n song.setTitle(jsonTrack.optString(SongEntry.TITLE, \"\"));\n song.setUri(StringUtils.createUri(jsonTrack.optString(SongEntry.URI, \"\")));\n song.setUserId(jsonTrack.optInt(SongEntry.USER_ID, 0));\n JSONObject jsonUser = jsonTrack.getJSONObject(SongEntry.USER);\n song.setAvatarUrl(jsonUser.optString(SongEntry.AVATAR_URL, null));\n song.setUsername(jsonUser.optString(SongEntry.USERNAME, \"\"));\n song.setPublic(jsonTrack.optBoolean(SongEntry.PUBLIC, false));\n if (song.getArtworkUrl() == null) {\n song.setArtworkUrl(song.getAvatarUrl());\n }\n if (song.getArtworkUrl() == null) return null;\n return song;\n }", "public Track() {\r\n }", "public Library() {\n books = new Book[0];\n numBooks = 0;\n }", "public List<Album> getAlbums(Artist artist);", "public Multi_Player()\r\n {\r\n \r\n }", "public Library(ArrayList<Book> collection){\n this.okToPrint = false;\n this.libraryBooks = collection;\n this.patron = new HashMap<String, Patron>();\n this.calendar = new Calendar();\n this.openOrNot = false;\n this.numberedListOfServing = new HashMap<Integer, Book>();\n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n this.serveOrNot = false;\n this.searchOrNot = false;\n this.servingPatron = new Patron(null,null);\n }", "public Player()\r\n {\r\n playerItem = new ArrayList();\r\n }", "public MusicOpenDetail(MusicOpenDetail source) {\n if (source.MusicId != null) {\n this.MusicId = new String(source.MusicId);\n }\n if (source.AlbumName != null) {\n this.AlbumName = new String(source.AlbumName);\n }\n if (source.AlbumImageUrl != null) {\n this.AlbumImageUrl = new String(source.AlbumImageUrl);\n }\n if (source.MusicName != null) {\n this.MusicName = new String(source.MusicName);\n }\n if (source.MusicImageUrl != null) {\n this.MusicImageUrl = new String(source.MusicImageUrl);\n }\n if (source.Singers != null) {\n this.Singers = new String[source.Singers.length];\n for (int i = 0; i < source.Singers.length; i++) {\n this.Singers[i] = new String(source.Singers[i]);\n }\n }\n if (source.Duration != null) {\n this.Duration = new Long(source.Duration);\n }\n if (source.Tags != null) {\n this.Tags = new String[source.Tags.length];\n for (int i = 0; i < source.Tags.length; i++) {\n this.Tags[i] = new String(source.Tags[i]);\n }\n }\n if (source.LyricUrl != null) {\n this.LyricUrl = new String(source.LyricUrl);\n }\n if (source.WaveformUrl != null) {\n this.WaveformUrl = new String(source.WaveformUrl);\n }\n }", "public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}", "public Song(String name, int duration)\r\n\t{\r\n\t\tsetName(name);\r\n\t\tsetDuration(duration);\r\n\t}", "public Player()\n {\n playerItem = new ArrayList();\n }", "private void prepareAlbums() {\n// int[] covers = new int[]{\n// R.drawable.album1,\n// R.drawable.album2,\n// R.drawable.album3,\n// R.drawable.album4,\n// R.drawable.album5,\n// R.drawable.album6,\n// R.drawable.album7,\n// R.drawable.album8,\n// R.drawable.album9,\n// R.drawable.album10,\n// R.drawable.album11,\n// R.drawable.album12,\n// R.drawable.album13};\n int [] covers = new int [ALBUM_SIZE];\n for (int i = 0; i < ALBUM_SIZE; i++){\n int temp = i + 1;\n covers[i] = getResources().getIdentifier(\"album\" + temp, \"drawable\", getPackageName() );\n }\n\n Album a = new Album(\"True Romance\", 13, covers[0]);\n albumList.add(a);\n\n a = new Album(\"Xscpae\", 8, covers[1]);\n albumList.add(a);\n\n a = new Album(\"Maroon 5\", 11, covers[2]);\n albumList.add(a);\n\n a = new Album(\"Born to Die\", 12, covers[3]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[4]);\n albumList.add(a);\n\n a = new Album(\"I Need a Doctor\", 1, covers[5]);\n albumList.add(a);\n\n // Special image (album19, album20 )has w x h smaller than normal image\n a = new Album(\"Honeymoon\", 14, covers[18]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[19]);\n albumList.add(a);\n\n a = new Album(\"Loud\", 11, covers[6]);\n albumList.add(a);\n\n a = new Album(\"Legend\", 14, covers[7]);\n albumList.add(a);\n\n a = new Album(\"Hello\", 11, covers[8]);\n albumList.add(a);\n\n a = new Album(\"Greatest Hits\", 17, covers[9]);\n albumList.add(a);\n\n a = new Album(\"Top Hits\", 17, covers[10]);\n albumList.add(a);\n\n a = new Album(\"King Hits\", 17, covers[11]);\n albumList.add(a);\n\n a = new Album(\"VIP Hits\", 17, covers[12]);\n albumList.add(a);\n\n a = new Album(\"True Romance\", 13, covers[13]);\n albumList.add(a);\n\n a = new Album(\"Xscpae\", 8, covers[14]);\n albumList.add(a);\n\n a = new Album(\"Maroon 5\", 11, covers[15]);\n albumList.add(a);\n\n a = new Album(\"Born to Die\", 12, covers[16]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[17]);\n albumList.add(a);\n\n // Special image (album19, album20 )has w x h smaller than normal image\n a = new Album(\"Honeymoon\", 14, covers[18]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[19]);\n albumList.add(a);\n\n adapter.notifyDataSetChanged();\n }", "public AlbumListFragment() {\n setFragmentname(this.getClass().getSimpleName());\n }", "public PlaylistWriter(OutputStream outputStream, Format format, Encoding encoding) {\n this(outputStream, format, encoding, false);\n }" ]
[ "0.8211707", "0.69199", "0.6731831", "0.6635825", "0.6626432", "0.6534555", "0.649189", "0.6414594", "0.6220396", "0.6203409", "0.6185971", "0.6107989", "0.60829926", "0.6073403", "0.60631233", "0.6007205", "0.5999238", "0.5994871", "0.5987929", "0.593531", "0.59147084", "0.5914657", "0.58772445", "0.5871186", "0.5845869", "0.58399874", "0.5810657", "0.5794388", "0.5763913", "0.5763099", "0.57618916", "0.5744777", "0.57341766", "0.5628036", "0.56148064", "0.5600472", "0.556149", "0.55351275", "0.552656", "0.54931563", "0.5478809", "0.54746264", "0.545919", "0.5443875", "0.5441394", "0.54370534", "0.54070926", "0.5386394", "0.5337257", "0.53331107", "0.5332861", "0.5328501", "0.53246677", "0.52828276", "0.5261229", "0.52379286", "0.5236604", "0.51920485", "0.51892304", "0.51792747", "0.51707697", "0.51125133", "0.5099028", "0.5095784", "0.50814027", "0.5019395", "0.5018192", "0.49858698", "0.49851125", "0.49793828", "0.49742898", "0.49610233", "0.49506307", "0.4948169", "0.49373314", "0.4933531", "0.492203", "0.4914653", "0.4902719", "0.4900346", "0.48964095", "0.48763475", "0.48682526", "0.48591042", "0.48546216", "0.48540387", "0.48511535", "0.48475316", "0.484497", "0.48396486", "0.48262563", "0.48223156", "0.4820465", "0.48130724", "0.48116773", "0.48024926", "0.48017502", "0.47995237", "0.4797192", "0.47946095" ]
0.86651856
0
Method to calculate album length. After calculation uses setAlbumDuur().
public void berekenDuur() { int duur = 0; for (Nummer nummer : albumNummers) { duur += nummer.getAfspeelDuur(); } this.setAlbumDuur(duur); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getAlbumCount(){\n\t\treturn this.albumCount;\n\t}", "public void setLength(){\n this.length = 0;\n for (Music track : this.tracks){\n this.length += track.getLength();\n }\n }", "public int length()\n\t{\n\t\tif ( properties != null && properties.containsKey(\"ogg.length.bytes\") )\n\t\t{\n\t\t\tlengthInMillis = VobisBytes2Millis((Integer)properties.get(\"ogg.length.bytes\"));\n\t\t\tSystem.out.println(\"GOT LENGTH: \"+lengthInMillis);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlengthInMillis = -1;\n\t\t}\n\t\treturn (int)lengthInMillis;\n\t}", "public int getLength() { \r\n return audioLength; \r\n }", "public int getLength() {\r\n int length = 0;\r\n \r\n Iterator it = collection.iterator();\r\n \r\n while(it.hasNext()) {\r\n length += ((Chunk)it.next()).getSize();\r\n }\r\n \r\n return length;\r\n }", "@Override\n\tpublic double getLength() {\n \tdouble muscleLength = myAmplitude * Math.sin(myPie);\n\t\tmyPie += myFrequency;\n\t\treturn muscleLength;\n }", "float getLength();", "float getLength();", "public double getLength() {\n return count;\n }", "public static int size_length() {\n return (8 / 8);\n }", "public int length(){\n return pilha.size();\n }", "public int getGallerySize(){\r\n int size = 0;\r\n if(recipe != null){\r\n size = recipe.getImageGallery().size();\r\n }\r\n return size;\r\n }", "public int size()\n\t{\n\t\treturn numOfSongs;\n\t}", "public double getLength();", "public int getWidth() {\n return bala.getWidth();\n }", "protected int length() { return FormatTools.getRasterLength(lengths); }", "public double avePathLength();", "public int getWidth() {\n return fullPhoto.getWidth();\n }", "public int getFullDuration() {\r\n return disc.getDisc().stream()\r\n .mapToInt(Song::getDuration)\r\n .sum();\r\n }", "public double get_length() {\n\t\treturn _length;\n\t}", "public int getAnalysisLength() {\n\t\tif (fHistoryLength > 0)\n\t\t\treturn fHistoryLength;\n\t\telse\n\t\t\treturn 0;\n\t}", "int getTotalLength() {\n synchronized (lock) {\n return cache.getTotalLength();\n }\n }", "public double Length() {\n return OCCwrapJavaJNI.Units_Dimensions_Length(swigCPtr, this);\n }", "abstract double getLength();", "public static double getTrackLength(URL trackAddress) throws UnsupportedAudioFileException,\r\n IOException {\r\n AudioInputStream stream = AudioSystem.getAudioInputStream(trackAddress);\r\n AudioFormat f = stream.getFormat();\r\n return stream.getFrameLength() / f.getFrameRate();\r\n }", "public int calculateVolume() {\n return (int) Math.pow(this.sideLength, 3) ;\n }", "private void computeAverageDocumentLength(){\n double corpusSize = documentDetails.size();\n double lengthsSum = 0;\n ArrayList<String> docs = new ArrayList<>(documentDetails.keySet());\n\n for(String doc : docs){\n lengthsSum += Integer.valueOf(documentDetails.get(doc)[3]);\n }\n averageDocumentLength = lengthsSum/corpusSize;\n }", "public double length() {\n return Vecteur.add(this.OB, this.OA.opposé()).length();\n }", "public static int size_estLength() {\n return (8 / 8);\n }", "public long length() {\n\tint nBits;\n\tlong x, y;\n\tlong length = 7 + Math.max(minBitsS(toFixed(getTranslateX())),\n\t\t\t\t minBitsS(toFixed(getTranslateY())));\n\tif (hasScale()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getScaleX())),\n\t\t\t\t minBitsS(toFixed(getScaleY())));\n\t}\n\tif (hasRotate()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getRotate1())),\n\t\t\t\t minBitsS(toFixed(getRotate2())));\n\t}\n\treturn length;\n }", "@Override\n public int getLength(){\n \n int count = 0;\n count += super.getLength();\n \n //Add the function\n count += handlerId.length;\n \n //Add the options\n count += socksBytes.length;\n \n //Set the length\n SocketUtilities.intToByteArray(length, count );\n \n return count;\n }", "int countByExample(UserAlbumExample example);", "public int calculateSize( int numSamples )\n {\n return numSamples * 2;\n }", "public abstract long getLength();", "public abstract long getLength();", "public long getLength();", "public long getLength();", "public int getLength() {\n return mySize.getLength();\n }", "public int getLength()\n\t{\n\t\tif (synopsisLengthSet)\n\t\t{\n\t\t\treturn length;\n\t\t}\n\t\telse return UNDEFINED;\n\t}", "public int getLengthInCentiMeters()\r\n\t{\r\n\t\treturn length;\r\n\t}", "public double getLength()\n\t{\n\t\treturn length;\n\t}", "public double getLength(){\r\n\t\treturn length;\r\n\t}", "public int getTotalPics()\n {\n\t\t/*System.out.println(\"photo\"+photo.size());\n\t\tif(photo.size() == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tSystem.out.println(totalPics);*/\n return this.totalPics;\n }", "public double len() {\n \t\treturn Math.sqrt((double)x*x + (double)y*y + (double)z*z);\n \t}", "public int getTotalSize();", "public Integer getFileSize(Long key) {\n File file = new File(MUSIC_FILE_PATH + File.separator + key + \".mp3\");\n return (int)file.length();\n }", "public double getLength() {\r\n return length;\r\n }", "public double getLength() {\r\n\t\t\treturn length;\r\n\t\t}", "public int bitLength() {\n \tif (bitLength == -1) {\n \t if (signum == 0) {\n \t \tbitLength = 0;\n \t } else {\n \t\t// Calculate the bit length of the magnitude\n \t\tint magBitLength = ((magnitude.length-1) << 5) + bitLen(magnitude[0]);\n\n \t\tif (signum < 0) {\n \t\t // Check if magnitude is a power of two\n \t\t boolean pow2 = (bitCnt(magnitude[0]) == 1);\n \t\t for(int i=1; i<magnitude.length && pow2; i++)\n \t\t\tpow2 = (magnitude[i]==0);\n\n \t\t bitLength = (pow2 ? magBitLength-1 : magBitLength);\n \t\t} else {\n \t\t bitLength = magBitLength;\n \t\t}\n \t }\n \t}\n \treturn bitLength;\n }", "public double getLength() {\n return length;\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 }", "protected int getLength() {\n int length = super.getLength(); //see if it is defined in the ncml\n if (length < 0) {\n double[] t = getTimes();\n if (t != null) length = t.length;\n else length = 0;\n }\n return length;\n }", "Length getWidth();", "public double getLength() {\r\n\t\treturn length;\r\n\t}", "public double getLength()\n {\n return length;\n }", "public int updateDuration(){\n int newSecondsTotal = 0;\n for(int i = 0; i < MAX_SONGS_PLAYLIST; i++){\n if(playSongs[i] != null){\n newSecondsTotal += playSongs[i].songDurationSong();\n }\n }\n return newSecondsTotal;\n }", "int getTotalSize();", "public double getLength() {\n\t\treturn length;\n\t}", "public int getNumberOfSongs()\n {\n return songs.size();\n }", "public double length(){\n return end.distance(getStart());\n }", "public int getLengthDays() {\r\n\t\treturn diffDays(imageList.get(0).cal, getLast().cal);\r\n\t}", "int countByExample(SportAlbumPictureExample example);", "@ApiModelProperty(required = true, value = \"The length of the file/folder.\")\n public Long getLength() {\n return length;\n }", "public int get_length();", "public int maxLen() {\n if (compositions == null) {\n return Math.max(maxLen(getAllele(0)), maxLen(getAllele(1)));\n } else {\n if (compositions.isEmpty())\n return 0;\n int maxLen = compositions.get(0).maxLen();\n for (Variant c : compositions) {\n maxLen = Math.max(maxLen, c.maxLen());\n }\n return maxLen;\n }\n }", "public int getLength() {\n if (data instanceof String) {\n String string = (String) data;\n return string.length();\n } else if (data instanceof StringReference) {\n StringReference stref = (StringReference) data;\n return stref.getLength();\n } else if (data instanceof Value) {\n Value val = (Value) data;\n return val.getString().length();\n } else {\n return data.toString().length();\n }\n }", "public int length() {\n return parts.length;\n }", "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 int width() {\n return picture.width();\n }", "public double getMusicDuration() {\n if (music == null) {\n return -1;\n }\n \n return music.getDuration();\n }", "@Override\n public String toString() {\n return this.title + \": \" + this.duration;\n //next step 6 create an album class\n }", "public Integer getLength() {\n return _length;\n }", "public Integer getLength() {\n return _length;\n }", "private int count(int[] L, int len) {\n int sum = 0;\n for (int l : L) {\n sum += l / len; //!!! 必须是(l/len), l可以被cut成多块长度为len的木头。\n }\n return sum;\n }", "public int width() \n {\n return this.picture.width();\n }", "public int size() {\r\n\t\tthis.size= 0;\r\n\t\tfor (DirectoryComponent item : DirectoryList){\r\n\t\t\tthis.size += item.size();\r\n\t\t}\r\n\t\treturn this.size;\r\n\t}", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "int getLength();", "long getDuration() {\n if (debugFlag)\n debugPrintln(\"JSChannel:getDuration\");\n\n if (ais == null || audioFormat == null ) {\n if (debugFlag)\n debugPrintln(\"JSChannel: Internal Error getDuration\");\n return (long)Sample.DURATION_UNKNOWN;\n }\n // Otherwise we'll assume that we can calculate this duration\n\n // get \"duration\" of audio stream (wave file)\n // TODO: For True STREAMing audio the size is unknown...\n long numFrames = ais.getFrameLength();\n if (debugFlag)\n debugPrintln(\" frame length = \" + numFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n\n float rateInFrames = audioFormat.getFrameRate();\n rateInHz = audioFormat.getSampleRate();\n if (debugFlag)\n debugPrintln(\" rate in Frames = \" + rateInFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n long duration = (long)((float)numFrames/rateInFrames);\n if (debugFlag)\n debugPrintln(\" duration(based on ais) = \" + duration);\n return duration;\n }", "public double getNeckLength() {\n MessageUtility.logGetter(name,\"getNeckLength\",neckLength);\n return neckLength;\n }", "public double getBaseLength() {\n return baseLength;\n }", "public short computeLength() {\n \tshort len = (short)(CORE_LENGTH + super.computeLength());\n \treturn len;\n }", "public int width() {\n return picture().width();\n }", "public int duration(){\n int maxLength=voices.get(0).duration();\n for(Bar bar:voices){\n if (bar.duration()>=maxLength){\n maxLength=bar.duration();\n }\n }\n checkRep();\n return maxLength;\n }", "public String getSize() {\n return fullPhoto.getSize();\n }", "long getLaenge() {\n long leange = 0;\n for (Song song : songlist) {\n if (song != null)\n leange += song.getLeange();\n }\n return leange;\n }", "public int getLength()\n\t{\n\t\treturn (int) length;\n\t}", "public int getLength()\n\t{\n\t\treturn mLength;\n\t}", "@Override\r\n public int getItemCount() {\r\n return albumList.size();\r\n }", "public final int mo66557hg() {\n int size;\n synchronized (this.aen) {\n mo66559hj();\n size = this.aeo.size();\n }\n return size;\n }", "private int length() { return length; }", "private int getAdSize(int position) {\r\n int adSize = position > 2 ? ((position - 3) / 8 + 1) : 0;\r\n return adSize;\r\n }", "protected int getLength() {\n return length;\n }" ]
[ "0.6724755", "0.67018634", "0.6104437", "0.5967946", "0.5917237", "0.58945966", "0.5872946", "0.5872946", "0.5799759", "0.57573664", "0.5738198", "0.5734646", "0.5711961", "0.56755906", "0.56579727", "0.56562144", "0.56525594", "0.5639583", "0.5610074", "0.5597002", "0.55814445", "0.5580674", "0.5570975", "0.55637896", "0.5562171", "0.55370533", "0.5527545", "0.54856855", "0.54735297", "0.5472119", "0.5470186", "0.5463225", "0.5457864", "0.5457629", "0.5457629", "0.54556143", "0.54556143", "0.54525536", "0.5444285", "0.5430518", "0.5427281", "0.54241675", "0.5418479", "0.54183555", "0.5408535", "0.5405898", "0.5388764", "0.53842723", "0.5380569", "0.53792083", "0.5377712", "0.53745836", "0.53734684", "0.53683984", "0.5357076", "0.5348424", "0.53459615", "0.53447014", "0.5344286", "0.5342663", "0.5331866", "0.5325965", "0.5321956", "0.5317354", "0.53156805", "0.5314308", "0.5284215", "0.5282226", "0.5281305", "0.52665776", "0.525695", "0.52558035", "0.52558035", "0.5250427", "0.52472275", "0.52410305", "0.5233694", "0.5233694", "0.5233694", "0.5233694", "0.5233694", "0.5233694", "0.5233694", "0.5233694", "0.5233694", "0.5233694", "0.5228355", "0.522119", "0.52198714", "0.52196246", "0.5216056", "0.5215633", "0.52136594", "0.5213425", "0.5213089", "0.520842", "0.5201601", "0.5200275", "0.5199467", "0.51979774", "0.5197309" ]
0.0
-1
Method to shuffle a playlist. Uses an existing method: Collections.shuffle().
public void shuffle() { Collections.shuffle((List<Nummer>) this.albumNummers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shuffle();", "public ArrayList<SongInfo> getShuffledSongs(boolean reshuffle);", "public void shuffle(){\n Collections.shuffle(Arrays.asList(this.deck));\n }", "void shuffle();", "void shuffle();", "public void shuffle() {\n Collections.shuffle(this);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n\t\tCollections.shuffle(inds);\n\t}", "protected abstract void playShuffled();", "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "public void resetShuffleOrder() {\n\t\tshuffleOrder = new ArrayList<Song>();\n\t\tthis.shuffleSongIndex = -1;\n\t}", "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffleDeck() {\n\t\tCollections.shuffle(this.deck);\n\t}", "public void shuffleDeck() {\n\t\tCollections.shuffle(deck);\n\t}", "public static void shuffle(java.util.List arg0, java.util.Random arg1)\n { return; }", "public abstract void shuffled();", "public void shuffle() {\n\t\tCollections.shuffle(Shoe);\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Arrays.asList(reel));\n\t}", "public void shuffle()\n {\n Collections.shuffle(artefacts);\n }", "public void setShuffle() {\n shuffle = true;\n // set AUTO so when the song ends - it will start the next song automatically\n action = PLAY_TRACK;\n if (shuffleIndexes != null) shuffleIndexes.clear();\n // create a new list of shuffled indexes\n shuffleIndexes = new ArrayList<>();\n for (int i = 0; i < songsNumber; i++) shuffleIndexes.add(i);\n Collections.shuffle(shuffleIndexes);\n songPosn = 0;\n playSong();\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t\t// : Shuffle with random seed each time, then we can save the seed\r\n\t\t// Collections.shuffle(cards, new Random(10));\r\n\t}", "public void shuffle()\n\t{\n\t\tCollections.shuffle(card);\n\t}", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "public void shuffle()\r\n {\r\n Collections.shuffle(cards);\r\n top = NUMCARDS - 1;\r\n }", "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "@Override\n public void shuffle() {\n System.out.println(\"shuffling the shoe...\");\n Collections.shuffle(this.cards);\n }", "private void shuffleDeck()\r\n {\n cardList = new ArrayList<Card>(deck);\r\n // shuffle the deck of cards using the ArrayList\r\n Collections.shuffle(getCardList());\r\n // convert it back to a HashSet\r\n deck = new HashSet<Card>(getCardList());\r\n }", "public void shuffleDeck() {\n for (int i = 0; i < TOTAL_NUMBER_OF_CARDS - 1; i++) {\n Random r = new Random();\n int x = r.nextInt(TOTAL_NUMBER_OF_CARDS);\n Card y = deck.get(x);\n deck.set(x, deck.get(i));\n deck.set(i, y);\n }\n }", "public void shuffle() {\n deck.clear();\n deck.addAll(allCards);\n Collections.shuffle(deck, new Random(System.nanoTime()));\n }", "public void onClickShuffle() {\n if (player != null) {\n serviceBound = false;\n player.stopMedia();\n Random r = new Random();\n currentSong = r.nextInt(audioList.size());\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n playListAdapter.getList()\n .get(playListAdapter.selected).setSelect(false);\n playListAdapter.notifyItemChanged(playListAdapter.selected);\n\n playListAdapter.selected = getCurrentSong();\n playListAdapter.getList()\n .get(playListAdapter.selected).setSelect(true);\n playListAdapter.notifyItemChanged(playListAdapter.selected);\n }\n }\n }", "public static void shuffle(java.util.List arg0)\n { return; }", "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "public void shuffle(){\n\n // resetting the int counters\n nextCard = 0;\n nextDiscardedPlace = 0;\n discardPile = new PlayingCard[Constants.DECK_SIZE];\n\n PlayingCard temp = null;\n Random rand = new Random();\n\n for(int i = 0; i < MAX_SHUFFLE; i++) {\n int pos1 = rand.nextInt(Constants.DECK_SIZE);\n int pos2 = rand.nextInt(Constants.DECK_SIZE);\n\n temp = deck[pos1];\n deck[pos1] = deck[pos2];\n deck[pos2] = temp;\n }\n }", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle() {\n\t\tRandom random = new Random();\n\t\tint dealtCards = this.dealtCards.get();\n\t\tfor (int i = dealtCards; i < Deck.DECK_SIZE; i++) {\n\t\t\t// Obtain random position for available cards.\n\t\t\tint randomNumber = dealtCards + random.nextInt((Deck.DECK_SIZE - dealtCards));\n Card tempCard = cards.get(i);\n // Swap cards position.\n cards.set(i, cards.get(randomNumber));\n cards.set(randomNumber, tempCard);\n }\n\t}", "private void cycleShuffle() {\n\t\tif (mShuffleMode == SHUFFLE_NONE) {\n\t\t\tsetShuffleMode(SHUFFLE_NORMAL);\n\t\t\tif (mRepeatMode == REPEAT_CURRENT) {\n\t\t\t\tsetRepeatMode(REPEAT_ALL);\n\t\t\t}\n\t\t} else {\n\t\t\tsetShuffleMode(SHUFFLE_NONE);\n\t\t}\n\t}", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "public void spreadShuffle()\r\n {\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int i = 0; i < SHUFFLE_COUNT; i++) {\r\n while (cards.size() > 0)\r\n {\r\n shuffledDeck.add( drawRandom() );\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n tempDeck.clear();\r\n shuffledDeck = tempDeck;\r\n }\r\n }", "public void shuffle()\r\n\t{\r\n\t\tRandom rand = ThreadLocalRandom.current();\r\n\t\t\r\n\t\tfor (int i = topCard; i > 0; i--)\r\n\t\t{\r\n\t\t\tint index = rand.nextInt(i + 1);\r\n\t\t\tString temp = cards[index];\r\n\t\t\tcards[index] = cards[i];\r\n\t\t\tcards[i] = temp;\r\n\t\t}\r\n\t}", "public void shuffle() {\n\t\tfor (int i = 51; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tint temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcurrentPosition = 0;\n\t}", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new HashSet<Integer>();\n\t\tthis.currentCard = 0;\n\t\tint i= 0;\n\t\twhile (i < deck.length)\n\t\t{\n\t\t\tint another = this.rand.nextInt(NUMBER_OF_CARDS);\n\t\t\tif(!usedRandoms.contains(another))\n\t\t\t{\n\t\t\t\tCard temp = this.deck[i];\n\t\t\t\tthis.deck[i] = this.deck[another];\n\t\t\t\tthis.deck[another] = temp;\n\t\t\t\ti++;\n\t\t\t\tusedRandoms.add(another);\n\t\t\t}\n\t\t}\n\t}", "public void shuffle(){ \n \n Collections.shuffle(cardDeck);\n /*Random rand = new Random();\n for(int i = 0 ; i < 110 ; i++){\n int firstCard = rand.nextInt(110);\n int secondCard = rand.nextInt(110);\n Collections.swap(cardDeck,firstCard,secondCard);\n }*/\n }", "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle()\r\n\t{\r\n\t\tCollections.shuffle(_tiles);\r\n\t}", "public void shuffle() {\n for (int i = 0; i < this.cards.length ; i++ ) {\n double x = Math.floor(Math.random() * ((double)this.cards.length - (double)0)) + (double)0;\n Card temp = this.cards[i];\n this.cards[i]= this.cards[(int)x];\n this.cards[(int)x]= temp;\n }\n }", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }", "public void shuffleDeck() {\n\t\tint numberOfShuffles = (int) ( Math.random() * 4 + 1 ) ;\n\t\tCard temp;\n\t\t\n\t\tfor( int j = 0; j < numberOfShuffles; j++ ) {\n\t\t\tfor( int i = 0; i < deck.length; i++ ) {\n\t\t\t\tint randSwitchNum = (int) (Math.random() * 52);\n\t\t\t\ttemp = deck[i];\n\t\t\t\tdeck[i] = deck[randSwitchNum];\n\t\t\t\tdeck[randSwitchNum] = temp;\n\t\t\t}\n\t\t}\t\n\t}", "public void shuffle() {\n Collections.shuffle(this.plateau);\n }", "@Override\n\tpublic void shuffleDeck() {\n\t\tfor(int i = 0; i < 1000000; i++) {\n\t\t\tint randomStelle1 = (int) (Math.random() * 32);\n\t\t\tint randomStelle2 = (int) (Math.random() * 32);\n\t\t\tPlayingCard copy = aktuellesDeck[randomStelle1];\n\t\t\taktuellesDeck[randomStelle1] = aktuellesDeck[randomStelle2];\n\t\t\taktuellesDeck[randomStelle2] = copy;\n\t\t}\n\t}", "public void shuffle(){\n //After shuffling dealing starts at deck[0] again\n currentCard = 0;\n //for each card , pick another random card and swap them\n for(int first = 0; first < deck.length; first++){\n int second = randomNumbers.nextInt(NUMBER_OF_CARDS);\n\n //Swap Method to swap current card with randomly selected card\n Card temp = deck[first];\n deck[first] = deck[second];\n deck[second] = temp;\n }\n }", "private void shuffle(ArrayList<Product> dataSet) {\n\t\tfor (int i = 0; i < dataSet.size(); i++) {\n\t\t\tint k = rand(0, i);\n\t\t\tProduct temp = dataSet.get(k);\n\t\t\tdataSet.set(k, dataSet.get(i));\n\t\t\tdataSet.set(i, temp);\n\t\t}\t\n\t}", "public void shuffleItems() {\n LoadProducts(idCategory);\n }", "private void shuffleOrder() {\n\t\t// Simple shuffle: swap each piece with some other one\n\t\tfor (int i = 0; i < order.size(); i++) {\n\t\t\tint j = (int) (Math.random() * order.size());\n\t\t\tInteger pi = order.get(i);\n\t\t\torder.set(i, order.get(j));\n\t\t\torder.set(j, pi);\n\t\t}\n\t}", "void shuffle() {\r\n cards.addAll(dealtCards);\r\n dealtCards.removeAll(dealtCards);\r\n Collections.shuffle(cards);\r\n System.out.println(\"Shuffled cards\" + cards);\r\n }", "public void shuffle() {\r\n for ( int i = deck.size()-1; i > 0; i-- ) {\r\n int rand = (int)(Math.random()*(i+1));\r\n SpoonsCard temp = deck.get(i);\r\n deck.set(i, deck.get(rand));\r\n deck.set(rand, temp);\r\n }\r\n cardsUsed = 0;\r\n }", "public void shuffle() {\n\n\tcardsLeft = cards.length;\n\tfor (int i=cards.length-1; i>=0; --i) {\n\n\t int r = (int)(Math.random()*(i+1)); // pick a random pos <= i\n\n\t Card t = cards[i];\n\t cards[i] = cards[r];\n\t cards[r] = t;\n\n\t}\n }", "public Deck randomShuffle(){\n\t\tshuffleOnceRandom();\n\t\tshuffleOnceRandom();\n\t\treturn ourDeck;\n\t}", "public static void shuffle(String[] arrayList){\n int num=arrayList.length; \n for(int j=0;j<60;j++){ // the number of shuffling>50 times, so I choose 60 times\n for(int i=0;i<num;i++){ \n int index=(int)(Math.random()*num);\n //Swap the position of elements in the array at that index with the first element\n String temp=arrayList[i]; \n arrayList[i]=arrayList[index];\n arrayList[index]=temp;\n }}}", "@Test\n public void testShuffle() {\n System.out.println(\"shuffle\");\n Deck instance = new Deck();\n instance.shuffle(); \n }", "public void shuffle(){\r\n int randomPos;\r\n //for each card in the deck\r\n for(int i=0; i<52; i++){\r\n randomPos = getRandomPos(i);\r\n exchangeCards(i, randomPos);\r\n }\r\n topCardIndex = 0;\r\n\t}", "protected void shuffle(List<Card> deck) {\n Collections.shuffle(deck);\n }", "public void shuffleCards() {\n Collections.shuffle(suspectCards);\n Collections.shuffle(weaponCards);\n Collections.shuffle(roomCards);\n\n }", "@Override\n public void onClick(View view) {\n if (play.getText().toString().equals(\"PLAY RANDOM\")) {\n play.setText(\"PAUSE\");\n\n Collections.shuffle(MainActivity.songs);//It changes the order of the songs\n\n } else {\n if (play.getText().toString().equals(\"PAUSE\")) {\n play.setText(\"PLAY RANDOM\");\n }\n }\n }", "public void shuffleTweets() {\n Collections.shuffle(tweets);\n }", "public static List arrayShuffle(List arrayToShuffle)\n\t{\n\t\tCollections.shuffle(arrayToShuffle);\n\t\treturn arrayToShuffle;\n\t}", "public static void main(String[] args) {\n ArrayList<String>colors= new ArrayList<>();\n colors.add(\"red\");\n colors.add(\"green\");\n colors.add(\"Orange\");\n colors.add(\"white\");\n colors.add(\"black\");\n System.out.println(\"list before shuffling: \" + colors );\n Collections.shuffle(colors);\n System.out.println(\"list after shuffling:\" + colors);\n\n\n\n }", "public boolean shuffleNeeded();", "public void setShuffle() {\n\t\tthis.shuffle = !this.shuffle;\n\t}", "default Stream<T> reshuffle() {\n return reshuffle(null);\n }", "public ArrayList<Song> getShuffleOrder() {\n\t\treturn this.shuffleOrder;\n\t}", "public void shuffle(int shuffleNum) {\n\t\tint lastPos = 0;\n\t\tint actualPos = 0;\n\t\tthis.shuffleNum = shuffleNum;\n\t\tfor (int i = 0; i < shuffleNum; i++) {\n\t\t\tshuffling = true;\n\t\t\tint[] aux = boardModel.getRandomMovement(lastPos, actualPos);\n\t\t\tnotifyObservers(aux[0], aux[1]);\n\n\t\t\tlastPos = aux[0];\n\t\t\tactualPos = aux[1];\n\t\t}\n\t\tshuffling = false;\n\t}", "public void skipForward() {\n if (shuffle == false) {\n // Shuffle OFF Repeat OFF\n if (repeat == false) {\n position++;\n } else {\n // Shuffle OFF Repeat ON\n if (position + 2 > tracks.size()) {\n position = 0;\n } else {\n position++;\n }\n }\n } else {\n if (tracksplayed.contains(position) == false) {\n tracksplayed.add(position);\n }\n Random r = new Random();\n int temp = 0;\n int count = 0;\n do {\n temp = r.nextInt(tracks.size());\n count++;\n } while (tracksplayed.contains(temp) == true && count < tracks.size());\n\n // Shuffle ON Repeat OFF\n if (repeat == false) {\n if (count < tracks.size()) {\n position = temp;\n tracksplayed.add(new Integer(temp));\n } else {\n // If all tracks have been played, deliberately set position to an invalid value\n position = tracks.size() + 1;\n }\n } else {\n // Shuffle ON Repeat ON\n if (count < tracks.size()) {\n position = temp;\n tracksplayed.add(new Integer(temp));\n } else {\n // Make sure we don't play the same song as last time, any other one is fine\n do {\n temp = r.nextInt(tracks.size());\n count++;\n } while (temp == position);\n\n position = temp;\n tracksplayed.clear();\n tracksplayed.add(temp);\n }\n }\n\n }\n //System.out.println( \"\\nWe just set the position to \" + position + \"\\n\" );\n }", "public void shuffle() {\n //Beginning with the top card, decrement i until i is 0.\n for (int i = this.topCard - 1; i >= 0; i--) {\n Card tmpCard = this.cards[i]; //Store the card at i, since it will be overwritten.\n //Choose a random card position from within the deck.\n int randomPosition = (int) (Math.random() * (this.topCard - 1));\n //Take the card from the random position and store it in the ith position.\n this.cards[i] = this.cards[randomPosition];\n //Take the card from the ith position, and put it into the randomly chosen position.\n this.cards[randomPosition] = tmpCard;\n //The cards have now been swapped.\n }\n }", "public void shuffle() {\n\t\t\n\t\tRandom random = new Random();\n\t\tint position;\n\t\t\n\t\tfor(int i = 0; i < 200 * dimension; i++) {\n\t\t\tposition = random.nextInt(numTiles - 1);\n\t\t\tif(isValidMove(position)) {\n\t\t\t\tmakeMove(position);\n\t\t\t}\n\t\t}\n\t\t\n\t\tnumMoves = 0;\n\t}", "public void shuffle(int numShuffles)\n { \n Card tempCard;\n int switchOne, switchTwo;\n\n for (int i=0; i<numCards; i++){\n switchOne = rand.nextInt(numCards);\n switchTwo = rand.nextInt(numCards);\n\n tempCard = cardAry[switchOne];\n cardAry[switchOne] = cardAry[switchTwo];\n cardAry[switchTwo] = tempCard; \n }\n\n if(cardAry.length > 1 && cardAry.length <=5 && isSorted()==true)\n shuffle(2);\n }", "@SuppressWarnings(\"unchecked\")\n Stream<T> reshuffle(@Nullable String name);", "public void shuffle()\r\n/* 18: */ {\r\n/* 19:41 */ for (int i = 0; i < this.pop.size(); i++)\r\n/* 20: */ {\r\n/* 21:43 */ Cluster c = (Cluster)this.pop.elementAt(i);\r\n/* 22:44 */ g.setClusters(c.getClusterVector());\r\n/* 23:45 */ g.shuffleClusters();\r\n/* 24:46 */ c.setClusterVector(g.getClusters());\r\n/* 25:47 */ c.setConverged(false);\r\n/* 26: */ }\r\n/* 27: */ }", "public static <E> void shuffle(ArrayList<E> list) {\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tint index = (int)(Math.random() * list.size());\n\t\t\tE temp = list.get(i);\n\t\t\tlist.set(i, list.get(index));\n\t\t\tlist.set(index, temp);\n\t\t}\n\t}", "public static void shuffle( int[] a ) {\n int N = a.length;\n \n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "@Override\r\n public void dealerShuffleDeck(){\r\n this.dealer.shuffleDecks();\r\n }", "public void hinduShuffle()\r\n {\r\n List<Card> cut = new ArrayList<Card>();\r\n List<Card> cut2 = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n int cutPoint = 0;\r\n int cutPoint2 = 0;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n cutPoint = rand.nextInt( cards.size()-1 );\r\n cutPoint2 = rand.nextInt( cards.size() - cutPoint ) + cutPoint;\r\n for (int i = 0; i < cutPoint; i++) {\r\n cut.add(draw());\r\n }\r\n for (int i = cutPoint2; i < cards.size(); i++) {\r\n cut2.add(draw());\r\n }\r\n for (int i = 0; i < cut.size(); i++) {\r\n shuffledDeck.add(cut.remove(0));\r\n }\r\n for (int i = 0; i < cards.size(); i++) {\r\n shuffledDeck.add(cards.remove(0));\r\n }\r\n for (int i = 0; i < cut2.size(); i++) {\r\n shuffledDeck.add(cut2.remove(0));\r\n }\r\n cut = cards;\r\n cut.clear();\r\n cut2.clear();\r\n cards = shuffledDeck;\r\n }\r\n }", "private void shufflePositions() {\r\n\r\n // Inizializzo con il progressivo delle posizioni\r\n for (int i = 0; i < shufflePositions.length; i++) {\r\n shufflePositions[i] = i;\r\n }\r\n\r\n int lastIndex ;\r\n int tempIndex = 0;\r\n int tempVal = 0;\r\n\r\n// // Tecnica 1 - Knuth (gli indici da scambiare sono scelti dall'inizio in un insieme decrescente in cardinalità)\r\n// int lastIndex = shufflePositions.length;\r\n// for (int i = 0; i < shufflePositions.length-1; i++) {\r\n// tempIndex = i+secureRandom.nextInt(lastIndex); // Randomizzo le posizioni del random buffer da cui prendo i valori casuali\r\n// tempVal=shufflePositions[tempIndex];\r\n// shufflePositions[tempIndex]=shufflePositions[i];\r\n// shufflePositions[i] = tempVal; \r\n// lastIndex--;\r\n// } \r\n \r\n //Tecnica 2 - Knuth GAB Modification (gli indici casuali sono scelti dal fondo in un insieme decrescente in cardinalità)\r\n lastIndex = shufflePositions.length-1;\r\n for (int i = 0; i < shufflePositions.length - 1; i++) {\r\n tempIndex = secureRandom.nextInt(lastIndex); // Randomizzo le posizioni del random buffer da cui prendo i valori casuali\r\n tempVal = shufflePositions[tempIndex];\r\n shufflePositions[tempIndex] = shufflePositions[lastIndex];\r\n shufflePositions[lastIndex] = tempVal;\r\n lastIndex--;\r\n }\r\n \r\n// // Tecnica 3 - Algoritmo standard delle collections\r\n// Integer[]tempArray = new Integer[MaxBufferLength];\r\n// for (int i=0;i<MaxBufferLength;i++){\r\n// tempArray[i]=i;\r\n// \r\n// }\r\n// List<Integer> tempList = Arrays.asList(tempArray);\r\n//\r\n// Collections.shuffle(tempList, secureRandom);\r\n// tempArray= (Integer[]) tempList.toArray();\r\n// for (int i=0;i<shufflePositions.length;i++){\r\n// shufflePositions[i]=tempArray[i];\r\n// }\r\n }", "public static ArrayList<String> shuffleCards(ArrayList<String> arrayList,int player){\n System.out.println(\"the cards are shuffule properly\");\n ArrayList<String> temp = new ArrayList<>();\n while(! arrayList.isEmpty()){\n int loc = (int) (Math.random()*arrayList.size());\n temp.add(arrayList.get(loc));\n arrayList.remove(loc);\n }\n arrayList = temp;\n display(arrayList);\n cardFlowCompute(arrayList,player);\n return arrayList;\n }", "public void removeFromShuffleList(Song song) {\n\t\t// iterate through the shuffle list, mark all deleted songs\n\t\tfor (int i = shuffleOrder.size() - 1; i >= 0; i--) {\n\t\t\tif (shuffleOrder.get(i).equals(song)) {\n\t\t\t\tshuffleOrder.remove(i);\n\t\t\t\tif (i < this.shuffleSongIndex)\n\t\t\t\t\tshuffleSongIndex -= 1;\n\t\t\t}\n\t\t}\n\t}", "public static void shuffle( Object[] a ) {\n int N = a.length;\n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n Object temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "private static <T> ImmutableList<T> shuffleImmutableList(List<T> sourceList, Random random) {\n List<T> mutableList = new ArrayList<>(sourceList);\n Collections.shuffle(mutableList, random);\n return ImmutableList.copyOf(mutableList);\n }", "public void setShuffleSongIndex(int index) {\n\t\tthis.shuffleSongIndex = index;\n\t}", "public int[] shuffle() {\n int[] result = reset();\n\n Random rand = new Random();\n for (int i = 0; i < result.length; i++) {\n int j = rand.nextInt(result.length - i) + i;\n int tmp = result[i];\n result[i] = result[j];\n result[j] = tmp;\n }\n return result;\n }", "@Override\n public <T> T[] shuffle(T[] elements) {\n return super.shuffle(elements);\n }", "public static void shuffle(int[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n int temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }", "public void setShuffle(boolean shuffle)\n {\n this.shuffle = shuffle;\n }", "public static void shuffle(Object[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n Object temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }", "public native int toggleShuffle();", "public static void shuffle(int data[]) {\n\n }" ]
[ "0.74722314", "0.74037844", "0.7333427", "0.72288954", "0.72288954", "0.7200266", "0.7153094", "0.7153094", "0.7064692", "0.70531476", "0.70495206", "0.70276123", "0.6910752", "0.69080895", "0.6851175", "0.68494487", "0.68311113", "0.6819848", "0.6811691", "0.6805598", "0.6793932", "0.678029", "0.67692786", "0.6751314", "0.67474055", "0.67347646", "0.67172533", "0.6588581", "0.6582499", "0.65817636", "0.6573389", "0.65705115", "0.6569755", "0.65681213", "0.65312356", "0.6516057", "0.6507561", "0.6501656", "0.6495509", "0.6483806", "0.6474978", "0.64725053", "0.6468701", "0.6465627", "0.64572346", "0.6455656", "0.64526886", "0.64441746", "0.644195", "0.6429072", "0.64000326", "0.6398209", "0.6394444", "0.638155", "0.63454473", "0.6298685", "0.6287735", "0.6276879", "0.6274727", "0.6268218", "0.62514406", "0.62512964", "0.6240159", "0.6228633", "0.621674", "0.62110716", "0.6210584", "0.6196204", "0.6176041", "0.61311644", "0.61206543", "0.6116991", "0.6113503", "0.60509616", "0.60356134", "0.60240626", "0.60238373", "0.59648883", "0.5958919", "0.5954259", "0.5953309", "0.5947564", "0.59462833", "0.59458566", "0.5937208", "0.59237856", "0.5909127", "0.5906028", "0.59048396", "0.5899511", "0.58899915", "0.5881665", "0.58809984", "0.58797884", "0.5868691", "0.5860615", "0.5857658", "0.58536214", "0.5852429", "0.5851074" ]
0.6843461
16
opens the spreadsheet popup
private SpreadsheetPage openSpreadsheet(ContentViewElement cv) { WebElement spreadsheetAction = cv.switchToResultLayout(ResultLayout.LISTING).getActionByTitle( SPREADSHEET_ACTION_TITLE); assertNotNull(spreadsheetAction); spreadsheetAction.click(); WebElement iFrame = Locator.findElementWithTimeout(By.xpath(IFRAME_XPATH)); assertNotNull(iFrame); driver.switchTo().frame(iFrame); SpreadsheetPage spreadsheet = new SpreadsheetPage(driver); // wait for ajax requests and render to complete spreadsheet.waitReady(); // fill the page object fillElement(SpreadsheetPage.class, spreadsheet); return spreadsheet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void open() {\n popupWindow = new Window(getTypeCaption());\n popupWindow.addStyleName(\"e-export-form-window\");\n popupWindow.addStyleName(\"opaque\");\n VerticalLayout layout = (VerticalLayout) popupWindow.getContent();\n layout.setMargin(true);\n layout.setSpacing(true);\n layout.setSizeUndefined();\n popupWindow.setSizeUndefined();\n popupWindow.setModal(false);\n popupWindow.setClosable(true);\n\n popupWindow.addComponent(this);\n getMainApplication().getMainWindow().addWindow(popupWindow);\n\n onDisplay();\n }", "public void triggerPopup();", "public void onClick(DialogInterface dialog, int which) {\n Intent browserIntent = new Intent(\n Intent.ACTION_VIEW,\n Uri.parse(\"https://docs.google.com/spreadsheet/viewform?formkey=dGpiRDhreGpmTFBmQ2FUTVVjVlhESHc6MQ\"));\n startActivity(browserIntent);\n\n return;\n }", "public void open() {\n\t\tthis.createContents();\n\n\t\tWindowBuilder delegate = this.getDelegate();\n\t\tdelegate.setTitle(this.title);\n\t\tdelegate.setContents(this);\n\t\tdelegate.setIcon(this.iconImage);\n\t\tdelegate.setMinHeight(this.minHeight);\n\t\tdelegate.setMinWidth(this.minWidth);\n\t\tdelegate.open();\n\t}", "private void showDialog() {\n\n BaseBottomSheetDialog dialog = new BaseBottomSheetDialog(this);\n dialog.setContentView(R.layout.bottom_sheet);\n dialog.show();\n\n }", "public void openURL(String url)\n {\n getLdtp().generateKeyEvent(\"<command><shift>o\");\n logger.debug(\"Open Office document from URL: \" + url);\n getLdtp().enterString(url);\n getLdtp().generateKeyEvent(\"<enter>\");\n }", "public void open(){\n dialog.setLocation\n (parent.getLocation().x + 10, parent.getLocation().y + 10);\n dialog.setSize(PREF_SIZE);\n dialog.setResizable(false);\n dialog.setVisible(true);\n dialog.setResizable(true);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tActionSheet.showSheet(GrzlActivity.this, GrzlActivity.this,\r\n\t\t\t\t\t\tGrzlActivity.this, \"1\");\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdoOpen();\n\t\t\t}", "public void open() {\r\n\t\tthis.setVisible(true);\r\n\t}", "public int open() {\n\t\tint value = super.open();\n\t\tif (popupCloser == null) {\n\t\t\tpopupCloser = new PopupCloserListener();\n\t\t}\n\t\tpopupCloser.installListeners();\n\t\tProposal p = getSelectedProposal();\n\t\tif (p != null) {\n\t\t\tshowProposalDescription();\n\t\t}\n\t\treturn value;\n\t}", "private void jMenuItem_ShowProspectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ShowProspectActionPerformed\n File fProspect = new File(\"Propsect_Relance.csv\");\n try {\n Desktop.getDesktop().open(fProspect);\n } catch (IOException ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void createPopupWindow() {\r\n \t//\r\n }", "public void Open() {\r\n\t click();\r\n\t }", "boolean isPopUpOpened();", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tpopup.show(mainpanel , 660, 40);\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent action) {\n\t\t\t\t\tDishDetails.OpenWindow(null);\n\t\t\t\t}", "private void showPopup(View view) {\n PopupMenu popupMenu = new PopupMenu(context, view);\n final DataResult dataResult = (DataResult) view.getTag();\n MenuInflater menuInflater = popupMenu.getMenuInflater();\n menuInflater.inflate(R.menu.popup_data_result, popupMenu.getMenu());\n if (dataResult.isIs_clouded()) {\n popupMenu.getMenu().getItem(1).setEnabled(false);\n }\n popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.open_csv_data_result:\n openCSVDataResult(dataResult);\n break;\n case R.id.cloud_saved_data_result:\n cloudSavedDataResult(dataResult);\n break;\n case R.id.delete_data_result:\n deleteDataResult(dataResult);\n break;\n }\n return true;\n }\n });\n popupMenu.show();\n }", "public void callDialog(){\n behavior.setState(BottomSheetBehavior.STATE_EXPANDED);\n\n }", "public void openURLByFile(String url)\n {\n getAppleMenu().activate();\n getAppleMenu().select(Menu.FILE);\n getAppleMenu().open(Menu.OPEN_URL);\n logger.debug(\"Open Office document from URL: \" + url);\n getLdtp().enterString(url);\n getLdtp().generateKeyEvent(\"<enter>\");\n }", "public static void goToEditSongWindow()\n {\n EditSongWindow editSongWindow = new EditSongWindow();\n editSongWindow.setVisible(true);\n editSongWindow.setFatherWindow(actualWindow, false);\n }", "public void editGrades(View v) {\n PopupWindow PW = new PopupWindow(100, 100);\n PW.showAtLocation(v, 10, 1, 1);\n }", "void openFromFileClicked() {\n\t\tif (GeoGebraJSNativeBridge.get() != null) {\n\t\t\tGeoGebraJSNativeBridge.get().openFromFileClickedNative();\n\t\t}\n\t}", "SpreadSheet() {\n /* Taene Onwane Windowz wa andazeye an*/\n super(\"My Basic SpreadSheet \"+namC+\", Spring 2011, University of Kurdistan-MOHSENmirzay\");\n setSize(1100, 700);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n /*ezafe kardane menu wa item haye an*/\n setJMenuBar(jmb);\n jmb.add(jmFile); jmb.add(jmEdit); jmb.add(jmFunction);\n jmFile.add(jmiNew); jmFile.add(jmiOpen); jmFile.add(jmiSave); jmFile.add(jmiSaveAs); jmFile.add(jmiExit);\n jmEdit.add(jmiCut); jmEdit.add(jmiCopy); jmEdit.add(jmiPaste); jmEdit.addSeparator(); jmEdit.add(jmiSelAll);\n jmFunction.add(jmiMax); jmFunction.add(jmiMin); jmFunction.add(jmiSum); jmFunction.add(jmiAve); jmFunction.add(jmiCount);\n /*ezafe kardane khate zirin baraye menu ha wa item ha*/\n jmFile.setMnemonic('F'); jmEdit.setMnemonic('E'); jmFunction.setMnemonic('u'); jmiSelAll.setMnemonic('l');\n jmiNew.setMnemonic('N'); jmiOpen.setMnemonic('O'); jmiSave.setMnemonic('S'); jmiSaveAs.setMnemonic('A'); jmiExit.setMnemonic('E');\n jmiMax.setMnemonic('M'); jmiMin.setMnemonic('i'); jmiSum.setMnemonic('S'); jmiAve.setMnemonic('A'); jmiCount.setMnemonic('C');\n /*ezafe kardane Item Popupmenu baraye klike RAST*/\n jpm.add(jpmiCut);\n jpm.add(jpmiCopy);\n jpm.add(jpmiPaste);\n /*ezafe kardane Listener be meno ha jahat fa'al sazi events*/\n jmiNew.addActionListener(new AL(1));\n jmiOpen.addActionListener(new AL(2));\n jmiSave.addActionListener(new AL(3));\n jmiSaveAs.addActionListener(new AL(4));\n jmiExit.addActionListener(new AL(5));\n jmiCut.addActionListener(new AL(6));\n jmiCopy.addActionListener(new AL(7));\n jmiPaste.addActionListener(new AL(8));\n jmiSelAll.addActionListener(new AL(14));\n jpmiCut.addActionListener(new AL(6));\n jpmiCopy.addActionListener(new AL(7));\n jpmiPaste.addActionListener(new AL(8));\n jmiMax.addActionListener(new AL(9));\n jmiMin.addActionListener(new AL(10));\n jmiSum.addActionListener(new AL(11));\n jmiAve.addActionListener(new AL(12));\n jmiCount.addActionListener(new AL(13));\n jmFile.addMouseListener(new ML());\n jmFile.addFocusListener(new FL());\n jmFile.addKeyListener(new KL());\n jmEdit.addMouseListener(new ML());\n jmEdit.addFocusListener(new FL());\n jmEdit.addKeyListener(new KL());\n jmFunction.addMouseListener(new ML());\n jmFunction.addFocusListener(new FL());\n jmFunction.addKeyListener(new KL());\n /* ezafe kardane khanehaye Excel be Panel barname*/\n for(int i=0; i<30; i++)\n for(int j=0; j<26; j++){\n jtf[i][j]=new JTextField();\n jtf[i][j].setEnabled(false);\n jtf[i][j].addMouseListener(new ML(i,j));\n jtf[i][j].addFocusListener(new FL(i,j));\n jtf[i][j].addKeyListener(new KL(i, j));\n jtf[i][j].addMouseMotionListener(new MML(i,j));\n jtf[i][j].setToolTipText(\"cell[\"+i+\"]\"+\"[\"+j+\"]\");\n jtf[i][j].setDisabledTextColor(Color.red);\n jtf[i][j].add(jpm);\n jp.add(jtf[i][j]);\n }\n /* Fa'al sazi Windowse marbut be barname*/\n addKeyListener(new KL());\n jp.addKeyListener(new KL());\n getContentPane().add(scp);\n setVisible(true);\n }", "public void openWindow()\r\n {\r\n myWindow = new TraderWindow(this);\r\n while(!mailbox.isEmpty())\r\n {\r\n myWindow.showMessage( mailbox.remove() );\r\n }\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tshowActionSheet();\n\t\t\t}", "public void showPopupModal() {\n log.info(\"OrdersBean : showPopupModal\");\n showPopup = true;\n if (getParam(\"idOrder\") != null) {\n int idOrder = parseInt(getParam(\"idOrder\"));\n ordersEntity = ordersServices.findById(idOrder);\n contractsBean.findAllContractsWhenFindOrders(ordersEntity.getId());\n }\n }", "@Override\n\tpublic boolean doPopup(int x, int y) {\n\t\tif (popup == null) {\n\t\t\tpopup = createPopup();\n\t\t}\n\t\tpopup.show(this, x, y);\n\t\treturn true;\n\t}", "private void popHelp() {\n try {\n //File file=new File(filepath);\n Desktop.getDesktop().open(new java.io.File(\"help.pdf\"));\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(rootPane,\"File not found or supported\");\n }\n }", "@OnClick(R.id.openBottomsheetLayout)\n void openBottomSheet() {\n\n BottomSheetDialogOnRecordVideoScreen dialog = new BottomSheetDialogOnRecordVideoScreen(getActivity(), mItemClickListener); // Setting dialogview\n Window window = dialog.getWindow();\n window.setGravity(Gravity.BOTTOM);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.show();\n }", "public void show()\n {\n setListSelection(comboBox.getSelectedIndex());\n Point location = getPopupLocation();\n show(comboBox\n //以下x、y坐标修正代码由Jack Jiang增加\n ,\n location.x + popupOffsetX //*~ popupOffsetX是自定属性,用于修改弹出窗的X坐标\n ,\n location.y + popupOffsetY //*~ popupOffsetY是自定属性,用于修改弹出窗的Y坐标\n );\n }", "@Given(\"^Open Book My Show Website$\")\r\n\tpublic void open_Book_My_Show_Website() {\n\t\twait=new WebDriverWait(driver, 20);\r\n\t\t driver.get(\"https://in.bookmyshow.com\");\r\n\t\t uimap = new UIMap(\"src//test//resources//locators.properties\");\r\n\t}", "public void launchWeb(){\n\t\t\t\n\t\t\t// STEP 2 :- Open the online shopping website.\n\t\t\tdriver.get(\"https://www.flipkart.com/\");\n\t\t\tSystem.out.println(\"Window opened successfully\");\n\t\t\t\t\n\t\t\t//STEP 3:- Close the Pop-up window.\n\t\t\tWebElement close = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/button\"));\n\t\t\tclose.click();\n\t\t\tSystem.out.println(\"Pop up Window closed successfully\");\n\t\t}", "private void browserMouseClicked(java.awt.event.MouseEvent evt) {\n \n int ret = jfc.showOpenDialog(rootPane);\n if(ret==JFileChooser.APPROVE_OPTION)\n openFile(jfc.getSelectedFile());\n else\n {\n JOptionPane.showMessageDialog(rootPane, \"Not Working!\");\n }\n jPanel1.requestFocusInWindow();\n }", "public void onOpen() {\n\t\t\n\t\t//if things are dirty, ask if they're sure they want to do this\n\t\tif(FormDesignerController.getIsDirty())\n\t\t{\n\t\t\t//if the use says no, then bounce\n\t\t\tif(!Window.confirm(LocaleText.get(\"newFormConfirm\")))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\txformsWidget.hideWindow();\n\t\tFormUtil.dlg.setText(\"Opening...\");\n\t\tFormUtil.dlg.show();\n\n\n\t\tScheduler.get().scheduleDeferred(new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\ttry {\n\t\t\t\t\t//openFile();\n\t\t\t\t\txformsWidget.setXform(\"\");\n\t\t\t\t\txformsWidget.showOpenButton(true);\n\t\t\t\t\txformsWidget.showWindow();\n\t\t\t\t\tFormUtil.dlg.hide();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tFormUtil.displayException(ex);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void getPopup() {\n\t\t\tglobal.btnClick(popup);\n\t\t}", "private void jMenuItem141ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem141ActionPerformed\n URI uri = null;\n try {\n uri = new URI(\"http://manual.audacityteam.org/quick_help.html\");\n }\n catch (URISyntaxException ex) {\n Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\n if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\n try {\n desktop.browse(uri);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tsuper.mouseClicked(e);\r\n\t\t\tif(e.isPopupTrigger()){\r\n\t\t\t\tdoClick(e);\r\n\t\t\t\tjPopupMenu.show((Component)e.getSource(), e.getX(), e.getY());\r\n\t\t\t}\r\n\t\t}", "public static void showDialog() {\n\t\tdialog.setLocationRelativeTo(Cytoscape.getDesktop());\n\t\tdialog.setVisible(true);\n\t}", "private void jMenuItem_ShowClientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ShowClientActionPerformed\n File fClient = new File(\"Meilleurs_Client.csv\");\n try {\n Desktop.getDesktop().open(fClient);\n } catch (IOException ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void showPopup(MouseEvent e) {\n if (e.isPopupTrigger()) {\n jPopupMenu1.show(e.getComponent(), e.getX(), e.getY());\n }\n }", "public void openMenu() {\r\n\t\tmenu.click();\r\n\t}", "private void popAbout() {\n try {\n //File file=new File(filepath);\n Desktop.getDesktop().open(new java.io.File(\"about.pdf\"));\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(rootPane,\"File not found or supported\");\n }\n }", "@Override\r\n public void execute(Workbook workbook) {\n InputStream fileStream = this.getResourceStream(\"xlsx/Employee absence schedule.xlsx\");\r\n workbook.open(fileStream);\r\n }", "@FXML\n public void openFolder()\n {\n try\n {\n Desktop.getDesktop().open(nng.getStorePopulation().getParentFile());\n }\n catch (IOException e)\n {\n }\n }", "private void openUri()\r\n {\r\n JOptionPane optionPane = new JOptionPane(new JLabel(\"URI:\"), \r\n JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);\r\n optionPane.setWantsInput(true);\r\n JDialog dialog = optionPane.createDialog(frame, \"Enter URI\");\r\n dialog.setResizable(true);\r\n dialog.setVisible(true);\r\n Object value = optionPane.getValue();\r\n if (value == null)\r\n {\r\n return;\r\n }\r\n if (!value.equals(JOptionPane.OK_OPTION))\r\n {\r\n return;\r\n }\r\n String uriString = (String)optionPane.getInputValue();\r\n if (uriString == null || uriString.trim().isEmpty())\r\n {\r\n return;\r\n }\r\n URI uri = null;\r\n try\r\n {\r\n uri = new URI(uriString);\r\n } \r\n catch (URISyntaxException e)\r\n {\r\n JOptionPane.showMessageDialog(\r\n frame, \"Invalid URI: \"+e.getMessage(), \r\n \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n openUriInBackground(uri);\r\n }", "@Override\r\n\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\t\tWindow.open(result.get(\"description\"), \"description\", result.get(\"description\"));\r\n\r\n\t\t\t\t\t\t}", "public void check_openfile_window_Presence() throws InterruptedException {\r\n\t\tdriver.switchTo().activeElement();\r\n\t\tWebElement openfile_window = driver.findElementByName(\"How do you want to open this file?\");\r\n\t\tThread.sleep(3000);\r\n\t\t// return IsElementVisibleStatus(openfile_window);\r\n\t\tWebElement openfile_Adobe = driver.findElementByName(\"Adobe Reader\");\r\n\t\tclickOn(openfile_Adobe);\r\n\t\tWebElement ConfirmButton_ok = driver.findElementByAccessibilityId(\"ConfirmButton\");\r\n\t\tclickOn(ConfirmButton_ok);\r\n\t\tdriver.switchTo().activeElement();\r\n\t}", "@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL + \"support\");\r\n }", "private void openPressed(){\n\t\tJFileChooser fileChooser = new JFileChooser(System.getProperty(\"user.dir\"));\n\t\tFileNameExtensionFilter extentions = new FileNameExtensionFilter(\"SuperCalcSave\", \"scalcsave\");\n\t\tfileChooser.setFileFilter(extentions);\n\t\tint retunedVal = fileChooser.showOpenDialog(this);\n\t\tFile file = null;\n\t\tif(retunedVal == JFileChooser.APPROVE_OPTION){\n\t\t\tfile = fileChooser.getSelectedFile();\n\t\t}\n\t\t//only continue if a file is selected\n\t\tif(file != null){\n\t\t\tSaveFile saveFile = null;\n\t\t\ttry {\n\t\t\t\t//read in file\n\t\t\t\tObjectInputStream input = new ObjectInputStream(new FileInputStream(file));\n\t\t\t\tsaveFile = (SaveFile) input.readObject();\n\t\t\t\tinput.close();\n\t\t\t\tVariable.setList(saveFile.getVariables());\n\t\t\t\tUserFunction.setFunctions(saveFile.getFunctions());\n\t\t\t\tmenuBar.updateFunctions();\n\t\t\t\tSystem.out.println(\"Open Success\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n Intent marketIntent = new Intent(Intent.ACTION_VIEW);\n marketIntent.setData(Uri.parse(\"market://details?id=com.adobe.reader\"));\n// marketIntent.setData(Uri.parse(\"market://details?id=com.infraware.office.link\"));\n startActivity(marketIntent);\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n helpPopUp();\n }", "@Override\n public void onClick(View v) {\n ((CreateDocketActivityPart2) activity).openPopUpForWorkDone(position);\n }", "private void openContextMenu(MouseEvent e) {\n if (e.isPopupTrigger()) {\n User user = getUser(e);\n if (user != null) {\n UserContextMenu m = new UserContextMenu(user, contextMenuListener);\n m.show(this, e.getX(), e.getY());\n }\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString url = \"Aide.html\";\r\n\t\t\t\tFile htmlFile = new File(url);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tDesktop.getDesktop().browse(htmlFile.toURI());\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "@FXML\n private void openFile() {\n try {\n \tFile file = new File(filmTable.getSelectionModel().getSelectedItem().getLocation());\n desktop.open(file);\n } catch (IOException ex) {\n \tex.printStackTrace();\n }\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n if (Desktop.isDesktopSupported()) {\r\n try {\r\n File myFile = new File(\"E:\");\r\n Desktop.getDesktop().open(myFile);\r\n \r\n } catch (IOException ex) {\r\n // no application registered for PDFs\r\n }\r\n}\r\n \r\n \r\n }", "private void openUserReporttWindow() {\r\n\t\tnew JFrameReport();\r\n\t}", "@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL);\r\n }", "@FXML\n private void openComposeWindow() {\n try {\n ComposeEmailWindow cew = new ComposeEmailWindow(\"\", \"\", \"\", \"\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void ConfirmPopupWindowClick(View view) {\n LayoutInflater inflater = (LayoutInflater)\n getSystemService(LAYOUT_INFLATER_SERVICE);\n View popupView = inflater.inflate(R.layout.activity_confirm_pub_crawl, null);\n\n // create the popup window\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true; // lets taps outside the popup also dismiss it\n final PopupWindow popupWindow = new PopupWindow(popupView, width, height, focusable);\n\n // show the popup window\n // which view you pass in doesn't matter, it is only used for the window tolken\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\n\n Button noBtn = (Button) popupView.findViewById(R.id.NoBtn);\n noBtn.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View popupView) {\n popupWindow.dismiss();\n }\n });\n\n Button yesBtn = (Button) popupView.findViewById(R.id.YesBtn);\n yesBtn.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View popupView) {\n popupWindow.dismiss();\n Intent goToRandomPubCrawlActivity = new Intent(AddToPubCrawl.this, random_pub_crawl.class);\n startActivity(goToRandomPubCrawlActivity);\n }\n });\n }", "public String open() {\n\t\tUtilGUI.centerShell(DocFetcher.getInstance().getShell(), shell);\n\t\tshell.open();\n\t\twhile (! shell.isDisposed()) {\n\t\t\tif (! shell.getDisplay().readAndDispatch())\n\t\t\t\tshell.getDisplay().sleep();\n\t\t}\n\t\treturn answer;\n\t}", "private void showOpenFileDialog() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n // We accept PDF files and images (for image documents).\n intent.putExtra(Intent.EXTRA_MIME_TYPES, new String[] {\"application/pdf\", \"image/*\"});\n\n // Set of the intent for result, so we can retrieve the Uri of the selected document.\n startActivityForResult(intent, REQUEST_OPEN_DOCUMENT);\n }", "@Override\n \t\t\t\tpublic void doOpen() {\n \n \t\t\t\t}", "public void openOptionsWindow() {\n\t\tthis.dispose();\t//built-in method to destroy this GUI.\n\t\tnew SARMain().setVisible(true);\n\t}", "@Override\n public void windowOpened(WindowEvent e) {\n this.mostrar();\n }", "void onActionFromExport() {\n\t\ttry {\n\t\t\tHSSFWorkbook document = new HSSFWorkbook();\n\t\t\tHSSFSheet sheet = ReportUtil.createSheet(document);\n\n\t\t\tsheet.setMargin((short) 0, 0.5);\n\t\t\tReportUtil.setColumnWidths(sheet, 0, 0.5, 1, 0.5, 2, 2, 3, 2, 3, 2, 4, 3, 5, 2, 6, 2, 7, 2, 8, 3, 9, 3, 10,\n\t\t\t\t\t3, 11, 2, 12, 2);\n\n\t\t\tMap<String, HSSFCellStyle> styles = ReportUtil.createStyles(document);\n\n\t\t\tint sheetNumber = 0;\n\t\t\tint rowIndex = 1;\n\t\t\tint colIndex = 1;\n\t\t\tLong index = 1L;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"empList\"), styles.get(\"title\"), 5);\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, ++rowIndex, 1,\n\t\t\t\t\tmessages.get(\"date\") + \": \" + format.format(new Date()), styles.get(\"plain-left-wrap\"), 5);\n\t\t\trowIndex += 2;\n\n\t\t\t/* column headers */\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1, messages.get(\"number-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"firstname-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tif (lastname) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"lastname-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (origin1) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"persuasion-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (register) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"register-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (status) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"status-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (gender) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"gender-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (occ) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"occupation-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (birthday) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"birthDate-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (phoneNo) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"phoneNo-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (email) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"email-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (org) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"organization-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (appointment) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"appointment-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegree) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цэргийн цол\", styles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeStatus) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цолны статус\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeDate) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цол авсан огноо\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (TotalWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"TotalOrgWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (StateWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"stateWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"courtOrgTotalWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtMilitaryWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtSimpleWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (familyCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"familyCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (childCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"childCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\n\t\t\trowIndex++;\n\t\t\tif (listEmployee != null)\n\t\t\t\tfor (Employee empDTO : listEmployee) {\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\tlistEmployee.indexOf(empDTO) + 1 + \"\", styles.get(\"plain-left-wrap-border\"));\n\n\t\t\t\t\tif (lastname) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getLastname() != null) ? empDTO.getLastname() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++, empDTO.getFirstName(),\n\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\n\t\t\t\t\tif (origin1) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOrigin().getName() != null) ? empDTO.getOrigin().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (register) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getRegisterNo() != null) ? empDTO.getRegisterNo() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (status) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getEmployeeStatus() != null) ? empDTO.getEmployeeStatus().name() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (gender) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\tmessages.get((empDTO.getGender() != null) ? empDTO.getGender().toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (occ) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOccupation() != null) ? empDTO.getOccupation().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (birthday) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getBirthDate() != null) ? format.format(empDTO.getBirthDate()) : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (phoneNo) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getPhoneNo() != null) ? empDTO.getPhoneNo() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (email) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.geteMail() != null) ? empDTO.geteMail() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (org) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getOrganization() != null) ? empDTO.getOrganization().getName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (appointment) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getAppointment() != null) ? empDTO.getAppointment().getAppointmentName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegree) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getMilitary().getMilitaryName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeStatus) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getDegreeStatus().name() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeDate) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? format.format(dao.getEmployeeMilitary(empDTO.getId()).getOlgosonOgnoo())\n\t\t\t\t\t\t\t\t\t\t: \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (TotalWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getTotalOrgWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getTotalOrgWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\tif (StateWorkedYear) {\n\t\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t\t((getStateWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t\t? getStateWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtOrgTotalWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtOrgTotalWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtMilitaryWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtMilitaryWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtSimpleWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtSimpleWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (familyCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getFamilyCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getFamilyCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (childCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getChildCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getChildCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\t\t\t\t\trowIndex++;\n\t\t\t\t\tindex++;\n\t\t\t\t\tcolIndex = 1;\n\n\t\t\t\t}\n\n\t\t\trowIndex += 2;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1,\n\t\t\t\t\t\"ТАЙЛАН ГАРГАСАН: \" + \"..................................... / \"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getLastname().charAt(0) + \".\"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getFirstName() + \" /\",\n\t\t\t\t\tstyles.get(\"plain-left-wrap\"), 8);\n\t\t\trowIndex++;\n\n\t\t\tOutputStream out = response.getOutputStream(\"application/vnd.ms-excel\");\n\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"employeeList.xls\\\"\");\n\n\t\t\tdocument.write(out);\n\t\t\tout.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void openQuery (CPanel panel)\n\t{\n\t\tf_checkout.setVisible(false);\n\t\tf_basicKeys.setVisible(false);\n\t\tf_lines.setVisible(false);\n\t\tf_functionKeys.setVisible(false);\n\t\tpanel.setVisible(true);\n\t}", "@Override\n public void onClick(View v) {\n if (popupWindow == null) {\n showPopWindow();\n } else {\n closePopWindow();\n }\n }", "public Object open() {\n // Create a new shell object and set the text for the dialog.\n Shell parent = getParent();\n shell = new Shell(parent, SWT.DIALOG_TRIM);\n shell.setText(\"Edit Colormaps\");\n\n // Setup all of the layouts and the controls.\n setup();\n\n // Open the shell to display the dialog.\n shell.open();\n\n // Wait until the shell is disposed.\n Display display = parent.getDisplay();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch())\n display.sleep();\n }\n\n return null;\n }", "public void gppShare_openBasicShareDialog () {\n\t\tGPPShare.sharedInstance().shareDialog().open();\n\t}", "protected void opened() throws COpenFailedException {\n\n\t\ttry {\n\t\t\t\n\t\t\tprops = (CPropertyService) CServiceProvider.getService(ServiceNames.PROPERTIES);\n\t\t\tArrayList groups = (ArrayList) CServiceProvider.getService(ServiceNames.MEMBER_LIST);\n\n\t\t\tres =(ResourceBundle) CServiceProvider.getService(ServiceNames.RESOURCES);\n\n\t\t\tCDialogTools.createButtonListener(this, \"jbOK\", \"handleOKButton\");\n\t\t\tCDialogTools.createButtonListener(this, \"jbCancel\", \"handleCancelButton\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\t\t\t\t\n\t\t\t\tif (!groups.contains(\"administrator\")) {\n\t\t\t\t\tJButton jb = (JButton) getGuiComposite().getWidget(\"jbOK\");\n\t\t\t\t\tjb.setEnabled(false);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\t\t\t\t\n\t\t\t}\t\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new COpenFailedException(ex);\n\t\t}\n\t}", "void showPopup(MouseEvent e) {\n\t\tif (e.isPopupTrigger()) {\n\t\t\tpopup.show((Component) e.getSource(), e.getX(), e.getY());\n\t\t}\n\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tif(e.isPopupTrigger())\n\t\t\t\t{\n\t\t\t\t\tpopup.show(e.getComponent(), e.getX(), e.getY());\n\t\t\t\t}\n\t\t\t}", "public static void openGiftsIdeasSection() {\n click(GIFTS_TAB_UPPER_MENU);\n }", "@Override\n\t\tpublic void open() {\n\t\t\tRange range = positionRangeTo.getRanges().get(0);\n\t\t\tUIHelper.selectAndReveal(new File(range.getFile()), range.getFrom(), range.getTo() - range.getFrom());\n\t\t}", "@FXML\r\n\tvoid open_btn_clicked(MouseEvent event) {\r\n\t\tsale_selected = sales_table.getSelectionModel().getSelectedItem();\r\n\t\tif (sale_selected != null) {\r\n\t\t\tswitchScenes(\"/client/boundry/MarketingAgentSaleShowForm.fxml\",\r\n\t\t\t\t\t\"/client/boundry/MarketingAgentMainCustomer.css\");\r\n\t\t} else {\r\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\talert.setTitle(\"No sale pattern selected\");\r\n\t\t\talert.setHeaderText(null);\r\n\t\t\talert.setContentText(\"Please select sale pattern\");\r\n\t\t\talert.show();\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link NumbersActivity}\n Intent sheetIntent = new Intent(MainActivity.this, sheetActivity.class);\n\n // Start the new activity\n startActivity(sheetIntent);\n }", "private void showPopUpWindow() {\n Log.d(TwoPlayersActivity.LOG_TAG, \"show popup\");\n LayoutInflater layoutInflater = (LayoutInflater) this\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n View popupView = layoutInflater.inflate(R.layout.pop_up,\n (ViewGroup) findViewById(R.id.pop_up));\n\n popupWindow = new PopupWindow(popupView,\n LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, true);\n\n popupWindow.showAtLocation(popupView, Gravity.CENTER, 0, 0);\n\n Button btnDismiss = (Button)popupView.findViewById(R.id.dismiss);\n\n btnDismiss.setOnClickListener(new Button.OnClickListener() {\n @Override\n public void onClick(View v) {\n popupWindow.dismiss();\n }\n });\n }", "public void createEditEmployeePopup() {\n createPopupResources();\n getCancelButton().setOnAction((event -> popupStage.close()));\n setupPopupLayout();\n mainBox.setPrefSize(PREFERRED_POPUP_WIDTH, PREFERRED_POPUP_HEIGHT);\n popupStage.setScene(scene);\n popupStage.initModality(Modality.APPLICATION_MODAL);\n popupStage.show();\n }", "private void openFile()\r\n {\r\n int returnState = openFileChooser.showOpenDialog(frame);\r\n if (returnState == JFileChooser.APPROVE_OPTION) \r\n {\r\n File file = openFileChooser.getSelectedFile();\r\n openUriInBackground(file.toURI());\r\n } \r\n }", "public void open() {\n display = Display.getDefault();\n createContents();\n shell.open();\n shell.layout();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch()) {\n display.sleep();\n }\n }\n\n // programme stop with exit 0\n System.exit(0);\n\n }", "public BookShelvesPage ClosePopUpAndClickBookShelves() {\r\n\t\t\r\n\t\tWebDriverWait wait=new WebDriverWait(driver, 30);\r\n\t\t wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath(\"//a[contains(text(),'Close')]\")));\r\n\r\n\t\tdriver.findElement(By.xpath(\"//a[contains(text(),'Close')]\")).click();\r\n\t\t\r\n\t\t\t \r\n\t\t//Click on bookshelves\r\n\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\r\n\t driver.findElement(By.xpath(\"//*[@id=\\'content\\']/div[3]/div/div[3]/a[4]/h4\")).click(); \r\n\r\n\t\t\r\n\t\t\r\n\t\treturn PageFactory.initElements(driver,BookShelvesPage.class);\r\n\t\t\r\n\t}", "@FXML\n private void openForwardWindow() {\n try {\n ComposeEmailWindow cew = new ComposeEmailWindow(\"FWD: \", \"\",\n this.subjectContent.getText(), this.msgContent.getText());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@FXML\n\tpublic void OpenHelpContentPage() {\n\n\t\tif (!Desktop.isDesktopSupported()) {\n\t\t\tSystem.out.println(\"Desktop not supported\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (!Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {\n\t\t\tSystem.out.println(\"File opening not supported\");\n\t\t\treturn;\n\t\t}\n\n\t\tfinal Task<Void> task = new Task<Void>() {\n\t\t\t@Override\n\t\t\tpublic Void call() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tFile sx3InstallLocation = SX3Manager.getInstance().getInstallLocation().getParentFile()\n\t\t\t\t\t\t\t.getAbsoluteFile();\n\t\t\t\t\tDesktop.getDesktop().open(new File(\n\t\t\t\t\t\t\tsx3InstallLocation + File.separator + \"Cypress_EZ-USB_SX3_ConfigurationUtility.pdf\"));\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.err.println(e.toString());\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\tfinal Thread thread = new Thread(task);\n\t\tthread.setDaemon(true);\n\t\tthread.start();\n\t}", "private void jMenuItem142ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem142ActionPerformed\n URI uri = null;\n try {\n uri = new URI(\"http://manual.audacityteam.org\");\n }\n catch (URISyntaxException ex) {\n Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\n if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\n try {\n desktop.browse(uri);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void onClick(View arg0) {\n ((CreateDocketActivityPart2) activity).openPopUpForSpareParts(position);\n }", "@Override\n\t\tpublic void mousePressed(final MouseEvent e) {\n\t\t\tif (e.isPopupTrigger()) {\n\t\t\t\tpopUp(e);\n\t\t\t}\n\t\t}", "@Override\n public void onSheetActionClick(BottomSheet bottomSheet, Object obj) {\n mSheet.dismiss();\n Cursor cr = (Cursor) obj;\n Bundle bundle = new Bundle();\n bundle.putInt(KEY_NOTE_ID, cr.getInt(cr.getColumnIndex(OColumn.ROW_ID)));\n IntentUtils.startActivity(getActivity(), NoteDetail.class, bundle);\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t \t \ttry {\n\t\t\t\t\t\tDesktop.getDesktop().open(new File(new File(\"\").getAbsolutePath() + \n\t\t\t\t\t\t\t\t\"\\\\src\\\\pdf\\\\DocumentationUtilisateur.pdf\"));\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t }", "public void setPopup(PDAnnotationPopup popup) {\n/* 175 */ getCOSObject().setItem(\"Popup\", popup);\n/* */ }", "public void open() {\n\n\t\tresize();\n\t\tgenerateLinks();\n\t\tshowing = true;\n\n\t}", "private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}", "public void showOxPopup() {\n\t\ttv_popupTitle.setText(R.string.title1);\n\t\ttv_popupInfo.setText(R.string.description1);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "@Test\r\n public void excel() throws EncryptedDocumentException, InvalidFormatException, FileNotFoundException, IOException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Selenium\\\\Newfolder\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\t\r\n //get the excel sheet file location \r\n String filepath=\"E:\\\\Selenium\\\\SampleApplications\\\\ClearTripAppln\\\\DataSheet.xlsx\";\r\n\t \t\t\t\tWorkbook wb= WorkbookFactory.create(new FileInputStream(new File(filepath)));\r\n //get the sheet which needs read operation\r\n\t\t Sheet sh = wb.getSheet(\"sheet1\");\r\n\t\t \r\n\t String url =sh.getRow(0).getCell(1).getStringCellValue();\r\n\t System.out.println(url);\r\n\t driver.get(url);\r\n\t \r\n\t \t\t// Maximizing the window\r\n\t \t\tdriver.manage().window().maximize();\r\n\t \t\t\r\n\r\n\r\n\t\t }", "@Given(\"^user should open link$\")\r\n\tpublic void user_should_open_link() throws Throwable {\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n driver.manage().deleteAllCookies();\r\n\r\n driver.get(prop.getProperty(\"url\"));\r\n\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n \t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n\t}", "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "public void openNSE() {\n\t\t\t this.open.getText();\r\n\t\t}", "Intent getOpenInOtherWindowIntent();" ]
[ "0.6871673", "0.65954", "0.6565672", "0.60510665", "0.596679", "0.5917232", "0.59091944", "0.5909061", "0.58606946", "0.5852959", "0.5791126", "0.5766838", "0.57635486", "0.5740439", "0.57125133", "0.5708606", "0.57005", "0.56447774", "0.562082", "0.5572708", "0.5544802", "0.5471909", "0.546333", "0.5456804", "0.545246", "0.5441641", "0.5432804", "0.54180604", "0.53917015", "0.53759956", "0.536782", "0.5354998", "0.5353541", "0.53205454", "0.53179073", "0.5315683", "0.5305087", "0.52896565", "0.52796817", "0.52791405", "0.52781916", "0.52742594", "0.52726865", "0.5262977", "0.52608144", "0.5260318", "0.52547425", "0.5252681", "0.5248805", "0.52473396", "0.5242853", "0.52369505", "0.52345204", "0.52320254", "0.5228413", "0.52161986", "0.5206513", "0.5200055", "0.51996565", "0.5192088", "0.5189734", "0.5184684", "0.5181838", "0.5179596", "0.5170419", "0.5169862", "0.51673394", "0.51627827", "0.51580405", "0.51579994", "0.5152639", "0.51518154", "0.514316", "0.51364195", "0.5134428", "0.51324964", "0.5129756", "0.5126337", "0.51242095", "0.5121585", "0.5115195", "0.51068753", "0.5096997", "0.50962305", "0.5094636", "0.50925004", "0.5085127", "0.50835204", "0.5080729", "0.5072151", "0.5071106", "0.50706106", "0.5067308", "0.506546", "0.50601685", "0.50590235", "0.5057837", "0.50564384", "0.5051363", "0.5049519" ]
0.6655643
1
returns the names of the content view's result columns
private List<String> getContentViewColumns(ContentViewElement cv) { List<String> headers = new ArrayList<>(); WebElement dataOutput = cv.findElement(By.className("dataOutput")); List<WebElement> cvHeaders = dataOutput.findElements(By.className("colHeader")); for (WebElement e : cvHeaders) { headers.add(e.getText()); } return headers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDisplayColumns() {\n return query.getDisplayColumns();\n }", "public Tuple<String> getColumnNames() {\n return resultTable.getColumnNames();\r\n }", "List<String> getColumns();", "public List<String> getColumns();", "public Object[] getColumnNames(){\r\n if (ufeRunner == null || renders == null || htmlObjLang == null) {\r\n return null;\r\n }\r\n String[] columnNames = {\"Name\", \"Value\"};\r\n return columnNames;\r\n }", "protected ArrayList<String> getColumnNames() {\n return getVariableNames();\n }", "public List<Column> getColumns();", "public List getColumns() {\r\n return columns;\r\n }", "@Override\r\n\tpublic String[] getPrettyColumnNames() {\n\t\treturn this.dispColNames;\r\n\t\t//未实现\r\n\t}", "public ArrayList<String> getColumnNames();", "public com.sforce.soap.partner.ListViewColumn[] getColumns() {\r\n return columns;\r\n }", "public String[] getColumnNames();", "List<String> headerColumns();", "public String[] getColumns() {\r\n\t\tlogger.trace(\"Enter getColumns\");\r\n\t\tlogger.trace(\"Exit getColumns\");\r\n\t\treturn columns;\r\n\t}", "public Set<String> getColumns();", "public List getColumns () {\n\t\tif (this.columns == null) {\n\t\t\tthis.columns = new ArrayList();\n\t\t\tthis.columns.add (new DcsTableColumn (\"Collection\", \"name\", \"name\", Constants.ASCENDING, \"listAllRecords\"));\n\t\t\tthis.columns.add (new DcsTableColumn (\"Create record\", \"create\", null, -1, \"createRecord\"));\n\t\t\tthis.columns.add (new DcsTableColumn (\"Metadata format\", \"format\", \"format\", Constants.ASCENDING, null));\n\t\t\tthis.columns.add (new DcsTableColumn (\"Num Records\", \"numFiles\", \"numFiles\", Constants.DESCENDING, \"listAllRecords\"));\n\t\t\tthis.columns.add (new DcsTableColumn (\"Not Valid\", \"numNotValid\", \"numNotValid\", Constants.DESCENDING, \"listNotValidRecords\"));\n\t\t}\n\t\treturn this.columns;\n\t}", "private String[] getHeaderColumns() {\n int length = CallLogQuery._PROJECTION.length;\n String[] columns = new String[length + 1];\n System.arraycopy(CallLogQuery._PROJECTION, 0, columns, 0, length);\n columns[length] = CallLogQuery.SECTION_NAME;\n return columns;\n }", "private List<String> getColNames() {\r\n\t\t//\r\n\t\tDBManager dbm = new DBManager(this);\r\n\t\t\r\n\t\tSQLiteDatabase wdb = dbm.getWritableDatabase();\r\n\r\n\t\t// REF=> http://stackoverflow.com/questions/947215/how-to-get-a-list-of-column-names-on-sqlite3-iphone\r\n\t\tString sql = \"PRAGMA table_info('\" + DBManager.tableName + \"')\";\r\n\t\t\r\n\t\tCursor c = wdb.rawQuery(sql, null);\r\n\t\t\r\n\t\t// Log\r\n\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t+ \"]\", \"c.getCount() => \" + c.getCount());\r\n\t\t\r\n\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t+ \"]\", \"c.getColumnCount() => \" + c.getColumnCount());\r\n\r\n\t\tList<String> colNames = new ArrayList<String>();\r\n\t\t\r\n\t\tc.moveToFirst();\r\n\t\t\r\n\t\tfor (int i = 0; i < c.getCount(); i++) {\r\n\t\t\t\r\n\t\t\tcolNames.add(c.getString(0));\r\n\t\t\t\r\n\t\t\t// Log\r\n\t\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t\t+ \"]\", \"c.getString(0) => \" + c.getString(0) + \r\n\t\t\t\t\t\" / \" + \"c.getString(1) => \" + c.getString(1));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tc.moveToNext();\r\n\t\t\t\r\n\t\t}//for (int i = 0; i < c.getCount(); i++)\r\n\t\t\r\n\t\twdb.close();\r\n\t\t\r\n\t\tfor (String string : colNames) {\r\n\t\t\t\r\n\t\t\t// Log\r\n\t\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t\t+ \"]\", \"colName => \" + string);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n//\t\treturn (String[])colNames.toArray();\r\n\t\treturn colNames;\r\n\t\t\r\n\t}", "public String[] getColumnNames()\n {\n return columnNames;\n }", "public java.lang.String[] getColumns() {\n return columns;\n }", "private List<String> getAllViewsDDL() {\n\t\tList<String> resultList = new ArrayList<String>();\n\t\tList<String> viewNameList = new ArrayList<String>();\n\t\tLinkedHashMap<String, String> viewQuerySpecMap = new LinkedHashMap<String, String>();\n\t\tConnection conn = null;\n\t\tStatement stmt = null;\n\t\tCUBRIDResultSetProxy rs = null;\n\n\t\tString sql;\n\t\tif (dbInfo.isSupportUserSchema()) {\n\t\t\tsql = \"SELECT c.class_name, c.owner_name, c.class_type\" + \" FROM db_class c, db_attribute a\"\n\t\t\t\t+ \" WHERE c.class_name=a.class_name AND c.is_system_class='NO'\"\n\t\t\t\t+ \" AND c.owner_name=a.owner_name\"\n\t\t\t\t+ \" AND c.class_type='VCLASS'\" + \" GROUP BY c.owner_name, c.class_name, c.class_type\"\n\t\t\t\t+ \" ORDER BY c.owner_name, c.class_type, c.class_name\";\n\t\t} else {\n\t\t\tsql = \"SELECT c.class_name, c.class_type\" + \" FROM db_class c, db_attribute a\"\n\t\t\t\t\t+ \" WHERE c.class_name=a.class_name AND c.is_system_class='NO'\"\n\t\t\t\t\t+ \" AND c.class_type='VCLASS'\" + \" GROUP BY c.class_name, c.class_type\"\n\t\t\t\t\t+ \" ORDER BY c.class_type, c.class_name\";\n\t\t}\n\n\t\t// [TOOLS-2425]Support shard broker\n\t\tsql = dbInfo.wrapShardQuery(sql);\n\t\ttry {\n\t\t\tconn = JDBCConnectionManager.getConnection(dbInfo, false);\n\t\t\tstmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\tResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\n\t\t\trs = (CUBRIDResultSetProxy) stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tif (dbInfo.isSupportUserSchema()) {\n\t\t\t\t\tString className = rs.getString(1);\n\t\t\t\t\tString ownerName = rs.getString(2);\n\t\t\t\t\tviewNameList.add(ownerName + \".\" + className);\n\t\t\t\t} else {\n\t\t\t\t\tString className = rs.getString(1);\n\t\t\t\t\tviewNameList.add(className);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"\", e);\n\t\t} finally {\n\t\t\tQueryUtil.freeQuery(stmt, rs);\n\t\t}\n\n\t\ttry {\n\t\t\tstmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\tResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\n\t\t\tfor (String viewName : viewNameList) {\n\t\t\t\tString querySpecSql;\n\t\t\t\tif (dbInfo.isSupportUserSchema()) {\n\t\t\t\t\tquerySpecSql = \"SELECT vclass_def FROM db_vclass WHERE CONCAT(owner_name, '.' , vclass_name)='\"\n\t\t\t\t\t\t+ viewName + \"'\";\n\t\t\t\t} else {\n\t\t\t\t\tquerySpecSql = \"SELECT vclass_def FROM db_vclass WHERE vclass_name='\"\n\t\t\t\t\t\t+ viewName + \"'\";\n\t\t\t\t}\n\n\t\t\t\t// [TOOLS-2425]Support shard broker\n\t\t\t\tquerySpecSql = dbInfo.wrapShardQuery(querySpecSql);\n\n\t\t\t\ttry {\n\t\t\t\t\trs = (CUBRIDResultSetProxy) stmt.executeQuery(querySpecSql);\n\t\t\t\t\tif (rs.next()) {\n\t\t\t\t\t\tviewQuerySpecMap.put(viewName, rs.getString(1));\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tQueryUtil.freeQuery(rs);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"\", e);\n\t\t} finally {\n\t\t\tQueryUtil.freeQuery(conn, stmt);\n\t\t}\n\n\t\tfor (Map.Entry<String, String> entry : viewQuerySpecMap.entrySet()) {\n\t\t\tSchemaInfo viewInfo = dbInfo.getSchemaInfo(entry.getKey());\n\t\t\tString ddl = getViewDDL(viewInfo, dbInfo, entry.getValue());\n\t\t\tresultList.add(ddl);\n\t\t}\n\n\t\treturn resultList;\n\t}", "@Override\n public List<String> getColumnLabels() {\n return columns;\n }", "List<Column> getQueryColumns();", "public ArrayList<String> getTableColumns(String _tName) {\n ArrayList<String> retList = new ArrayList<String>();\n\n try {\n ResultSetMetaData rsmd = getMetaData(executeQuery(\"SELECT * FROM \" + _tName));\n\n for (int i = 1; i <= rsmd.getColumnCount(); i++) {\n retList.add(rsmd.getColumnName(i));\n }\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n\n return retList;\n }", "private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),DBSAResourceBundle.res.getString(\"mark\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"duplicate\"), \"dlsName\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}", "java.util.List<Column>\n getColumnsList();", "private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),(\"X\"), \r\n\t\t\t\t(\"duplicate\"), \"id\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}", "public final List<String> getColumnNames(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tList<String> columnNames = new ArrayList<String>();\r\n\t\tResultSetMetaData meta = rs.getMetaData();\r\n\t\tint numColumns = meta.getColumnCount();\r\n\t\tfor (int i = 1; i <= numColumns; ++i)\r\n\t\t{\r\n\t\t\tcolumnNames.add(meta.getColumnName(i));\r\n\t\t}\r\n\t\treturn columnNames;\r\n\t}", "public List<Object[]> select() {\n return selectColumns(metadata.getColumns());\n }", "public List<Column> columns() {\n return this.columns;\n }", "private String[] getColumnNames(ResultSet rs) throws SQLException {\n ResultSetMetaData meta = rs.getMetaData();\n String[] names = new String[meta.getColumnCount()];\n\n for (int i = 0; i < names.length; i++) {\n // NB: we're getting the label here, to support the SQL's \"select a AS b\".\n // If label not available, we'll get the plain column name.\n names[i] = meta.getColumnLabel(i + 1);\n }\n return names;\n }", "public List<String> getColumnsNames() {\n return columnsNames;\n }", "public static Object[] getColumnNames()\n\t{\n\t\treturn new Object[]{\"id\", \"name\", \"price\", \"onSale\"};\n\t}", "public List<Column> getColumns(){\r\n\t\treturn columns;\r\n\t}", "private String getAllColumnName() {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\t// .append(COLUMN_id).append(\"=?,\").\n\t\tbuilder.append(\"user_id\").append(\"=?,\");\n\t\tbuilder.append(\"lib_book_id\").append(\"=?,\");\n\t\tbuilder.append(\"lending_date\").append(\"=?,\");\n\t\tbuilder.append(\"return_date\").append(\"=?,\");\n\t\tbuilder.append(\"returned_date\").append(\"=?,\");\n\t\tbuilder.append(\"status\").append(\"=?\");\n\t\t\n\t\treturn builder.toString();\n\t}", "public ArrayList getColumns() {\n return columns;\n }", "public int getColumns()\n {\n return columns;\n }", "@Override\n public java.util.List<Column> getColumnsList() {\n return columns_;\n }", "public int getColumns()\n {\n return field.getColumns();\n }", "public static String[] columnNames(final ResultSet aResultSet) {\r\n if (aResultSet==null) return null;\r\n try {\r\n ResultSetMetaData md = aResultSet.getMetaData();\r\n String[] cn = new String[md.getColumnCount()];\r\n for (int i=0, n= cn.length; i<n; i++) {\r\n cn[i] = md.getColumnName(i+1);\r\n// cn[i] = md.getColumnLabel(i+1);\r\n }\r\n return cn;\r\n }\r\n catch (SQLException ex) {} // intentional: no need for logging here\r\n return null;\r\n }", "public String getColumns() {\n\t\tString[] colStrArr = columns.toArray(new String[columns.size()]); \n\t\tlogInfo(String.join(\", \", colStrArr));\n\t\treturn \"\"+String.join(\", \", colStrArr);\n\t}", "public int getColumns() {\n return this.columns;\n }", "public Vector<String> getColumns() throws SQLException {\r\n return this.columns;\r\n }", "public Map<String, ColumnMetaData> getColumns();", "private void getColumnNames() {\n try {\n String qry1 = \"select * from \" + StaticData.tablename;\n ResultSet rs = EstablishConnection.executeQuery(qry1);\n rsmd = rs.getMetaData();\n int columnCount = rsmd.getColumnCount();\n DefaultListModel dlm=new DefaultListModel();\n for (int i = 1; i <= columnCount; i++) {\n StaticData.columntype[i]=rsmd.getColumnTypeName(i);\n dlm.addElement(rsmd.getColumnName(i));\n String value = rsmd.getColumnName(i);\n jComboBox_columnNames.addItem(value);\n }\n //dlm.addElement(\"ALL\");\n jList_columnNames.setModel(dlm);\n JScrollPane jsp = new JScrollPane(list);\n } catch (SQLException ex) {\n Logger.getLogger(ConditionFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public int getColumns() {\n return columns;\n }", "public List<String> getAllSelectColumnNames() {\n\t\tList<String> result = new ArrayList<>();\n\n\t\tfor (ColumnSpec cs : getColumnSpecs()) {\n\t\t\tresult.add(cs.getColumnName());\n\t\t}\n\n\t\treturn result;\n\t}", "private static ArrayList getColumns (Connection c, String t)\n\t\tthrows Exception\n\t{\n\t\tStatement s = c.createStatement();\n\t\tResultSet r = s.executeQuery(\"show columns from `\" + t + \"`\");\n\t\tArrayList result = new ArrayList();\n\t\twhile (r.next()) {\n\t\t\tColumnInfo info = new ColumnInfo();\n\t\t\tinfo.name = r.getString(1);\n\t\t\tinfo.type = r.getString(2);\n\t\t\tinfo.nullok = r.getString(3);\n\t\t\tinfo.key = r.getString(4);\n\t\t\tinfo.defaultval = r.getString(5);\n\t\t\tinfo.extra = r.getString(6);\n\t\t\tresult.add(info);\n\t\t}\n\t\ts.close();\n\t\tCollections.sort(result);\n\t\treturn result;\n\t}", "public interface View extends SchemalessView {\r\n\r\n\tColumnMetadata[] columns();\r\n\r\n\tint columnsCount();\r\n\r\n\tColumnMetadata getColumnByName (String columnName);\r\n\r\n\t/**\r\n\t * <p>Get Column index given its name</p>\r\n\t * @param columnName String\r\n\t * @return Column Index[1..columnsCount()] or -1 if no column with such name was found.\r\n\t */\r\n\tint getColumnIndex (String columnName);\r\n\r\n}", "List<String> getColumnIdentifiers();", "Column getColumns(int index);", "public Column[] getColumns() {return columns;}", "Column[] getColumns() { return columns; }", "protected Collection<Column> getColumns(BusinessObject bo, BusinessObjectRestrictions businessObjectRestrictions) {\n Collection<Column> columns = new ArrayList<Column>();\n\n for (String attributeName : getBusinessObjectDictionaryService().getLookupResultFieldNames(bo.getClass())) {\n columns.add(setupResultsColumn(bo, attributeName, businessObjectRestrictions));\n }\n return columns;\n }", "public int columns() {\n\treturn columns;\n}", "public Columns getColumns() {\n return columns;\n }", "public LuaObject getcolnames() throws SQLException\n {\n L.newTable();\n LuaObject table = L.getLuaObject(-1);\n \n ResultSetMetaData md = rs.getMetaData();\n \n for (int i = 1; i <= md.getColumnCount(); i++)\n {\n String name = md.getColumnName(i);\n \n L.pushNumber(i);\n L.pushString(name);\n L.setTable(-3);\n }\n L.pop(1);\n \n return table;\n }", "public int[] getColumns()\n\t{\n\t\treturn columns;\n\t}", "int getColumns();", "int getColumns();", "public int getColumns() {\n return columns;\n }", "public int getColumns() {\n\t\treturn columns;\n\t}", "public int getColumns() {\n\t\treturn columns;\n\t}", "public int getColumns() {\n\t\treturn columns;\n\t}", "public int getCols();", "public ColumnInfo[] getColumnInfos() {\n return new ColumnInfo[] {\n new NameInfo(),\n new TypeInfo(),\n new CoverInfo(),\n new LocationInfo()\n };\n }", "java.util.List<com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition> \n getColumnsList();", "public int getColumns() {\n\t\treturn NUM_OF_COLUMNS;\n\t}", "public int getColumnCount(){\n return columnTitles.length;\n }", "public Collection<TapColumn> findAllColumns();", "@Override\n public List<String> getUserColumnLabels() {\n // per-user and global have the same fields, they just differ in aggregation.\n return columns;\n }", "private void printColSchema() {\n System.out.print(\"Table Name: \");\n String tableName = sc.nextLine();\n ArrayList<String> result = sqlMngr.colSchema(tableName);\n System.out.println(\"\");\n System.out.println(\"------------\");\n System.out.println(\"Total number of fields: \" + result.size() / 2);\n for (int i = 0; i < result.size(); i += 2) {\n System.out.println(\"-\");\n System.out.println(\"Field Name: \" + result.get(i));\n System.out.println(\"Field Type: \" + result.get(i + 1));\n }\n System.out.println(\"------------\");\n System.out.println(\"\");\n }", "public static int getColumns() {\n\t\treturn columns;\n\t}", "Vector<String> getColumns(String table) throws SQLException {\n\t\tVector<String> columns = new Vector<String>();\n\t\tDatabaseMetaData md = con.getMetaData();\n\t\tfor (ResultSet rs = md.getColumns(null, null, table, null); rs.next(); columns\n\t\t\t\t.add(rs.getString(4)))\n\t\t\t;\n\t\treturn columns;\n\t}", "com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition getColumns(int index);", "public void fetColumnList() {\n try {\n table.getColumns().clear();\n if (rsAllEntries != null) {\n //SQL FOR SELECTING ALL OF CUSTOMER\n for (int i = 0; i < rsAllEntries.getMetaData().getColumnCount(); i++) {\n //We are using non property style for making dynamic table\n final int j = i;\n TableColumn col = new TableColumn();\n switch (rsAllEntries.getMetaData().getColumnName(i + 1)) {\n case \"order_number\":\n col.setText(\"Order Number\");\n break;\n case \"product_type\":\n col.setText(\"Produt Type\");\n break;\n case \"worker\":\n col.setText(\"Worker\");\n break;\n case \"planned_time\":\n col.setText(\"Planned Time\");\n break;\n case \"actual_time\":\n col.setText(\"Actual Time\");\n break;\n case \"order_status\":\n col.setText(\"Order Status\");\n break;\n default:\n col.setText(rsAllEntries.getMetaData().getColumnName(i + 1)); //if column name in SQL Database is not found, then TableView column receive SQL Database current column name (not readable)\n break;\n }\n\n col.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<ObservableList, String>, ObservableValue<String>>() {\n public ObservableValue<String> call(TableColumn.CellDataFeatures<ObservableList, String> param) {\n return new SimpleStringProperty(param.getValue().get(j).toString());\n }\n });\n\n table.getColumns().removeAll(col);\n table.getColumns().addAll(col);\n }\n } else {\n warning.setText(\"No columns to display\");\n }\n } catch (SQLException e) {\n System.out.println(\"Failure getting column data from SQL \");\n }\n }", "@Override\n public int getColumnCount() { return columnnames.length; }", "public int getCols() {\n\treturn cols;\n }", "public List<Column> getQueryDependColumns() {\n return queryDependendCollumns;\n }", "public ResultViewerColumnInfo getColumnInfo(int index) throws IndexOutOfBoundsException {\n\t\treturn (ResultViewerColumnInfo)columns.get(index);\n\t}", "public String [] getColumnNamesForQuery(String query) {\n LOG.error(\"This database does not support free-form query column names.\");\n return null;\n }", "public String[] getColumnNames(T1 ob) {\n\t\tjava.lang.reflect.Field[] f1=ob.getClass().getDeclaredFields(); \r\n\t\tString[] s =new String[f1.length-1];\t\r\n\t\t//JOptionPane.showMessageDialog(null,f1.length); \r\n\t\tfor(int i=0;i<f1.length-1;i++)\r\n\t\t{\r\n\t\t\t String name = f1[i].getName(); //获取属性的名字\r\n\t\t\t String type = f1[i].getGenericType().toString(); //获取属性的类型\r\n\t if(type.equals(\"class java.lang.String\")){ //如果type是类类型,则前面包含\"class \",后面跟类名\r\n\t\t name=name.substring(0, 1).toUpperCase()+name.substring(1);\r\n\t\t //JOptionPane.showMessageDialog(null,name);\r\n\t\t Method m = null;\r\n\t\t\ttry {\r\n\t\t\t\tm = ob.getClass().getMethod(\"get\"+name);\r\n\t\t\t} catch (SecurityException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} catch (NoSuchMethodException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t String value = null;\r\n\t\t\ttry {\r\n\t\t\t\tvalue = (String) m.invoke(ob);\r\n\t\t\t} catch (IllegalArgumentException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} catch (IllegalAccessException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} catch (InvocationTargetException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} //调用getter方法获取属性值\r\n\t if(value != null){\t \r\n\t s[i]=value;\r\n\t\t\t\t //JOptionPane.showMessageDialog(null,value);\r\n\t }\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t }\r\n\t\t//JOptionPane.showMessageDialog(null,s.size());\r\n\t return s;\r\n\t\t\r\n }", "public int getCols() {\n return cols;\n }", "public int getCols() {\n return cols;\n }", "@Override\n public Column getColumns(int index) {\n return columns_.get(index);\n }", "void displayColumnHeaders() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"|col \" + j);\n\t\tSystem.out.println();\n\t}", "public int getCols()\n\t{\n\t\treturn cols;\n\t}", "private List<PgColumn> getColumnsWithStatistics() {\n final List<PgColumn> list = new ArrayList<PgColumn>();\n \n for (PgColumn column : columns) {\n if (column.getStatistics() != null) {\n list.add(column);\n }\n }\n \n return list;\n }", "java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Column> \n getColumnList();", "public static String[] detailsColumnProjection() {\n\n\t\treturn new String[]{KEY_ID, KEY_ADDRESS, KEY_NAME, KEY_VOLUME};\n\t}", "public Vector getColunas(String schema, String name);", "public int getCountCol() {\n\treturn countCol;\n}", "public List getColumnKeys() {\n/* 204 */ List result = new ArrayList();\n/* 205 */ int last = lastCategoryIndex();\n/* 206 */ for (int i = this.firstCategoryIndex; i <= last; i++) {\n/* 207 */ result.add(this.underlying.getColumnKey(i));\n/* */ }\n/* 209 */ return Collections.unmodifiableList(result);\n/* */ }", "@Override\n public String getName() {\n return columnInfo.getName();\n }", "public List<ColumnSchema> getColumns() {\n return columns;\n }", "public SortedSet<String> getColumns()\n\t\t{\n\t\treturn Collections.unmodifiableSortedSet(columns);\n\t\t}", "@Override\n public int getColumnsCount() {\n return columns_.size();\n }", "@Override\n public List<PmTableCol> getColumns() {\n if (this.sortOrderSelection == null) {\n List<PmTableCol> cols = PmUtil.getPmChildrenOfType(this, PmTableCol.class);\n for (int i=0; i<cols.size(); ++i) {\n cols.get(i).getColPosAttr().setValue(i);\n }\n this.sortOrderSelection = new SortOrderSelection(cols);\n return cols;\n }\n else {\n return PmUtil.getPmChildrenOfType(this, PmTableCol.class);\n }\n }", "@Override\n\tpublic Map<String, String[]> loadColumnMetas(String databaseName) throws SQLException {\n\t\tString sql=\"select utc.*,UCC.comments from user_tab_columns utc\\n\" + \n\t\t\t\t\"left join user_col_comments ucc on UCC.table_name=UTC.table_name and UCC.column_name=UTC.column_name\";\n\t\tMap<String, String[]> ret=new HashMap<>();\n\t\t try(PreparedStatement preparedStatement= connection.prepareStatement(sql);\n\t \t\tResultSet resultSet=preparedStatement.executeQuery();){\n\t\t\twhile(resultSet.next()) {\n\t\t\t\tString tableName=resultSet.getString(\"TABLE_NAME\")\n\t\t\t\t\t\t,columnName=resultSet.getString(\"COLUMN_NAME\")\n\t\t\t\t\t\t,dataLength=resultSet.getString(\"DATA_LENGTH\")\n\t\t ,nullable=resultSet.getString(\"NULLABLE\")\n\t\t ,comments=resultSet.getString(\"COMMENTS\")\n\t\t\t\t\t\t;\n\t\t\t\tString key=tableName+\":\"+columnName;\n\t\t\t\tret.put(key, new String[] {dataLength,nullable,comments});\n\t\t\t\t\n\t\t\t}\n\t }\n\t\t\n\t\treturn ret;\n\t}", "public String getColumnName();" ]
[ "0.7106905", "0.70427716", "0.69931614", "0.6974281", "0.67108476", "0.66277856", "0.6551353", "0.6520117", "0.6466279", "0.64494634", "0.6437617", "0.643527", "0.6424951", "0.64028", "0.6388602", "0.6376322", "0.637463", "0.6364622", "0.63465035", "0.63335586", "0.63085306", "0.6299256", "0.6294139", "0.62594163", "0.62262255", "0.6218371", "0.62028617", "0.61929506", "0.61762404", "0.6173523", "0.61681104", "0.6112182", "0.6109708", "0.61094844", "0.6104329", "0.60898656", "0.605412", "0.60459995", "0.60371", "0.6017039", "0.59893525", "0.59705186", "0.5969745", "0.59635854", "0.5956262", "0.5950286", "0.5947286", "0.5935366", "0.5922923", "0.5920791", "0.59165716", "0.59150225", "0.59117216", "0.59085786", "0.5895401", "0.589449", "0.587036", "0.5861487", "0.5855095", "0.5855095", "0.5854491", "0.5851378", "0.5851378", "0.5851378", "0.5846977", "0.58251446", "0.5820842", "0.58190554", "0.58086914", "0.5796534", "0.57956856", "0.5776459", "0.5750909", "0.57402015", "0.57303745", "0.5717233", "0.5712603", "0.5706699", "0.5704534", "0.5701907", "0.568129", "0.56808096", "0.56801695", "0.5676377", "0.5663651", "0.5654839", "0.56544214", "0.56497186", "0.56451505", "0.56403625", "0.5639256", "0.5638418", "0.5634791", "0.5633779", "0.56335944", "0.56304574", "0.5627665", "0.5623157", "0.5618076", "0.5612948" ]
0.71510917
0
returns the content view rows
private List<WebElement> getContentViewRows(ContentViewElement cv) { return cv.findElements(By.cssSelector(".dataOutput > tbody > tr")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getRows() {\n int count = metroTileView.getChildCount();\n for (int i=0; i<count; i++) {\n LinearLayout layout = (LinearLayout) metroTileView.getChildAt(i);\n rows.add(layout);\n }\n }", "public List getRows() \n {\n return rows;\n }", "public abstract int getViewRowCount();", "public List<List<Object>> rows() {\n return this.rows;\n }", "public int getRowCount() {\n\t\treturn content.size();\r\n\t}", "public ArrayList[] getRows() {\r\n return rows;\r\n }", "@Override\n public int getCount() {\n return getRowCount();\n }", "@GET\n\t\t\t@Path(\"/rows\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getChannelRows() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new ChannelDao(uriInfo,header).getChannelRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t logger.info( \"Error calling getChannelRows()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}", "private List<List<String>> getAllRows() {\n List<List<String>> rowLst = new ArrayList<List<String>>();\n int rowIndex = 1;\n String xpathRow = xpathTableRow.replace(\"*row*\", String.valueOf(rowIndex));\n while (isElementPresent(xpathRow) && isElementVisible(xpathRow)) {\n List<String> row = new ArrayList<String>();\n for (int i = 1; i <= 3; i++) {\n String xpathCell = xpathTableCell.replace(\"*row*\", String.valueOf(rowIndex))\n .replace(\"*col*\",\n String.valueOf(i));\n waitForElementVisibility(xpathCell);\n row.add(assertAndGetText(xpathCell));\n }\n logger.info(\"# Row \" + rowIndex + \": \" + row);\n rowLst.add(row);\n xpathRow = xpathTableRow.replace(\"*row*\", String.valueOf(++rowIndex));\n }\n logger.info(\"# List of rows: \" + rowLst);\n return rowLst;\n }", "public Row[] getRows() {return rows;}", "public List<String> getRows();", "public java.util.List<io.dstore.engine.procedures.StGetPageVisitsAd.Response.Row> getRowList() {\n if (rowBuilder_ == null) {\n return java.util.Collections.unmodifiableList(row_);\n } else {\n return rowBuilder_.getMessageList();\n }\n }", "public ArrayList<ArrayList<Object>> getRows() {\n\t\treturn m_data.rows;\n\t}", "@GET\n\t\t\t@Path(\"/rows\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getAttachmentRows() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new AttachmentDao(uriInfo,header).getAttachmentRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t logger.info( \"Error calling getAttachmentRows()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}", "int getRows();", "int getRows();", "public java.util.List<io.dstore.engine.procedures.StGetPageVisitsAd.Response.Row> getRowList() {\n return row_;\n }", "public int getRows()\n {\n return rows;\n }", "public int getRows() {\n return rows;\n }", "java.util.List<io.dstore.engine.procedures.StGetPageVisitsAd.Response.Row> \n getRowList();", "protected Object[][] getContents() {\r\n return contents;\r\n }", "public int getRows() {\n return rows;\n }", "public int getRows();", "public int getRows();", "public int getRows() {\n\treturn rows;\n }", "@Override\n\t\t\t\tpublic int getViewRowCount() {\n\t\t\t\t\treturn model.getListaBase().size();\n\t\t\t\t}", "public java.util.List<io.dstore.engine.procedures.FoModifyForumsInCategoriesAd.Response.Row> getRowList() {\n if (rowBuilder_ == null) {\n return java.util.Collections.unmodifiableList(row_);\n } else {\n return rowBuilder_.getMessageList();\n }\n }", "java.util.List<io.dstore.engine.procedures.FoModifyForumsInCategoriesAd.Response.Row> \n getRowList();", "public java.util.List<io.dstore.engine.procedures.FoModifyForumsInCategoriesAd.Response.Row> getRowList() {\n return row_;\n }", "public ObservableList<Integer> getSelectedRows() {\n return selectedRows;\n }", "public List<Row> getAllRows() {\n return this.allRows;\n }", "java.util.List<String>\n getRowsList();", "@GET\n\t\t\t@Path(\"/rows\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getIndentRows() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new IndentDao(uriInfo,header).getIndentRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t logger.info( \"Error calling getIndentRows()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}", "public java.util.List<io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row> getRowList() {\n if (rowBuilder_ == null) {\n return java.util.Collections.unmodifiableList(row_);\n } else {\n return rowBuilder_.getMessageList();\n }\n }", "public List<Row> containingRows() {\n\t\treturn Collections.unmodifiableList(containingRows);\n\t}", "public abstract int rows();", "public int getRows()\n\t{\n\t\treturn rows;\n\t}", "@Override\n public int getCount() {\n return lsct.size();\n }", "public int getRows(){\n return _rows;\n }", "public Integer getRows() {\n\t\treturn rows;\n\t}", "public GetProductoSrvRow[] getRows() {\n\t\tGetProductoSrvRow[] rows = new GetProductoSrvRow[select.getRowCount()];\n\t\tfor (int i = 0; i <= select.getRowCount() - 1; i++) {\n\t\t\trows[i] = new GetProductoSrvRow(select, i + 1);\n\t\t};\n\t\treturn rows;\n\t}", "String getRows(int index);", "public Integer getRows() {\n return this.rows;\n }", "public Integer getRows() {\n return this.rows;\n }", "public Object[][] getContents()\n {\n return contents;\n }", "private java.util.Vector getContentItems()\r\n\t{\r\n\t\treturn contentItems;\r\n\t}", "@Override\n public Object[][] getContents() {\n return contents;\n }", "public int getRows() {\n\t\treturn myGrid.getRows();\n\t}", "public int getRows() {\n\t\treturn rows;\n\t}", "public int getRows() {\n\t\treturn rows;\n\t}", "public Object[][] getContents() {\n return contents;\n }", "public List<List<Object>> rows() {\n List<List<Object>> rows = new ArrayList<List<Object>>();\n for (List<String> rawRow : getRawRows()) {\n List<Object> newRow = new ArrayList<Object>();\n for (int i = 0; i < rawRow.size(); i++) {\n newRow.add(transformCellValue(i, rawRow.get(i)));\n }\n rows.add(newRow);\n }\n return rows;\n }", "@Override\n\tpublic int getCount() {\n\t\treturn result.size();\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn iterms.size();\n\t}", "public java.util.List<com.randioo.tiger_server.protocol.Entity.RowData> getRowDataList() {\n return java.util.Collections.unmodifiableList(result.rowData_);\n }", "public Iterable<Content> findAllContent(){\n\n return contentRepository.findAll();\n }", "public java.util.List<io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row> getRowList() {\n return row_;\n }", "public java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> getRowList() {\n if (rowBuilder_ == null) {\n return java.util.Collections.unmodifiableList(row_);\n } else {\n return rowBuilder_.getMessageList();\n }\n }", "protected Object[][] getContents() {\n return RESOURCES;\n }", "public int rows() {\n\treturn rows;\n}", "public java.util.List<io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row> getRowList() {\n if (rowBuilder_ == null) {\n return java.util.Collections.unmodifiableList(row_);\n } else {\n return rowBuilder_.getMessageList();\n }\n }", "@Override\n public int getCount() {\n return result.size();\n }", "@Override\n\tpublic int getCount() {\n\t\treturn dataSource.size();\n\t}", "protected Object[][] getContents() {\n/* 447 */ return contents;\n/* */ }", "public int getRows() {\n\t\treturn this.rows;\n\t}", "java.util.List<io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row> \n getRowList();", "@Override\n public int getCount() {\n return result.length;\n }", "@Override\r\n public int getCount() {\n return mdata.size();\r\n }", "@Override\r\n public int getCount() {\n return data.size();\r\n }", "@Override\n public int getCount() {\n return result.length;\n }", "List<C> getRow() throws Exception;", "@Override\r\n\tpublic int getCount() {\n\t\treturn entradas.size();\r\n\t}", "protected List<View> getItems() {\n return items;\n }", "java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> \n getRowList();", "public int getmRows() {\n return mRows;\n }", "@Override\n public int getCount() {\n return data.size();\n }", "@Override\r\n\tpublic int getCount() {\n\t\treturn data.size();\r\n\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn data.size();\r\n\t}", "public java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Row> getRowList() {\n if (rowBuilder_ == null) {\n return java.util.Collections.unmodifiableList(row_);\n } else {\n return rowBuilder_.getMessageList();\n }\n }", "public java.util.List<io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row> getRowList() {\n return row_;\n }", "@Override\n public int getCount() {\n return data.size();\n }", "@Override\n public int getCount() {\n return data.size();\n }", "@Override\n public int getCount() {\n return data.size();\n }", "@Override\n public int getCount() {\n return data.size();\n }", "@Override\n\t\t\tpublic int getRow() {\n\t\t\t\treturn count;\n\t\t\t}", "@Override\n public int getCount() {\n return mData.size();\n }", "@Override\r\n public int getCount() {\r\n return dati.size();\r\n }", "public Set<LinkedHashMap<String, String>> getRows() {\n return rows;\n }", "@Override\n public int getCount() {\n return mData.size();\n }", "@Override\n public int getCount() {\n return mData.size();\n }", "@Override\n public int getCount() {\n return mData.size();\n }", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn views.size();\n\t\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn mData.size();\r\n\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn mData.size();\r\n\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn datas.size();\r\n\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn datas.size();\r\n\t}", "java.util.List<io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row> \n getRowList();", "public Vector[] getAllRowsData() {\n Vector[] va = new Vector[getModel().getRowCount()];\n getAllRowsData(va);\n return va;\n }", "@Override\r\n\t\t\tpublic int getCount() {\n\t\t\t\treturn bl.size();\r\n\t\t\t}", "@Override\r\n\tpublic int getCount() {\n\t\treturn mViews.size();\r\n\t}" ]
[ "0.7420939", "0.6901324", "0.6579497", "0.6575964", "0.65287846", "0.64998174", "0.64951617", "0.6478054", "0.64580387", "0.64072216", "0.6379664", "0.6326798", "0.6326482", "0.6283429", "0.6271688", "0.6271688", "0.62677735", "0.6244415", "0.62309444", "0.6230891", "0.62265754", "0.6190841", "0.6169597", "0.6169597", "0.6157047", "0.61523026", "0.6129067", "0.611378", "0.6103233", "0.6092169", "0.6079628", "0.6067797", "0.6057422", "0.6049874", "0.6043338", "0.6019414", "0.6015157", "0.60096294", "0.60057575", "0.60052264", "0.59823906", "0.5982192", "0.59782296", "0.59782296", "0.59779805", "0.5977136", "0.5962465", "0.59558207", "0.5953332", "0.5953332", "0.5946768", "0.5940541", "0.59346837", "0.5928786", "0.5914801", "0.5911115", "0.5881335", "0.58765537", "0.5872881", "0.5869752", "0.58669215", "0.5866879", "0.58595055", "0.5858639", "0.5856364", "0.58525866", "0.5847834", "0.58086735", "0.58006483", "0.5779334", "0.5773097", "0.5770497", "0.5766061", "0.5759673", "0.5758824", "0.5755466", "0.5749245", "0.5749245", "0.57429975", "0.5730799", "0.57304233", "0.57304233", "0.57304233", "0.57304233", "0.5725807", "0.57243603", "0.5719787", "0.5716732", "0.5715819", "0.5715819", "0.5715819", "0.5715758", "0.5712914", "0.5712914", "0.571092", "0.571092", "0.57070774", "0.5699833", "0.5697147", "0.56911874" ]
0.7404723
1
Adds blocks and entities from this structure to the given world.
public void addBlocksToWorld(ChunkPrimer primer, List<TileEntity> tileEntitiesToAdd, World world, BlockPos pos, PlacementSettings placementIn) { placementIn.setBoundingBoxFromChunk(); Random rand = new Random(); StructureBoundingBox boundingBox = placementIn.getBoundingBox(); rand.setSeed((boundingBox.minX >> 4) * 0x4f9939f508L + (boundingBox.minZ >> 4) * 0x1ef1565bd5L); final Rotation rotationIn = placementIn.getRotation(); if (!isEmpty()) { final Block block = placementIn.getReplacedBlock(); final StructureBoundingBox structureboundingbox = boundingBox; for (BlockInfo templateBlockInfo : blocks) { templateBlockInfo = getAlternateBlockInfo(templateBlockInfo, rand); final BlockPos blockpos = transformedBlockPos(placementIn, templateBlockInfo.pos).add(pos); final Block processedBlock = templateBlockInfo.blockState.getBlock(); if ((block == null || block != processedBlock) && (!placementIn.getIgnoreStructureBlock() || processedBlock != Blocks.STRUCTURE_BLOCK) && (structureboundingbox == null || structureboundingbox.isVecInside(blockpos))) { final IBlockState mirrorState = templateBlockInfo.blockState.withMirror(placementIn.getMirror()); final IBlockState finalState = mirrorState.withRotation(rotationIn); if (primer != null) { primer.setBlockState(blockpos.getX() & 15, blockpos.getY(), blockpos.getZ() & 15, finalState); } if (templateBlockInfo.tileentityData != null && processedBlock instanceof ITileEntityProvider) { final TileEntity tileEntity = ((ITileEntityProvider) processedBlock).createNewTileEntity(world, processedBlock.getMetaFromState(finalState)); if (tileEntity != null) { templateBlockInfo.tileentityData.setInteger("x", blockpos.getX()); templateBlockInfo.tileentityData.setInteger("y", blockpos.getY()); templateBlockInfo.tileentityData.setInteger("z", blockpos.getZ()); tileEntity.readFromNBT(templateBlockInfo.tileentityData); tileEntity.mirror(placementIn.getMirror()); tileEntity.rotate(rotationIn); tileEntitiesToAdd.add(tileEntity); } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToWorld(World world);", "public static void addWorld(World world) {\n\t\tworlds.add(world);\n\t}", "public void addToWorld() {\n world().addObject(this, xPos, yPos);\n \n try{\n terrHex = MyWorld.theWorld.getObjectsAt(xPos, yPos, TerritoryHex.class).get(0);\n } catch(IndexOutOfBoundsException e){\n MessageDisplayer.showMessage(\"The new LinkIndic didn't find a TerritoryHex at this position.\");\n this.destroy();\n }\n \n }", "public WorldRegion(GameWorldEntity entity) {\n gameWorldEntities.add(entity);\n }", "protected void addedToWorld(World world) \n {\n createImages();\n }", "@Override\r\n public void generateWorld(World world) {\r\n // create the static non-moving bodies\r\n this.creator.createWorld(world, this, COLLISIONLAYERS);\r\n // create the transition areas\r\n this.creator.createTransition(world, this, NORTHTRANSITION, NORTH);\r\n this.creator.createTransition(world, this, SOUTHTRANSITION, SOUTH);\r\n \r\n }", "protected void updateWorld(World world) {\r\n\t\tthis.world = world;\r\n\t\tsetup(); //Call setup again to re assign certain variables that depend\r\n\t\t\t\t // on the world\r\n\t\tbufferWorld(); //Buffer the new world\r\n\t}", "@Override\n\tpublic void pasteInWorld(World world, int xCoord, int yCoord ,int zCoord) {\n\n\t\t//Set all the blocks\n\t\tfor(int x = 0; x < sizeX; x++) {\n\t\t\tfor(int z = 0; z < sizeZ; z++) {\n\t\t\t\tfor(int y = 0; y< sizeY; y++) {\n\n\t\t\t\t\tif(blocks[x][y][z] != null) {\n\t\t\t\t\t\tworld.setBlockState(new BlockPos(xCoord + x, yCoord + y, zCoord + z), blocks[x][y][z].getStateFromMeta(metas[x][y][z]), 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Set tiles for each block\n\t\tfor(TileEntity tile : tileEntities) {\n\t\t\tNBTTagCompound nbt = new NBTTagCompound();\n\t\t\ttile.writeToNBT(nbt);\n\t\t\tint x = nbt.getInteger(\"x\");\n\t\t\tint y = nbt.getInteger(\"y\");\n\t\t\tint z = nbt.getInteger(\"z\");\n\n\t\t\tint tmpX = x + xCoord;\n\t\t\tint tmpY = y + yCoord;\n\t\t\tint tmpZ = z + zCoord;\n\n\t\t\t//Set blocks of tiles again to avoid weirdness caused by updates\n\t\t\t//world.setBlock(xCoord + x, yCoord + y, zCoord + z, blocks[x][y][z], metas[x][y][z], 2);\n\n\n\t\t\tnbt.setInteger(\"x\",tmpX);\n\t\t\tnbt.setInteger(\"y\",tmpY);\n\t\t\tnbt.setInteger(\"z\",tmpZ);\n\n\t\t\tTileEntity entity = world.getTileEntity(new BlockPos(tmpX, tmpY, tmpZ));\n\n\t\t\tif(entity != null)\n\t\t\t\tentity.readFromNBT(nbt);\n\t\t}\n\t}", "private void generateWorld() {\n\t\t// Loop through all block locations where a block needs to be generated\n\t\tfor(int x=0; x<WORLD_SIZE; x++) {\n\t\t\tfor(int z=0; z<WORLD_SIZE; z++) {\n\t\t\t\tfor(int y=0; y<WORLD_HEIGHT/2; y++) {\n\t\t\t\t\tsetBlockAt(x, y, z, BlockType.STONE);\n\t\t\t\t\tif(y > (WORLD_HEIGHT/2) - 5)\n\t\t\t\t\t\tsetBlockAt(x, y, z, BlockType.DIRT);\n\t\t\t\t\tif(y == (WORLD_HEIGHT/2) -1)\n\t\t\t\t\t\tsetBlockAt(x, y, z, BlockType.GRASS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Generate NUM_DIAMONDS of diamonds in random locations\n\t\tfor(int i=0; i<NUM_DIAMONDS; i++)\n\t\t\tsetBlockAt(getRandomLocation(), BlockType.DIAMOND);\t\n\t}", "public void loadWorld() {\n\t\tint[][] tileTypes = new int[100][100];\n\t\tfor (int x = 0; x < 100; x++) {\n\t\t\tfor (int y = 0; y < 100; y++) {\n\t\t\t\ttileTypes[x][y] = 2;\n\t\t\t\tif (x > 40 && x < 60 && y > 40 && y < 60) {\n\t\t\t\t\ttileTypes[x][y] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tEntityList entities = new EntityList(0);\n\t\tPlayer player = new Player(Direction.SOUTH_WEST, 50, 50);\n\t\tentities.addEntity(player);\n\t\tentities.addEntity(new Tree(Direction.SOUTH_WEST,49, 49));\n\t\tworld = new World(new Map(tileTypes), player, entities);\n\t}", "private void addPlacesToWorld(ArrayList<Place> places, GameWorld world) {\n for (int i = 0; i < places.size(); i++) {\n world.addPlace(places.get(i));\n }\n }", "public World() {\n\t\tblockIDArray = new byte[WORLD_SIZE][WORLD_HEIGHT][WORLD_SIZE];\n\t\tentities\t = new ArrayList<Entity>();\n\t\trand\t\t = new Random();\n\t\t\n new GravityThread(this);\n\t\t\t\t\n\t\tgenerateWorld();\n\t}", "private void buildWorld() {\r\n\t\tremoveAll();\r\n\t\tintro = null;\r\n\t\tfacingEast = true;\r\n\t\t\r\n\t\taddLevels();\r\n\t\taddCharacters();\r\n\t\taddLifeDisplay();\r\n\t}", "public void setWorld(GameData world) {\r\n this.world = world;\r\n }", "public void setWorld(World world) {\n this.world = world;\n }", "public boolean addComponentParts(World world, Random random, StructureBoundingBox boundingBox)\n {\n if (this.field_143015_k < 0)\n {\n this.field_143015_k = this.getAverageGroundLevel(world, boundingBox);\n\n if (this.field_143015_k < 0)\n {\n return true;\n }\n\n this.boundingBox.offset(0, this.field_143015_k - this.boundingBox.maxY + 5 - 1, 0);\n }\n\n this.fillWithBlocks(world, boundingBox, 1, 1, 1, 10, 4, 10, Blocks.air, Blocks.air, false);\n this.fillWithBlocks(world, boundingBox, 0, 0, 0, 10, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n /*this.fillWithBlocks(world, boundingBox, 0, 0, 0, 10, 0, 0, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 10, 0, 0, 10, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 10, 0, 10, 0, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 0, 0, 10, 0, 0, 0, Blocks.cobblestone, Blocks.cobblestone, false);*/\n this.fillWithBlocks(world, boundingBox, 1, 0, 1, 9, 0, 9, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 4, 0, 10, 4, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n \n //RIGHT WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 0, 0, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 0, 0, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 1, boundingBox);\n this.fillWithBlocks(world, boundingBox, 0, 2, 2, 0, 2, 4, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 5, boundingBox);\n this.fillWithBlocks(world, boundingBox, 0, 2, 6, 0, 2, 8, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 10, boundingBox);\n \n //LEFT WALL\n this.fillWithBlocks(world, boundingBox, 10, 1, 0, 10, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 10, 3, 0, 10, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 1, boundingBox);\n this.fillWithBlocks(world, boundingBox, 10, 2, 2, 10, 2, 4, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 5, boundingBox);\n this.fillWithBlocks(world, boundingBox, 10, 2, 6, 10, 2, 8, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 10, boundingBox);\n \n //FRONT WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 0, 5, 1, 0, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 7, 1, 0, 10, 1, 0, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 0, 10, 3, 0, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 1, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 2, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 3, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 4, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 5, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 7, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 8, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 0, boundingBox);\n \n //BACK WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 10, 10, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 10, 10, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 1, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 2, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 3, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 4, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 5, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 6, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 7, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 8, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 10, boundingBox);\n \n \n //DECO\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.crafting_table, 0, 9, 1, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 1, 8, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 8, 1, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.furnace, this.getMetadataWithOffset(Blocks.furnace, 1), 8, 1, 9, boundingBox);\n this.generateStructureChestContents(world, boundingBox, random, 7, 1, 9, workshopChestContents, getCount(random, 5, 7));\n this.generateStructureChestContents(world, boundingBox, random, 6, 1, 9, workshopChestContents, getCount(random, 5, 7));\n this.placeDoorAtCurrentPosition(world, boundingBox, random, 6, 1, 0, this.getMetadataWithOffset(Blocks.wooden_door, 1));\n //this.placeBlockAtCurrentPosition(world, Blocks.torch, this.getMetadataWithOffset(Blocks.torch, 1), 5, 3, 9, boundingBox);\n\n if (this.getBlockAtCurrentPosition(world, 6, 0, -1, boundingBox).getMaterial() == Material.air && this.getBlockAtCurrentPosition(world, 6, -1, -1, boundingBox).getMaterial() != Material.air)\n {\n this.placeBlockAtCurrentPosition(world, Blocks.stone_stairs, this.getMetadataWithOffset(Blocks.stone_stairs, 3), 6, 0, -1, boundingBox);\n }\n\n /* for (l = 0; l < 6; ++l)\n {\n for (int i1 = 0; i1 < 9; ++i1)\n {\n this.clearCurrentPositionBlocksUpwards(p_74875_1_, i1, 9, l, p_74875_3_);\n this.func_151554_b(p_74875_1_, Blocks.cobblestone, 0, i1, -1, l, p_74875_3_);\n }\n }*/\n\n this.spawnVillagers(world, boundingBox, 2, 1, 2, 1);\n return true;\n }", "@Override\n public void world() {\n super.world();\n }", "public void updateWorldRegion()\n\t{\n\t\tif(!isVisible)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tL2WorldRegion newRegion = WorldManager.getInstance().getRegion(getWorldPosition());\n\t\tL2WorldRegion oldRegion = region;\n\t\tif(!newRegion.equals(oldRegion))\n\t\t{\n\t\t\tif(oldRegion != null)\n\t\t\t{\n\t\t\t\toldRegion.removeVisibleObject(object);\n\t\t\t}\n\n\t\t\tsetWorldRegion(newRegion);\n\n\t\t\t// Add the L2Object spawn to _visibleObjects and if necessary to all players of its L2WorldRegion\n\t\t\tnewRegion.addVisibleObject(object);\n\t\t}\n\t}", "private static void registerBlocks() {\n for(Block block : modBlocks) {\n ForgeRegistries.BLOCKS.register(block);\n\n ItemBlock itemBlock = new ItemBlock(block);\n itemBlock.setRegistryName(block.getRegistryName());\n ForgeRegistries.ITEMS.register(itemBlock);\n }\n }", "public void load() {\n loadDisabledWorlds();\n chunks.clear();\n for (World world : ObsidianDestroyer.getInstance().getServer().getWorlds()) {\n for (Chunk chunk : world.getLoadedChunks()) {\n loadChunk(chunk);\n }\n }\n }", "public void createBody(World world) {\n\t BodyEditorLoader loader = new BodyEditorLoader((FileHandle)game.getResourceManager().getResource(assetName + \".json\"));\n\t \n\t // 1. Create a BodyDef, as usual.\n\t BodyDef bd = new BodyDef();\n\t bd.type = BodyType.StaticBody;\n\t \n\t // 2. Create a FixtureDef, as usual.\n\t FixtureDef fd = new FixtureDef();\n\t fd.density = 1;\n\t fd.friction = 0.5f;\n\t fd.restitution = 0f;\n\t fd.isSensor = true;\n\t fd.filter.categoryBits = FilterData.ENTITY;\n\t \n\t // 3. Create a Body, as usual.\n\t body = world.createBody(bd);\n\t body.setTransform(GameUtil.ptm(position.x), GameUtil.ptm(position.y), 0);\n\t body.setUserData(this);\n\t \n\t // 4. Create the body fixture automatically by using the loader.\n\t loader.attachFixture(body, assetName, fd, GameUtil.ptm(sprite.getWidth()));\n\t}", "public static void updateNearbyLightBlock(World world, BlockPos pos)\n\t{\n\t\tfor (int i = -1; i <= 1; i++)\n\t\t{\n\t\t\tfor (int j = 1; j <= 2; j++)\n\t\t\t{\n\t\t\t\tfor (int k = -1; k <= 1; k++)\n\t\t\t\t{\n\t\t\t\t\tTileEntity tile = world.getTileEntity(pos.add(i, j, k));\n\t\t\t\t\t\n\t\t\t\t\t//renew lifespan\n\t\t\t\t\tif (tile instanceof TileEntityLightBlock)\n\t\t\t\t\t{\n\t\t\t\t\t\t((TileEntityLightBlock) tile).tick = 1;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}//end z\n\t\t\t}//end y\n\t\t}//end x\n\t}", "public void buildWorld() {\n buildBoundaryWall();\n buildDiscreteWorld();\n removeBoundaryWall();\n reorganizeNote();\n connectWorld();\n buildWall();\n }", "private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }", "void update(Env world) throws Exception;", "public void registerWorldChunkManager()\n\t{\n\t\tthis.worldChunkMgr = new WorldChunkMangerHeaven(worldObj.getSeed(), terrainType);\n\t\tthis.hasNoSky = false;\n\t}", "public static void fix(World world) {\n \t\tFile regionFolder = new File(Bukkit.getWorldContainer() + File.separator + world.getName() + File.separator + \"region\");\r\n \t\tif (regionFolder.exists()) {\r\n \t\t\t// Loop through all region files of the world\r\n \t\t\tint dx, dz;\r\n \t\t\tint rx, rz;\r\n \t\t\tfor (String regionFileName : regionFolder.list()) {\r\n \t\t\t\t// Validate file\r\n \t\t\t\tFile file = new File(regionFolder + File.separator + regionFileName);\r\n \t\t\t\tif (!file.isFile() || !file.exists()) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t\tString[] parts = regionFileName.split(\"\\\\.\");\r\n \t\t\t\tif (parts.length != 4 || !parts[0].equals(\"r\") || !parts[3].equals(\"mca\")) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t\t// Obtain the chunk offset of this region file\r\n \t\t\t\ttry {\r\n \t\t\t\t\trx = Integer.parseInt(parts[1]) << 5;\r\n \t\t\t\t\trz = Integer.parseInt(parts[2]) << 5;\r\n \t\t\t\t} catch (Exception ex) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// Is it contained in the cache?\r\n \t\t\t\tReference<RegionFile> ref = RegionFileCacheRef.FILES.get(file);\r\n \t\t\t\tRegionFile reg = null;\r\n \t\t\t\tif (ref != null) {\r\n \t\t\t\t\treg = ref.get();\r\n \t\t\t\t}\r\n \t\t\t\tboolean closeOnFinish = false;\r\n \t\t\t\tif (reg == null) {\r\n \t\t\t\t\tcloseOnFinish = true;\r\n \t\t\t\t\t// Manually load this region file\r\n \t\t\t\t\treg = new RegionFile(file);\r\n \t\t\t\t}\r\n \t\t\t\t// Obtain all generated chunks in this region file\r\n \t\t\t\tfor (dx = 0; dx < 32; dx++) {\r\n \t\t\t\t\tfor (dz = 0; dz < 32; dz++) {\r\n \t\t\t\t\t\tif (reg.c(dx, dz)) {\r\n \t\t\t\t\t\t\t// Region file exists - add it\r\n\t\t\t\t\t\t\tfix(world, rx + dx, rz + dz, true);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\tif (closeOnFinish) {\r\n \t\t\t\t\t// Close the region file stream - we are done with it\r\n \t\t\t\t\treg.c();\r\n \t\t\t\t}\r\n \t\t\t}\r\n\t\t} else {\r\n\t\t\tNoLagg.plugin.log(Level.WARNING, \"Failed to fix world '\" + world.getName() + \"': Region folder is missing!\");\r\n \t\t}\r\n \t}", "@Override\n\tpublic void registerWorldChunkManager() {\n\t\tworldChunkMgr = new zei_WorldChunkManagerZeitgeist(giants, worldObj);\n\t\tworldType = 99;\n\t\thasNoSky = false;\n\t}", "public void setWorld(World world) throws IllegalStateException {\n\t\tif (!canHaveAsWorld(world))\n\t\t\tthrow new IllegalStateException(\"Invalid position in the world trying to assign this entity to.\");\n\t\n\t\t//If current world is null, don't try to remove 'this' from it\n\t\t//If world is null, don't try to add anything to it\n\t\t//This allows us to provide 'null' as an argument in case we want to \n\t\t//undo the association for this entity.\n\t\tif (!(this.getWorld() == null) && !(world == null)) {\n\t\t\tthis.getWorld().removeEntity(this);\n\t\t\tworld.addEntity(this);\n\t\t}\n\n\t\tthis.world = world;\n\t\t\n\t}", "private void addBlock(Block one)\n\t{\n\t\tgetChildren().add(one);\n\t\tblocks1.add(one);\n\t\tblocks2.add(one);\n\t}", "public void addBlock(Block newBlock) {\n\t\tBLOCK_LIST.add(newBlock);\n\t\tSPRITE_LIST.add(newBlock);\n\t}", "@Model\n\tprotected void setWorld(World world) {\n\t\tthis.world = world;\n\t}", "public Region(World world, int width, int height) {\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tcellGrid = new CellGrid(this,width,height);\n\t\tentities = new EntityList(this);\n\t\twalls = new Walls();\n\t\tthis.world = world;\n\t\tthis.soundEngine = new SoundEngine();\n\t\tthis.addBoundingWalls();\n\t}", "@Override\n protected void buildWorldRepresentation() {\n java.util.List<BasicModelEntity> worldModelEntityList = spaceExplorerModel.getWorldEntityList();\n java.util.List<CSysEntity> viewWorldEntityList = new ArrayList();\n for (int i = 0; i < worldModelEntityList.size(); i++) {\n\n BasicModelEntity basicModelEntity = worldModelEntityList.get(i);\n\n CSysEntity cSysEntity = null;\n if (basicModelEntity instanceof ModelLineEntity) {\n cSysEntity = new SeCSysLineEntity(this, (ModelLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(cSysLineEntity);\n } else if (basicModelEntity instanceof ModelPolyLineEntity) {\n cSysEntity = new SeCSysViewPolyLineEntity(this, (ModelPolyLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(seCSysViewPolylineEntity);\n }\n viewWorldEntityList.add(cSysEntity);\n }\n\n createAxis(viewWorldEntityList);\n viewWorldEntityArray = viewWorldEntityList.toArray(new BasicCSysEntity[viewWorldEntityList.size()]);\n updateCSysEntList(combinedRotatingMatrix);\n }", "public static void registerBlockEntities()\n\t{\n\t}", "public void newGameWorld()\r\n {\r\n addObject(new Blackout(\"Fade\"), getWidth() / 2, getHeight() / 2);\r\n removeAllObjects();\r\n\r\n GameWorld gameWorld = new GameWorld();\r\n Greenfoot.setWorld(gameWorld);\r\n }", "public void registerWorldChunkManager() {\n\t\tthis.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.sky, 0.5F, 0.0F);\n\t\tthis.dimensionId = 1;\n\t\tthis.hasNoSky = true;\n\t}", "public void initAndSetWorld() {\n\t\tHashMap<String, Location> gameWorld = new HashMap<String, Location>();\r\n\t\tthis.world = gameWorld;\r\n\t\t\r\n\t\t// CREATING AND ADDING LOCATIONS, LOCATION AND ITEM HASHES ARE AUTOMATICALLY SET BY CALLING CONSTRUCTOR\r\n\t\tLocation valley = new Location(\"valley\", \"Evalon Valley. A green valley with fertile soil.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(valley);\r\n\t\tLocation plains = new Location(\"plains\", \"West Plains. A desolate plain.\",\r\n\t\t\t\t\"You cannot go in that direction. There is nothing but dust over there.\",true);\r\n\t\tthis.addLocation(plains);\r\n\t\tLocation mountain = new Location(\"mountain\", \"Northern Mountains. A labyrinth of razor sharp rocks.\",\r\n\t\t\t\t\"You cannot go in that direction. The Mountain is not so easily climbed.\",true);\r\n\t\tthis.addLocation(mountain);\r\n\t\tLocation shore = new Location(\"shore\", \"Western Shore. The water is calm.\",\r\n\t\t\t\t\"You cannot go in that direction. There might be dangerous beasts in the water.\",true);\r\n\t\tthis.addLocation(shore);\r\n\t\tLocation woods = new Location(\"woods\", \"King's Forest. A bright forest with high pines.\",\r\n\t\t\t\t\"You cannot go in that direction. Be careful not to get lost in the woods.\",true);\r\n\t\tthis.addLocation(woods);\r\n\t\tLocation hills = new Location(\"hills\", \"Evalon hills.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(hills);\r\n\t\tLocation cave = new Location(\"cave\", \"Blood Cave. Few of those who venture here ever return.\",\r\n\t\t\t\t\"The air smells foul over there, better not go in that direction.\",true);\r\n\t\tthis.addLocation(cave);\r\n\t\tLocation innercave = new Location(\"innercave\", \"Blood Cave. This path must lead somewhere.\",\r\n\t\t\t\t\"Better not go over there.\",true);\r\n\t\t\r\n\t\tLocation westhills = new Location(\"westhills\", \"Thornhills. A great many trees cover the steep hills.\",\r\n\t\t\t\t\"You cannot go in that direction. Watch out for the thorny bushes.\",true);\r\n\t\tthis.addLocation(westhills);\r\n\t\t\r\n\t\tLocation lake = new Location(\"lake\", \"Evalon Lake. A magnificent lake with a calm body of water.\",\r\n\t\t\t\t\"You cannot go in that direction, nothing but fish over there.\",true);\r\n\t\tthis.addLocation(lake);\r\n\t\t\r\n\t\tLocation laketown = new Location(\"laketown\", \"Messny village. A quiet village with wooden houses and a dirt road.\",\r\n\t\t\t\t\"You cannot go in that direction, probably nothing interesting over there.\",true);\r\n\t\t\r\n\t\tLocation inn = new Room(\"inn\", \"Messny Inn. A small but charming inn in the centre of the village.\",\r\n\t\t\t\t\"You cannot go in that direction.\",false);\r\n\t\t\r\n\t\t// CONNECTING LOCATIONS\r\n\t\t// IT DOES NOT MATTER ON WHICH LOCATION THE METHOD ADDPATHS IS CALLED\r\n\t\tvalley.addPaths(valley, \"east\", plains, \"west\");\r\n\t\tvalley.addPaths(valley, \"north\", mountain, \"south\");\r\n\t\tvalley.addPaths(valley, \"west\", shore, \"east\");\r\n\t\tvalley.addPaths(valley, \"south\", woods, \"north\");\r\n\t\twoods.addPaths(woods, \"east\", hills, \"west\");\r\n\t\thills.addPaths(hills, \"south\", westhills, \"north\");\r\n\t\twesthills.addPaths(westhills, \"west\", lake, \"east\");\r\n\t\tlake.addPaths(woods, \"south\", lake, \"north\");\r\n\t\tlake.addPaths(lake, \"west\", laketown, \"east\");\r\n\t\tmountain.addPaths(mountain, \"cave\", cave, \"exit\");\r\n\t\tlaketown.addPaths(laketown, \"inn\", inn, \"exit\");\r\n\t\t\r\n\r\n\t\t\r\n\t\t// CREATE EMPTY ARMOR SET FOR GAME START AND UNEQUIPS\r\n\t\tBodyArmor noBodyArmor = new BodyArmor(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBodyArmor(noBodyArmor);\r\n\t\tBoots noBoots = new Boots(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBoots(noBoots);\r\n\t\tHeadgear noHeadgear = new Headgear(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultHeadgear(noHeadgear);\r\n\t\tGloves noGloves = new Gloves(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultGloves(noGloves);\r\n\t\tWeapon noWeapon = new Weapon(\"unarmored\", 0, 0, true, 5, false);\r\n\t\tthis.setDefaultWeapon(noWeapon);\r\n\t\t\r\n\t\tthis.getPlayer().setBodyArmor(noBodyArmor);\r\n\t\tthis.getPlayer().setBoots(noBoots);\r\n\t\tthis.getPlayer().setGloves(noGloves);\r\n\t\tthis.getPlayer().setHeadgear(noHeadgear);\r\n\t\tthis.getPlayer().setWeapon(noWeapon);\r\n\t\t\r\n\t\t\r\n\t\t// CREATING AND ADDING ITEMS TO PLAYER INVENTORY \r\n\t\tItem potion = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tthis.getPlayer().addItem(potion);\r\n\t\tWeapon sword = new Weapon(\"sword\", 10, 200, true, 10, false);\r\n\t\tvalley.addItem(sword);\r\n\t\t\r\n\t\tWeapon swordEvalon = new Weapon(\"EvalonianSword\", 15, 400, true, 1, 15, false);\r\n\t\thills.addItem(swordEvalon);\r\n\t\t\r\n\t\tPotion potion2 = new Potion(\"largepotion\", 2, 200, true, 25);\r\n\t\tPotion potion3 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tPotion potion4 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tlake.addItem(potion3);\r\n\t\tinn.addItem(potion4);\r\n\t\t\r\n\t\tItem potion5 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion6 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\twoods.addItem(potion6);\r\n\t\t\r\n\t\tPurse purse = new Purse(\"purse\",0,0,true,100);\r\n\t\tvalley.addItem(purse);\r\n\t\t\r\n\t\tChest chest = new Chest(\"chest\", 50, 100, false, 50);\r\n\t\tvalley.addItem(chest);\r\n\t\tchest.addItem(potion2);\r\n\t\t\r\n\t\tChest chest2 = new Chest(\"chest\", 10, 10, false, 20);\r\n\t\tinn.addItem(chest2);\r\n\t\t\r\n\t\t// ENEMY LOOT\r\n\t\tBodyArmor chestplate = new BodyArmor(\"chestplate\", 20, 200, true, 20);\r\n\t\t\r\n\t\t// ADDING NPC TO WORLD\r\n\t\tNpc innkeeper = new Npc(\"Innkeeper\", false, \"Hello, we have rooms available if you want to stay over night.\",true,1000);\r\n\t\tinn.addNpc(innkeeper);\r\n\t\t\r\n\t\tItem potion7 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion8 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tinnkeeper.addItem(potion7);\r\n\t\tinnkeeper.addItem(potion8);\r\n\t\t\r\n\t\tNpc villager = new Npc(\"Lumberjack\", false, \"Gotta get those logs back to the mill soon, but first a few pints at the inn!\",false,0);\r\n\t\tlaketown.addNpc(villager);\r\n\t\t\r\n\t\tEnemy enemy1 = new Enemy(\"Enemy\", true, \"Come at me!\", 50, chestplate, 200, 10);\r\n\t\tmountain.addNpc(enemy1);\r\n\t\t\r\n\t\tEnemyGuardian guardian = new EnemyGuardian(\"Guardian\", true, \"I guard this cave.\", 100, potion5, 600, 15, innercave, \"An entrance reveals itself behind the fallen Guardian.\", \"inwards\", \"entrance\");\r\n\t\tcave.addNpc(guardian);\r\n\t\t\r\n\t\t// ADDING SPAWNER TO WORLD\r\n\t\tthis.setNpcSpawner(new BanditSpawner()); \r\n\t\t\r\n\t\t// ADDING PLAYER TO THE WORLD\r\n\t\tthis.getPlayer().setLocation(valley);\r\n\t\t\r\n\t\t// QUEST\r\n\t\tQuest noquest = new Quest(\"noquest\",\"nodesc\",\"nocomp\",false,true,1000,0,0,0);\r\n\t\tthis.setCurrentQuest(noquest);\r\n\t\t\r\n\t\t\r\n\t\tQuest firstquest = new Quest(\"A New Journey\",\"Find the lost sword of Evalon.\",\"You have found the lost sword of Evalon!\",false,false,1,400,0,1);\r\n\t\t\r\n\t\tScroll scroll = new Scroll(\"Questscroll\",1,1,true,firstquest);\r\n\t\tmountain.addItem(scroll);\r\n\t\t\r\n\t\tSystem.out.println(\"All set up.\");\r\n\t}", "public void addBlock(Block block){\n\t\tblocks.addElement(block);\n\t}", "public void setupWorld()\r\n\t{\r\n\t\t//build walls\r\n\t\twall1.add(new PointD(-500, 500));\r\n\t\twall1.add(new PointD(-490, 500));\r\n\t\twall1.add(new PointD(-490, -500));\r\n\t\twall1.add(new PointD(-500, -500));\r\n\r\n\t\twall2.add(new PointD(-500, 500));\r\n\t\twall2.add(new PointD(2000, 500));\r\n\t\twall2.add(new PointD(2000, 490));\r\n\t\twall2.add(new PointD(-500, 490));\r\n\t\t\r\n\t\twall3.add(new PointD(2000, 500));\r\n\t\twall3.add(new PointD(1990, 500));\r\n\t\twall3.add(new PointD(1990, -500));\r\n\t\twall3.add(new PointD(2000, -500));\r\n\r\n\t\twall4.add(new PointD(-500, -500));\r\n\t\twall4.add(new PointD(2000, -500));\r\n\t\twall4.add(new PointD(2000, -490));\r\n\t\twall4.add(new PointD(-500, -490));\r\n\r\n\t\tobjects.add(wall1);\r\n\t\tobjects.add(wall2);\r\n\t\tobjects.add(wall3);\r\n\t\tobjects.add(wall4);\r\n\t\t\r\n\t\t\r\n\t\t//add people\r\n\t\tGameVars.people = people;\r\n\t\tGameVars.aSquare = aSquare;\r\n\t\t\r\n\t\tobjects.add(grandson.boundary);\r\n\t\tpeople.add(grandson);\r\n\t\t\r\n\t\tobjects.add(son.boundary);\r\n\t\tpeople.add(son);\r\n\t\t\r\n\t\tobjects.add(triangle.boundary);\r\n\t\tpeople.add(triangle);\r\n\r\n\t\tobjects.add(wife.boundary);\r\n\t\tpeople.add(wife);\r\n\r\n\t\tobjects.add(runaway.boundary);\r\n\t\tpeople.add(runaway);\r\n\t\t\r\n\t\t\r\n\t\t//set aSquare's position\r\n\t\taSquare.rotate(220);\r\n\t\t\r\n\t}", "public void spawn()\n\t{\n\t\tsynchronized(this)\n\t\t{\n\t\t\t// Set the x,y,z position of the L2Object spawn and update its _worldregion\n\t\t\tsetVisible(true);\n\t\t\tsetWorldRegion(WorldManager.getInstance().getRegion(getWorldPosition()));\n\n\t\t\t// Add the L2Object spawn in the _allobjects of L2World\n\t\t\tWorldManager.getInstance().storeObject(object);\n\n\t\t\t// Add the L2Object spawn to _visibleObjects and if necessary to _allplayers of its L2WorldRegion\n\t\t\tregion.addVisibleObject(object);\n\t\t}\n\n\t\t// this can synchronize on others instancies, so it's out of\n\t\t// synchronized, to avoid deadlocks\n\t\t// Add the L2Object spawn in the world as a visible object\n\t\tWorldManager.getInstance().addVisibleObject(object, region);\n\n\t\tobject.onSpawn();\n\t}", "@Override\n public void onPlace(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) {\n Minecraft.getInstance().execute(() -> {\n for (Direction d : Direction.values()) {\n IlluminateClient.instance().addLight(new LightBlockLight(level, blockPos, d));\n }\n });\n }", "public void addBlock(Block block) {\n this.blocks.add(block);\n }", "public boolean addComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox)\n\t{\n\t\tif (this.averageGroundLevel < 0)\n\t\t{\n\t\t\tthis.averageGroundLevel = this.getAverageGroundLevel(par1World, par3StructureBoundingBox);\n\n\t\t\tif (this.averageGroundLevel < 0)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tthis.boundingBox.offset(0, this.averageGroundLevel - this.boundingBox.maxY + 4 - 1, 0);\n\t\t}\n\n\t\tthis.fillWithBlocks(par1World, par3StructureBoundingBox, 0, 1, 0, 12, 10, 8, 0, 0, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, -1, 2, 14, -1, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID,\n\t\t\t\tColors.Pink, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 14, 0, 2, 14, 2, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID,\n\t\t\t\tColors.Pink, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 11, 0, 2, 13, 0, 4, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID,\n\t\t\t\tColors.Pink, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 11, 0, 8, 13, 0, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID,\n\t\t\t\tColors.Pink, false);\n\t\tthis.fillWithBlocks(par1World, par3StructureBoundingBox, 13, 0, 5, 13, 0, 7, Block.lavaMoving.blockID, Block.lavaStill.blockID, false);\n\t\tthis.fillWithBlocks(par1World, par3StructureBoundingBox, 11, 0, 5, 12, 0, 7, 0, 0, false);\n\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, 0, 2, 10, 0, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID,\n\t\t\t\tColors.Pink, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, 1, 2, 7, 2, 4, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, 1, 8, 7, 2, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, 1, 2, 14, 2, 2, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\t// this.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2,\n\t\t// 1, 8, 4, 2, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t// ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 5, 0, 11, 9, 3, 11, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID,\n\t\t\t\tColors.Pink, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 10, 0, 10, 14, 2, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID,\n\t\t\t\tColors.Pink, false);\n\n\t\t// roof 1\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, 3, 3, 14, 3, 9, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithBlocks(par1World, par3StructureBoundingBox, 8, 3, 4, 13, 3, 8, 0, 0, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 4, 3, 10, 10, 3, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID,\n\t\t\t\tColors.Pink, false);\n\t\tthis.fillWithBlocks(par1World, par3StructureBoundingBox, 8, 3, 9, 9, 3, 10, 0, 0, false);\n\t\tthis.fillWithBlocks(par1World, par3StructureBoundingBox, 2, 3, 5, 7, 3, 7, 0, 0, false);\n\n\t\t// roof 2\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, 4, 4, 7, 4, 8, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\t// this.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2,\n\t\t// 4, 4, 5, 4, 4, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t// ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 6, 4, 3, 8, 4, 3, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 9, 4, 4, 14, 4, 4, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithBlocks(par1World, par3StructureBoundingBox, 14, 4, 5, 14, 4, 7, Block.thinGlass.blockID, Block.thinGlass.blockID, false);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, 4, 8, 5, 4, 8, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 9, 4, 8, 14, 4, 8, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 5, 4, 8, 7, 4, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 9, 4, 8, 9, 4, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 6, 4, 11, 8, 4, 11, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID,\n\t\t\t\tColors.Pink, false);\n\n\t\t// roof 3\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, 5, 5, 14, 5, 7, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 6, 5, 4, 8, 5, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 7, 5, 3, 7, 5, 11, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithBlocks(par1World, par3StructureBoundingBox, 8, 5, 6, 13, 5, 6, 0, 0, false);\n\n\t\t// roof 4\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 7, 6, 4, 7, 6, 10, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\t\tthis.fillWithMetadataBlocks(par1World, par3StructureBoundingBox, 2, 6, 6, 14, 6, 6, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink, ShurtugalMod.blockHandler.Brick.blockID, Colors.Pink,\n\t\t\t\tfalse);\n\n\t\tthis.fillWithBlocks(par1World, par3StructureBoundingBox, 10, 0, 6, 10, 0, 6, ShurtugalMod.blockHandler.PinkTempleTrigger.blockID, ShurtugalMod.blockHandler.PinkTempleTrigger.blockID, false);\n\n\t\tint var4;\n\n\t\tfor (var4 = 1; var4 <= 7; ++var4)\n\t\t{\n\n\t\t}\n\n\t\tfor (var4 = 0; var4 < 9; ++var4)\n\t\t{\n\t\t\tfor (int var5 = 0; var5 < 13; ++var5)\n\t\t\t{\n\t\t\t\t// this.clearCurrentPositionBlocksUpwards(par1World, var5, 4,\n\t\t\t\t// var4, par3StructureBoundingBox);\n\t\t\t\tthis.fillCurrentPositionBlocksDownwards(par1World, Block.dirt.blockID, 0, var5, -1, var4, par3StructureBoundingBox);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public void removeFromWorld(World world);", "public static void registerBlocks() {\n\t\tRegistry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"egg_block\"), EGG_BLOCK);\n\t\t\n\t\t// Yolk\n\t\tSTILL_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_flow\"), new YolkFluid.Still());\n\t\tFLOWING_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_still\"), new YolkFluid.Flowing());\n\t\tYOLK = Registry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"yolk\"), new FluidBlock(STILL_YOLK, FabricBlockSettings.copy(Blocks.WATER)){});\n\t}", "public GameFrame(final World world) {\n this.world = world;\n }", "public void addBlock(int x, int y) {\r\n\t\tthis.blockMap.add(new Block(x, y));\r\n\t}", "public static void writeWorld(World world, CompoundTag compound) {\n UUID worldUuid = world.getUID();\n // world UUID used by Bukkit and code above\n compound.putLong(\"WorldUUIDMost\", worldUuid.getMostSignificantBits());\n compound.putLong(\"WorldUUIDLeast\", worldUuid.getLeastSignificantBits());\n // leave a Dimension value for possible Vanilla use\n compound.putInt(\"Dimension\", world.getEnvironment().getId());\n }", "public World makeWorld() {\n World world = new World(1000, 1000);\n world.createEntity().addComponent(new CursorComponent());\n \n ProjectileSystem projectileSystem = new ProjectileSystem();\n world.addSystem(projectileSystem, 1);\n \n return world;\n }", "@SuppressWarnings(\"unchecked\")\n \tvoid addSystem(EntitySystem system) {\n \t\tif (systems.contains(system))\n \t\t\tthrow new RuntimeException(\"System already added\");\n \t\tsystem.id = getNewSystemId();\n \t\tsystem.componentBits = world.getComponentBits(system.components);\n \n \t\tClass<? extends EntitySystem> class1 = system.getClass();\n \t\tdo {\n \t\t\tfor (Field field : class1.getDeclaredFields()) {\n \t\t\t\t// Check for ComponentManager declarations.\n \t\t\t\tif (field.getType() == ComponentMapper.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of componentmanager\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the component manager declaration with the right\n \t\t\t\t\t\t// component manager.\n \t\t\t\t\t\tfield.set(system, world.getComponentMapper((Class<? extends Component>) type));\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t// check for EventListener declarations.\n \t\t\t\tif (field.getType() == EventListener.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of eventListener.\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\t@SuppressWarnings(\"rawtypes\")\n \t\t\t\t\tEventListener<? extends Event> eventListener = new EventListener();\n \t\t\t\t\tworld.registerEventListener(eventListener, (Class<? extends Event>) type);\n \n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the event listener declaration with the right\n \t\t\t\t\t\t// field listener.\n \t\t\t\t\t\tfield.set(system, eventListener);\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tclass1 = (Class<? extends EntitySystem>) class1.getSuperclass();\n \t\t} while (class1 != EntitySystem.class);\n \t\tsystems.add(system);\n \t\tsystemMap.put(system.id, system);\n\t\tsystem.world = world;\n \t}", "public void addWorld(File file, String name){\n worlds.add(new MBMWorld(file, name));\n }", "public void WorldRender() {\n\t\t int BlockX = (int) (Camera.CameraX/Game.TileSize);\n\t\t int BlockY = (int) (Camera.CameraY/Game.TileSize);\n\t\t \n\t\t //Tile.sky.draw(0, 0, Display.getWidth(), Display.getHeight());\n\t\t //Tile.voidBlock.startUse();\n\t\t for(int l = 0; l < this.worldLayers.size(); l++) {\n\t\t\t for(int x = BlockX; x < BlockX + Game.DisplayXBlk; x++) {\n\t\t\t\t for(int y = BlockY; y < BlockY + Game.DisplayYBlk; y++) {\n\t\t\t\t\t //try {\n\t\t\t\t\t //Tile.requestTiles(worldLayers.get(l).getBlock(x, y).id);\n\t\t\t\t\t //} catch (Exception e) { }\n\t\t\t\t\t \n\t\t\t\t\t worldLayers.get(l).renderBlock(x, y);\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t //Tile.voidBlock.endUse();\n\t }", "@Override\n\tpublic void addBlock(Block block) {\n\t\tem.persist(block);\n\t}", "void addEntityToSystems(Entity e, RECSBits systemBits) {\n \t\tfor (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) {\n \t\t\tsystemMap.get(i).addEntity(e.id);\n \t\t}\n \t}", "public static void createBodyAndType(World world) {\n\t\t\n\t}", "public void addBlock(int x, int y, int health) {\r\n\t\tthis.blockMap.add(new Block(x, y, health));\r\n\t}", "@Override\n public void afterWorldInit() {\n }", "public void doAddEntity(TreePath path) {\n \t\tif(world == null) return;\n \t\tNode node = (Node) path.getLastPathComponent();\n \t\tString[] names = new String[EEntity.values().length];\n \t\tfor (int i = 0; i < names.length; i++) {\n \t\t\tnames[i] = EEntity.values()[i].name();\n \t\t}\n \t\tString selected = (String) JOptionPane.showInputDialog(\n \t\t\t\tWorldEditor.this, \"What kind of entity\", \"Create Entity\",\n \t\t\t\tJOptionPane.PLAIN_MESSAGE, null, names, names[0]);\n \t\tEEntity selectedEntity = EEntity.valueOf(selected);\n \t\tif (selectedEntity == null)\treturn;\n \t\tEditableEntity entity = (EditableEntity) EntityManager.getInstance().createEntity(selectedEntity);\n \t\tif (selectedEntity == EEntity.Terrain) {\n \t\t\tTerrainDialog dialog = new TerrainDialog(this);\n \t\t\tif (dialog.wasCanceled()) {\n \t\t\t\treturn;\n \t\t\t}\n \t\t\tDimension d = dialog.getTerrainSize();\n \t\t\tint tris = dialog.getTrisPerMesh();\n \t\t\t((TerrainEntity) entity).setWidth((int) d.getWidth());\n \t\t\t((TerrainEntity) entity).setDepth((int) d.getHeight());\n \t\t\t((TerrainEntity) entity).setTrianglesPerMesh(tris);\n \t\t}\n \t\tEditableView view = (EditableView) ViewManager.getInstance().createView(entity);\n \t\tif (selectedEntity == EEntity.Terrain) {\n \t\t\tthis.terrainView = (TerrainView)view;\n \t\t\tthis.terrainView.getTerrainCluster().setDetailTexture(1, 1);\n \t\t}\n \t\tthis.world.attachView(view);\n \t\ttreeModel.addChild(node, view);\n \t\trepaint();\n \t}", "public void addToGame(GameLevel g) {\n g.addSprite(this); // now block is a part of the sprites.\n g.addCollidable(this); // now block is a part of the collidables.\n }", "public void addedToWorld(World w) {\r\n\t\tupdate();\r\n\t}", "public boolean apply(World world, BlockPos rootPos);", "@Override\n\tpublic void handleEventWorldUpdate(World world) {\n\t}", "public static void blockMove(Player player) {\n Location location1 = (Location) plugin.getConfig().get(\"region1\");\n Location location2 = (Location) plugin.getConfig().get(\"region2\");\n\n int y = (location1.getBlockY() < location2.getBlockY() ? location2.getBlockY() : location1.getBlockY());\n\n for (Location location : blockPlace.redblockloc) {\n int x = location.getBlockX();\n int z = location.getBlockZ();\n new Location(player.getWorld(), x, y + 1, z).getBlock().setType(location.getBlock().getType());\n player.sendMessage(String.valueOf(location.getBlock().getType()));\n if(location.getBlock().getType()==Material.AIR) {\n blockPlace.redblock.remove(location.getBlock().getType());\n }\n if(location.getBlock().getType()==Material.WATER) {\n blockPlace.redblock.remove(location.getBlock().getType());\n }\n if(location.getBlock().getType()== Material.IRON_BLOCK) {\n blockPlace.redblock.add(location.getBlock());\n }\n location.getBlock().setType(Material.AIR);\n }\n\n for (Location location : blockPlace.blueblockloc) {\n int xb = location.getBlockX();\n int zb = location.getBlockZ();\n new Location(player.getWorld(), xb, y + 1, zb).getBlock().setType(location.getBlock().getType());\n location.getBlock().setType(Material.AIR);\n if(location.getBlock().getType()==Material.AIR) {\n blockPlace.blueblock.remove(location.getBlock().getType());\n }\n }\n\n for (Location location : blockPlace.greenblockloc) {\n int xg = location.getBlockX();\n int zg = location.getBlockZ();\n new Location(player.getWorld(), xg, y + 1, zg).getBlock().setType(location.getBlock().getType());\n location.getBlock().setType(Material.AIR);\n }\n for (Location location : blockPlace.yellowblockloc) {\n int xy = location.getBlockX();\n int zy = location.getBlockZ();\n new Location(player.getWorld(), xy, y + 1, zy).getBlock().setType(location.getBlock().getType());\n location.getBlock().setType(Material.AIR);\n }\n }", "public void onBlockAdded(World par1World, int par2, int par3, int par4) {\n\t\tsuper.onBlockAdded(par1World, par2, par3, par4);\n\t\tthis.unifyAdjacentChests(par1World, par2, par3, par4);\n\t\tBlock l = par1World.getBlock(par2, par3, par4 - 1);\n\t\tBlock i1 = par1World.getBlock(par2, par3, par4 + 1);\n\t\tBlock j1 = par1World.getBlock(par2 - 1, par3, par4);\n\t\tBlock k1 = par1World.getBlock(par2 + 1, par3, par4);\n\n\t\tif (l == this) {\n\t\t\tthis.unifyAdjacentChests(par1World, par2, par3, par4 - 1);\n\t\t}\n\n\t\tif (i1 == this) {\n\t\t\tthis.unifyAdjacentChests(par1World, par2, par3, par4 + 1);\n\t\t}\n\n\t\tif (j1 == this) {\n\t\t\tthis.unifyAdjacentChests(par1World, par2 - 1, par3, par4);\n\t\t}\n\n\t\tif (k1 == this) {\n\t\t\tthis.unifyAdjacentChests(par1World, par2 + 1, par3, par4);\n\t\t}\n\t}", "public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)\r\n {\r\n super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n// this.func_149930_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n }", "private void configureWorlds(){\n switch (gameWorld){\n case NORMAL:\n world.setPVP(true);\n world.setKeepSpawnInMemory(false);\n world.setAutoSave(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n case NETHER:\n world.setPVP(true);\n world.setAutoSave(false);\n world.setKeepSpawnInMemory(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n }\n }", "private static void addFakeItemDataToInWorldBlocksAndCleanUpFakeData() {\n\n Map<String, Materials> MATERIALS_MAP = null;\n\n try {\n Field f = Materials.class.getDeclaredField(\"MATERIALS_MAP\");\n f.setAccessible(true);\n MATERIALS_MAP = (Map<String, Materials>) f.get(null);\n } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) {\n e.printStackTrace();\n }\n\n if (MATERIALS_MAP == null)\n throw new NullPointerException(\"MATERIALS_MAP null!\");\n\n Materials oreMat = new Materials(-1, null, 0, 0, 0, false, \"bwores\", \"bwores\", null, true, null);\n Materials smallOreMat = new Materials(-1, null, 0, 0, 0, false, \"bwsmallores\", \"bwsmallores\", null, true, null);\n Materials blockMat = new Materials(-1, null, 0, 0, 0, false, \"bwblocks\", \"bwblocks\", null, true, null);\n\n for (int i = 0; i < 16; i++) {\n GT_OreDictUnificator.addAssociation(ore, oreMat, new ItemStack(BWOres, 1, i), true);\n GT_OreDictUnificator.addAssociation(oreSmall, smallOreMat, new ItemStack(BWSmallOres, 1, i), true);\n GT_OreDictUnificator.addAssociation(block, blockMat, new ItemStack(BWBlocks, 1, i), true);\n }\n\n MATERIALS_MAP.remove(\"bwores\");\n MATERIALS_MAP.remove(\"bwsmallores\");\n MATERIALS_MAP.remove(\"bwblocks\");\n }", "public void updateStructure()\n\t{\n\t\tboolean itWorked = true;\n\t\t\n\t\t// Get block's rotational information as a ForgeDirection\n\t\tForgeDirection rotation = ForgeDirection.getOrientation(Utils.backFromMeta(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)));\n\t\t\n\t\t//\n\t\t// Step one: validate all blocks\n\t\t//\n\t\t\n\t\t// Get the MachineStructures from the MachineStructureRegistrar\n\t\t// But if the machine is already set up it should only check the desired structure.\n\t\tfor (MachineStructure struct : (structureComplete() ? MachineStructureRegistrar.getStructuresForMachineID(getMachineID()) : MachineStructureRegistrar.getStructuresForMachineID(getMachineID())))\n\t\t{\n\t\t\t// Check each block in requirements\n\t\t\tfor (PReq req : struct.requirements)\n\t\t\t{\n\t\t\t\t// Get the rotated block coordinates.\n\t\t\t\tBlockPosition pos = req.rel.getPosition(rotation, xCoord, yCoord, zCoord);\n\n\t\t\t\t// Check the requirement.\n\t\t\t\tif (!req.requirement.isMatch(tier, worldObj, pos.x, pos.y, pos.z, xCoord, yCoord, zCoord))\n\t\t\t\t{\n\t\t\t\t\t// If it didn't work, stop checking.\n\t\t\t\t\titWorked = false; break;\n\t\t\t\t}\n\t\t\t\t// If it did work keep calm and carry on\n\t\t\t}\n\t\t\t\n\t\t\t// We've gone through all the blocks. They all match up!\n\t\t\tif (itWorked)\n\t\t\t{\n\t\t\t\t// **If the structure is new only**\n\t\t\t\t// Which implies the blocks have changed between checks\n\t\t\t\tif (struct.ID != structureID)\n\t\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// This is only called when structures are changed/first created.\n\t\t\t\t\t//\n\t\t\t\t\t\n\t\t\t\t\t// Save what structure we have.\n\t\t\t\t\tstructureID = struct.ID;\n\t\t\t\t\t\n\t\t\t\t\t// Make an arraylist to save all teh structures\n\t\t\t\t\tArrayList<StructureUpgradeEntity> newEntities = new ArrayList<StructureUpgradeEntity>();\n\n\t\t\t\t\t// Tell all of the blocks to join us!\n\t\t\t\t\tfor (PReq req : struct.requirements)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Get the blocks that the structure has checked.\n\t\t\t\t\t\tBlockPosition pos = req.rel.getPosition(rotation, xCoord, yCoord, zCoord);\n\t\t\t\t\t\tBlock brock = worldObj.getBlock(pos.x, pos.y, pos.z); if (brock == null) continue;\n\n\t\t\t\t\t\tif (brock instanceof IStructureAware)\n\t\t\t\t\t\t\t((IStructureAware)brock).onStructureCreated(worldObj, pos.x, pos.y, pos.z, xCoord, yCoord, zCoord);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check the tile entity for upgrades\n\t\t\t\t\t\tTileEntity ent = worldObj.getTileEntity(pos.x, pos.y, pos.z);\n\t\t\t\t\t\tif (ent != null && ent instanceof StructureUpgradeEntity)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tStructureUpgradeEntity structEnt = (StructureUpgradeEntity)ent;\n\t\t\t\t\t\t\tnewEntities.add(structEnt);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* // Not sure about this.\n\t\t\t\t\t\t\tif (structEnt.coreX != xCoord && structEnt.coreY != yCoord && structEnt.coreZ != zCoord)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstructEnt.onCoreConnected()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// do stuff with that\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// I haven't figured out how the hell to do toArray() in this crap\n\t\t\t\t\t// so here's a weird combination of iterator and for loop\n\t\t\t\t\tupgrades = new StructureUpgradeEntity[newEntities.size()];\n\t\t\t\t\tfor (int i = 0; i < newEntities.size(); i++)\n\t\t\t\t\t\tupgrades[i] = newEntities.get(i);\n\n\t\t\t\t\t// Tell all of the structure blocks to stripe it up!\n\t\t\t\t\tfor (RelativeFaceCoords relPos : struct.relativeStriped)\n\t\t\t\t\t{\n\t\t\t\t\t\tBlockPosition pos = relPos.getPosition(rotation, xCoord, yCoord, zCoord);\n\t\t\t\t\t\tBlock brock = worldObj.getBlock(pos.x, pos.y, pos.z);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If it's a structure block tell it to stripe up\n\t\t\t\t\t\tif (brock != null && brock instanceof StructureBlock)\n\t\t\t\t\t\t\tworldObj.setBlockMetadataWithNotify(pos.x, pos.y, pos.z, 2, 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// If not, reset the loop and try again.\n\t\t\telse { itWorked = true; continue; }\n\t\t}\n\t\t\n\t\t//\n\t\t// None of the structures worked!\n\t\t//\n\t\t\n\t\t// If we had a structure before, we need to clear it\n\t\tif (structureComplete())\n\t\t{\n\t\t\tfor (PReq req : MachineStructureRegistrar.getMachineStructureByID(structureID).requirements)\n\t\t\t{\n\t\t\t\tBlockPosition pos = req.rel.getPosition(rotation, xCoord, yCoord, zCoord);\n\t\t\t\tBlock brock = worldObj.getBlock(pos.x, pos.y, pos.z);\n\t\t\t\t\n\t\t\t\t// This will also un-stripe all structure blocks.\n\t\t\t\tif (brock instanceof IStructureAware)\n\t\t\t\t\t((IStructureAware)brock).onStructureBroken(worldObj, pos.x, pos.y, pos.z, xCoord, yCoord, zCoord);\n\t\t\t}\n\t\t\t// We don't have a structure.\n\t\t\tstructureID = null;\n\t\t}\n\t\t\n\t}", "private void addMorph(World world, String name)\n {\n try\n {\n EntityMorph morph = this.factory.morphFromName(name);\n EntityLivingBase entity = (EntityLivingBase) EntityList.createEntityByIDFromName(new ResourceLocation(name), world);\n\n if (entity == null)\n {\n System.out.println(\"Couldn't add morph \" + name + \", because it's null!\");\n return;\n }\n\n NBTTagCompound data = entity.serializeNBT();\n\n morph.name = name;\n\n /* Setting up a category */\n String category = \"generic\";\n\n /* Category for third-party modded mobs */\n if (!name.startsWith(\"minecraft:\"))\n {\n category = name.substring(0, name.indexOf(\":\"));\n }\n else if (entity instanceof EntityDragon || entity instanceof EntityWither || entity instanceof EntityGiantZombie)\n {\n category = \"boss\";\n }\n else if (entity instanceof EntityAnimal || name.equals(\"minecraft:bat\") || name.equals(\"minecraft:squid\"))\n {\n category = \"animal\";\n }\n else if (entity instanceof EntityMob || name.equals(\"minecraft:ghast\") || name.equals(\"minecraft:magma_cube\") || name.equals(\"minecraft:slime\") || name.equals(\"minecraft:shulker\"))\n {\n category = \"hostile\";\n }\n\n EntityUtils.stripEntityNBT(data);\n morph.setEntityData(data);\n\n this.get(category).add(morph);\n }\n catch (Exception e)\n {\n System.out.println(\"An error occured during insertion of \" + name + \" morph!\");\n e.printStackTrace();\n }\n }", "public void updateMainBlock() {\n\t\tthis.mainblock = player.getWorld().getBlockAt(player.getLocation().add(0, -1, 0));\n\t}", "public static void setWorld(World aWorld)\r\n/* */ {\r\n\t \tlogger.info(count++ + \" About to setWotld : \" + \"Agent\");\r\n/* 43 */ \tworldForAgent = aWorld;\r\n/* */ }", "public void growTree(World par1World, int par2, int par3, int par4, Random par5Random)\n {\n \t int var6 = par1World.getBlockMetadata(par2, par3, par4) & 3;\n //world.setBlock(i, j, k, 0);\n Object obj = null;\n obj = new WorldGenReactionCraftTree();\n\n {\n par1World.setBlockAndMetadata(par2, par3, par4, this.blockID, var6);\n }\n }", "public abstract World create(World world);", "public void updateWorld(Location loc)\n {\n worldData = getPersistence().get(loc.getWorld().getName(), WorldData.class);\n }", "public void load() {\n structure = SpigotUtils.structBetweenTwoLocations(pos1, pos2, material);\n }", "public void initializeWorld() {\n checkWorldAndGameManager();\n if (this.worldDisplay == null) {\n throw new GameSetupException(\"World display has not been passed to\" +\n \" WorldDisplayManager\");\n } if (this.renderer == null) {\n throw new GameSetupException(\"Renderer is not initialized\" +\n \" for WorldDisplayManager\");\n }\n // Instantiate the helper managers\n tilesManager = new TilesManager(this.world, this.worldDisplay);\n\n // render the tiles\n tilesManager.renderInitialWorld();\n\n // Load the rendering engine\n renderer.setTilesManager(tilesManager);\n renderer.setMainEntityManager(gameManager.getMainEntityManager());\n\n }", "@Inject(method = \"generateVeinPart\", at = @At(\"TAIL\"))\n private void coping(StructureWorldAccess world, net.minecraft.util.math.random.Random random, OreFeatureConfig config, double startX, double endX,\n double startZ, double endZ, double startY, double endY, int x, int y, int z, int horizontalSize,\n int verticalSize, CallbackInfoReturnable<Boolean> cir) {\n\n OWO$COPING.get().forEach((blockPos, state) -> {\n world.setBlockState(blockPos, state, Block.NOTIFY_ALL);\n });\n OWO$COPING.get().clear();\n }", "private void loadWorld() {\n try {\n world = jsonReader.read();\n System.out.println(\"Loaded world from \" + JSON_STORE);\n } catch (IOException | InvalidDataException e) {\n System.out.println(\"Unable to read from file: \" + JSON_STORE);\n }\n }", "public void addBlock(Block block) {\n\t\tblock.setId(this.generateID());\n\t\tthis.blocks.put(block.getId(), block);\n\t}", "public World(final BoundingBox bounds, final Peer peer) {\n \t\tmyVirtualWorldBounds = bounds;\n \t\tmyPeer = peer;\n \t\tmyPeer.addObserver(this);\n \t\t\n \t\tmyForces = new LinkedList<Force>();\n \t\tmyObjects = new LinkedList<PhysicalObject>();\n \t\t\n \t\t// TODO: Should this go here?\n \t\tmyScene = new BranchGroup();\n \t\tmyScene.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);\n \t\tmyScene.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);\n \t\t\n \t\tBoundingLeaf originLeaf = new BoundingLeaf(new BoundingSphere());\n \t\tmyScene.addChild(originLeaf);\n \t\t\n \t\tmyScene.addChild(createVirtualWorldBoundsShape());\n \t\t\n \t\taddLights();\n \t\taddHalfspaces();\n \t\t\n \t\tmyScene.compile();\n \t}", "public void onBlockAdded(World world, int x, int y, int z){\n\t\t\tsuper.onBlockAdded(world, x, y, z);\n\t\t\tif (!world.isRemote && !world.isBlockIndirectlyGettingPowered(x, y, z)){ \n\t tile = (OrangeSirenTileEntity) world.getTileEntity(x, y, z); \n\t tile.setShouldStop(true);}\n\t\t\t\n\t if (!world.isRemote && world.isBlockIndirectlyGettingPowered(x, y, z)){ \n\t tile = (OrangeSirenTileEntity) world.getTileEntity(x, y, z); \n\t tile.setShouldStart(true);}\n\t\t}", "public World(int width, int height, World other, Element bgElement)\n {\n // construct self\n\n this(width, height, bgElement);\n\n // if the other width and height the same as this don't adjust\n\n if (other.width == width && other.height == height)\n {\n getGraphics().drawImage(other, 0, 0, null);\n return;\n }\n // locate content on other world\n\n int leftMost = -1;\n int rightMost = -1;\n int topMost = -1;\n int botMost = -1;\n\n // find left most particle\n\n for (int x = 0; leftMost == -1 && x < other.width; ++x)\n for (int y = 0; leftMost == -1 && y < other.height; ++y)\n if (other.getRGB(x, y) != background)\n leftMost = x;\n\n // if no content on other world, stop here\n\n if (leftMost == -1)\n return;\n\n // find right most particle\n\n for (int x = other.width - 1; rightMost == -1 && x >= 0; --x)\n for (int y = 0; rightMost == -1 && y < other.height; ++y)\n if (other.getRGB(x, y) != background)\n rightMost = x;\n\n // find top most particle\n\n for (int y = 0; topMost == -1 && y < other.height; ++y)\n for (int x = 0; topMost == -1 && x < other.width; ++x)\n if (other.getRGB(x, y) != background)\n topMost = y;\n\n // find top most particle\n\n for (int y = other.height - 1; botMost == -1 && y >= 0; --y)\n for (int x = 0; botMost == -1 && x < other.width; ++x)\n if (other.getRGB(x, y) != background)\n botMost = y;\n\n // copy world centered into new world\n\n int otherWidth = rightMost - leftMost + 1;\n int otherHeight = botMost - topMost + 1;\n\n BufferedImage content = other.getSubimage(\n leftMost, topMost, otherWidth, otherHeight);\n getGraphics().drawImage(content, \n (width - otherWidth) / 2, \n (height - otherHeight),\n null);\n }", "public MyWorld()\n { \n // Create a new world with 1600x1200 cells with a cell size of 1x1 pixels.\n super(1125, 1125, 1);\n //Adds the Cornucopia to the center of the Arena.\n int centerX = this.getWidth()/2;\n int centerY = this.getHeight()/2;\n this.addObject(new Cornucopia(), centerX, centerY);\n \n //The following adds the main character for the game.\n int CharacterX = 1125/2;\n int CharacterY = 770;\n this.addObject(new Character(), CharacterX, CharacterY);\n \n //The following code adds 6 \"Careers\" into the arena.\n int CareerX = 405;\n int CareerY = 328;\n this.addObject(new Careers(), CareerX, CareerY);\n this.addObject(new Careers(), CareerX+310, CareerY-5);\n this.addObject(new Careers(), CareerX+90, CareerY+430);\n this.addObject(new Careers(), CareerX+290, CareerY+405);\n this.addObject(new Careers(), CareerX+190, CareerY-60);\n \n //The following code add the remaining 17 Tributes to the arena.\n //Also, I cannot add like a normal person so there will only be twenty-three tributes. The Capitol goofed this year.\n int TribX = 660;\n int TribY = 288;\n this.addObject(new Tributes(), TribX, TribY);\n this.addObject(new Tributes(), TribX-200, TribY);\n this.addObject(new Tributes(), TribX-227, TribY+443);\n this.addObject(new Tributes(), TribX-280, TribY+400);\n this.addObject(new Tributes(), TribX-34, TribY+467);\n this.addObject(new Tributes(), TribX+86, TribY+397);\n this.addObject(new Tributes(), TribX-134, TribY-22);\n this.addObject(new Tributes(), TribX+103, TribY+82);\n this.addObject(new Tributes(), TribX+139, TribY+144);\n this.addObject(new Tributes(), TribX+150, TribY+210);\n this.addObject(new Tributes(), TribX+150, TribY+280);\n this.addObject(new Tributes(), TribX+120, TribY+342);\n this.addObject(new Tributes(), TribX-338, TribY+275);\n this.addObject(new Tributes(), TribX-319, TribY+343);\n this.addObject(new Tributes(), TribX-343, TribY+210);\n this.addObject(new Tributes(), TribX-330, TribY+150);\n this.addObject(new Tributes(), TribX-305, TribY+80);\n \n //The following code should add the forest onto the map.\n int ForX = this.getWidth()/2;\n int ForY = 900;\n this.addObject(new Forest(), ForX, ForY);\n \n //The following code should add the lake to the map.\n int LakX = 790;\n int LakY = 990;\n this.addObject(new Lake(), LakX, LakY);\n \n //The following should add the cave to the map.\n int CavX = 125;\n int CavY = 110;\n this.addObject(new Cave(), CavX, CavY);\n \n \n int actorCount = getObjects(Tributes.class).size();\n if(actorCount == 17) {\n int BeastX = 200;\n int BeastY = 200;\n this.addObject(new Beasts(), BeastX, BeastY);\n this.addObject(new Beasts(), BeastX+100, BeastY+100);\n }\n }", "private void updateAffectedBlocks() {\n Location blockLocation = getBlock().getLocation();\n \n affectedBlocks.clear();\n \n for (int x = -(radius / 2); x <= radius / 2; x++) {\n for (int z = -(radius / 2); z <= radius / 2; z++) {\n affectedBlocks.add(blockLocation.getWorld().getBlockAt(blockLocation.getBlockX() + x, blockLocation.getBlockY(), blockLocation.getBlockZ() + z));\n }\n }\n }", "public void addBlock(int row, int col, Block block, GameplayState gps) {\n if (row < 4) {\n gps.setGameIsLost(true);\n }\n\n cells[row][col] = block;\n }", "protected abstract void initializeWorld();", "public VolcanoWorld(int width, int height) {\n super(width, height);\n DatabaseManager.loadWorld(this, SAVE_LOCATION_AND_FILE_NAME);\n //Add player to game\n this.setPlayerEntity(new PlayerPeon(-3f, -24f, 0.15f));\n addEntity(this.getPlayerEntity());\n\n this.allVolcanoDialogues = new ArrayList<>();\n\n // Provide enemies\n EnemyManager enemyManager = new EnemyManager(this, \"volcanoDragon\", 7, \"volcanoOrc\");\n GameManager.get().addManager(enemyManager);\n enemyManager.spawnBoss(16, 20);\n\n //Create Volcano NPCs\n List<NonPlayablePeon> npnSpawns = new ArrayList<>();\n VolcanoNPC volcanoNpc1 = new VolcanoNPC(\"VolcanoQuestNPC1\", new SquareVector(-20, -13),\"volcano_npc1\");\n VolcanoNPC volcanoNpc2 = new VolcanoNPC(\"VolcanoQuestNPC2\", new SquareVector(-21, 22),\"volcano_npc2\");\n npnSpawns.add(volcanoNpc2);\n npnSpawns.add(volcanoNpc1);\n this.allVolcanoDialogues.add(volcanoNpc2.getBox());\n this.allVolcanoDialogues.add(volcanoNpc1.getBox());\n NonPlayablePeonManager npcManager = new NonPlayablePeonManager(this, (PlayerPeon) this.playerEntity, npnSpawns);\n GameManager.get().addManager(npcManager);\n\n //Add items to game\n generateItemEntities();\n\n //Creates dialogue manager\n DialogManager dialog = new DialogManager(this, (PlayerPeon) this.getPlayerEntity(),\n this.allVolcanoDialogues);\n GameManager.get().addManager(dialog);\n\n //Add local Event to this world\n this.setWorldEvent(new VolcanoEvent(this));\n\n //Updates difficulty manager\n DifficultyManager difficultyManager = GameManager.getManagerFromInstance(DifficultyManager.class);\n difficultyManager.setPlayerEntity((PlayerPeon) this.getPlayerEntity());\n difficultyManager.setDifficultyLevel(getType());\n\n // Start ambience\n GameManager.getManagerFromInstance(SoundManager.class).playAmbience(\"volcanoAmbience\");\n\n timeLastTick = System.currentTimeMillis();\n }", "private static void generateWorld(){\n for(int i = 0; i < SIZE*SIZE; i++){\n new Chunk();\n }\n }", "public World() {\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tItemDefinition.load();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tNPCDefinition.load();\n\t\t\t\tNPCStyle.init();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tDegradeSystem.init();\n\t\t\t\tProjectileManager.init();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\tbackgroundLoader.submit(new Callable<Object>() {\n\t\t\t@Override\n\t\t\tpublic Object call() throws Exception {\n\t\t\t\tShops.loadShopFile();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t}", "public void currentWorld(WumpusWorld world) throws RemoteException {\n\t\twidth = world.getWidth();\n\t\theight = world.getHeight();\n\t\tif (frame == null) {\n\t\t\tframe = new Frame();\n\t\t\tframe.addWindowListener(new WindowAdapter() {\n\t\t\t\tpublic void windowClosing(WindowEvent evt) {\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t});\n\t\t\tframe.setTitle(\"The Wumpus Monitor\");\n\t\t\tframe.setLayout(new GridLayout(width * 2, height * 2));\n\t\t\tDimension d = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\tframe.setBounds(0, 0, d.width - 1, d.height - 1);\n\t\t} else {\n\t\t\tframe.removeAll();\n\t\t}\n\t\trooms = new DirectionalPanel[width][height][8];\n\t\tfor (int row = 0; row < width; row++) {\n\t\t\tfor (int col = 0; col < height; col++) {\n\t\t\t\trooms[row][col][0] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.NORTH | ImagePanel.WEST);\n\t\t\t\trooms[row][col][1] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.NORTH | ImagePanel.EAST);\n\t\t\t\trooms[row][col][2] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.SOUTH | ImagePanel.WEST);\n\t\t\t\trooms[row][col][3] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.SOUTH | ImagePanel.EAST);\n\t\t\t\tfor (int k = 4; k < 8; k++) {\n\t\t\t\t\trooms[row][col][k] = new DirectionalPanel(-1);\n\t\t\t\t}\n\t\t\t\tagentPositions.put(new Point(row, col), new HashSet());\n\t\t\t}\n\t\t}\n\t\tfor (int row = 0; row < world.getWidth(); row++) {\n\t\t\tfor (int turn = 0; turn < 2; turn++) {\n\t\t\t\tfor (int col = 0; col < world.getHeight(); col++) {\n\t\t\t\t\tframe.add(rooms[height - row - 1][col][2*turn]);\n\t\t\t\t\tframe.add(rooms[height - row - 1][col][2*turn + 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int row = 0; row < width; row++) {\n\t\t\tfor (int col = 0; col < height; col++) {\n\t\t\t\tRoom room = world.getRoom(row, col);\n\t\t\t\tif (room.getPit()) {\n\t\t\t\t\taddImage(row, col, PIT_FILE, PIT_FILE);\n\t\t\t\t}\n\t\t\t\tif (room.getGold()) {\n\t\t\t\t\taddImage(row, col, GOLD_FILE, GOLD_FILE);\n\t\t\t\t}\n\t\t\t\tWumpus w = room.getWumpus();\n\t\t\t\tif (w != null) {\n\t\t\t\t\taddImage(row, col, w.getName(), WUMPUS_FILE);\n\t\t\t\t\tsetDirection(row, col, w.getName(), w.getDirection());\n\t\t\t\t\tPoint pos = new Point(w.getRow(), w.getColumn());\n\t\t\t\t\tagents.put(w.getName(), pos);\n\t\t\t\t\tSet s = (Set) agentPositions.get(pos);\n\t\t\t\t\ts.add(w);\n\t\t\t\t\tcheckStench(row + 1, col - 1, row - 1, col + 1);\n\t\t\t\t}\n\t\t\t\tSet explorers = room.getExplorers();\n\t\t\t\tfor (Iterator it = explorers.iterator(); it.hasNext(); ) {\n\t\t\t\t\tExplorer e = (Explorer) it.next();\n\t\t\t\t\taddImage(row, col, e.getName(), EXPLORER_FILE);\n\t\t\t\t\tsetDirection(row, col, e.getName(), e.getDirection());\n\t\t\t\t\tPoint pos = new Point(e.getRow(), e.getColumn());\n\t\t\t\t\tagents.put(e.getName(), pos);\n\t\t\t\t\tSet s = (Set) agentPositions.get(pos);\n\t\t\t\t\ts.add(e);\n\t\t\t\t}\n\t\t\t\tboolean breeze = false;\n\t\t\t\tif (row > 0 && world.getRoom(row - 1, col).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (row < world.getWidth() - 1 &&\n\t\t\t\t\t\t\t\t\tworld.getRoom(row + 1, col).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (col > 0 && world.getRoom(row, col - 1).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (col < world.getHeight() - 1 &&\n\t\t\t\t\t\t\t\t\tworld.getRoom(row, col + 1).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t}\n\t\t\t\tif (breeze) {\n\t\t\t\t\taddImage(row, col, BREEZE_FILE, BREEZE_FILE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tframe.show();\n\t\tthis.enabled = true;\n\t}", "@Override\n\tpublic void update() {\n\t\tworld.update();\n\t}", "public void renderWorldBlock(bbb renderblocks, ym iba, int i, int j, int k, int md)\r\n/* 26: */ {\r\n/* 27: 26 */ int cons = 0;\r\n/* 28: 27 */ TilePipe tt = (TilePipe)CoreLib.getTileEntity(iba, i, j, k, TilePipe.class);\r\n/* 29: 29 */ if (tt == null) {\r\n/* 30: 29 */ return;\r\n/* 31: */ }\r\n/* 32: 31 */ this.context.exactTextureCoordinates = true;\r\n/* 33: 32 */ this.context.setTexFlags(55);\r\n/* 34: 33 */ this.context.setTint(1.0F, 1.0F, 1.0F);\r\n/* 35: 34 */ this.context.setPos(i, j, k);\r\n/* 36: 35 */ if (tt.CoverSides > 0)\r\n/* 37: */ {\r\n/* 38: 36 */ this.context.readGlobalLights(iba, i, j, k);\r\n/* 39: 37 */ renderCovers(tt.CoverSides, tt.Covers);\r\n/* 40: */ }\r\n/* 41: 40 */ cons = PipeLib.getConnections(iba, i, j, k);\r\n/* 42: */ \r\n/* 43: */ \r\n/* 44: */ \r\n/* 45: 44 */ this.context.setBrightness(this.block.e(iba, i, j, k));\r\n/* 46: */ \r\n/* 47: 46 */ this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);\r\n/* 48: 47 */ this.context.setPos(i, j, k);\r\n/* 49: */ \r\n/* 50: 49 */ RenderLib.bindTexture(\"/eloraam/machine/machine1.png\");\r\n/* 51: */ \r\n/* 52: */ \r\n/* 53: */ \r\n/* 54: */ \r\n/* 55: */ \r\n/* 56: */ \r\n/* 57: */ \r\n/* 58: */ \r\n/* 59: */ \r\n/* 60: */ \r\n/* 61: */ \r\n/* 62: */ \r\n/* 63: */ \r\n/* 64: 63 */ renderCenterBlock(cons, 26, 28);\r\n/* 65: */ \r\n/* 66: 65 */ tt.cacheFlange();\r\n/* 67: 66 */ renderFlanges(tt.Flanges, 27);\r\n/* 68: */ \r\n/* 69: 68 */ RenderLib.unbindTexture();\r\n/* 70: */ }", "public void addBody(Body body) {\n body.addToWorld(this, latestId++);\n bodies.add(body);\n }", "public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) {\n\t\tTileEntityCobexChest tileentitychest = (TileEntityCobexChest) par1World.getTileEntity(par2, par3, par4);\n\n\t\tif (tileentitychest != null) {\n\t\t\tfor (int j1 = 0; j1 < tileentitychest.getSizeInventory(); ++j1) {\n\t\t\t\tItemStack itemstack = tileentitychest.getStackInSlot(j1);\n\n\t\t\t\tif (itemstack != null) {\n\t\t\t\t\tfloat f = this.random.nextFloat() * 0.8F + 0.1F;\n\t\t\t\t\tfloat f1 = this.random.nextFloat() * 0.8F + 0.1F;\n\t\t\t\t\tEntityItem entityitem;\n\n\t\t\t\t\tfor (float f2 = this.random.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; par1World.spawnEntityInWorld(entityitem)) {\n\t\t\t\t\t\tint k1 = this.random.nextInt(21) + 10;\n\n\t\t\t\t\t\tif (k1 > itemstack.stackSize) {\n\t\t\t\t\t\t\tk1 = itemstack.stackSize;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titemstack.stackSize -= k1;\n\t\t\t\t\t\tentityitem = new EntityItem(par1World, (double) ((float) par2 + f), (double) ((float) par3 + f1), (double) ((float) par4 + f2),\n\t\t\t\t\t\t\t\tnew ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage()));\n\t\t\t\t\t\tfloat f3 = 0.05F;\n\t\t\t\t\t\tentityitem.motionX = (double) ((float) this.random.nextGaussian() * f3);\n\t\t\t\t\t\tentityitem.motionY = (double) ((float) this.random.nextGaussian() * f3 + 0.2F);\n\t\t\t\t\t\tentityitem.motionZ = (double) ((float) this.random.nextGaussian() * f3);\n\n\t\t\t\t\t\tif (itemstack.hasTagCompound()) {\n\t\t\t\t\t\t\tentityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpar1World.func_147453_f(par2, par3, par4, par5);\n\t\t}\n\n\t\tsuper.breakBlock(par1World, par2, par3, par4, par5, par6);\n\t}", "public static void init()\n {\n oreStarSteel = new BlockOreStarSteel(MSAConfig.ores, Material.rock);\n storageStarSteel = new BlockStorageStarSteel(MSAConfig.storageBlock, Material.iron);\n // tech blocks\n launchTower = new BlockLaunchTower(MSAConfig.launchTower, Material.iron);\n launchTowerController = new BlockLaunchControl(MSAConfig.launchController, Material.iron);\n rocketAssembler = new BlockRocketAssembler(MSAConfig.rocketAssembler, Material.iron);\n comSatellite = new BlockComSatellite(MSAConfig.comSatellite, Material.iron);\n ssBuilding = new BlockSSBuilding(MSAConfig.ssBuilding, Material.rock);\n commandCenter = new BlockCommandCenter(MSAConfig.commandCenter, Material.iron);\n\n /* Register Blocks */\n // ore blocks\n GameRegistry.registerBlock(oreStarSteel, \"oreStarSteel\");\n GameRegistry.registerBlock(storageStarSteel, \"storageStarSteel\");\n // tech blocks\n GameRegistry.registerBlock(launchTower, \"launchTower\");\n GameRegistry.registerBlock(launchTowerController, \"launchTowerController\");\n GameRegistry.registerBlock(rocketAssembler, \"rocketAssembler\");\n GameRegistry.registerBlock(comSatellite, \"comSatellite\");\n GameRegistry.registerBlock(ssBuilding, \"ssBuilding\");\n GameRegistry.registerBlock(commandCenter, \"commandCenter\");\n\n /* Set block harvest level */\n // ore blocks\n MinecraftForge.setBlockHarvestLevel(oreStarSteel, \"pickaxe\", 2);\n MinecraftForge.setBlockHarvestLevel(storageStarSteel, \"pickaxe\", 2);\n // building blocks\n MinecraftForge.setBlockHarvestLevel(ssBuilding, \"pickaxe\", 2);\n // tech blocks\n MinecraftForge.setBlockHarvestLevel(launchTower, \"pickaxe\", 1);\n }", "public void populateRegion(World world, String regionName, ProtectedRegion region) {\n long timeAtStart = System.currentTimeMillis();\n ProtectedPolygonalRegion polygonalRegion = (ProtectedPolygonalRegion) region;\n Location found;\n int attempt = 0;\n int minX = polygonalRegion.getMinimumPoint().getBlockX();\n int maxX = polygonalRegion.getMaximumPoint().getBlockX();\n int minY = polygonalRegion.getMinimumPoint().getBlockY();\n int maxY = polygonalRegion.getMaximumPoint().getBlockY();\n int minZ = polygonalRegion.getMinimumPoint().getBlockZ();\n int maxZ = polygonalRegion.getMaximumPoint().getBlockZ();\n List<Location> locationList = new ArrayList<>();\n // Increase the amount of attempts here.\n while (attempt < 100) {\n attempt++;\n int x = ThreadLocalRandom.current().nextInt(minX, maxX + 1);\n int z = ThreadLocalRandom.current().nextInt(minZ, maxZ + 1);\n int y = getHighestYAt(new Location(world, x, maxY, z), minY);\n if (y == -1) {\n continue;\n }\n found = new Location(world, x, y, z);\n Block block = found.getBlock();\n if (!main.validFloorMaterials.contains(block.getType()))\n continue;\n\n if (!polygonalRegion.contains(BukkitUtil.toVector(found)))\n continue;\n\n Block airSpaceAbove = found.add(0, 1, 0).getBlock();\n if (airSpaceAbove.getType() != Material.AIR)\n continue;\n\n Block airSpaceTwoAbove = found.add(0, 1, 0).getBlock();\n if (airSpaceTwoAbove.getType() != Material.AIR)\n continue;\n\n locationList.add(found.add(0, -1, 0));\n }\n main.preLoadedSpawnLocations.put(regionName, locationList);\n long duration = System.currentTimeMillis() - timeAtStart;\n System.out.print(\"Generated \" + locationList.size() + \" points for the region \" + regionName + \". (Took \" + duration + \" ms.)\");\n }", "@SubscribeEvent\n public static void onRegisterBlocks(RegistryEvent.Register<Block> event) {\n CoffeeMachineBlock coffeMachine = new CoffeeMachineBlock(\n Block.Properties.create(Material.ANVIL)\n .hardnessAndResistance(-1.0F, 360000F));\n event.getRegistry().registerAll(setup(coffeMachine, \"coffee_machine\"));\n }", "public void createWorld(){\n\n }", "private void setBlocks() {\n // load the class\n ClassLoader cl = ClassLoader.getSystemClassLoader();\n // create an InputStream object\n InputStream inputStream = cl.getResourceAsStream(this.map.get(\"block_definitions\"));\n // initialize this factory with a factory\n this.factory = BlocksDefinitionReader.fromReader(new InputStreamReader(inputStream));\n try {\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }" ]
[ "0.70592374", "0.6761569", "0.66986114", "0.65773916", "0.6342593", "0.6330705", "0.62961286", "0.6164697", "0.6120163", "0.6098373", "0.60151064", "0.6003266", "0.5889488", "0.57616526", "0.57415354", "0.5737464", "0.56815386", "0.5666129", "0.56575066", "0.5642209", "0.56358564", "0.56269634", "0.5597626", "0.5591249", "0.55750245", "0.55579627", "0.555435", "0.5543368", "0.54910266", "0.54833114", "0.54667044", "0.54153156", "0.5404515", "0.5402252", "0.5395197", "0.538766", "0.53873193", "0.53832537", "0.5363991", "0.53461677", "0.5341157", "0.5332882", "0.53269374", "0.53192914", "0.5298569", "0.5298554", "0.5284709", "0.5284611", "0.5283028", "0.5279342", "0.5273226", "0.52729833", "0.52665234", "0.5264081", "0.5260569", "0.52590233", "0.5256683", "0.52487534", "0.5228562", "0.5224407", "0.5214651", "0.5206734", "0.52005714", "0.518918", "0.51746964", "0.51697856", "0.516948", "0.5159666", "0.51542705", "0.5141374", "0.5139081", "0.5138429", "0.51322573", "0.512309", "0.5121538", "0.5114868", "0.5111588", "0.51100206", "0.5094062", "0.5093975", "0.5074595", "0.50597626", "0.5052544", "0.5049709", "0.5045755", "0.5044889", "0.50298434", "0.5028849", "0.50229454", "0.50120413", "0.4998112", "0.49926314", "0.49764347", "0.49641255", "0.49482575", "0.49468225", "0.49319944", "0.4926764", "0.49256667", "0.4922352" ]
0.5606109
22
Keywords.clickOnElement("XPATH", "//span[text()=' 24x7 goCare Support']");
@Test public void verifycustomerSupportlink() { Keywords.clickOnElement(PropertiesFile.getLocator("Spportlink")[0],PropertiesFile.getLocator("Spportlink")[1]); System.out.println("24*7 goCare Support link is Displayed on Header"); Constants.driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS) ; Keywords.terminateBrowser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ClickAtDesireProduct(String product){ //clicarNoProdutoDesejado\n driver.findElement(By.xpath(\"//h3[contains(text(),'\" + product + \"')]\")).click();\n\n }", "@Test\n public void prime(){\n\n WebElement input = driver.findElement(By.id(\"twotabsearchtextbox\"));\n input.sendKeys(\"wooden spoon\");\n WebElement searchButton = driver.findElement(By.className(\"nav-input\"));\n searchButton.click();\n\n String productName = \"COOKSMARK 5 Piece Bamboo Wood Nonstick Cooking Utensils - Wooden Spoons and Spatula Utensil Set with Multicolored Silicone Handles in Red Yellow Green Orange Blue\";\n\n WebElement primeButton = driver.findElement(By.xpath(\"(//i[@class='a-icon a-icon-checkbox'])[1]\"));\n primeButton.click();\n\n\n }", "public static WebElement selectHighlightedtext(WebDriver driver)\n\t{\n\t\telement = driver.findElement(By.xpath(\"//span[contains(text(),'+91 India')]\"));\n\t\treturn element; \n\t\t\t\t\n\t}", "public void navigateToWomanCategory(){\n a = new Actions(driver);\n a.moveToElement(driver.findElement(By.cssSelector(\"div[id ='block_top_menu'] a[title='Women']\"))).build().perform();\n driver.findElement(By.cssSelector(\"ul[class='submenu-container clearfix first-in-line-xs'] li a[title='Casual Dresses'] \")).click();\n }", "public void clickByXpath (String locator){\n\t\tdriver.findElement (By.xpath(locator)).click();\n\n\t}", "public static void main(String[] args) {\n WebDriver driver = WebDriverFactory.getDriver(\"chrome\");\n driver.get(\"https://www.amazon.com/\");\n\n WebElement searchBox = driver.findElement(By.id(\"twotabsearchtextbox\"));\n searchBox.sendKeys(\"selenium cookbook\" + Keys.ENTER);\n\n WebElement searchedItem = driver.findElement(By.xpath(\"//span[.=\\\"Selenium Testing Tools Cookbook - Second Edition\\\"]\"));\n System.out.println(searchedItem.getText());\n if(searchedItem.isDisplayed()){\n System.out.println(\"pass\");\n }else{\n System.out.println(\"fail\");\n }\n\n\n\n }", "public void clickOnText(String text);", "public void clickOnSummerDresses(){\n a = new Actions(driver);\n a.moveToElement(driver.findElement(By.cssSelector(\"div[id ='block_top_menu'] a[title='Women']\"))).build().perform();\n driver.findElement(By.cssSelector(\"ul[class='submenu-container clearfix first-in-line-xs'] li a[title='Summer Dresses']\")).click();\n a.moveToElement(driver.findElement(By.xpath(\"//ul[contains(@class,'product_list')]/li[2]\"))).build().perform();\n driver.findElement(By.xpath(\"//ul[contains(@class,'product_list')]/li[2]/div/div[2]/div[2]/a[1]\")).click();\n }", "@Test\n @When(\"I navigate to Market\")\n public void s04_MarketOpen(){\n WebElement marketLink = driver.findElementByLinkText(\"Маркет\");\n marketLink.click();\n System.out.println(\"Step04 PASSED\");\n }", "@Test\n public void testHomepageUsageText()\n {\n try {\n WebElement e = driver.findElement(By.className(\"row\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Used for CS1632 Software Quality Assurance, taught by Bill Laboon\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "@Then (\"^Accept creation terms$\")\t\t\t\t\t\n public void Accept_creation_terms() throws Throwable \t\t\t\t\t\t\t\n { \t\t\n \tdriver.findElement(By.xpath(\"//*[@id='phoneUsageNext']/content/span\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.findElement(By.xpath(\"//*[@id='termsofserviceNext']/content/span\")).click();\n \t\t\t\t\n }", "@Test\n public void articleSingleView()throws Exception{\n ChromeDriver driver = openChromeDriver();\n try {\n driver.get(\"https://www.knjizare-vulkan.rs\");\n clearCookies(driver);\n\n WebElement schoolProgram = driver.findElement(By.xpath(\"//a[@href='https://www.knjizare-vulkan.rs/program-za-skolu']\"));\n schoolProgram.click();\n\n WebElement childPencilBox = driver.findElement(By.xpath(\"/html/body/div[4]/div[1]/div/div/div/div[5]/div/div[2]/div/div/div[7]/div[1]/div[1]/a[2]\"));\n childPencilBox.click();\n\n\n\n Thread.sleep(3000);\n\n } finally {\n\n driver.quit();\n\n }\n\n }", "public void searchProduct(String product){\n driver.findElement(By.id(\"search_query_top\")).sendKeys(product);\n List<WebElement> options = driver.findElements(By.className(\"ac_results\"));\n for(WebElement option:options){\n if(option.getText().equalsIgnoreCase(\"printed dress\")){\n option.click();\n break;\n }\n }\n driver.findElement(By.name(\"submit_search\")).click();\n }", "public void clickMyServices() {\n driver.findElement(myServices).click();\n }", "public void clickOnSearchButton() {\n elementControl.clickElement(searchButton);\n }", "public static void clickOnAmazon(By locator){\n\t\twebAction(locator).click();\n\t}", "public void clickOnElement (By locator){\n appiumDriver.findElement(locator).click();\n }", "public void clickByXpath(String xpath,String sign) throws InterruptedException{\r\n\t\tThread.sleep(3000);\r\n\t\t\r\n\t\t driver.findElementByXPath(xpath).click();\r\n//\t\tcreateAction();\r\n\t//\tmoveelement(s);\r\n\t\t clickByLink(sign);\r\n\r\n\t}", "public static WebElement lnk_clickPdtKeyword_PACrossPromotion() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[contains(@class, 'PACon_addTxt')]//a\"));\r\n \t\t\r\n \t\tWebDriverWait wait = new WebDriverWait(driver, 15);\r\n \t\twait.until(ExpectedConditions.elementToBeClickable(element));\r\n \t\t\r\n \t\tAdd_Log.info(\"Product keyword link is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Product keyword link is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test\n public void underweightCategoryFirstRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"47\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"177\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Underweight\",\n \"actual text is not: Your category is Underweight\");\n }", "public void ClickSearch() {\r\n\t\tsearch.click();\r\n\t\t\tLog(\"Clicked the \\\"Search\\\" button on the GIS Locator page\");\r\n\t}", "@Test\n public void testAdvancedSearchResult() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Click on Advanced Search link in footer \" );\n WebElement advancedSearchButton = driver.findElement(By.partialLinkText(\"Advanced Search\"));\n advancedSearchButton.click();\n WebElement searchCassette = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"input\"));\n WebElement searchButton = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.className(\"btn-standard\"));\n searchCassette.click();\n searchCassette.clear();\n log.info(\"Click in Search Casetter and introduce search term sculpture\" );\n searchCassette.sendKeys(\"sculpture\");\n log.info(\"Click on search Button \" );\n searchButton.click();\n log.info(\"Confirm Adavanced Search Page by keywords=sculpture is displayed in browser\" );\n assertTrue(driver.getCurrentUrl().contains(\"keywords=sculpture\"));\n }", "public void clickgoButton(){\n \n \t \n driver.findElement(By.cssSelector(goButton)).click();\n }", "public void clickSalvar (){driver.findElement(botaoSalvar).click();}", "@Test\n public void underweightCategorySecondRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"58.6\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"178\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Underweight\",\n \"actual text is not: Your category is Underweight\");\n }", "@Then(\"^click on \\\"([^\\\"]*)\\\" icon$\")\npublic void click_on_icon(String arg1) throws Throwable \n{\n\tThread.sleep(3000);\n\tdriver.findElement(By.xpath(\"//button[@class=' btn btn-primary ']\")).click();\n\tdriver.findElement(By.xpath(\"//div[@class='alert alert-success']\")).isDisplayed();\n\t \n\n}", "@Test\n\t@When(\"^I click on home_button$\")\n\tpublic void b_i_click_on_home_button() {\n\t\t\n\t\n\n\t\t driver.findElement(By.xpath(\"//*[contains(text(),'Home')]\")).click();\n\t}", "public void clickReturnSearchSeleniumBook(){\n\t\tList<WebElement> books=d.findElements(By.cssSelector(OR.getProperty(\"listSeleniumbook\")));\n\t\tWebElement SeleniumBook=books.get(0);\n\t\tSeleniumBook.click();\n\t}", "@Test\n public void overweightCategorySecondRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"94\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"177\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Overweight\",\n \"actual text is not: Your category is Overweight\");\n }", "@Test\n public void keywordSearchTest() throws InterruptedException {\n SearchNavigation.gotoSearchResultsPage(index,\"\\\"\"+exact_searchTerm+\"\\\"\");\n System.out.println(AssistanceListingSearchPage.title());\n assertEquals(\"Assistance Title does not match with Search term\",AssistanceListingSearchPage.title(), exact_searchTerm);\n }", "public static WebElement lnk_clickDidYouMean() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[contains(@class, 'guessKW')]/a\"));\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test\n public void normalCategorySecondRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"81\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"180\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Normal\",\n \"actual text is not: Your category is Normal\");\n }", "@Test\n public void normalCategoryFirstRangeInKgAndCm() {\n\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"59.3\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"179\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Normal\",\n \"actual text is not: Your category is Normal\");\n }", "public void clickStockTab(){\r\n\t\t\r\n\t\tString xpath = \"//div[contains(@class,\"+PURCHASING_PRODUCT_WINDOW_CLASS+\")]//span[text()='Stock']\";\r\n\t\twaitForExtJSAjaxComplete(20);\r\n\t\tWebDriverWait wait = new WebDriverWait(driver,20);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(By.xpath(xpath)));\r\n\t\t\r\n\t\tMcsElement.getElementByAttributeValueAndParentElement(driver, \"div\", \"@class\", PURCHASING_PRODUCT_WINDOW_CLASS, \"span\", \"text()\", \"Stock\", true, true).click();\r\n\t\t\r\n\t}", "public void hoverElement(WebDriver driver, String xpath) {\t\t\n\t\tWebElement Element = driver.findElement(By.xpath(xpath));\n Actions builder = new Actions(driver);\n builder.moveToElement(Element).build().perform(); \n\t}", "@Test\n public void overweightCategoryFirstRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"85.6\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"185\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Overweight\",\n \"actual text is not: Your category is Overweight\");\n }", "@Test\n public void keywordSelectTest() {\n\n onView(withId(R.id.fab)).perform(click());\n\n try{\n Thread.sleep(2000);\n } catch(Exception e) {\n\n }\n\n onView(withText(\"Cat\")).check(matches(isDisplayed()));\n onView(withText(\"Dog\")).check(matches(isDisplayed()));\n\n DataInteraction constraintLayout = onData(anything())\n .inAdapterView(allOf(withId(R.id.keyword_list_view),\n childAtPosition(\n withClassName(is(\"android.support.constraint.ConstraintLayout\")),\n 0)))\n .atPosition(1);\n\n constraintLayout.perform(click());\n\n try{\n Thread.sleep(2000);\n } catch(Exception e) {\n\n }\n\n onView(allOf(withText(\"Dog\"), withId(R.id.test_result_view))).check(matches(isDisplayed()));\n\n }", "public void selectAddedWareHouse(String warehouseRef){\r\n\t\t\r\n\t\t//Sleeper.sleepTightInSeconds(5);\r\n\t\tWebElement wareHouse = driver.findElement(By.xpath( \"(//div[contains(@class,'mcsfinancialspurchasingproductdetails')]//*[@class='x-grid3']//div[text()='\"+warehouseRef+\"'])[last()]\"));\r\n\t\t\r\n\t\t//Simple webelement.click() is throwing \"Element is not clickable at point\" error.\r\n\t\t//So using Actions class to click on Element\r\n\t\tActions action = new Actions(driver);\r\n\t\taction.moveToElement(wareHouse, 5, 5).click().perform();\r\n\t\t\r\n\t}", "public void clickElementByTextValue(By locator, String textValue)\n {\n By newLocator = By.id(locator.toString().replaceAll(\"(By.id: )|(.*?)\", \"\")\n + textValue);\n clickOnElement(newLocator);\n }", "@Test\n public void testYahooSerchResultPage(){\n WebElement searchBox= driver.findElement(By.xpath(\"//input[@name='p']\"));\n searchBox.sendKeys(\"Selenium\"+ Keys.ENTER);\n\n //assert the title starts with selenium\n\n String actual = driver.getTitle();\n assertTrue(actual.startsWith(\"Selenium\"));\n\n\n\n }", "public void selectProduct() {\n\t\tActions obj = new Actions(driver);\n\t\tobj.moveToElement(driver.findElements(By.xpath(\".//*[@id='center_column']/ul/li\")).get(0)).build().perform();\n\t\tdriver.findElement(By.xpath(\".//*[@id='center_column']/ul/li[1]/div/div[2]/div[2]/a[1]/span\")).click();\n\t}", "public void clickSubmitInkAndTonnerSearchButton(){\r\n\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:- Ink and Tonner Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnInkSeacrh\"));\r\n\t\t\tclick(locator_split(\"btnInkSeacrh\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Ink and Tonner Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Ink and Tonner Search icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ink and Tonner Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnInkSeacrh\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "public void clickSearchAgainButtonForDriversAge() {\n travelerPhoneNumber.click();\n driversAge.findElement(By.xpath(\n \"//input[contains(@class,'seleniumDriverAge')]//..//..//a[contains(@class,'seleniumSearchAgainButton')]\"))\n .click();\n }", "@Test\n public void obesityCategory() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"102.7\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"185\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Overweight\",\n \"actual text is not: Your category is Overweight\");\n }", "@Test\n\t@TestProperties(name = \"Click element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clickElement() {\n\t\tfindElement(by, locator).click();\n\t}", "public static void main(String[] args) {\n\n WebDriver driver= WebDriverFactory.getDriver(\"chrome\");\n\n driver.get(\"https://amazon.com\");\n driver.get(\"https://ebay.com\");\n\n WebElement searchBox=driver.findElement(By.xpath(\"//input[@type='text']\"));\n searchBox.sendKeys(\"books\");\n\n WebElement search=driver.findElement(By.xpath(\"//input[@type='submit']\"));\n search.click();\n\n String actualWord=driver.getTitle();\n\n System.out.println(\"title is: \"+ actualWord);\n\n String expectedWord=\"books\";\n\n if(actualWord.contains(expectedWord)){\n System.out.println(\"Pass\");\n }else{\n System.out.println(\"Fail\");\n System.out.println(\"actualWord = \" + actualWord);\n System.out.println(\"expectedWord = \" + expectedWord);\n }\n\n }", "@Test\n public void testSearchBoxCategoriesList() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Go to Search Box in Header \" );\n log.info(\"Write urn \" );\n Actions builder = new Actions(driver);\n WebElement searchBox = driver.findElement(By.id(\"SearchInputs\")).findElement(By.tagName(\"input\"));\n searchBox.click();\n searchBox.sendKeys(\"urn\");\n WebElement categoryResults = driver.findElement(By.partialLinkText(\"category results\"));\n List<WebElement> categoryResultsList = driver.findElement(By.className(\"categories\")).findElements(By.tagName(\"a\"));\n WebDriverWait wait = new WebDriverWait(driver, 1000);\n wait.until(ExpectedConditions.elementToBeClickable(categoryResults));\n log.info(\"Click on first result from category suggestion list\" );\n categoryResultsList.get(0).click();\n log.info(\"Confirm that the link oppened contains searched term (urn in this case ) related results.\");\n assertTrue(driver.getCurrentUrl().contains(\"urn\"));\n }", "public void clickById(String id) {\n\n\n driver.findElementById(id).click();\n\n\n }", "public static void main(String[] args) {\n\n System.out.println(\"/\\\"Hello\\\"/\");\n System.out.println(\"/'Hello'/\");\n System.out.println(\"\\\"Hello\\\"\");\n System.out.println(\"'I love \\\"Java\\\" and \\\"Programming\\\"'\");\n\n\n System.out.println(getXpath(\"Sandeep\")); ////input[@id='Sandeep']\n\n }", "public void clickSearchButton() {\n\t\tsearchButton.click();\n\t}", "HtmlPage clickSiteName();", "public void findAndClick()\n {\n String normalVal;\n String [] values = parseSrc();\n if( firstThree(values) )\n {\n return;\n }\n else\n {\n normalVal = values[0];\n }\n\n for( int i = 3; i < values.length; i++ )\n {\n if( !values[i].equals(normalVal) )\n {\n int squareIndex = i + 1;\n String squareCSS = \"#box > span:nth-child(\" + squareIndex + \")\";\n driver.findElement(By.cssSelector(squareCSS)).click();\n return;\n }\n }\n\n }", "public static void main(String[] args) throws InterruptedException {\n //1- Open a chrome browser\n WebDriver driver=WebDriverUtil.getDriver(\"chrome\");\n\n //2- Go to: https://google.com\n driver.get(\"https://www.google.com\");\n //3- Write \"apple\" in search box\n //driver.findElement(By.name(\"q\")).sendKeys(\"Apple\"); works\n\n //driver.findElement(By.className(\"gLFyf gsfi\")).sendKeys(\"Apple\");\n //having spaces in classname will make your code fail\n //you can remove one part see if it is unique you can locate\n driver.findElement(By.className(\"gLFyf\")).sendKeys(\"Apple\");\n Thread.sleep(1000);\n\n //click i am feeling lucky button\n driver.findElement(By.className(\"RNmpXc\")).click();\n\n //Verify title contains Apple\n\n String actualTitle=driver.getTitle();\n String expectedTitle=\"Apple\";\n\n if (actualTitle.contains(expectedTitle)){\n System.out.println(\"lucky button passed\");\n }else{\n System.out.println(\"lucky button failed\");\n System.out.println(\"actualTitle = \" + actualTitle);\n }\n\n driver.close();\n }", "public String mouseOverAndClick(String object, String data) {\n logger.debug(\"entered into mouseOverAndClick\");\n try {\n Actions act = new Actions(driver);\n Action pressEnterKey = act.moveToElement(wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object))))).click().build();\n pressEnterKey.perform();\n return Constants.KEYWORD_PASS;\n } \n catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n catch (Exception e) {\n \n return Constants.KEYWORD_FAIL + e.getMessage();\n }\n }", "@When(\"^Clicking on login button$\")\npublic void clicking_on_login_button() throws Throwable {\n driver.findElement(By.xpath(\"//*[@id=\\\"loginfrm\\\"]/button\")).click();\n}", "@Test\n public void testHelloTrailString()\n {\n driver.get(\"https://cs1632ex.herokuapp.com/hello/friends\");\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Hello CS1632, from friends!\"));\n }", "@When(\"user clicks on Careers link\")\n public void user_clicks_on_careers_link() throws InterruptedException {\n // bu.windowHandling();\n hp.search();\n }", "public void clickOnFindlocations() {\n\t\tsFunName = \"clickOnFindlocations\";\n\t\tLogger.info(\"Inside : clickOnFindlocations\");\n\t\tLogger.info(sFunName + \" : Verify and Click on Find Locations link\");\n\t\tbStatus = util.explicitlyWaitUntilElementIsPresent(findLlocationsLink);\n\t\tAssert.assertTrue(bStatus, \"Service Search Text field not Found\");\n\t\tfindLlocationsLink.click();\n\t}", "@When(\"I click on the search button\")\n\tpublic void i_click_on_search_button() {\n\t\tdriver.findElement(By.xpath(searchbtn)).click();\n\t}", "public static void main(String[] args) throws InterruptedException {\n\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"F:\\\\Selenium\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\t\t\t\r\n\t\t\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.google.co.in/\");\r\n\t\tWebElement t = driver.findElement(By.cssSelector(\"#tsf > div:nth-child(2) > div > div.RNNXgb > div > div.a4bIc > input\"));\r\n\t\t\r\n\t\tt.sendKeys(\"yify\");\r\n\t\t\tThread.sleep(3000);\r\n\t\t\t\r\n\t\t\tList<WebElement>r = driver.findElements(By.xpath(\"//ul[@role='listbox']//li/descendant::div[@class='sbtc']\"));\r\n\t\t\t\tint y =r.size();\r\n\t\t\t\tSystem.out.println(\"No of suggestion is \" + y);\r\n\t\t\t\t\r\n\t\t\t\tfor (int i=0; i<y; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tString p = r.get(i).getText();\r\n\t\t\t\t\tSystem.out.println(p);\r\n\t\t\t\t\tif(p.contains(\"yify\"));\r\n\t\t\t\t\t{\r\n\t\t\t\t\t r.get(i).click();\r\n\t\t\t\t\t break;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<WebElement> allLinkname = driver.findElements(By.tagName(\"h3\"));\r\n\t\t\r\n\t\r\n\t\t//Print the size of no of linkname present in alllinkname\r\n\t\t\r\n\t\tint size = allLinkname.size();\r\n\t\tSystem.out.println(size);\r\n\t\t\r\n\t\t//Printing there names in console\r\n\t\tfor (WebElement Link : allLinkname) {\r\n\t\t\t\r\n\t\t\tString value = Link.getText();\r\n\t\t\tSystem.out.println(value);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i =0; i<size; i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tString value2 = allLinkname.get(i).getText();\r\n\t\t\tif (value2.equals(\"YTS: The Official Home of YIFY Movies Torrent Download\"))\r\n\t\t\t{\r\n\t\t\t\tallLinkname.get(i).click();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Printing name of yify window\r\n\t\tString yifywindow = driver.getWindowHandle();\r\n\t\tSystem.out.println(yifywindow);\r\n\t\t\r\n\t\t//Click on browse search box text box\r\n\t\tdriver.findElement(By.cssSelector(\"#quick-search-input\")).click();\r\n\t\t\r\n\t\t\r\n\t\t// Storing all tab or window value in allwindow variable\r\n\t\t\r\n\t\tSet<String> allwindow = driver.getWindowHandles();\r\n\t\t// Printing the no of window\r\n\t\tSystem.out.println(allwindow.size());\r\n\t\t\r\n\t\t//Proof that still first window has power\r\n\t\tSystem.out.println(driver.getCurrentUrl());\r\n\t\t\r\n\t\t//Printing the exact values of each window\r\n\t\tSystem.out.println(allwindow);\r\n\t\t\r\n\t\t//Switch to second window\r\n\t\tfor (String child : allwindow) {\r\n\t\t\tif(!child.equals(yifywindow))\r\n\t\t\t{\r\n\t\t\t\tdriver.switchTo().window(child);\r\n\t\t\t\tSystem.out.println(driver.getCurrentUrl());\r\n\t\t\t\tdriver.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Again switch to yify window\r\n\t\tdriver.switchTo().window(yifywindow);\r\n\t\tSystem.out.println(driver.getCurrentUrl());\r\n\t\t\r\n\t\t//closing unwanted popup\r\n\t\t//driver.findElement(By.cssSelector(\"#id5c2a23c1c4close-cross5c2a23c1c4\")).click();\r\n\t\t\r\n\t\t//Click on browse search box text box\r\n\t\tdriver.findElement(By.cssSelector(\"#quick-search-input\")).sendKeys(\"captain marvel\");\r\n\t\t\r\n\t\t\r\n\t\t//driver.findElement(By.cssSelector(\"#quick-search-input\")).click();\r\n\t// driver.findElement(By.cssSelector(\"#quick-search-input\")).sendKeys(Keys.ENTER);\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n}", "@Test\n public void testHomepageWelcomeText()\n {\n try {\n WebElement e = driver.findElement(By.className(\"lead\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Welcome, friend,\") && elementText.contains(\"to a land of pure calculation\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }", "public void clickGender() {\n driver.findElement(gender).click();\n }", "public void I_Should_click_My_Account_link(){\n\t MyAccountLink.click();\n\t \n}", "public boolean clickMatchingelementByText(By elementList, String itemName) {\n\t\tboolean res = false;\n\t\ttry {\n\t\t\tThread.sleep(implicitWaitTimeout*1000);\n\t\t\tList<WebElement> matchelements = getListOfMatchingElements(elementList);\n\t\t\tif (matchelements.size() > 0) {\n\t\t\t\tfor (int elecount = 0; elecount < matchelements.size(); elecount++) { // to get index of element\n\t\t\t\t\tSystem.out.println(matchelements.get(elecount).getText());\n\t\t\t\t\tif (matchelements.get(elecount).getText().equalsIgnoreCase(itemName)) {\n\t\t\t\t\t\t// reqindex = elecount;\n\t\t\t\t\t\tclickUsingJavaScript(matchelements.get(elecount));\n\t\t\t\t\t\tres = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (itemName.equalsIgnoreCase(\"anyitem\")) { // click first item\n\t\t\t\t\t\tclickUsingJavaScript(matchelements.get(elecount));\n\t\t\t\t\t\tres = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception Caught To click on Element Identifier :\" + elementList + \" With String name:\"\n\t\t\t\t\t+ itemName);\n\t\t}\n\n\t\treturn res;\n\n\t}", "public void clickElementLocation(By anyElement)\n {\n\n Actions execute = new Actions(driver);\n execute.moveToElement(findElement(anyElement)).click().perform();\n }", "public void Click_My_Favites()\r\n {\r\n driver.findElement(By.cssSelector(\"a.menuTitle\")).click(); \r\n https://www.n11.com/hesabim\r\n WaitTime(5000);\r\n \r\n driver.findElement(By.linkText(\"İstek Listelerim\")).click();\r\n \r\n WaitTime(3000);\r\n \r\n WebElement element = driver.findElement(By.cssSelector(\"h4.listItemTitle\"));\r\n String number = \"\";\r\n boolean find = false;\r\n for(int i = 0; i < element.getText().length(); ++i)\r\n {\r\n if(element.getText().charAt(i) == '(')\r\n find = true;\r\n else if(find && element.getText().charAt(i) != ')' )\r\n number += element.getText().charAt(i);\r\n }\r\n //System.out.println(\"--------------:\"+number);\r\n String alert = \"alert('\";\r\n alert += \"You have \";\r\n alert += number;\r\n alert += \" favorite products.\";\r\n alert += \"');\";\r\n \r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(alert);\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n WaitTime(2000);\r\n \r\n \r\n }", "public void goToPage(String xPathCustom) { \n seleniumDriver.findElement(By.xpath(xPathCustom)).click();\n }", "@When(\"^Click on Compose hyperlink icon$\")\npublic void click_on_Compose_hyperlink_icon() throws Throwable \n{\n\tWebElement p=driver.findElement(By.partialLinkText(\"Compose\"));\n p.click();\n System.out.println(\"Page title after link click : \" + driver.getTitle());\n \n\n\n}", "@Given(\"click tab {string}\")\n public void clickEarlyAccessTab(String string) {\n $(page_objects.AdminPage.EarlyAccessTab).click();\n }", "@And (\"^I click on \\\"([^\\\"]*)\\\"$\")\n\tpublic void click_on(String object){\n\t\tString result = selenium.clickButton(object);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}", "@Test()\n\tpublic static void Homep1() {\n\t\t\n\t\tdriver= CallingChrome();\ndriver.navigate().to(\"https://www.spicejet.com/\");\n\t\t\n\n\t\t\n\t\tSystem.out.println(driver.findElement(By.xpath(\"//a[text()='Book']\")).getText());\t\n\t}", "public void clickProductDetailsAddToCartBtn(){\n clickElement(productDetailsAddToCart);\n }", "@Test\r\n\tpublic void test_3and4_Search() {\n\t\tdriver.findElement(By.id(\"twotabsearchtextbox\")).sendKeys(searchKey);\r\n\t\t// click on search button\r\n\t\tdriver.findElement(By.id(\"nav-search-submit-text\")).click();\r\n\t\t// use JavaScriptExecutor to scroll on page\r\n\t\t// cast driver to JavaScriptExecutor\r\n\t\texecutor = (JavascriptExecutor) driver;\r\n\t\texecutor.executeScript(\"window.scrollTo(0, 600)\");\r\n\r\n\t\t// try to get \"results for\" text on web page \r\n\t\t// if it is found then search is successful \r\n\t\tWebElement element = driver.findElement(By.xpath(\"//span[@id='s-result-count']\"));\r\n\t\tString resultFound = element.getText();\r\n\t\tAssert.assertTrue(resultFound.contains(\"results for\"));\r\n\t\tSystem.out.println(\"Search for Samsung is passed\");\r\n\t}", "public WebElement apply(WebDriver driver ) {\n return driver.findElement(By.xpath(\"/html/body/div[1]/section/div[2]/div/div[1]/div/div[1]/div/div/div/div[2]/div[2]/div/div/div/div/div[1]/div/div/a/i\"));\n }", "public void myorders() {\n\t\t\t\r\n\t\t\t\r\n\t\tBy my=By.xpath(\"//a[@href='/my/orders/create?form']\");\r\n\t\tWebElement We_my=wt.ElementToBeClickable(my, 20);\r\n\t\tWe_my.click();\r\n\t\t}", "@Test (dataProvider = \"searchTerms\")\n public void searchForKeyword (String searchTerms, String expectedContainedTerm) {\n SearchPage searchPage = homePage.clickForAdvansedSearchLink();\n searchPage.searchByKeywordAndSubmit(searchTerms);\n Assert.assertEquals(searchPage.getSearchResultsOnPageCount(), 10, \"Actual results on page number is wrong\");\n Assert.assertTrue(searchPage.Title(expectedContainedTerm), \"Expected search term is not found in result list\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Selenium\\\\Browser for selenium\\\\chromedriver_win32\\\\chromedriver1.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\t\n driver.get(\"https://www.google.com/\");\n Actions rclick= new Actions(driver);\n rclick.contextClick(driver.findElement(By.xpath(\"//*[@id=\\\"tsf\\\"]/div[2]/div/div[1]/div/div[2]/div/span\"))).perform();;\n \n\n\t}", "public String clickWebElement(String object, String data) {\n\t\tlogger.debug(\"Clicking on element\");\n\t\tWebElement ele=null;\n\t\ttry {\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\t\n\t\t\tisInConsistentAlert(object,data);\n\t\t\t ele = explictWaitForElementUsingFluent(object);\n\t\t\t JavascriptExecutor executor = (JavascriptExecutor) driver;\n\t\t\texecutor.executeScript(\"arguments[0].scrollIntoView(true);\", ele);\n\t\t\tele.click();\n\t\t\t//browserSpecificPause(object, data);\n\t\t}\n\t\tcatch(TimeoutException ex)\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch(ElementNotVisibleException ex)\n {\n \tif(new ApplicationSpecificKeywordEventsUtil().clickJs(ele).equals(Constants.KEYWORD_PASS))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL;\n }\n\t\tcatch(StaleElementReferenceException ex){\n\t\t\tele.click();\n\t\t}\n\t\tcatch(WebDriverException ex){\n\t\t\ttry{\n\t\t\t\tString exceptionMessage=ex.getMessage();\n\t\t\t\t\tif(exceptionMessage.contains(\"Element is not clickable at point\"))\n\t\t\t\t\t{\n\t\t\t\tif(new ApplicationSpecificKeywordEventsUtil().clickJs(ele).equals(Constants.KEYWORD_PASS))\n\t\t\t\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t\t\telse\n\t\t\t\t\t\t\treturn Constants.KEYWORD_FAIL;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t\treturn Constants.KEYWORD_FAIL+\"not able to Click\"+ex.getMessage();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\n\t\t\t\t\treturn Constants.KEYWORD_FAIL+e.getMessage();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t} \n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" \" + e.getMessage() + \" Not able to click\";\n\t\t}\n\t\treturn Constants.KEYWORD_PASS;\n\t}", "public void clickByName(String elementByName) {\n getDriver().findElementByName(elementByName).click();\n }", "public static WebElement lnk_clickSupplierNameTitle() throws Exception{\r\n \ttry{\r\n \t\t// comdev.qa\tdate: 23-Oct-2015\r\n \t//\telement = driver.findElement(By.xpath(\"(//*[contains(@class, 'supplierName_tit')]//a)[position()=1]\"));\r\n \t\t\r\n \t\tWebDriverWait waits = new WebDriverWait(driver, 20);\r\n \t\twaits.until(ExpectedConditions.elementToBeClickable(\r\n \t\t\t\tBy.xpath(\"(//a[contains(@class, 'supplierTit')])[position()=1]\")));\r\n \t\t\r\n \t\telement = driver.findElement(By.xpath(\"(//a[contains(@class, 'supplierTit')])[position()=1]\"));\r\n \t\tAdd_Log.info(\"Supplier name title is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Supplier name title is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void clickOnElement (String locator){\n String jQuerySelector = \"return $(\\\"\" + locator + \"\\\").get(0);\";\n WebElement element = (WebElement) js.executeScript(jQuerySelector);\n element.click();\n }", "WebElement getSearchButton();", "@Test\n public void testHelloNoTrail()\n {\n driver.findElement(By.linkText(\"Hello\")).click();\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String elementText = e.getText();\n assertTrue(elementText.contains(\"Hello CS1632, from Prof. Laboon!\"));\n }", "public void click(String className){\n seleniumDriver.findElement(By.className(className)).click();\n }", "public void clickDescriptionTab() {\r\n\t\t\r\n\t\tString xpath = \"//div[contains(@class,\"+PURCHASING_PRODUCT_WINDOW_CLASS+\")]//span[text()='Description']\";\r\n\t\t\r\n\t\tWebDriverWait wait = new WebDriverWait(driver,20);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(By.xpath(xpath)));\r\n\t\t\r\n\t\tMcsElement.getElementByAttributeValueAndParentElement(driver, \"div\",\r\n\t\t\t\t\"@class\", PURCHASING_PRODUCT_WINDOW_CLASS, \"span\", \"text()\",\r\n\t\t\t\t\"Description\", true, true).click();\r\n\r\n\t}", "public void selectActionToStartTraining(String trainingName)\n {\n\t\t WebElement optionToBeSelected= driver.findElement(ByLocator(\"//strong[contains(text(),'\"+trainingName+\"')]/..//button\"));\n\t\t clickOn(optionToBeSelected);\n\t\t reportInfo();\n }", "public SearchPage searchBtnClick(String cityName ) throws InterruptedException, IOException\t{\n\t\n\t//WebDriverWait wait =new WebDriverWait(driver,30);\n\t \n\tWebElement myDynamicElement = (new WebDriverWait(driver, 60).until(ExpectedConditions.presenceOfElementLocated(searchBtn)));\n\t\n\t\n\t\n\tmyDynamicElement.click();\n\t\n\tThread.sleep(4000);\n\t\t\n\t\n\t/*\n\t * Melchi Search Page navigation\n\t * \n\t * \n\t */\n\t\n\t/*driver.get(\"https://www.indiaproperty.com/searchresults.php?q=\");\n\t \n\t Actions act =new Actions(driver);\n\t\n\tact.sendKeys(Keys.ENTER);*/\n\t\n\t\n\n\t/*\n\t * Existing Search Page navigation\n\t * \n\t * \n\t */\n\t\n\t\n\tdriver.get(\"https://www.indiaproperty.com/searchs/ci=alangudi&pt=allresidential&litype=sale&vm=ltrboqViZ6ufnNrKl%5E~%5ETrxOKkmtfecaWPm9bYydegldPppt7MmK6ni96io7GpWuHSp67qxt6XV%5E~%5ETimLKeX6ejnJ5rXaasYKagX6OrkaRn&frm=15&srchtype=quick-search&f=srch&withapi=2&view=grid\");\n\t\n\t\n\tActions act =new Actions(driver);\n\t\n\tact.sendKeys(Keys.ENTER);\n\treturn new SearchPage(driver,cityName);\n\t\n\n\t\n}", "public void clickSearch() {\n\t\twaitForDocumentReady(5);\n\t\tlog.debug(\"Clicking on search button\");\n\t\tclickOn(search_button, 20);\n\t\tlog.info(\"Clicked on search button\");\n\t\tlogger.log(Status.INFO, \"Search for cruise completed\");\n\t\t\n\t}", "@Test(enabled = true)\n public void searchForFlight() throws InterruptedException {\n driver.findElement(By.xpath(\"//*[@id='uitk-tabs-button-container']/li[2]\")).click();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.findElement(By.xpath(\"//button[contains(@aria-label,'Going to')]\")).sendKeys(Keys.ARROW_DOWN);\n Thread.sleep(15000);\n\n //d1-btn\n\n }", "@And(\"^I click on \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void i_click_On_Button(String actkey) throws Throwable {\n\t\tThread.sleep(5000);\r\n\t\t//loginPage.getDriver().findElement(By.xpath(\".//*[contains(@value,'Edit')]\")).click();\r\n\t\tenduser.Qos_screen_edit_and_save(actkey);\r\n\t\t\r\n\t}", "@CssSelector(\"${williamsSProducts}\")\n\tpublic AspireWebElements williamsSProducts();", "@Test\n public void starvationCategory() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"47.5\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"178\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Starvation\",\n \"actual text is not: Your category is Starvation\");\n }", "@Test\n public void rightClick(){\n\n driver.get(\"https://the-internet.herokuapp.com/context_menu\");\n// 3- Cizili alan uzerinde sag click yapalim\n // a - ilk once action objesi olusturur\n Actions act = new Actions(driver);\n // b - mouse action yapacagim web elementini locate edilir\n WebElement stripedBox = driver.findElement(By.id(\"hot-spot\"));\n // c - actions objesi ve locate ettigimiz webelementini kullanarak istedigimiz islemi yapalim\n act.contextClick(stripedBox).perform();\n\n// 4- Alert’te cikan yazinin “You selected a context menu” oldugunu test edelim.\n String alertText =driver.switchTo().alert().getText();\n String expectedText = \"You selected a context menu\";\n Assert.assertEquals(alertText,expectedText);\n\n// 5- Tamam diyerek alert’I kapatalim\n driver.switchTo().alert().accept();\n\n\n// 6- Elemental Selenium linkine tiklayalim\n\n String firstHandle = driver.getWindowHandle();\n\n WebElement selenium = driver.findElement(By.xpath(\"//a[text()='Elemental Selenium']\"));\n\n act.click(selenium).perform();\n\n\n\n// 7- Acilan sayfada h1 taginda “Elemental Selenium” yazdigini test edelim\n\n Set<String> windowHandles = driver.getWindowHandles();\n System.out.println(firstHandle);\n\n String secondHandle =\"\";\n for(String each : windowHandles){\n if(!firstHandle.equals(each)){\n secondHandle=each;\n }\n }\n driver.switchTo().window(secondHandle);\n WebElement h1 = driver.findElement(By.tagName(\"h1\"));\n String actual = h1.getText();\n String expected = \"Elemental Selenium\";\n\n WebElement seleniumText = driver.findElement(By.xpath(\"//h1[text()='Elemental Selenium']\"));\n act.moveToElement(seleniumText).perform();\n\n Assert.assertEquals(actual,expected);\n\n }", "@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}", "public void selectAttributeClickOK() {\n $(attributeClickOk).click();\n }", "public void clickOnTopLevelNavigatorItem(String tagName, String text) {\n\t\tWebElement tabLocator = findElement(By.xpath(\"//\" + tagName + \"[contains(text(),'\" + text + \"')]\"));\n\t\twaitAndClick(tabLocator);\n\t\t_normalWait(3000);\n reportInfo();\n\n\t}", "@When(\"user clicks on cart symbol\")\r\n\tpublic void user_clicks_on_cart_symbol() {\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"header\\\"]/div[1]/div/div/div[2]/div/a[2]\")).click();\r\n\t}", "protected void click(By locator) {\n \tint waitTime = 10;\n \tWebElement element = new WebDriverWait(DRIVER, waitTime)\n \t.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\n \t element.click();\n }", "public void clickAssessment() {\r\n\t\tthis.clickAssessment.click();\r\n\t}", "public void selectAProduct() {\n specificProduct.click();\n }" ]
[ "0.6774114", "0.6437276", "0.6311998", "0.62279063", "0.61413115", "0.6000834", "0.5921259", "0.5887565", "0.58455384", "0.5702369", "0.5693854", "0.56738895", "0.5655694", "0.56350154", "0.56243384", "0.562178", "0.56159055", "0.5605057", "0.5583852", "0.5569124", "0.551134", "0.55105555", "0.5498332", "0.5494617", "0.54882276", "0.5486947", "0.5486135", "0.5486087", "0.54643166", "0.54561365", "0.5447841", "0.5439844", "0.5431473", "0.5426801", "0.5422312", "0.54149014", "0.5407293", "0.5404985", "0.5397634", "0.53796273", "0.53788155", "0.53780484", "0.5372777", "0.536758", "0.53635013", "0.5350803", "0.5339002", "0.53176373", "0.5317421", "0.530196", "0.5301451", "0.5298135", "0.5293863", "0.52902436", "0.5282132", "0.526784", "0.52646255", "0.52601194", "0.5253361", "0.5245984", "0.52437264", "0.5237539", "0.5230513", "0.5211668", "0.52089465", "0.52051574", "0.52047944", "0.5199506", "0.5199406", "0.5198616", "0.5191881", "0.5185752", "0.517028", "0.5169591", "0.516582", "0.5165247", "0.516504", "0.5159627", "0.5158984", "0.5157902", "0.51551944", "0.51533365", "0.5152706", "0.51499313", "0.5149345", "0.51492953", "0.5143232", "0.5138313", "0.51361644", "0.5132902", "0.5122956", "0.5121591", "0.5117195", "0.51134044", "0.5112548", "0.5107993", "0.5105974", "0.51046985", "0.51023966", "0.50956833" ]
0.54324365
32
User clicked OK button
public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); pdm = new ProgressDialog(MapActivity.this); pdm.setTitle("Esperando oponente..."); pdm.setCancelable(true); pdm.setIndeterminate(true); pdm.show(); esperarLucha(title); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void okButtonClicked();", "protected abstract boolean onOkClicked();", "protected abstract void pressedOKButton( );", "public void OnOkClick()\r\n {\r\n\r\n }", "void onOkButtonPressed();", "public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}", "@Override\r\n\tprotected void onOkSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Ok button implementation\");\r\n\t}", "private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }", "protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}", "private void onOK() {\n isOkClicked = true;\n dispose();\n }", "private void onOkButtonPressed() {\n\t\tconfirm = true;\n\t\tif (template.getAskDimension()) {\n\t\t\ttry {\n\t\t\t\twidth = Integer.parseInt(widthInputField.getFieldString());\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\theight = Integer.parseInt(heightInputField.getFieldString());\n\t\t\t\theightInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\theightInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\tif(!confirm)\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (template.getAskLoading()) {\n\t\t\tint result = savefileChooser.showOpenDialog(this);\n\t\t\tif (result != JFileChooser.APPROVE_OPTION) {\n\t\t\t\tconfirm = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttext.setText(ok.getText());\n\t\t\t}", "@Override\n\tpublic void okPressed() {\n\t\t_text = _noteTextField.getText();\n\t\tsetReturnCode(OK);\n\t\tclose();\n\t}", "public void cmdOk() {\n\n\t\tif (!m_actionscombo.isValueInModel()) {\n\t\t\tString msg = I18N.getLocalizedMessage(\"Invalid Action Name\");\n\t\t\tString title = I18N.getLocalizedMessage(\"Error\");\n\t\t\tJOptionPane.showMessageDialog(null, msg, title, JOptionPane.ERROR_MESSAGE);\n\t\t} else\n\t\t\tsuper.cmdOk();\n\t}", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "@FXML public void handleOk() {\n\t\tSystem.out.println(\"OK clicked!\");\n\t\t\n\t\tif (checkParameters().equals(ErrorCode.BatchSize)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Batch Size]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.ConfidenceFactor)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Confidence Factor]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.MinNumObj)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Min Num Obj]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumDecimalPlaces)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Decimal Places]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumFolds)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Folds]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Seed)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Seed]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Fine)) {\n\t\t\tsaveParameters();\n\t\t\tClassifiersWindowsManager.stage.close();\n\t\t}\n\t}", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "public boolean isOkClicked() {\r\n\t\treturn okClicked;\r\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n actualizarEntidad(this.entidad);\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "public boolean isOkClicked(){\n\t\treturn okClicked;\n\t}", "private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}", "public void clickedOk(View view) {\n \t\n \t// validate the data set\n \tif (!getData()) return;\n \t\n \t// confirm values that are in range, but possibly wrong\n \tif (!confirmData(0)) return;\n \t\n \t// success\n \t\treturnResult(Activity.RESULT_OK);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}", "@FXML\n\tprivate void handleOk() {\n\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\n\t}", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "@FXML\n\tprivate void handleOk() {\n\t\tif (isValidInput()) {\n\t\t\tsaveCurrentAcknowledgment();\n\t\t\t\n\t\t\tif (isNew) {\n\t\t\t\tmain.getDbHelper().insertAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\n\t\t\t} else {\n\t\t\t\tmain.getDbHelper().updateAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\t\n\t\t\t}\n\t\t\t\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "public boolean isOkClicked() {\n return okClicked;\n }", "public boolean isOkClicked() {\n return okClicked;\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this\");\n }", "public void handleActionOk() {\n\t\tsuper.handleActionOk();\n\t\tnewModeOkApply();\n\t\tthis.getDocumentView().close();\n\t}", "@Test\n\tpublic void testClickOnOkayButton() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getOkayButton().click();\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputApplied();\n\t}", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Pressed OK\",\n Toast.LENGTH_SHORT).show();\n }", "void CloseOkDialog();", "public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }", "public void actionPerformed(ActionEvent e)\n { /* actionPerformed */\n String\n cmd= e.getActionCommand();\n \n /* [1] see which button was pushed and do the right thing,\n * hide window and return default/altered data */\n if (cmd.equals(\" Cancel\") || cmd.equals(\"Continue\"))\n { /* send default data back - data is already stored into this.data */\n this.setVisible(false); /* hide frame which can be shown later */\n } /* send default data back */\n else\n if(cmd.equals(\"Ok\"))\n { /* hide window and return data back entered by user */\n data= textField.getText(); /* altered data returned */\n this.setVisible(false); /* hide frame which can be shown later*/\n }\n alertDone= true;\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }", "private void mIesireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mIesireActionPerformed\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa parasiti aplicatia?\", \"Confirmare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "void okButton_actionPerformed(ActionEvent e) {\n setItskey(keyTextField.getText());\n setItsvalue(valueTextField.getText());\n setUserAction(OK);\n setVisible(false);\n }", "@FXML\n private void handleOk() {\n if (isInputValid()) {\n gem.setGemName(gemNameField.getText());\n gem.setGemValue(Integer.parseInt(gemValueField.getText()));\n gem.setDescription(gemDescripField.getText());\n\n okClicked = true;\n dialogStage.close();\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\toptionPane.setValue(okString);\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showConfirmDialog(null, \"BOTAO CLICADO\", \"VALOR\", JOptionPane.PLAIN_MESSAGE);\n\n\t\t}", "protected void okPressed()\n\t{\n\t\t((NewProjectComposite) this.getDialogArea()).updateProject(project);\n\t\tsuper.okPressed();\n\t}", "void ShowOkDialog(String title, String message, OnClickListener listener);", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tif (e.getActionCommand().equals(\"确定\"))\r\n\t\t\t\t\tonOK();\r\n\t\t\t\tif (e.getActionCommand().equals(\"取消\"))\r\n\t\t\t\t\tonCancel();\r\n\t\t\t\tif (e.getActionCommand().equals(\"应用\"))\r\n\t\t\t\t\tonApply();\r\n\t\t\t}", "public void clickOnSuccessOkBtn() throws Exception {\r\n\t\r\n\t\t\tclickOnButton(btnOKSuccess);\r\n\t\t\tlog(\"clicked on OK button and object is:-\" + btnOKSuccess.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(JOptionPane.showConfirmDialog(f4, \"Confrom if you want to exit\",\"Library Management System\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "@Action\n public void acOk() {\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord1, -1e5, 1e5)) {\n return;\n }\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord2, -1e5, 1e5)) {\n return;\n }\n if (checkTextField(jtfName)) {\n return;\n }\n getTempObj().setType(jcbType.getSelectedIndex());\n getTempObj().setCoord1(getDoubleFromFormattedTextField(jftfCoord1));\n getTempObj().setCoord2(getDoubleFromFormattedTextField(jftfCoord2));\n getTempObj().setName(jtfName.getText());\n setChangeObj(true);\n }", "public void actionPerformed(ActionEvent e) {\n if(e.getSource() == confirmButton) {\n setVisible(false); // causes all the add text \n }\n else if(e.getSource() == exitButton) {\n System.exit(0);\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n Object source = e.getSource();\n if (source == confirmButton) {\n var newResult = new Result(result, name.getText());\n try {\n newResult.saveResult();\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JButton button = (JButton) e.getSource();\n if (button.getText().toString().equals(\"OK\")) {\n this.dispose();\n }\n\n else {\n ip = null;\n this.dispose();\n }\n }", "public void confirmStudentUpdate(){\n\n String title =\"Confirm student information update\";\n String HeaderText = \"Confirm inserted data\";\n String ContentText = \"Are you sure you want to update this student's information?\";\n\n AlertHandler ah = new AlertHandler();\n\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n updateStudent();\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_save)\n .setTitle(\"End Evidence Collection\")\n .setMessage(\"Are you sure you want to end collecting evidence?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n submit();\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tupdateOkState();\r\n\t\t\t}", "@Override\n\tpublic boolean performOk() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\t// Set the values from the fields\n\t\tpreferenceStore.setValue(DEFAULT_PASSWORD_LENGTH, spiLength.getSelection());\n\t\tpreferenceStore.setValue(USE_LOWERCASE_LETTERS, btnUseLowercase.getSelection());\n\t\tpreferenceStore.setValue(USE_UPPERCASE_LETTERS, btnUserUppercase.getSelection());\n\t\tpreferenceStore.setValue(USE_DIGITS, btnUseDigits.getSelection());\n\t\tpreferenceStore.setValue(USE_SYMBOLS, btnUseSymbols.getSelection());\n\t\tpreferenceStore.setValue(USE_EASY_TO_READ, btnUseEaseToRead.getSelection());\n\t\tpreferenceStore.setValue(USE_HEX_ONLY, btnUseHexOnly.getSelection());\n\n\t\t// Return true to allow dialog to close\n\t\treturn true;\n\t}", "public void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to exit?\");\n\n\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t\t}\n\t\t\t\t}", "public void clickYes ();", "void okButton_actionPerformed(ActionEvent e)\n\t{\n\t\tpropertiesEditPanel.saveChanges();\n\t\tcloseDlg();\n\t\tokPressed = true;\n }", "protected void okPressed() {\r\n \t\tArrayList resources= new ArrayList(10);\r\n \t\tfindCheckedResources(resources, (IContainer)fTree.getInput());\r\n \t\tif (fWorkingSet == null)\r\n \t\t\tfWorkingSet= new WorkingSet(getText().getText(), resources.toArray());\r\n \t\telse if (fWorkingSet instanceof WorkingSet) {\r\n \t\t\t// Add not accessible resources\r\n \t\t\tIResource[] oldResources= fWorkingSet.getResources();\r\n \t\t\tfor (int i= 0; i < oldResources.length; i++)\r\n \t\t\t\tif (!oldResources[i].isAccessible())\r\n \t\t\t\t\tresources.add(oldResources[i]);\r\n \r\n \t\t\t((WorkingSet)fWorkingSet).setName(getText().getText());\r\n \t\t\t((WorkingSet)fWorkingSet).setResources(resources.toArray());\r\n \t\t}\r\n \t\tsuper.okPressed();\r\n \t}", "private void btnConfirmActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public boolean getOK() {\n return userAction.equals(OK);\n }", "@FXML\n\tprivate void handleOk() {\n\t\tif (isInputValid()) {\n\t\t\titem.setDate(DateUtil.parse(dateField.getText()));\n\t\t\titem.setCategory(categoryField.getSelectionModel().getSelectedItem());\n\t\t\titem.setUse(useField.getText());\n\t\t\t\n\t\t\tString textBefore = amountField.getText();\n\t\t\tString textAfter = null;\n\t\t\tif(textBefore.contains(\",\")) {\n\t\t\t\ttextAfter = textBefore.replace(\",\", \".\");\n\t\t\t} else {\n\t\t\t\ttextAfter = textBefore;\n\t\t\t}\n\t\t\titem.setAmount(Double.parseDouble(textAfter));\n\t\t\titem.setDistributionKind(distributionKindField.getText());\n\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "public void okPressed() {\r\n\t\t\r\n\t\tif (albumname.getText().trim().toString().equals(\"\")) {\r\n\t\t\t\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Error\");\r\n\t\t\talert.setContentText(\"Must enter an album name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\r\n\t\tString albumName = albumname.getText().trim().toString();\r\n\t\t\r\n\t\tif (checkForDuplicateAlbumNames(albumName)==true) {\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Duplicate Names\");\r\n\t\t\talert.setContentText(\"An album already has that name. \\n Enter a new name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tAlbum newalbum = new Album(albumName);\r\n\t\tAlbumsController.getCurrentUser().addAlbumToUser(newalbum);\r\n\t\tLoginController.saveData(LoginController.users);\r\n\t\t\r\n\t\t\r\n\t\t//go to albums controller and load corresponding fxml\r\n\t\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Albums.fxml\"));\r\n\t\t\t\ttry{\r\n\t\t\t\t\tParent parent = (Parent) loader.load();\r\n\t\t\t\t\tAlbumsController controller = loader.<AlbumsController>getController();\r\n\t\t\t\t\tScene scene = new Scene(parent);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// ok is the button pressed action event\r\n\t\t\t\t\tStage stage = (Stage) ((Node) ok).getScene().getWindow();\r\n\t\t\t\t\tcontroller.start(stage,AlbumsController.getCurrentUser());\r\n\t\t\t\t\tstage.setScene(scene);\r\n\t\t\t\t\tstage.centerOnScreen();\r\n\t\t\t\t\tstage.show();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception exception) {\r\n\t\t\t\t\texception.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public void handle(ActionEvent event) {\n alert = new Alert(AlertType.CONFIRMATION);\n //Optional title. If not used the standard title \"Confiramation\" will be displayed\n //To remove the title use alert.setTitle(null);\n alert.setTitle(\"Confirmation Dialog\");\n //Optional header.If not used the standard header \"Confiramation\" will be displayed\n //To remove the title use alert.setHeaderText(null); \n alert.setHeaderText(\"Please answer the question!\");\n alert.setContentText(initText);\n //Display the dialog and get the result from the user action\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK){\n // the user clicked OK\n alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(\"Important message for you!\");\n alert.setContentText(\"Happiness is ephemeral!\");\n alert.showAndWait(); \n //the user clocked Cancel\n } else {\n // ... user chose CANCEL or closed the dialog\n //Warning Dialog\n alert = new Alert(AlertType.WARNING);\n alert.setTitle(\"Warning Dialog\");\n alert.setHeaderText(\"Read the Warning!\");\n alert.setContentText(\"You must like Java - Shall make you Happy!\");\n alert.showAndWait(); \n }\n }", "public static void okButtonAction(ActionContext actionContext){\n World world = World.getInstance();\n Thing form = actionContext.getObject(\"form\");\n Shell shell = actionContext.getObject(\"shell\");\n \n Thing dataObject = world.getThing(\"xworker.app.test.dataObject.thing.Sex\");\n form.doAction(\"setDataObject\", actionContext, \"dataObject\", dataObject);\n shell.pack();\n }", "@FXML\n\tprivate void handleOk() {\n\t\ttry {\n\t\t\ttypeDAO.supprimerType(new Type(listIdType.get(comboboxtype.getSelectionModel().getSelectedIndex()),\"\",\"\"));\n\t\t\tnew Popup(\"Type \"+comboboxtype.getValue()+\" supprimer !\");\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\t}", "private static void JGUI5() {\n\t\tint response = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\"Do you want to continue?\", \"Confirm\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); \n\t\tif (response == JOptionPane.NO_OPTION) {\n\t\t\tSystem.out.println(\"No button clicked\");\n\t\t} else if (response == JOptionPane.YES_OPTION) {\n\t\tSystem.out.println(\"Yes button clicked\");\n\t\t} else if (response == JOptionPane.CLOSED_OPTION) {\n\t\t\tSystem.out.println(\"JOptionPane closed\");\n\t\t}\n\t}", "private JButton getBtnOK() {\n if (btnOK == null) {\n btnOK = new JButton();\n btnOK.setText(\" OK \");\n btnOK.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n selected = true;\n setVisible(false);\n }\n });\n getRootPane().setDefaultButton(btnOK);\n }\n return btnOK;\n }", "public JButton getOkButton(){\n\t\treturn okButton;\n\t}", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent Event) {\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tint reply = JOptionPane.showConfirmDialog(null, getPanel(), \"Exit\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (reply == JOptionPane.NO_OPTION)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t System.exit(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tint reply = JOptionPane.showConfirmDialog(null, \"Are you sure you want to leave us behind, my liege?\", \"Close?\", JOptionPane.YES_NO_OPTION);\n\t\tif (reply == JOptionPane.YES_OPTION)\n\t\t{\n\t\t System.exit(0);\n\t\t}\n\t}", "private void okAction()\r\n\t{\r\n\t\tString navn = txfInput[0].getText().trim();\r\n\r\n\t\tint telefonNr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttelefonNr = Integer.parseInt(txfInput[1].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString vej = txfInput[2].getText().trim();\r\n\r\n\t\tint nr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tnr = Integer.parseInt(txfInput[3].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString etage = txfInput[4].getText().trim();\r\n\r\n\t\tint postNr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tpostNr = Integer.parseInt(txfInput[5].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString by = txfInput[6].getText().trim();\r\n\t\tString land = txfInput[7].getText().trim();\r\n\r\n\t\tif (navn.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Navn er tom\");\r\n\t\t\treturn;\r\n\t\t} else if (telefonNr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Telefon nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\telse if (vej.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Vej er tom\");\r\n\t\t\treturn;\r\n\t\t} else if (nr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (postNr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Post Nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (by.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"By er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (land.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Land er tom\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tFirma firma = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfirma = lvwFirmaer.getSelectionModel().getSelectedItem();\r\n\t\t} catch (NullPointerException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\r\n\t\tLedsager ledsager = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tledsager = lvwLedsagere.getSelectionModel().getSelectedItem();\r\n\t\t} catch (NullPointerException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif (deltager != null)\r\n\t\t{\r\n\t\t\tService.updateDeltager(deltager, firma, ledsager, navn, telefonNr, null, vej, nr, etage, postNr, by, land);\r\n\t\t} else\r\n\t\t{\r\n\t\t\tService.createDeltager(navn, telefonNr, null, vej, nr, etage, postNr, by, land);\r\n\t\t}\r\n\r\n\t\tthis.hide();\r\n\t}", "private void jMenuItemSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSalirActionPerformed\n LOG.trace(evt.paramString());\n\n int opc = JOptionPane.showConfirmDialog(this, \"Seguro que desea salir\",\n this.getTitle(), JOptionPane.YES_NO_OPTION);\n if (opc == 0) {\n System.exit(0);\n }\n}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n if (askUserYesNo(\"Do you really want to quit?\")) {\n if(askUserYesNo(\"Do you want to save game?\")){\n game.saveGame();\n }\n System.exit(0);\n }\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"OK\");\n\t\t\t\t\n\t\t\t}", "public void actionPerformed(ActionEvent oEvent) {\n if (oEvent.getActionCommand().equals(\"OK\")) {\n try {\n addFinishedData();\n } catch (ModelException e) {\n ErrorGUI oHandler = new ErrorGUI(this);\n oHandler.writeErrorMessage(e);\n return;\n }\n\n //Close this window\n this.setVisible(false);\n this.dispose();\n }\n else if (oEvent.getActionCommand().equals(\"Cancel\")) {\n //Close this window\n this.setVisible(false);\n this.dispose();\n } \n }", "public void actionPerformed(ActionEvent e) {\r\n String command = e.getActionCommand();\r\n if (command.equals(\"OK\")) {\r\n if (validateData()) {\r\n validData = true;\r\n setVisible(false);\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n TASKAggInfo agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n }\r\n }\r\n else if (command.equals(\"Cancel\")) {\r\n setVisible(false);\r\n }\r\n }", "void onOKPressed(Non_Negative_Integer_Counts_Trial nnicTrial);", "public boolean onOkClicked() {\n try {\n if (form.isValid()) {\n String userName = form.getFieldValue(SysUser.USER_NAME_PROPERTY);\n String userAccount = form.getFieldValue(SysUser.USER_ACCOUNT_PROPERTY);\n String passWord = form.getFieldValue(SysUser.USER_PASSWORD_PROPERTY);\n String cPassWord = form.getFieldValue(\"cPassWord\");\n if (!passWord.equals(cPassWord)) {\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setValue(\"\");\n form.getField(\"cPassWord\").setValue(\"\");\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setFocus(true);\n addModel(\"msg\", \"密码不一致\");\n } else if (SysUserDao.getInstance().canCreate(getSysUser().getObjectContext(), userAccount)) {\n if (SysUserDao.getInstance().createSysUser(getSysUser().getObjectContext(), userName, userAccount, passWord)) {\n setRedirect(UserListPage.class);\n } else {\n addModel(\"msg\", \"失败\");\n }\n } else {\n form.getField(SysUser.USER_ACCOUNT_PROPERTY).setFocus(true);\n addModel(\"msg\", \"账号已存在\");\n }\n }\n } catch (Exception e) {\n logger.error(e.getLocalizedMessage(), e);\n }\n return true;\n }", "public void onClick(DialogInterface arg0, int arg1) {\n\t \t //Declare Object From Get Internet Connection Status For Check Internet Status\n\t \t System.exit(0);\n\t \t\t\t arg0.dismiss();\n\t \t\t\t \n\t }", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean yes = false;\n\t\t\t\t// update the question text\n\t\t\t\tupdateQuestion(yes);\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t\tcon.setResult(btnName);\n\t\t\t}", "private void keluarMenuItemActionPerformed(java.awt.event.ActionEvent evt) {\n int exit = JOptionPane.showConfirmDialog(this, \"Anda yakin akan keluar ?\",\"\", JOptionPane.OK_CANCEL_OPTION);\n if(exit == JOptionPane.OK_OPTION){\n System.exit(0);\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean yes = true;\n\t\t\t\t// update the question text\n\t\t\t\tupdateQuestion(yes);\n\t\t\t}", "private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n \temployee.setId(Integer.parseInt(idLabel.getText()));\r\n \temployee.setFirstName(firstNameField.getText());\r\n \temployee.setLastName(lastNameField.getText());\r\n \temployee.setIndustry(industryField.getText());\r\n \temployee.setWorkType(workTypeField.getText());\r\n \temployee.setAddress(addressField.getText());\r\n \t\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n jlQuestion.setText(S_QUESTION_CONFIRMATION);\n jbNewOrderButton.setVisible(false);\n jbConfirm.setVisible(true);\n jbCancel.setVisible(true);\n }", "public void handleYesConfirmButtonAction(ActionEvent event) {\n if (updateItemPane.isVisible()){\n deleteItem();\n this.clearUpdateItemFields();\n }\n else if(updateCopyPane.isVisible()){\n deleteCopy();\n this.clearUpdateCopyFields();\n }\n maskPane.setVisible(false);\n confirmPane.setVisible(false);\n }", "@FXML\n private void handleOKPressed() {\n\n if (Authenticator.validatePassword(accountId.getText(), password.getText())) {\n application.accountLogging(accountId.getText());\n confirmLogin = true;\n dialogStage.close();\n } else {\n errorMessage.setVisible(true);\n }\n }", "@FXML\r\n void actionCancelButton(ActionEvent event) throws IOException {\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Alert\");\r\n alert.setContentText(\"Do you want to cancel your changes and return to the main screen?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n returnToMainScreen(event);\r\n }\r\n }", "protected void buttonPressed(String label)\r\n\t\t{\r\n\t\t\tif(label.equals(\"OK\"))\r\n\t\t\t{\r\n\t\t\t\t// Retrieve the mapping cell type setting\r\n\t\t\t\tString type = typeFilter.getSelectedButton();\r\n\t\t\t\tInteger typeSetting = type.equals(\"All\") ? MappingController.ALL : type.equals(\"System\") ? MappingController.SYSTEM : MappingController.USER;\r\n\t\t\t\t\r\n\t\t\t\t// Retrieve the mapping cell focus setting\r\n\t\t\t\tString focus = focusFilter.getSelectedButton();\r\n\t\t\t\tInteger focusSetting = focus.equals(\"All\") ? MappingController.ALL : focus.equals(\"Focused\") ? MappingController.FOCUSED : MappingController.UNFOCUSED;\r\n\t\t\t\t\r\n\t\t\t\t// Retrieve the mapping cell visibility setting\r\n\t\t\t\tString visibility = visibilityFilter.getSelectedButton();\r\n\t\t\t\tInteger visibilitySetting = visibility.equals(\"All\") ? MappingController.ALL : visibility.equals(\"Visible\") ? MappingController.VISIBLE : MappingController.HIDDEN;\r\n\t\t\t\t\r\n\t\t\t\t// Select or delete mapping cells\r\n\t\t\t\tif(mode.equals(SELECT))\r\n\t\t\t\t\tMappingController.selectMappingCells(harmonyModel, typeSetting, focusSetting, visibilitySetting);\r\n\t\t\t\telse MappingController.deleteMappingCells(harmonyModel, typeSetting, focusSetting, visibilitySetting);\r\n\t\t\t}\r\n\t\t\tdispose();\r\n\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n int score = answerCheck();\n try {\n Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score);\n setVisible(false);\n } catch (SQLException ex) {\n Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }" ]
[ "0.8416059", "0.7906154", "0.78761244", "0.7739544", "0.77332246", "0.771569", "0.75174195", "0.74180746", "0.7382377", "0.73555684", "0.72178215", "0.72037923", "0.7194231", "0.7191233", "0.71904606", "0.71682405", "0.715651", "0.71418244", "0.7114807", "0.7114807", "0.7114807", "0.7114807", "0.7114807", "0.71069425", "0.7085264", "0.7075029", "0.70705265", "0.7055838", "0.70545536", "0.7046767", "0.703976", "0.703976", "0.703976", "0.703976", "0.7002697", "0.69862056", "0.69862056", "0.698092", "0.69775015", "0.6973484", "0.69679415", "0.69630504", "0.6941934", "0.6923353", "0.69102204", "0.6901955", "0.689697", "0.6872456", "0.6852677", "0.6833846", "0.68303066", "0.6798041", "0.6769198", "0.6764644", "0.6754856", "0.6753201", "0.6729763", "0.67194957", "0.67098594", "0.67073095", "0.6706984", "0.6705648", "0.66950744", "0.6694761", "0.6694414", "0.66871697", "0.6685531", "0.66803443", "0.6662265", "0.66563904", "0.6656124", "0.66307944", "0.6613354", "0.659382", "0.6593508", "0.6580862", "0.6577513", "0.6566472", "0.65624386", "0.6557348", "0.6543933", "0.6539737", "0.6537175", "0.6528483", "0.65281624", "0.65212023", "0.65156114", "0.6504613", "0.6491378", "0.64871377", "0.64831454", "0.64815074", "0.64807713", "0.6469274", "0.64608675", "0.64530754", "0.644695", "0.64376223", "0.6435224", "0.642694", "0.64258504" ]
0.0
-1
User cancelled the dialog
public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cancelDialog() {dispose();}", "public void cancel() { Common.exitWindow(cancelBtn); }", "@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n }", "@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }", "void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }", "private void cancel(){\n\t\tSPSSDialog.instance = null;\n\t\thide();\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}", "@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}", "@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}", "public void onCancelClicked() {\n close();\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\r\n\r\n }", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "public void handleCancel() {\n\t\tdialogStage.close();\n\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void dialogCancelled(int dialogId) {\n\t\t\r\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}", "public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }", "public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }", "private void cancel() {\n\t\tfinish();\n\t}", "public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}", "@Override\n public void onCancel(DialogInterface arg0) {\n\n }", "@Override\n public void onClick(View v) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n finish();\n }", "@Override\n public void onCancel(DialogInterface dialog) {\n finish();\n }", "@Override\n\tpublic void onCancel(DialogInterface dialog) {\n\t\tBase.car_v.wzQueryDlg = null;\n\t}", "private void cancel(){\n if(isFormEmpty()){\n finish();\n }else{\n // Confirmation dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.cancel_booking_creation_confirmation));\n // When users confirms dialog, end activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n finish();\n });\n\n // Do nothing if cancel\n builder.setNegativeButton(android.R.string.cancel, null);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }\n }", "public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }", "@Override\n public void onClick(View v) {\n\n dialog.cancel();\n }", "public boolean cancel();", "@Override\n public void onCancel(DialogInterface dialog) {\n }", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}", "@Override\n public void onClick(DialogInterface dialog, int whichButton) {\n \tdialog.cancel(); //Close this dialog box\n }", "public void onCancelButtonClick() {\n close();\n }", "public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t\ttoastMessage(\"Confirmation cancelled\");\n\t\t\t}", "public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}", "public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}", "public void onDialogCancelled(DialogActivity dialog)\n {\n cancel();\n }", "void onCancelClicked();", "void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }", "public void onClick(DialogInterface dialog, int which) {\n\t\t\t dialog.cancel();\n\t\t\t }", "public void onClick(DialogInterface dialog, int arg1) {\n dialog.cancel();\n }", "@Override\r\n public void onCancel(DialogInterface dialogInterface) {\n finish();\r\n }", "protected void closeDialogCancel() {\n dispose();\n }", "@Override\n public void cancel() {\n super.cancel();\n\n /** Flag cancel user request\n */\n printingCanceled.set(true);\n\n /** Show a warning message\n */\n JOptionPane.showMessageDialog( MainDemo.this , \"Lorem Ipsum printing task canceled\", \"Task canceled\" , JOptionPane.WARNING_MESSAGE );\n }", "@Override\n public void onCancel(DialogInterface dialog) {\n Log.v(LOG_TAG, \"onCancel\");\n dismiss();\n }", "public void cancel()\n\t{\n\t}", "@Override\n public void onClick(View v)\n {\n begindialog.cancel();\n }", "public void cancel(){\n cancelled = true;\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n finish();\n }", "@Override\n public void onCancel(DialogInterface dialog) {\n\n }", "public void cancel() {\n if (alert != null) {\n alert.cancel();\n isShowing = false;\n } else\n TLog.e(TAG + \" cancel\", \"alert is null\");\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Pressed Cancel\",\n Toast.LENGTH_SHORT).show();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n finish();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n finish();\n }", "public void onCancel();", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }", "public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }", "public void onClick(DialogInterface dialog,int id)\n {\n dialog.cancel();\n }", "@Override\r\n\tpublic void onCancel(DialogInterface dialog) {\n\r\n\t}", "@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}", "@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}", "public void onClick(DialogInterface dialog,\n int id) {\n dialog.cancel();\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\t\n\t\t}" ]
[ "0.84252524", "0.81816214", "0.81397384", "0.80922073", "0.7927849", "0.79160905", "0.78777075", "0.78763556", "0.7856008", "0.7849157", "0.7848072", "0.7838308", "0.7804249", "0.77992254", "0.7796975", "0.7796975", "0.77921396", "0.7792013", "0.77904165", "0.77860636", "0.7785849", "0.7781991", "0.7781991", "0.7781991", "0.7775402", "0.7774749", "0.7774749", "0.77683115", "0.77681756", "0.77668333", "0.7761063", "0.7761063", "0.7761063", "0.7761063", "0.7761063", "0.7759365", "0.7731582", "0.7724297", "0.7720925", "0.7720103", "0.76955104", "0.7678485", "0.7654357", "0.7654357", "0.764555", "0.76443124", "0.7634409", "0.7633464", "0.7621916", "0.7621163", "0.7603697", "0.7603203", "0.7600248", "0.7598492", "0.7591874", "0.7591874", "0.7591339", "0.7590508", "0.7589548", "0.7589548", "0.7589548", "0.7589548", "0.7589548", "0.7589548", "0.7588744", "0.75886345", "0.7560806", "0.7550736", "0.7540379", "0.7539729", "0.7539729", "0.7534361", "0.7531358", "0.75296545", "0.7524118", "0.7523424", "0.75232726", "0.752038", "0.75199866", "0.7512266", "0.75083005", "0.7500499", "0.7497863", "0.7495073", "0.7493796", "0.7492944", "0.74797153", "0.74698204", "0.7465173", "0.74630636", "0.7460028", "0.7460028", "0.7458466", "0.7455514", "0.74514836", "0.7442903", "0.74414104", "0.7436282", "0.7436282", "0.74358857", "0.74198526" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(DialogInterface dialog, int which) { AceptarCofre(objeto.get(which)); }
{ "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
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.principal, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904536", "0.78052336", "0.7766536", "0.7727363", "0.76318616", "0.7621916", "0.7584545", "0.7530609", "0.74878335", "0.74571276", "0.74571276", "0.7438656", "0.7422694", "0.7403604", "0.73918706", "0.7387049", "0.7379379", "0.73706305", "0.7362634", "0.7356091", "0.7345742", "0.7341655", "0.7330208", "0.73284286", "0.7325726", "0.7319205", "0.731691", "0.73137385", "0.7304247", "0.7304247", "0.73017776", "0.7298307", "0.72933966", "0.7286999", "0.7283511", "0.72811604", "0.72787315", "0.7259994", "0.7259994", "0.7259994", "0.72595567", "0.72595537", "0.72501904", "0.7224887", "0.7219672", "0.7217532", "0.72043973", "0.72010916", "0.7199519", "0.71928704", "0.71855384", "0.7177209", "0.71689284", "0.7167426", "0.715412", "0.71537405", "0.7135554", "0.7134872", "0.7134872", "0.7129713", "0.7129041", "0.71240187", "0.7123551", "0.7123167", "0.71221936", "0.71173894", "0.71173894", "0.71173894", "0.71173894", "0.71170884", "0.7116871", "0.7116271", "0.7114722", "0.7112311", "0.7109584", "0.7108896", "0.7105745", "0.70993924", "0.70979136", "0.7095834", "0.70936936", "0.70936936", "0.70863414", "0.7083095", "0.7081166", "0.70801973", "0.7073687", "0.7068324", "0.7061727", "0.7060408", "0.7060199", "0.7051346", "0.70376796", "0.70376796", "0.7035851", "0.70354784", "0.70354784", "0.7032029", "0.70307976", "0.70294225", "0.70193213" ]
0.0
-1