query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
sequencelengths
19
20
metadata
dict
Returns whether or not a player is online with the given UUID.
boolean playerExists(UUID uuid);
[ "public boolean checkPlayerUUID (String uuid) {\n\t\treturn myConnector.doCheck(\"SELECT * FROM player WHERE uuid = '\"+ uuid +\"'\");\n\t}", "private boolean isOnline(@NonNull final UUID playerID) {\n if(Bukkit.getPlayer(playerID) == null) {\n return false;\n } else {\n return true;\n }\n }", "EnumWirelessConnectionState canPlayerConnect(UUID uuid);", "public boolean isOnline()\n\t{\n\t\treturn PlayerManager.getPlayer(name)!=null;\n\t}", "boolean isUserOnline( UUID uniqueId );", "public boolean isOnline() {\n \t\treturn (type == PLAYER_ONLINE);\n \t}", "public boolean isOnline(){\r\n\t\treturn Bukkit.getServer().getPlayer(player) != null;\r\n\t}", "public boolean isOnline ( ) {\n\t\treturn getBukkitPlayerOptional ( ).isPresent ( );\n\t}", "public boolean doesUserHaveActiveSession(String UUID)\r\n {\r\n return playerSetupSessions.containsKey(UUID);\r\n }", "boolean isWhitelisted(UUID player);", "boolean doeGameExistWithUUID(String uuid);", "public boolean checkPlayerIsConnected() {\n synchronized (startupLock) {\n if (alive && !playerConnected) {\n try {\n startupLock.wait();\n } catch (InterruptedException e) {\n log.error(e);\n }\n }\n return alive && playerConnected;\n }\n }", "public boolean canPlayOnline()\r\n\t{\r\n\t\treturn this.authentication.canPlayOnline();\r\n\t}", "boolean hasActivePlayers();", "public static boolean supportsUuid() {\n try {\n Bukkit.class.getDeclaredMethod(\"getPlayer\", UUID.class);\n } catch (NoSuchMethodException e) {\n return false;\n }\n return ServerUtil.getVersion().isCompatible(\"1.7.5\");\n }", "synchronized boolean isOnline(String username) {\n boolean status = false;\n for (User user : users)\n if (user.getUsername().equals(username))\n status = user.isOnline();\n return status;\n }", "boolean hasIsOnline();", "@Override\n public boolean hasAccount(OfflinePlayer offlinePlayer) {\n\n return offlinePlayer.hasPlayedBefore();\n\n }", "public static boolean hasPlayerFaction(UUID uuid) {\n\t\t\treturn EventHandlerFaction.hasUserFaction(uuid);\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This controller method is called when the request pattern is of type 'users/registration' and also the incoming request is of POST type
@RequestMapping(value = "users/registration", method = RequestMethod.POST) public String registerUser(User user) { //Complete this method //Call the business logic which currently does not store the details of the user in the database //After registration, again redirect to the registration page userService.registerUser(user); return "redirect:/users/login"; }
[ "@PostMapping(\"/register\")\r\n\tpublic void registerUser() {\r\n\t\tSystem.out.println(\"Register user\");\r\n\r\n\t}", "@GetMapping(\"/registration\")\n\t public String registration(Model model) {\n\t model.addAttribute(\"userForm\", new User());\n\t return \"registration\";\n\t }", "void register() {\n // handles invalid form\n if ((viewModel.isValidForm == null) || !viewModel.isValidForm.getValue()) {\n return;\n }\n // handles the registration request using an interactor\n RegistrationInteractor.sendRegisterRequest(viewModel.email.getValue(),\n viewModel.name.getValue(), viewModel.password.getValue(),\n viewModel.passwordConfirm.getValue(), new ResponseCallBack() {\n @Override\n public void onSuccess(JSONObject data) throws JSONException {\n owner.navigateToLogin();\n }\n @Override\n public void onFail(String errorMessage) {\n Log.wtf(\"Registration error\",errorMessage);\n }\n });\n\n }", "@GetMapping(\"/registration\")\n public String registration(Model model) {\n \t\n model.addAttribute(\"userForm\", new User());\n\n return \"registration\";\n }", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n frontController.dispatchRequest(Endpoint.USER, RequestMethod.POST, req, res);\n }", "@PostMapping(\"/registration\")\n public String registration(@ModelAttribute(\"userForm\") User userForm, BindingResult bindingResult) {\n \n \tuserValidator.validate(userForm, bindingResult); // Validates the user registration form inputs and binds the errors.\n\n if (bindingResult.hasErrors()) {\n return \"registration\";\n }\n\n userService.save(userForm);\n\n return \"redirect:/welcome\";\n }", "@RequestMapping(value = \"/register\", method = RequestMethod.POST,\n consumes = APPLICATION_FORM_URLENCODED_VALUE)\n public String createUser(@RequestParam Map<String, String> parameters,\n HttpServletRequest request, HttpSession session, Model model)\n {\n try\n {\n //verify reCAPTCHA\n verifyRecaptcha(parameters);\n\n // construct a list of attributes for the user based on the form\n // parameters\n List<Attribute> attributes = new ArrayList<>();\n for(String objectClass : settings.getObjectClasses())\n {\n attributes.add(new Attribute(\"objectClass\", objectClass.trim()));\n }\n attributes.add(new Attribute(\"ds-pwp-account-disabled\", \"true\"));\n String namingAttributeName = settings.getNamingAttribute();\n String namingAttributeValue = null;\n for(Map.Entry<String, String> e : parameters.entrySet())\n {\n // only handle attributes that are defined in the schema\n String name = e.getKey();\n if(schema.getAttributeType(name) != null)\n {\n String value = e.getValue().trim();\n if(!value.isEmpty())\n {\n attributes.add(new Attribute(name, value));\n }\n // take note of the naming attribute value for constructing the DN\n if(name.equals(namingAttributeName))\n {\n namingAttributeValue = value;\n }\n }\n }\n\n // make sure that the naming attribute was found\n if(namingAttributeValue == null)\n {\n model.addAttribute(\"error\", \"A naming attribute was not provided for '\" \n + namingAttributeName + \"'\");\n model.addAttribute(\"passwordRequirements\",\n getPasswordRequirements(null));\n populateRegistrationModel(parameters, model);\n return \"register\";\n }\n \n // create and add the user entry\n DN dn = new DN(new RDN(namingAttributeName, namingAttributeValue), baseDN);\n Entry entry = new Entry(dn, attributes);\n LDAPResult result = pool.add(entry);\n ResultCode resultCode = result.getResultCode();\n if(resultCode != ResultCode.SUCCESS)\n {\n model.addAttribute(\"error\", HtmlUtils.htmlEscape(resultCode + \" - \"\n + result.getDiagnosticMessage()));\n model.addAttribute(\"passwordRequirements\",\n getPasswordRequirements(null));\n populateRegistrationModel(parameters, model);\n return \"register\";\n }\n \n // send a single use token with a registration code\n DeliverRegistrationCodeResult codeResult = deliverRegistrationCode(\n entry.getDN());\n \n // put the DN in the session\n session.setAttribute(\"userDN\", dn.toString());\n // put the code result in the session and model\n session.setAttribute(\"result\", codeResult);\n model.addAttribute(\"result\", codeResult);\n \n return \"registration-verify\";\n }\n catch(LDAPException e)\n {\n log.error(\"Encountered error creating user\", e);\n model.addAttribute(\"error\", HtmlUtils.htmlEscape(e.getMessage()));\n model.addAttribute(\"passwordRequirements\", getPasswordRequirements(null));\n populateRegistrationModel(parameters, model);\n return \"register\";\n }\n catch(WebApplicationException e)\n {\n log.error(e.getMessage(), e);\n // add an accessible error to the model\n model.addAttribute(\"error\", HtmlUtils.htmlEscape(e.getMessage()));\n model.addAttribute(\"passwordRequirements\", getPasswordRequirements(null));\n populateRegistrationModel(parameters, model);\n return \"register\";\n }\n }", "public void processRegistration() {\n try {\n System.out.println(\"Processing Registration\");\n FacesContext c = FacesContext.getCurrentInstance();\n c.getApplication().getNavigationHandler().handleNavigation(c, null, \"register.xhtml\");\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "@POST\n @Path(\"/users/register\")\n public Response register(\n @Context HttpServletRequest request \n ,@Context HttpServletResponse response\n ,@Context ServletContext servletContext\n ,String raw\n ){\n try{\n log.debug(\"/register called\");\n// String raw=IOUtils.toString(request.getInputStream());\n mjson.Json x=mjson.Json.read(raw);\n \n Database2 db=Database2.get();\n for (mjson.Json user:x.asJsonList()){\n String username=user.at(\"username\").asString();\n \n if (db.getUsers().containsKey(username))\n db.getUsers().remove(username); // remove so we can overwrite the user details\n \n Map<String, String> userInfo=new HashMap<String, String>();\n for(Entry<String, Object> e:user.asMap().entrySet())\n userInfo.put(e.getKey(), (String)e.getValue());\n \n userInfo.put(\"level\", LevelsUtil.get().getBaseLevel().getRight());\n userInfo.put(\"levelChanged\", new SimpleDateFormat(\"yyyy-MM-dd\").format(new Date()));// nextLevel.getRight());\n \n db.getUsers().put(username, userInfo);\n log.debug(\"New User Registered (via API): \"+Json.newObjectMapper(true).writeValueAsString(userInfo));\n db.getScoreCards().put(username, new HashMap<String, Integer>());\n \n db.addEvent(\"New User Registered (via API)\", username, \"\");\n }\n \n db.save();\n return Response.status(200).entity(\"{\\\"status\\\":\\\"DONE\\\"}\").build();\n }catch(IOException e){\n e.printStackTrace();\n return Response.status(500).entity(\"{\\\"status\\\":\\\"ERROR\\\",\\\"message\\\":\\\"\"+e.getMessage()+\"\\\"}\").build(); \n }\n \n }", "public void registration() {\n this.registration_dialog(index_layout, \"user\");\n }", "@RequestMapping(value = \"/registrationRequests\", method = RequestMethod.GET)\n public String registrationRequests()\n {\n return \"registrationRequests\";\n }", "@PostMapping(value = \"/rest/appregistration\")\r\n \t@ResponseStatus(HttpStatus.CREATED)\r\n \t@ResponseBody\r\n \tpublic ResponseEntity createRegistration(@RequestBody RegistrationDto regObject) {\n \t\t\r\n \t\tRegistrationDto registrationDto = new RegistrationDto();\r\n\r\n\r\n \t\treturn new ResponseEntity(registrationDto, HttpStatus.OK);\r\n \t}", "@PostMapping(\"/register\")\r\n public Guardian createGuardian(@Valid @RequestBody RegistrationInfo registrationInfo) throws UserExistException {\r\n User user = userService.save(new User(registrationInfo));\r\n if (user != null) {\r\n return guardianRepository.save(new Guardian(registrationInfo));\r\n } else {\r\n throw new UserExistException(\"User is empty. Something went wrong.\");\r\n }\r\n }", "@Override\n public void registration(RegistrationForm registrationForm) {\n Users newUser = new Users();\n newUser.setFirstName(registrationForm.getFirstName());\n newUser.setLastName(registrationForm.getLastName());\n newUser.setEmail(registrationForm.getEmail());\n newUser.setPassword(passwordEncoder.encode(registrationForm.getPassword()));\n newUser.setRole(Role.USER);\n// users.setPassword(passwordEncoder.encode(registrationForm.getPassword()));\n userRepository.save(newUser);\n System.out.println(userRepository.findByEmail(newUser.getEmail()).isPresent());\n }", "@GetMapping(\"/registration\")\r\n\tpublic String registrationPage(Model model) {\n\t\tmodel.addAttribute(\"user\", new User());\r\n\t\treturn \"registration\";\r\n\t}", "@RequestMapping(value = \"/sign-up\", method = RequestMethod.POST)\n public ResponseEntity<StandardResponse> registerUser(@RequestBody SignUpForm signUpRequest) throws Exception {\n try {\n\n\n if (userRepository.existsByUsername(signUpRequest.getUsername())) {\n return new ResponseEntity<StandardResponse>(\n new StandardResponse(false, \"Fail -> Username already exists!\", null),\n HttpStatus.BAD_REQUEST);\n }\n\n if (userRepository.existsByEmail(signUpRequest.getEmail())) {\n return new ResponseEntity<StandardResponse>(\n new StandardResponse(false, \"Fail -> Email already uses!\", null),\n HttpStatus.BAD_REQUEST);\n }\n\n // Creating user's account\n User user = new User(signUpRequest.getName(), signUpRequest.getUsername(), signUpRequest.getEmail(),\n passwordEncoder.encode(signUpRequest.getPassword()), signUpRequest.getAvatar());\n\n Set<Role> roles = new HashSet<>();\n Role role = roleRepository.findByName(RoleName.ROLE_GUEST);\n roles.add(role);\n user.setRoles(roles);\n userRepository.save(user);\n\n return new ResponseEntity<StandardResponse>(\n new StandardResponse(true, \"User registered with GUEST successfully!\", null),\n HttpStatus.OK);\n } catch (Exception e) {\n e.printStackTrace();\n return new ResponseEntity<StandardResponse>(\n new StandardResponse(false, \"Fail -> Email already uses!\", null),\n HttpStatus.INTERNAL_SERVER_ERROR);\n }\n }", "@PostMapping(\"/register\")\n public ResponseEntity<Map<String, String>> registerUser(@RequestBody User user){ \n userService.registerUser(user);\n return new ResponseEntity<>(generateJWTTToken(user), HttpStatus.OK);\n }", "@PostMapping(\"/adduser\")\n\tpublic ResponseEntity<Response> addUser(@Valid @RequestBody RegistrationDto registrationDto) {\n\t\treturn new ResponseEntity<Response>(serviceImpl.addUser(registrationDto), HttpStatus.OK);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__IntConst__Group__1" $ANTLR start "rule__IntConst__Group__1__Impl" InternalSymboleoide.g:7998:1: rule__IntConst__Group__1__Impl : ( ( rule__IntConst__TypeAssignment_1 ) ) ;
public final void rule__IntConst__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSymboleoide.g:8002:1: ( ( ( rule__IntConst__TypeAssignment_1 ) ) ) // InternalSymboleoide.g:8003:1: ( ( rule__IntConst__TypeAssignment_1 ) ) { // InternalSymboleoide.g:8003:1: ( ( rule__IntConst__TypeAssignment_1 ) ) // InternalSymboleoide.g:8004:2: ( rule__IntConst__TypeAssignment_1 ) { before(grammarAccess.getIntConstAccess().getTypeAssignment_1()); // InternalSymboleoide.g:8005:2: ( rule__IntConst__TypeAssignment_1 ) // InternalSymboleoide.g:8005:3: rule__IntConst__TypeAssignment_1 { pushFollow(FOLLOW_2); rule__IntConst__TypeAssignment_1(); state._fsp--; } after(grammarAccess.getIntConstAccess().getTypeAssignment_1()); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__IntConst__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:7991:1: ( rule__IntConst__Group__1__Impl )\n // InternalSymboleoide.g:7992:2: rule__IntConst__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__IntConst__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Const__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:4731:1: ( ( ( rule__Const__TypeAssignment_1 ) ) )\n // InternalReflex.g:4732:1: ( ( rule__Const__TypeAssignment_1 ) )\n {\n // InternalReflex.g:4732:1: ( ( rule__Const__TypeAssignment_1 ) )\n // InternalReflex.g:4733:2: ( rule__Const__TypeAssignment_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getConstAccess().getTypeAssignment_1()); \n }\n // InternalReflex.g:4734:2: ( rule__Const__TypeAssignment_1 )\n // InternalReflex.g:4734:3: rule__Const__TypeAssignment_1\n {\n pushFollow(FOLLOW_2);\n rule__Const__TypeAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getConstAccess().getTypeAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__IntConst__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:7964:1: ( rule__IntConst__Group__0__Impl rule__IntConst__Group__1 )\n // InternalSymboleoide.g:7965:2: rule__IntConst__Group__0__Impl rule__IntConst__Group__1\n {\n pushFollow(FOLLOW_32);\n rule__IntConst__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__IntConst__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ConstExpr__Group_1__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9211:1: ( rule__ConstExpr__Group_1__2__Impl )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9212:2: rule__ConstExpr__Group_1__2__Impl\r\n {\r\n pushFollow(FOLLOW_rule__ConstExpr__Group_1__2__Impl_in_rule__ConstExpr__Group_1__218465);\r\n rule__ConstExpr__Group_1__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__ConstExpr__Group_1__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9222:1: ( ( RULE_INT ) )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9223:1: ( RULE_INT )\r\n {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9223:1: ( RULE_INT )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9224:1: RULE_INT\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getConstExprAccess().getINTTerminalRuleCall_1_2()); \r\n }\r\n match(input,RULE_INT,FOLLOW_RULE_INT_in_rule__ConstExpr__Group_1__2__Impl18492); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getConstExprAccess().getINTTerminalRuleCall_1_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__ConstExpr__Group_0__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9117:1: ( rule__ConstExpr__Group_0__1__Impl )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:9118:2: rule__ConstExpr__Group_0__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__ConstExpr__Group_0__1__Impl_in_rule__ConstExpr__Group_0__118279);\r\n rule__ConstExpr__Group_0__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__ConstDecl__Group_2_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:8603:1: ( ( ( rule__ConstDecl__Group_2_1_1__0 )* ) )\r\n // InternalGo.g:8604:1: ( ( rule__ConstDecl__Group_2_1_1__0 )* )\r\n {\r\n // InternalGo.g:8604:1: ( ( rule__ConstDecl__Group_2_1_1__0 )* )\r\n // InternalGo.g:8605:2: ( rule__ConstDecl__Group_2_1_1__0 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getConstDeclAccess().getGroup_2_1_1()); \r\n }\r\n // InternalGo.g:8606:2: ( rule__ConstDecl__Group_2_1_1__0 )*\r\n loop80:\r\n do {\r\n int alt80=2;\r\n int LA80_0 = input.LA(1);\r\n\r\n if ( (LA80_0==RULE_ID||LA80_0==46) ) {\r\n alt80=1;\r\n }\r\n\r\n\r\n switch (alt80) {\r\n \tcase 1 :\r\n \t // InternalGo.g:8606:3: rule__ConstDecl__Group_2_1_1__0\r\n \t {\r\n \t pushFollow(FOLLOW_57);\r\n \t rule__ConstDecl__Group_2_1_1__0();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return ;\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop80;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getConstDeclAccess().getGroup_2_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Const__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:8926:1: ( rule__Const__Group__1__Impl rule__Const__Group__2 )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:8927:2: rule__Const__Group__1__Impl rule__Const__Group__2\r\n {\r\n pushFollow(FOLLOW_rule__Const__Group__1__Impl_in_rule__Const__Group__117905);\r\n rule__Const__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Const__Group__2_in_rule__Const__Group__117908);\r\n rule__Const__Group__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__IntConst__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:7976:1: ( ( () ) )\n // InternalSymboleoide.g:7977:1: ( () )\n {\n // InternalSymboleoide.g:7977:1: ( () )\n // InternalSymboleoide.g:7978:2: ()\n {\n before(grammarAccess.getIntConstAccess().getIntConstAction_0()); \n // InternalSymboleoide.g:7979:2: ()\n // InternalSymboleoide.g:7979:3: \n {\n }\n\n after(grammarAccess.getIntConstAccess().getIntConstAction_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XIntLiteral__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2911:1: ( rule__XIntLiteral__Group_1__1__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2912:2: rule__XIntLiteral__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XIntLiteral__Group_1__1__Impl_in_rule__XIntLiteral__Group_1__16199);\n rule__XIntLiteral__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PointConst__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:8650:1: ( ( ( rule__PointConst__TypeAssignment_1 ) ) )\n // InternalSymboleoide.g:8651:1: ( ( rule__PointConst__TypeAssignment_1 ) )\n {\n // InternalSymboleoide.g:8651:1: ( ( rule__PointConst__TypeAssignment_1 ) )\n // InternalSymboleoide.g:8652:2: ( rule__PointConst__TypeAssignment_1 )\n {\n before(grammarAccess.getPointConstAccess().getTypeAssignment_1()); \n // InternalSymboleoide.g:8653:2: ( rule__PointConst__TypeAssignment_1 )\n // InternalSymboleoide.g:8653:3: rule__PointConst__TypeAssignment_1\n {\n pushFollow(FOLLOW_2);\n rule__PointConst__TypeAssignment_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPointConstAccess().getTypeAssignment_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ConstantDefinition__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4704:1: ( rule__ConstantDefinition__Group__2__Impl )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4705:2: rule__ConstantDefinition__Group__2__Impl\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__ConstantDefinition__Group__2__Impl_in_rule__ConstantDefinition__Group__29822);\r\n rule__ConstantDefinition__Group__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XIntLiteral__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:15470:1: ( rule__XIntLiteral__Group__1__Impl )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:15471:2: rule__XIntLiteral__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XIntLiteral__Group__1__Impl_in_rule__XIntLiteral__Group__131171);\r\n rule__XIntLiteral__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__ConstDecl__Group_2_1__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:8618:1: ( rule__ConstDecl__Group_2_1__2__Impl )\r\n // InternalGo.g:8619:2: rule__ConstDecl__Group_2_1__2__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__ConstDecl__Group_2_1__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void ruleIntConst() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:716:2: ( ( ( rule__IntConst__Group__0 ) ) )\n // InternalSymboleoide.g:717:2: ( ( rule__IntConst__Group__0 ) )\n {\n // InternalSymboleoide.g:717:2: ( ( rule__IntConst__Group__0 ) )\n // InternalSymboleoide.g:718:3: ( rule__IntConst__Group__0 )\n {\n before(grammarAccess.getIntConstAccess().getGroup()); \n // InternalSymboleoide.g:719:3: ( rule__IntConst__Group__0 )\n // InternalSymboleoide.g:719:4: rule__IntConst__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__IntConst__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntConstAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Const__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:4692:1: ( rule__Const__Group__0__Impl rule__Const__Group__1 )\n // InternalReflex.g:4693:2: rule__Const__Group__0__Impl rule__Const__Group__1\n {\n pushFollow(FOLLOW_36);\n rule__Const__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Const__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AssignmentExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9417:1: ( rule__AssignmentExpression__Group__1__Impl )\n // InternalReflex.g:9418:2: rule__AssignmentExpression__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__AssignmentExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAssignment__Group_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5321:1: ( rule__XAssignment__Group_1_1__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5322:2: rule__XAssignment__Group_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1__1__Impl_in_rule__XAssignment__Group_1_1__111251);\n rule__XAssignment__Group_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ConstDecl__Group_2_1_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:8645:1: ( rule__ConstDecl__Group_2_1_1__0__Impl rule__ConstDecl__Group_2_1_1__1 )\r\n // InternalGo.g:8646:2: rule__ConstDecl__Group_2_1_1__0__Impl rule__ConstDecl__Group_2_1_1__1\r\n {\r\n pushFollow(FOLLOW_25);\r\n rule__ConstDecl__Group_2_1_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__ConstDecl__Group_2_1_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines which elements are affected by a mouse scroll event and initiates a UI event on those elements
public void handleScrollEvent(CMouse mouse, float difference) { if (!isEnabled || isTransitioning) { return; } }
[ "void onScrolling();", "public interface UniScrollListener\n{\n void onScrollChanged(int x, int y, int oldX, int oldY);\n}", "void onMyScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY);", "private void setupScrollViews() {\n parent = findViewById(R.id.parent_scroll_view);\n child = findViewById(R.id.child_scroll_view1);\n\n parent.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n Log.v(\"TAG\", \"PARENT_TOUCH\");\n parent.requestDisallowInterceptTouchEvent(false);\n return false;\n }\n });\n\n child.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n Log.v(\"TAG\", \"CHILD_DESCRIPTION\");\n parent.requestDisallowInterceptTouchEvent(true);\n return false;\n }\n });\n }", "void mouseWheelEvent(int x, int y, int count, boolean mod1, boolean mod2);", "public void scroll();", "public abstract void mouseWheel(MouseWheelEvent mouseWheelEvent);", "void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY);", "void onScrollingStarted(AbWheelView wheel);", "public void onScrollChange(android.view.View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY);", "public void handleScrollBarUpdate(ScrollBar scrollBar);", "@Override\n public void onScrolling() {\n\n\n }", "protected void scrollPaneComponentShown(ComponentEvent e) { }", "protected void scrollPaneComponentMoved(ComponentEvent e) { }", "private void handleScrollerMotion() {\n if (shouldIgnoreScrollbarEvent_) {\n // Ignoring this one, but we'll publish the next one, unless this\n // variable gets reset of course.\n shouldIgnoreScrollbarEvent_ = false;\n }\n else {\n bus_.post(new ScrollPositionEvent(this, scrollbar_.getValue()));\n }\n }", "@Override public void computeScroll() {\n super.computeScroll();\n if (scroller != null) {\n scroller.computeScroll();\n }\n }", "public void addMouseWheelListener(MouseWheelListener mouseWheelListener);", "@Test\n public void testSlowScroll() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }", "public interface OnScrollViewListener {\nvoid onScrollChanged(ScrollView scroll,int x, int y, int oldx, int oldy);\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints an error with backtrace to the error stream. MRI: eval.c error_print()
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } if (RubyException.TRACE_TYPE == RubyException.RUBINIUS) { printRubiniusTrace(excp); return; } ThreadContext context = getCurrentContext(); IRubyObject backtrace = excp.callMethod(context, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil() || !(backtrace instanceof RubyArray)) { if (context.getFile() != null) { errorStream.print(context.getFile() + ":" + context.getLine()); } else { errorStream.print(context.getLine()); } } else if (((RubyArray) backtrace).getLength() == 0) { printErrorPos(context, errorStream); } else { IRubyObject mesg = ((RubyArray) backtrace).first(); if (mesg.isNil()) { printErrorPos(context, errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getRuntimeError() && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } excp.printBacktrace(errorStream); }
[ "public void printError(RubyException excp) {\n if (excp == null || excp.isNil()) {\n return;\n }\n \n- if (RubyException.TRACE_TYPE == RubyException.RUBINIUS) {\n- printRubiniusTrace(excp);\n- return;\n- }\n-\n- ThreadContext context = getCurrentContext();\n- IRubyObject backtrace = excp.callMethod(context, \"backtrace\");\n-\n PrintStream errorStream = getErrorStream();\n- if (backtrace.isNil() || !(backtrace instanceof RubyArray)) {\n- if (context.getFile() != null) {\n- errorStream.print(context.getFile() + \":\" + context.getLine());\n- }", "public void printError(RubyException excp) {\n if (excp == null || excp.isNil()) {\n return;\n }\n \n PrintStream errorStream = getErrorStream();\n errorStream.print(RubyInstanceConfig.TRACE_TYPE.printBacktrace(excp));\n }", "private static void eprint( String s ) { System.err.print( s ); }", "public void printStackTrace()\n {\n printStackTrace(System.err);\n }", "public void printStackTrace() {\n printStackTrace(System.err);\n }", "private void printError() {\n outputForUser.println(params.getError());\n }", "@Override\n public void printStackTrace() {\n printStackTrace(System.err);\n }", "private static void eprintln( String s ) { System.err.println( s ); }", "public void dumpErr(final String msg);", "void printError(String errorMsg, boolean displayHelp);", "void printStackTrace(Throwable e);", "public void error(String message){\r\n\t\tint id = Printer.nextErrorInstanceId++;\r\n\t\tSystem.out.println(this.clock()+\" ERROR #\"+id+\"\\n \"+this.user+\" : \"+message);\r\n\t}", "void PrintError(ReaderTokenizer readertokenizer, String message)\r\n {\r\n System.out.println(\"File error, line #\" + readertokenizer.lineno() + \": \" + message);\r\n }", "public void setErr(PrintStream err);", "public void printStackTrace(java.io.PrintStream out) {\r\n out.println(Res.bundle.format( ResIndex.ErrorCode, getClass().getName(), Integer.toString(getErrorCode()%1000)));\r\n if (exceptionChain == null)\r\n super.printStackTrace(out);\r\n else {\r\n super.printStackTrace(out);\r\n out.println(Res.bundle.getString(ResIndex.ChainedException));\r\n exceptionChain.printStackTrace(out);\r\n }\r\n }", "private void printErrorLog(final Error error) {\n\terrorLog.println(getTimeStemp() + \" \" + error.getMessage());\n\terror.printStackTrace(errorLog);\n }", "public void printStackTrace(java.io.PrintWriter s) {\r\n s.println(Res.bundle.format( ResIndex.ErrorCode, getClass().getName(), Integer.toString(getErrorCode()%1000)));\r\n if (exceptionChain == null)\r\n super.printStackTrace(s);\r\n else {\r\n super.printStackTrace(s);\r\n s.println(Res.bundle.getString(ResIndex.ChainedException));\r\n exceptionChain.printStackTrace(s);\r\n }\r\n }", "public void printErrors() {\n final int size = _errors.size();\n if (size > 0) {\n System.err.println(new ErrorMsg(ErrorMsg.COMPILER_ERROR_KEY));\n for (int i = 0; i < size; i++) {\n System.err.println(\" \" + _errors.get(i));\n }\n }\n }", "public PrintStream semantError(AbstractSymbol filename, TreeNode t) {\n \terrorStream.print(filename + \":\" + t.getLineNumber() + \": \");\n \treturn semantError();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns all the entities given a specific category in the sentence
public ArrayList<String> returnEntities(String category) { ArrayList<String> entities = new ArrayList<String>(); String s = classifier.classifyWithInlineXML(paragraphItself); Pattern p = Pattern.compile("(\\<\\b"+category+"\\b\\>)(.*?)(\\<\\/\\b"+category+"\\b\\>)"); Matcher m = p.matcher(s); ArrayList<String> matchesNER = new ArrayList<String>(); while (m.find()) { matchesNER.add(m.group(2)); } ArrayList<String> mathesNERWeight = new ArrayList<String>(); String replaceParagraph = paragraphItself.replace(",",""); String[] splitParagraph = replaceParagraph.split(" "); //ArrayList<String> splitParagraph = paragraphItself.split(" "); //splitParagraph[i] += "/"+i; for (int i = 0; i < splitParagraph.length; i++) { for (int j = 0; j < matchesNER.size(); j++) { String[] matchesNERSplit = matchesNER.get(j).split(" "); for (int k = 0; k < matchesNERSplit.length; k++) { try { if (splitParagraph[i].equalsIgnoreCase(matchesNERSplit[k])) { String keyWord = matchesNER.get(j); keyWord +="/"+i; mathesNERWeight.add(keyWord); //System.out.println(splitParagraph[i]+":"+matchesNERSplit[k]); i+=matchesNERSplit.length; } } catch (Exception e) { // TODO: handle exception } } } } //System.out.println(splitParagraph[0]); //System.out.println(matches_org); return mathesNERWeight; }
[ "public List<ListEntity> getListEntities(String phrase);", "public static HashMultimap<Word, EntityMention> getWord2Entities(JCas aJCas) {\n HashMultimap<Word, EntityMention> word2EntityMentions = HashMultimap.create();\n for (EntityMention em : UimaConvenience.getAnnotationList(aJCas, EntityMention.class)) {\n List<Word> coveredWords = JCasUtil.selectCovered(Word.class, em);\n for (Word coveredWord : coveredWords) {\n word2EntityMentions.put(coveredWord, em);\n }\n }\n return word2EntityMentions;\n }", "private static ImmutableSet<String> categorizeText(String text) throws IOException {\n ImmutableSet<String> categories = ImmutableSet.of();\n\n try (LanguageServiceClient client = LanguageServiceClient.create()) {\n Document document = Document.newBuilder().setContent(text).setType(Type.PLAIN_TEXT).build();\n ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(document).build();\n\n ClassifyTextResponse response = client.classifyText(request);\n\n categories = response.getCategoriesList()\n .stream()\n .flatMap(ReceiptAnalysis::parseCategory)\n .collect(ImmutableSet.toImmutableSet());\n } catch (ApiException e) {\n // Return empty set if classification request failed.\n return categories;\n }\n\n return categories;\n }", "public static ArrayList<String> entCateg(String entity) throws Exception {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\tif (entOffsetIndex == null) {\n\t\t\tSystem.out.println(\"entCateg loading index...\");\n\t\t\tloadEntityIndex();\n\t\t\tSystem.out.println(\"entCateg index loaded !!!\");\n\t\t}\n\n\t\tif (!entOffsetIndex.containsKey(entity)) {\n\t\t\t// System.out.println(\"Error: entOffsetIndex does not contain \" +\n\t\t\t// entity);\n\t\t\treturn null;\n\t\t}\n\n\t\tFile file = new File(basedir + \"entCateg\");\n\n\t\tRandomAccessFile rFile = new RandomAccessFile(file, \"r\");\n\n\t\t// System.out.println(entOffsetIndex.get(entity));\n\t\trFile.seek(entOffsetIndex.get(entity));\n\t\tString temp = rFile.readLine();\n\t\trFile.close();\n\t\tString arr[] = temp.split(\"\\t\");\n\n\t\tString temp1 = arr[1].substring(1, arr[1].length() - 1);\n\t\tString arr1[] = temp1.split(\",\");\n\n\t\tfor (String key : arr1) {\n\t\t\tlist.add(key.trim());\n\t\t}\n\n\t\treturn list;\n\t}", "private Vector<String> findEntities(String tweet) {\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(tweet);\n\n\t\t// run all Annotators on this text\n\t\tNERPipeline.annotate(document);\n\n\t\t// these are all the sentences in this document\n\t\t// a CoreMap is essentially a Map that uses class objects as keys and\n\t\t// has values with custom types\n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\n\t\tVector<String> entities = new Vector<String>();\n\t\tfor (CoreMap sentence : sentences) {\n\t\t\t// traversing the words in the current sentence\n\t\t\t// a CoreLabel is a CoreMap with additional token-specific methods\n\t\t\tfor (CoreLabel token : sentence.get(TokensAnnotation.class)) {\n\t\t\t\t// this is the text of the token\n\t\t\t\tString word = token.get(TextAnnotation.class);\n\t\t\t\t// this is the NER label of the token\n\t\t\t\tString ne = token.get(NamedEntityTagAnnotation.class);\n\t\t\t\t// if the enetitie is what we looking for, add to output\n\t\t\t\tif(ne.equals(\"PERSON\") || ne.equals(\"LOCATION\") || ne.equals(\"ORGANIZATION\"))\n\t\t\t\t\tentities.add(word + \":\" + ne);\n\t\t\t}\n\t\t}\n\t\treturn entities;\n\t}", "Map<String, Field> getEntitiesByVocabulary(String vocabulary);", "List<String> categoryTags();", "List<Category2> findByEntityAndCategoryGroup(Entity entity, char categoryGroup);", "Collection<Entity> getEntitiesWithTag(Tag tag);", "private void readKnownEntitiesFromFile(File entitiesFile) throws IOException {\n\n\t\tString extension = Files.getFileExtension(entitiesFile.getAbsolutePath());\n\n\t\tif (extension.equals(\"txt\")) {\n\t\t\tlog.info(\"Read Skills from txt-File: \" + entitiesFile.getAbsolutePath());\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(entitiesFile));\n\t\t\tString line = in.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tif (line.equals(\"\")) {\n\t\t\t\t\tline = in.readLine();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tString[] split = line.split(\" \");\n\t\t\t\tString keyword;\n\t\t\t\ttry {\n\t\t\t\t\tkeyword = Util.normalizeLemma(split[0]);\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t\t\tline = in.readLine();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tSet<InformationEntity> iesForKeyword = entities.get(keyword);\n\t\t\t\tif (iesForKeyword == null)\n\t\t\t\t\tiesForKeyword = new HashSet<InformationEntity>();\n\t\t\t\t// nicht kategorisierte IEs haben kein Label\n\t\t\t\tInformationEntity ie = new InformationEntity(keyword, split.length == 1, \"\");\n\t\t\t\tif (!ie.isSingleWordEntity()) {\n\t\t\t\t\tfor (String string : split) {\n\t\t\t\t\t\tie.addLemma(Util.normalizeLemma(string));\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboolean isnew = iesForKeyword.add(ie);\n\t\t\t\tif (isnew) {\n\t\t\t\t\tknownEntities++;\n\t\t\t\t}\n\t\t\t\tentities.put(keyword, iesForKeyword);\n\t\t\t\tline = in.readLine();\n\t\t\t}\n\t\t\tin.close();\n\t\t} else if (extension.equals(\"ttl\")) {\n\t\t\tlog.info(\"Read Skills from RDF Model: \" + entitiesFile.getAbsolutePath());\n\t\t\tentities = Util.readRDF(entitiesFile, entities);\n\t\t} else if (extension.equals(\"csv\")) {\n\t\t\tlog.info(\"Read Skills from CSV: \" + entitiesFile.getAbsolutePath());\n\t\t\tentities = Util.readCSV(entitiesFile, entities);\n\t\t} else {\n\t\t\tSystem.err.println(\"unbekanntes Dateiformat: \" + entitiesFile.getAbsolutePath());\n\t\t}\n\n\t}", "Set<String> listTranslations(String category);", "@Query(\"SELECT r FROM Recipe r JOIN FETCH r.category AS rc WHERE UPPER(rc.category) = UPPER(:category)\")\n Set<Recipe> findByCategory(@Param(\"category\") String category);", "private ArrayList<String> getEntities(String URL){ \n //Reset Message\n Message.setText(\"\");\n \n //Scan webpage and get urls related to image\n ArrayList<String> list = imageAgent.find(URLField.getText(),DepthSlider.getValue(),Language.getSelectedItem().toString().split(\" \")[1]); \n //Remove Duplicates, google cache and unnecessary links for optimizing search \n list = removeDuplicates(list); \n list.removeIf(s -> s.contains(\"https://webcache.googleusercontent.com/search?q\"));\n list.remove(\"#\");\n \n //Check if list is null\n if(list==null){\n Message.setText(\"Can't Find Any Source\");\n return null;\n } \n \n //Store entity type\n String EntityType = SearchType2.getSelectedItem().toString();\n \n //Get entities using my textAnalizer Class \n ArrayList<String> entities = textAnalizer.getEntities(list,Bar,EntityType, SearchType.getSelectedItem().toString().equals(\"PARALLEL\")); \n \n //If no entities relate to image found, set message\n if(entities.size()==0) \n Message.setText(\"Can't find any \"+EntityType+\" type entity.\");\n \n return entities; \n }", "public interface EntityExtractor {\r\n public ArrayList<String> searchEntities(String s);\r\n}", "@Override\n public ArrayList<News> findByCategory(String byCategory) throws DAOException {\n ArrayList<News> foundList = new ArrayList<News>();\n Document document = setDocument();\n NodeList nodeList = document.getElementsByTagName(CATEGORY);\n for (int i = 0; i < nodeList.getLength(); i++) {\n Node nNode = nodeList.item(i);\n Element element = (Element) nNode;\n String category = element.getAttribute(CATEGORY_NAME);\n String title = element.getElementsByTagName(TITLE).item(0).getTextContent();\n String author = element.getElementsByTagName(AUTHOR).item(0).getTextContent();\n String date = element.getElementsByTagName(DATE).item(0).getTextContent();\n if (category.equals(byCategory)) {\n foundList.add(new News(category, title, author, date));\n }\n }\n printFound(foundList);\n return foundList;\n }", "public void filteredLogCategory() {\n System.out.println(\"What category would you like to look for? \");\n String type = sc.next();\n\n Expense.Category category = parseCategory(type);\n\n print(tracker.getExpensesLog().findExpense(category));\n\n System.out.println(\"Your overall expenses total for this category is: \"\n + tracker.getExpensesLog().findTotalExpensesCategory(type));\n\n }", "List<Post> findAllBycategory(Category category);", "List<EmbeddedCategory> selectByExample(EmbeddedCategoryCriteria example);", "private static Stream<String> parseCategory(ClassificationCategory category) {\n return Stream.of(category.getName().substring(1).split(\"/| & \"));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when creating a ChatFragment, use tournament, club, receiver to specify whether it's a tournament chat, club chat or private chat. And use self to identify oneself
public static ChatFragment newInstance(Tournament tournament, Club club, Player receiver, Player self){ ChatFragment fragment = new ChatFragment(); Bundle bundle = new Bundle(); if ( tournament != null ) { bundle.putString(ARG_TOUR,tournament.toJson()); } if ( club != null ) { bundle.putString(ARG_CLUB,club.toJson()); } if ( receiver != null ) { bundle.putString(ARG_RECV,receiver.toJson()); } bundle.putString(ARG_SELF,self.toJson()); fragment.setArguments(bundle); return fragment; }
[ "public abstract Object getChatIdentifier();", "private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }", "public ChatRoomCreationMsgBehaviour( String name, String creatorPrimaryKey, boolean isBotChatRoom ) {\n super( name, creatorPrimaryKey );\n this.isBotChatRoom = isBotChatRoom;\n }", "public ChatFragment() {\n // Required empty public constructor\n }", "ChatWithServer.Relay getChatWithServerRelay();", "@Override\n public void onEnterToChatDetails() {\n\n }", "@Override\n public void onOpenChat(int theChatId) {\n if (theChatId == -1) {\n loadFragment(new StartChatFragment());\n } else {\n Intent intent = new Intent(this, ChatActivity.class);\n intent.putExtra(\"CHAT_ID\", String.valueOf(theChatId));\n startActivity(intent);\n }\n }", "public abstract void newChatMembersMessage(Message m);", "public abstract String getChatName();", "public void createChat() {\n\n ref.child(keyChat).child(\"recordatorio\").\n setValue(new Mensaje(getText(R.string.NoRecuerdaContra).toString(), \"ElBuenoDeManguima\"));\n }", "public void startPrivateChannelBtn(View v) {\n String myName = FirebaseAuth.getInstance().getCurrentUser().getDisplayName();\n String hisName = user.getDisplayName();\n String cidun;\n\n if (myName.compareTo(hisName) < 0) {\n cidun = myName + \"-\" + hisName;\n } else {\n cidun = hisName + \"-\" + myName;\n }\n\n String cid = cidun.replaceAll(\"\\\\s\",\"\")\n .replaceAll(\"[åäöÅÄÖ]\",\"\");\n\n\n Database.setPrivate(cid, true, res -> {\n Map<String, Boolean> data = new HashMap<String, Boolean>() {{\n put(myName, true);\n put(hisName, true);\n }};\n Database.channelSubscribe(cid, data, r -> {});\n });\n\n Fragment fragment = ChatFragment.newInstance(cid);\n AppCompatActivity activity = (AppCompatActivity)v.getContext();\n\n activity.getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragment_container, fragment, cid)\n .addToBackStack(cid)\n .commit();\n\n Log.d(\"New channel\" , \"\" + cid);\n\n }", "public OwnerMsgFragment() {\n }", "public int getChatType() {\n return chatType_;\n }", "private void initChatParticipants()\n {\n ChatRoom chatRoom = chatRoomWrapper.getChatRoom();\n if ((chatRoom != null) && chatRoom.isJoined()) {\n for (ChatRoomMember member : chatRoom.getMembers())\n chatParticipants.add(new ConferenceChatContact(member));\n }\n }", "public String getIdentifier()\n {\n return chatRoomName;\n }", "public interface IViewToChatroomAdapter {\n\n \n\tpublic void send(String text);\n\tpublic void removeUser();\n\tpublic void invitetoChatRoom(String text);\n\tpublic Set<IChatUser> getUsers();\n\tpublic String getChatroomName();\n\t\n\tstatic public IViewToChatroomAdapter NULL = new IViewToChatroomAdapter(){\n\n\t\t@Override\n\t\tpublic void send(String text) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t}\n\n\t\t@Override\n\t\tpublic void removeUser() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t}\n\n\t\t@Override\n\t\tpublic void invitetoChatRoom(String text) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t}\n\n\t\t@Override\n\t\tpublic Set<IChatUser> getUsers() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\treturn null;\n\t\t}\n\n\t\t@Override\n\t\tpublic String getChatroomName() {\n\t\t\treturn null;\n\t\t}\n\n\t\t@Override\n\t\tpublic void leave() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t}\n\t\t\n\t};\n\n\tpublic void leave();\n}", "public AdHocChatRoom getTargetAdHocChatRoom()\n {\n return chatRoom;\n }", "MUCRoom getChatRoom();", "io.yuri.yuriserver.packet.Protos.ChatOrBuilder getChatOrBuilder();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the image buttons panel.
public void setImageButtonsPanel(JPanel imageButtonsPanel) { this.imageButtonsPanel = imageButtonsPanel; }
[ "public void setAnswerImageButtonsPanel(JPanel answerImageButtonsPanel) {\r\n\t\tthis.answerImageButtonsPanel = answerImageButtonsPanel;\r\n\t}", "public void setControls() {\r\n if (getImageB() != null) {\r\n menuBuilder.setMenuItemEnabled(\"Close image(B)\", true);\r\n controls.addActiveImageControl();\r\n } else {\r\n menuBuilder.setMenuItemEnabled(\"Close image(B)\", false);\r\n controls.removeActiveImageControl();\r\n }\r\n\r\n userInterface.getMainFrame().setJMenuBar(menuBar);\r\n userInterface.getMainFrame().getContentPane().add(controls, BorderLayout.CENTER);\r\n userInterface.getMainFrame().pack();\r\n\r\n componentImage.useHighlight(true); // the controls point to this componentImage. Display the highlighter\r\n getActiveImage().notifyImageDisplayListeners(); // ie., componentImage.repaint();\r\n }", "private void changeInterface(int btnNo, String img) {\n for (int i = 0; i < panelList.length ; i++) {\n if (btnNo == i) {\n panelList[i].setVisible(true);\n continue;\n }\n \n panelList[i].setVisible(false);\n }\n \n buttonList[0].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/OverViewInactive.png\")));\n buttonList[1].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/AccountsInactive.png\")));\n buttonList[2].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/AccountActivitiesInactive.png\")));\n buttonList[3].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/ExpensesInactive.png\")));\n buttonList[4].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/EarningsInactive.png\")));\n buttonList[5].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/BudgetInactive.png\")));\n buttonList[6].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/ManageCategoriesInactive.png\")));\n buttonList[7].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/ReportsInactive.png\")));\n buttonList[8].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/ConfigurationInactive.png\")));\n buttonList[9].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/AboutInactive.png\")));\n buttonList[10].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/HelpInactive.png\")));\n \n buttonList[btnNo].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/epicsoft/expensemanager/guiImages/\"+img)));\n \n }", "private void initButtons() {\r\n // addComponentListener(this);\r\n\r\n ImageIcon icon;\r\n\r\n firstButton = initButton(\"first.gif\"); \r\n\r\n priorButton = new RepeatButton(new ImageIcon(JdbNavToolBar.class.getResource(\"image/prior.gif\"))); \r\n priorButton.addActionListener(this);\r\n priorButton.setMargin(new Insets(0, 0, 0, 0));\r\n add(priorButton);\r\n\r\n nextButton = new RepeatButton(new ImageIcon(JdbNavToolBar.class.getResource(\"image/next.gif\"))); \r\n nextButton.addActionListener(this);\r\n nextButton.setMargin(new Insets(0, 0, 0, 0));\r\n add(nextButton);\r\n\r\n lastButton = initButton(\"last.gif\"); \r\n\r\n insertButton = initButton(\"insert.gif\"); \r\n\r\n deleteButton = initButton(\"delete.gif\"); \r\n\r\n postButton = initButton(\"post.gif\"); \r\n\r\n cancelButton = initButton(\"cancel.gif\"); \r\n\r\n dittoButton = initButton(\"ditto.gif\"); \r\n\r\n saveButton = initButton(\"save.gif\"); \r\n\r\n refreshButton = initButton(\"refresh.gif\"); \r\n\r\n }", "public JPanel getImageButtonsPanel() {\r\n\t\treturn imageButtonsPanel;\r\n\t}", "@Override\n public void setImage(ImageIcon img , JButton btn) {\n btn.setIcon(img);\n this.Sym=img;\n }", "public JPanel getAnswerImageButtonsPanel() {\r\n\t\treturn answerImageButtonsPanel;\r\n\t}", "private void setCaptureButtonImages()\n\t{\n\t\tif(m_CaptureButtons == null)\n\t\t\treturn;\n\t\tCameraActivity camaraActivity = this.getCameraActivity();\n\t\tif(!Handle.isValid(m_CaptureButtonBgHandle))\n\t\t\tm_CaptureButtonBgHandle = m_CaptureButtons.setPrimaryButtonBackground(camaraActivity.getDrawable(R.drawable.capture_button_slow_motion_border), 0);\n\t\tif(!Handle.isValid(m_CaptureButtonIconHandle))\n\t\t\tm_CaptureButtonIconHandle = m_CaptureButtons.setPrimaryButtonIcon(camaraActivity.getDrawable(R.drawable.capture_button_slow_motion_icon), 0);\n\t}", "private void setRemoveFilesButtonPanel() {\n removeFileButtonsPanel = new RemoveFileButtonsPanel();\n removeFileButtonsPanel.setBackground(Color.WHITE);\n this.add(removeFileButtonsPanel, BorderLayout.CENTER);\n }", "public EnterpriseDataJPanel() {\n initComponents();\n setButtonImage();\n }", "public void buildButtons() {\r\n\t\tImage temp1= display_img.getImage();\r\n\t\tImageIcon img=new ImageIcon(temp1.getScaledInstance(800, 800, Image.SCALE_SMOOTH));\r\n\t\timg1 = img.getImage();\r\n\t\tfor(int y=0;y<10;y++) {\r\n\t\t\tfor(int x=0; x<10; x++) {\r\n\t\t\t\tImage image = Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(img1.getSource(), new CropImageFilter(x * 800 / 10, y * 800 / 10, 100, 100)));\r\n\t\t\t\tImageIcon icon = new ImageIcon(image);\r\n\t\t\t\tJButton temp = new JButton(icon);\r\n\t\t\t\ttemp.putClientProperty(\"position\", new Point(y,x));\r\n\t\t\t\tsolutions.add(new Point(y,x));\r\n\t\t\t\ttemp.putClientProperty(\"isLocked\", false);\r\n\t\t\t\ttemp.addMouseListener(new DragMouseAdapter());\r\n\t\t\t\tgrid[x][y]=temp;\r\n\r\n\t\t\t\tbuttons.add(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void updateImageButtonStates() {\n boolean b = (_imageDisplay != null);\n _selectAreaButton.setEnabled(b);\n _setFromImageButton.setEnabled(b);\n }", "private void setButtonPanelComponents(){\n\t\tJPanel buttonPane = new JPanel();\n\t\tbuttonPane.setPreferredSize(new Dimension(-1,32));\n\t\tbuttonPane.setBackground(Constant.DIALOG_BOX_COLOR_BG);\n\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\n\t\tsaveButton = Utilities.getInstance().initializeNewButton(\n\t\t\t-1, -1, -1, -1,\n\t\t\tImages.getInstance().saveBtnDialogImg,\n\t\t\tImages.getInstance().saveBtnDialogImgHover\n\t\t);\n\t\tbuttonPane.add(saveButton);\n\t\n\n\t\n\t}", "public void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\tfor (int i = 1; i < 101; i++) {\r\n\t\t\t\tbutton[i] = new JButton();\r\n\t\t\t\tbutton[i].setSize(70, 90);\r\n\t\t\t\tint height = button[i].getHeight();\r\n\t\t\t\tint width = button[i].getWidth();\r\n\t\t\t\tbutton[i].setOpaque(false);\r\n\t\t\t\tbutton[i].setContentAreaFilled(false);\r\n\t\t\t\tbutton[i].setBorderPainted(false);\r\n\r\n\t\t\t\tImageIcon icon2;\r\n\t\t\t\ticon2 = new ImageIcon(getClass().getResource(\r\n\t\t\t\t\t\t\"image/\" + i + \".jpg\"));\r\n\t\t\t\tImage img = icon2.getImage();\r\n\t\t\t\tImage newimg = img.getScaledInstance(width + 120, height,\r\n\t\t\t\t\t\tjava.awt.Image.SCALE_SMOOTH);\r\n\t\t\t\tImageIcon icon;\r\n\t\t\t\ticon = new ImageIcon(newimg);\r\n\r\n\t\t\t\tif (icon != null) {\r\n\t\t\t\t\t// button[i] = new JButton();\r\n\t\t\t\t\tbutton[i].setIcon(icon);\r\n\t\t\t\t\tbutton[i].addActionListener(new IconButtonHandler(i, icon));\r\n\t\t\t\t\tbuttonOrder[i] = i;\r\n\t\t\t\t\timageSize[i] = (Double) (double) (icon.getIconHeight() * icon\r\n\t\t\t\t\t\t\t.getIconWidth());\r\n\t\t\t\t}// end if\r\n\t\t\t}// end for\r\n\t\t\t\t// repopulate the buttons\r\n\t\t\timageCount = 1;\r\n\t\t\tfor (int i = imageCount; i < 21; i++) {\r\n\t\t\t\tpanelBottom1.add(button[buttonOrder[i]]);\r\n\t\t\t}// end for i\r\n\t\t\tint imageButNo = 0;\r\n\t\t\tint endImage = imageCount + 20;\r\n\t\t\tif (endImage <= 101) {\r\n\t\t\t\tpanelBottom1.removeAll();\r\n\t\t\t\tfor (int i = imageCount; i < endImage; i++) {\r\n\t\t\t\t\timageButNo = buttonOrder[i];\r\n\t\t\t\t\tpanelBottom1.add(button[imageButNo]);\r\n\t\t\t\t\tif (relevantSelected) {\r\n\t\t\t\t\t\tpanelBottom1.add(relevantButton[imageButNo]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\timageCount++;\r\n\t\t\t\t}// end for i\r\n\t\t\t\tpanelBottom1.revalidate();\r\n\t\t\t\tpanelBottom1.repaint();\r\n\t\t\t}// end if\r\n\t\t\tlastMethod = \"R\";\r\n\t\t}", "public JPanel imgButtons() {\n\t\tJPanel grid = new JPanel();\n\t\tgrid.setLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\n\t\tc.insets = new Insets(20,20,0,0);\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.weightx = 0.5;\n\t\tc.gridx = 0;\n\t\tc.gridy = 0;\n\t\tgrid.add(imgCourse, c);\n\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.weightx = 0.5;\n\t\tc.gridx = 1;\n\t\tc.gridy = 0;\n\t\tgrid.add(imgNatation, c);\n\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.weightx = 0.5;\n\t\tc.gridx = 2;\n\t\tc.gridy = 0;\n\t\tgrid.add(imgCyclisme, c);\n\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.weightx = 0.5;\n\t\tc.gridx = 0;\n\t\tc.gridy = 1;\n\t\tgrid.add(imgTennis, c);\n\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.weightx = 0.5;\n\t\tc.gridx = 1;\n\t\tc.gridy = 1;\n\t\tgrid.add(imgEchecs, c);\n\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.weightx = 0.5;\n\t\tc.gridx = 2;\n\t\tc.gridy = 1;\n\t\tgrid.add(imgRs, c);\n\n\t\treturn grid;\n\t}", "private void placeImageOnButtonsCreature(JButton listButtons[]) {\n\t\testuaryCreatureButtonImages(); // calls the image to initialize the pictures\n\t\tfor(int i = 0; i < GAME_BUTTONS.length && i < listButtons.length; i++){\n\t\t\tGAME_BUTTONS[i].setSize(48, 65);\n\t\t\tImage buttonImage = creatureImg[i].getScaledInstance(GAME_BUTTONS[i].getWidth(),\n\t\t\t\t\tGAME_BUTTONS[i].getHeight(), Image.SCALE_SMOOTH);\n\t\t\tImageIcon imgIcon = new ImageIcon(buttonImage);\n\t\t\tGAME_BUTTONS[i].setIcon(imgIcon);\t\n\t\t}\n\t}", "private void setRepeatButtonImage() {\n\t\tif (MusicUtils.mService == null)\n\t\t\treturn;\n\t\ttry {\n\t\t\tswitch (MusicUtils.mService.getRepeatMode()) {\n\t\t\t\tcase ApolloService.REPEAT_ALL:\n\t\t\t\t\tmRepeat.setImageResource(R.drawable.apollo_holo_light_repeat_all);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ApolloService.REPEAT_CURRENT:\n\t\t\t\t\tmRepeat.setImageResource(R.drawable.apollo_holo_light_repeat_one);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tmRepeat.setImageResource(R.drawable.apollo_holo_light_repeat_normal);\n\t\t\t\t\t// Theme chooser\n\t\t\t\t\tThemeUtils.setImageButton(getActivity(), mRepeat,\"apollo_repeat_normal\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(MusicUtils.mService.getShuffleMode()!=ApolloService.SHUFFLE_NONE){\n\t\t\t\tmRepeat.setImageResource(R.drawable.apollo_holo_light_shuffle_on);\n\t\t\t}\n\t\t} catch (RemoteException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public VisualizadorImagemJFrame() {\n initComponents();\n \n setLocationRelativeTo(null);\n \n AbrirAction abrirAction = new AbrirAction(this);\n jMenuItemAbrir.setAction(abrirAction);\n abrirBtn.setAction(abrirAction);\n intFrameImage.setVisible(false);\n }", "public void setUpButtonPanel() {\n\t\tpanelButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tpanelButton.setBackground(Color.DARK_GRAY);\n\n\t\tbuttonChan = new JButton(\"Set Channel\");\n\t\tbuttonChan.addActionListener(new SetChannelListener());\n\t\tbuttonStart = new JButton(\"Start Bets\");\n\t\tbuttonStart.addActionListener(new StartBetListener());\n\t\tbuttonClose = new JButton(\"Close Bets\");\n\t\tbuttonClose.addActionListener(new CloseBetListener());\n\t\tbuttonEnd1 = new JButton(\"Bet 1 Wins\");\n\t\tbuttonEnd1.addActionListener(new EndBetListener1());\n\t\tbuttonEnd2 = new JButton(\"Bet 2 Wins\");\n\t\tbuttonEnd2.addActionListener(new EndBetListener2());\n\t\tbuttonStop = new JButton(\"Stop Bot\");\n\t\tbuttonStop.addActionListener(new StopListener());\n\n\t\tbuttonLogin = new JButton(\"Login\");\n\t\tbuttonLogin.addActionListener(new LoginListener());\n\t\tbuttonLoad = new JButton(\"Load Previous Settings\");\n\t\tbuttonLoad.addActionListener(new LoadListener());\n\n\t\tbuttonClose.setVisible(false);\n\t\tbuttonEnd1.setVisible(false);\n\t\tbuttonEnd2.setVisible(false);\n\t\tbuttonStop.setVisible(false);\n\t\tbuttonChan.setVisible(false);\n\t\tbuttonStart.setVisible(false);\n\t\tbuttonLoad.setVisible(false);\n\n\t\tpanelButton.add(buttonChan);\n\t\tpanelButton.add(buttonStart);\n\t\tpanelButton.add(buttonClose);\n\t\tpanelButton.add(buttonEnd1);\n\t\tpanelButton.add(buttonEnd2);\n\t\tpanelButton.add(buttonStop);\n\t\tpanelButton.add(buttonLogin);\n\t\tpanelButton.add(buttonLoad);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if all numbers from 1 to given limit satisfy Collatz conjecture
public static boolean testCollatzConjecture(int limit) { Set<Integer> verified = new HashSet<>(); verified.add(1); for (int number = 2; number <= limit; number++) { if (!verified.contains(number)) { Set<Integer> steps = new HashSet<>(); int currentDecompositionStep = number; steps.add(currentDecompositionStep); while (!verified.contains(currentDecompositionStep)) { currentDecompositionStep = collatzConjectureStep(currentDecompositionStep); if (steps.contains(currentDecompositionStep)) return false; else steps.add(currentDecompositionStep); } verified.addAll(steps); } } return true; }
[ "boolean hasCannabinoids();", "int checkMandelbrot(CNumber number, int iterations, double threshold) {\n\n CNumber n = new CNumber();\n int reached = -1;\n\n n = CNumber.add(n, number);\n\n for (int i = 0; i < iterations; i++) {\n n = CNumber.add(CNumber.multiply(n, n), number); // CNumber.multiply(n, n)\n if ((n.getReal() + n.getImag()) > threshold) {\n reached = i;\n break;\n }\n }\n\n return reached;\n }", "private static boolean isLimitReached(double perplexity) {\n\t\tif(perplexity_array[0]==0 || Math.abs(perplexity-perplexity_array[0])<1)\n\t\t{\n\t\t\tperplexity_array[0]=perplexity; \n\t\t\tconsecutiveIterations++;\n\t\t\tif(consecutiveIterations==5) \n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\tperplexity_array[0]=perplexity; // storing the value to compare it with next iteration\n\t\tconsecutiveIterations=0;\n\t\treturn false;\n\t}", "@Test\n public void testIsInLimitUpper() {\n Assertions.assertFalse(saab.isInLimit(.5, 1.5, 2.0));\n }", "public boolean whileLoopCondition(BigInteger number, List<BigInteger> currentCollatzPath, OptionsHelper opts) {\n return number.compareTo(BigInteger.ONE) > 0 && currentCollatzPath.size() < opts.getNumSteps();\n }", "private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }", "private boolean constraint2(int x, int y, int z)\n {\n return A * x + B * y < C * z - 3;\n }", "boolean isSetUpperLimit();", "public static void collatzRecursive(long n) {\n\t\tSystem.out.print(n + \" \");\n \tif (n == 1) return;\n \t\telse if (n % 2 == 0) collatzRecursive(n / 2);\n \t\telse collatzRecursive(3*n + 1);\n }", "@Test\n public void ab2cb() {\n LogicalOlapScan student = new LogicalOlapScan(RelationUtil.newRelationId(), PlanConstructor.student);\n LogicalLimit<LogicalOlapScan> limit10 = new LogicalLimit<>(10, 0, LimitPhase.ORIGIN, student);\n LogicalLimit<LogicalOlapScan> limit5 = new LogicalLimit<>(5, 0, LimitPhase.ORIGIN, student);\n\n PlanChecker.from(connectContext, limit10)\n .applyBottomUp(\n logicalLimit().when(limit10::equals).then(limit -> limit5)\n )\n .checkGroupNum(2)\n .matchesFromRoot(\n logicalLimit(\n logicalOlapScan().when(student::equals)\n ).when(limit5::equals)\n );\n }", "@Test\r\n\tpublic void testmaxMirror_NegativeTest(){\r\n\t\t\tassertNotEquals(4, arrOperations.countClumps(new int[]{1,1,2,3}));\r\n\t}", "private boolean constraint1(int x, int y, int z)\n {\n return A * x + B * y > C * z;\n }", "public boolean passesBoundTest(double n){\n if (inBounds(n) || !toggle) \n return true;\n else return false;\n }", "public boolean isValid(int t, int z)\r\n {\r\n return t<8 && t>=0 && z<8 && z>=0;\r\n }", "public static boolean isRamanujan(long n) {\n int count = 0;\n long cubeRootOfN = (long) Math.cbrt(n);\n\n for (long a = 1; a <= cubeRootOfN; a++) {\n long a3 = a * a * a;\n double guessB = Math.cbrt(n - a3);\n\n if (count >= 2) {\n break;\n }\n\n if ((guessB % 1 == 0.0) && (guessB > a)) {\n count++;\n }\n\n }\n return count == 2;\n\n }", "private static int solution(int a1, int a0, int c, int n0) {\n if(a1*n0+a0 <= c*n0 && a1 <= c) return 1;\n return 0;\n }", "private boolean constraint3(int x, int y, int z)\n {\n return A * x + B * y + C > 4 * z;\n }", "public boolean hasTeen(int a, int b, int c) {\n if(a>12&&a<20 || b>12&&b<20 || c>12&&c<20)\n return true;\n return false;\n}", "public static int collatz(int num){\r\n\t\t//create a sccanner for input\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\t//create a variable to track the number of times it takes to reach to one\r\n\t\tint numTimes=0;\r\n\t\tSystem.out.println(\"Your starting number is \" + num + \".\");\r\n\t\t//repeat until the break\r\n\t\twhile (num>1){\r\n\t\t\t//if the number is even\r\n\t\t\tif (num%2==0){\r\n\t\t\t\tnum/=2;\r\n\t\t\t\tSystem.out.println(numTimes + \": \" + num);\r\n\t\t\t\tnumTimes+=1;\r\n\t\t\t}else{\r\n\t\t\t\tnum=num*3+1;\r\n\t\t\t\tSystem.out.println(numTimes + \": \" + num);\r\n\t\t\t\tnumTimes+=1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//remove 1 for the starting int\r\n\t\tnumTimes-=1;\r\n\t\t//return number of times taken to get to 1\r\n\t\treturn numTimes;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find a printable component.
protected Component findPrintableComponent () { int i = tabbedPane.getSelectedIndex(); TableOfContentsPanel tocPanel = (TableOfContentsPanel)panels[i]; return tocPanel.getTree(); }
[ "public Printable getPrintableComponent();", "public abstract Printable getPrintable();", "private static JComponent findPropertySheetTab(ContainerOperator contOper, String tabName) {\n ComponentChooser chooser = new PropertySheetTabChooser();\n ComponentSearcher searcher = new ComponentSearcher((Container)contOper.getSource());\n searcher.setOutput(TestOut.getNullOutput());\n Component comp = searcher.findComponent(chooser);\n if(comp == null) {\n return null;\n }\n JTabbedPaneOperator tabbed = new JTabbedPaneOperator((JTabbedPane)comp.getParent());\n int count = tabbed.getTabCount();\n for(int i=0; i < count; i++) {\n if(contOper.getComparator().equals(tabbed.getTitleAt(i), tabName)) {\n tabbed.selectPage(i);\n return (JComponent)tabbed.getSelectedComponent();\n }\n }\n return null;\n }", "public static PrintService findPrinter(Object o) {\n PrintService exact = null;\n PrintService begins = null;\n PrintService partial = null;\n \n String printerName;\n if (o == null) {\n return null;\n } else if (o instanceof String) {\n printerName = \"\\\\Q\" + (String) o + \"\\\\E\";\n } else if (o instanceof PrintService) {\n return (PrintService) o;\n } else {\n printerName = \"\\\\Q\" + o.toString() + \"\\\\E\";\n }\n\n // Get print service list\n getPrinterList();\n\n LogIt.log(Level.INFO, \"Found \" + printers.length + \" attached printers.\");\n LogIt.log(Level.INFO, \"Printer specified: \" + printerName);\n\n Pattern p1 = Pattern.compile(\"\\\\b\" + printerName + \"\\\\b\", Pattern.CASE_INSENSITIVE);\n Pattern p2 = Pattern.compile(\"\\\\b\" + printerName, Pattern.CASE_INSENSITIVE);\n Pattern p3 = Pattern.compile(printerName, Pattern.CASE_INSENSITIVE);\n \n // Search for best match by name\n for (PrintService ps : printers) {\n String sysPrinter = ((PrinterName) ps.getAttribute(PrinterName.class)).getValue();\n\n Matcher m1 = p1.matcher(sysPrinter);\n Matcher m2 = p2.matcher(sysPrinter);\n Matcher m3 = p3.matcher(sysPrinter);\n\n if (m1.find()) {\n exact = ps;\n LogIt.log(\"Printer name match: \" + sysPrinter);\n } else if (m2.find()) {\n begins = ps;\n LogIt.log(\"Printer name beginning match: \" + sysPrinter);\n } else if (m3.find()) {\n partial = ps;\n LogIt.log(\"Printer name partial match: \" + sysPrinter);\n }\n }\n \n // Return closest match\n if (exact != null) {\n LogIt.log(\"Using best match: \" + exact.getName());\n return exact;\n } else if (begins != null) {\n LogIt.log(\"Using best match: \" + begins.getName());\n return begins;\n } else if (partial != null) {\n LogIt.log(\"Using best match: \" + partial.getName());\n return partial;\n }\n\n // Couldn't find printer\n LogIt.log(Level.WARNING, \"Printer not found: \" + printerName);\n return null;\n }", "@Function\n public static UIComponent findComponent(String id) {\n return findComponent(FacesContext.getCurrentInstance(), id);\n }", "public Object getPrinter(PageFormat pf);", "public JPanel getPanelFind() {\n return panelFind;\n }", "protected boolean isPrint(CtExecutableReference executable) {\n String toString = executable.toString();\n return toString.startsWith(\"java.io.PrintStream.println(\")\n || toString.startsWith(\"java.io.PrintStream.print(\");\n }", "public void printComponent() {\n if (textPane != null) {\n try {\n textPane.print();\n } catch (PrinterException ex) {\n return;\n }\n }\n }", "abstract java.awt.Component getComponent(java.lang.Object object);", "public abstract String getTextToPrint(JCas aJCas);", "public WXComponent findChildByRef(WXComponent component, String ref){\n if(ref.equals(component.getRef())){\n return component;\n }\n if(component instanceof WXVContainer){\n WXVContainer container = (WXVContainer) component;\n for(int i=0; i<container.getChildCount(); i++){\n WXComponent child = findChildByRef(container.getChild(i), ref);\n if(child != null){\n return child;\n }\n }\n }\n return null;\n }", "LWComponentPeer<?, ?> findPeerAt(final int x, final int y) {\n final Rectangle r = getBounds();\n final Region sh = getRegion();\n final boolean found = isVisible() && sh.contains(x - r.x, y - r.y);\n return found ? this : null;\n }", "@SuppressWarnings(\"unchecked\") // Downcast from runtime check\n @Override\n public <X> X findComponent(Class<X> clazz)\n {\n if (clazz.isAssignableFrom(getClass()))\n { return (X) this;\n }\n else if (parent!=null)\n { return parent.<X>findComponent(clazz);\n }\n else\n { return null;\n }\n }", "public FitInPagePrint(Component component) {\n super(component);\n }", "@Test\n public void testGetPrintableComponent() {\n System.out.println(\"getPrintableComponent\");\n DataItem instance = new DataItemImpl();\n Object expResult = null;\n Object result = instance.getPrintableComponent();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public DiagramComponent getComponent(int x, int y) {\n for (Message message : links.keySet()) {\n if (linkForMessage(message).isLabelHit(x,y))\n return message;\n }\n for (Party party : diagram.getParties()) {\n if (figureForParty(party).isHit(x,y))\n return party;\n }\n return null;\n }", "public org.openide.src.Element findElement(int offset);", "public Printable getPrintable(int pagenum) { return this; }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns name of latest commit (at index 0)
public String getLatestCommit() { if (name != null) { return name[0]; } else { return null; } }
[ "com.google.protobuf.ByteString getLastCommitHash();", "Commit getCurrentCommit() {\n String branchh = null;\n Commit prev = null;\n File currentB = new File(\".gitlet/current\");\n for (File file: currentB.listFiles()) {\n branchh = file.getName();\n }\n return deserializeCommit(\".gitlet/heads/\" + branchh);\n }", "public String getLastCommit() {\n return getCellContent(LAST_COMMIT);\n }", "Revision getLatestRevision();", "public static RevCommit getLatestCommit(Git git, String branchName) throws JGitFlowIOException\n {\n RevWalk walk = null;\n try\n {\n ObjectId branch = git.getRepository().resolve(branchName);\n walk = new RevWalk(git.getRepository());\n walk.setRetainBody(true);\n\n return walk.parseCommit(branch);\n }\n catch (IOException e)\n {\n throw new JGitFlowIOException(e);\n }\n finally\n {\n if (null != walk)\n {\n walk.close();\n }\n }\n }", "TCommit getLatestCommitForBranch(String branchName, TRepo repo);", "Commit getLastCommitDetails(Object requestBody) throws VersionControlException;", "public com.google.protobuf.ByteString getLastCommitHash() {\n return lastCommitHash_;\n }", "public com.google.protobuf.ByteString getLastCommitHash() {\n return lastCommitHash_;\n }", "com.github.jtendermint.jabci.types.Types.ResponseCommit getCommit();", "public String getLatestName() {\r\n\t this.waitForThread();\r\n\t return this.versionName;\r\n\t }", "java.lang.String getRevision();", "public Commit getHead() {\n return current;\n }", "String getReposRevision();", "HibBranch getLatestBranch();", "String getCommitStreamName();", "String getWorkfileRevisionString();", "com.github.jtendermint.jabci.types.Types.RequestCommit getCommit();", "long getCurrentRevision();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the company ID of this pathology data.
@Override public long getCompanyId() { return _pathologyData.getCompanyId(); }
[ "public long getCompanyId() {\n\t\treturn _room.getCompanyId();\n\t}", "public java.lang.String getCompanyId() {\n return companyId;\n }", "public long getCompanyId() {\n return _region.getCompanyId();\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _scienceApp.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _location.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _dictData.getCompanyId();\n\t}", "public long getCompanyId() {\n\t\treturn _instanceImage.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _workFlowConfig.getCompanyId();\n\t}", "public int getCompanyIdentifier() {\n return mCompanyIdentidier;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _ext_information.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _paper.getCompanyId();\n\t}", "public long getCompanyId() {\n\t\treturn _team.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _rule.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _modelo.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _changesetEntry.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _userInfo.getCompanyId();\n\t}", "public long getCompanyId() {\n\t\treturn _adsItem.getCompanyId();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
loadDish() Load data of a dish
public static Dish loadDish(Map<String, Object> document) { String _id = (String)document.get("dish_id"); String _name = (String)document.get("dish_name"); Number _price = (Number)document.get("dish_price"); String _description = (String)document.get("dish_description"); String _homeImage = (String)document.get("dish_home_image"); List<String> _moreImages = (ArrayList)document.get("dish_more_images"); String _menuId = (String)document.get("menu_id"); String _dishTypeId = (String)document.get("dish_type_id"); return new Dish(_id, _name, _price.intValue(), _description, _homeImage, _moreImages, _menuId, _dishTypeId); }
[ "public DishORM loadDishes() throws PersistentDataStoreException {\n return persistentDataStore.loadDishes();\n }", "public void loadDessert() {\n dessert.add(new Dish(\"Kinako Mochi\", 4.65));\n dessert.add(new Dish(\"Raspberry Pistachio Cream Tart\", 5.95));\n dessert.add(new Dish(\"Banana Cream Pie\", 5.95));\n dessert.add(new Dish(\"Sweet Potato Crepe\", 4.65));\n dessert.add(new Dish(\"Hojicha Parfait\", 4.65));\n dessert.add(new Dish(\"Chestnut Cake\", 5.25));\n dessert.add(new Dish(\"Tofu Ice Cream\", 3.75));\n }", "private void getDishData() {\n\n// // add dummy data reviews for each dish\n// // dummy reviews\n// Review review1 = new Review(\"This dish was excellent\", 5, true, \"User1\");\n// Review review2 = new Review(\"This dish was delicious\", 4, true, \"User2\");\n// Review review3 = new Review(\"This dish was mediocre\", 3, true, \"User3\");\n// // set dummy data reviews for each dish\n// for (int i = 0; i < dishes.size(); i++) {\n// Dish dish = dishes.get(i);\n// // check if there are already reviews for this dish\n// List<Review> dish_reviews = ((MenuApp)this.getApplication()).getDishReviews(dish.name);\n// if (dish_reviews.size() == 0) {\n// // if there are no reviews, add the 3 dummy reviews\n// ((MenuApp)this.getApplication()).addDishReview(dish.name, review1);\n// ((MenuApp)this.getApplication()).addDishReview(dish.name, review2);\n// ((MenuApp)this.getApplication()).addDishReview(dish.name, review3);\n// }\n// }\n\n // sort the dishes by rating\n Collections.sort(dishes, new Comparator<Dish>() {\n public int compare(Dish d1, Dish d2) {\n return d1.getDishRating() < d2.getDishRating() ? 1 : d1.getDishRating() > d2.getDishRating() ? -1 : 0;\n }\n });\n\n // get the top 3 rated dishes and add it to popular dishes (and remove it from the rest of the dishes)\n Dish dish1 = dishes.remove(0);\n Dish dish2 = dishes.remove(1);\n Dish dish3 = dishes.remove(2);\n popular_dishes = new ArrayList<>();\n popular_dishes.add(dish1);\n popular_dishes.add(dish2);\n popular_dishes.add(dish3);\n\n // sort the rest of the dishes alphabetically\n Collections.sort(dishes, new Comparator<Dish>() {\n public int compare(Dish d1, Dish d2) {\n return d1.getDishName().compareTo(d2.getDishName());\n }\n });\n }", "public void insertDish(FoodDish foodDish)\n {\n realm.beginTransaction();\n\n foodDish.setId(generateId());\n FoodDish dish = realm.createObject(FoodDish.class, foodDish.getId());\n dish.setName(foodDish.getName());\n dish.setIngredients(foodDish.getIngredients());\n dish.setRecipe(foodDish.getRecipe());\n realm.commitTransaction();\n }", "private static void getRandomDish(Scanner keyboard, File file, ArrayList<String> categoryList,\n ArrayList<String> dishList) throws FileNotFoundException {\n\n boolean satisfy;\n String changeCategory = \"\";\n\n do {\n File childFile = getChildFile(keyboard, file, categoryList);\n do {\n satisfy = generateRandomDish(keyboard, childFile, dishList);\n if (!satisfy) {\n System.out.print(ANSI.ANSI_PURPLE);\n System.out.print(\"\\nWould you like to generate a dish from a different category? \");\n changeCategory = keyboard.nextLine();\n System.out.print(ANSI.ANSI_RESET);\n }\n } while (!satisfy && (changeCategory.charAt(0) == 'N' || changeCategory.charAt(0) == 'n'));\n } while (!satisfy);\n }", "public void addDish(DishVO dish) {\n\t\t\tshoppingBasket.add(dish); // add dish \n\t}", "public void setDishOfTheDay(String _dishOfTheDay){\n dishOfTheDay = _dishOfTheDay;\n }", "public static Map<String, Object> createDishData(String _dishId, String _dishName, Integer _dishPrice, String _dishDescription, String _dishHomeImage, List<String> _dishMoreImages, String _menuId, String _dishTypeId) {\n Map<String, Object> dishData = new HashMap<>(); // Save data of dish\n\n dishData.put(\"dish_id\", _dishId);\n dishData.put(\"dish_name\", _dishName);\n dishData.put(\"dish_price\", _dishPrice);\n dishData.put(\"dish_description\", _dishDescription);\n dishData.put(\"dish_home_image\", _dishHomeImage);\n dishData.put(\"dish_more_images\", _dishMoreImages);\n dishData.put(\"menu_id\", _menuId);\n dishData.put(\"dish_type_id\", _dishTypeId);\n\n return dishData;\n }", "void loadData();", "public Dish getDishById(int dishById) {\n\t\tDish dish = null;\n\t\t\n\t\ttry (Connection connection = getConnection();\n \t\t// Query\n \t\tPreparedStatement preparedStatement = connection.prepareStatement(GET_DISH_BY_ID);) {\n\t\t\tpreparedStatement.setInt(1, dishById);\n \t\tSystem.out.println(preparedStatement);\n \t\t//Execute the query\n \t\tResultSet rs = preparedStatement.executeQuery();\n \t\t// Process Result\n \t\twhile(rs.next()) {\n \t\t\tint dishId = Integer.parseInt(rs.getString(\"dish_id\"));\n \t\t\tString dishName = rs.getString(\"dish_name\");\n \t\t\tString dishImage = rs.getString(\"dish_image\");\n \t\t\tint dishType = Integer.parseInt(rs.getString(\"dish_type\"));\n \t\t\tfloat dishPrice = Float.parseFloat(rs.getString(\"dish_price\"));\n \t\t\tdish = new Dish(dishId, dishName, dishImage, dishType, dishPrice);\n \t\t}\n \t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \treturn dish;\n\t}", "public List<Dish> getDishesByType(int dishtype) {\n\t\tList<Dish> dishes = new ArrayList<>();\n\t\t\n\t\ttry (Connection connection = getConnection();\n\t \t\t// Query\n\t \t\tPreparedStatement preparedStatement = connection.prepareStatement(GET_DISHES_BY_TYPE);) {\n\t \t\tpreparedStatement.setInt(1, dishtype);\n\t\t\t\tSystem.out.println(preparedStatement);\n\t \t\t//Execute the query\n\t \t\tResultSet rs = preparedStatement.executeQuery();\n\t \t\t// Process Result\n\t \t\twhile(rs.next()) {\n\t \t\t\tint dishId = Integer.parseInt(rs.getString(\"dish_id\"));\n\t \t\t\tString dishName = rs.getString(\"dish_name\");\n\t \t\t\tString dishImage = rs.getString(\"dish_image\");\n\t \t\t\tint dishType = Integer.parseInt(rs.getString(\"dish_type\"));\n\t \t\t\tfloat dishPrice = Float.parseFloat(rs.getString(\"dish_price\"));\n\t \t\t\tdishes.add(new Dish(dishId,dishName,dishImage,dishType,dishPrice));\n\t \t\t}\n\t \t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t \treturn dishes;\n\t}", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public List<Dish> getDishesByName(String dishname) {\n\t\tList<Dish> dishes = new ArrayList<>();\n\t\t\n\t\ttry (Connection connection = getConnection();\n\t \t\t// Query\n\t \t\tPreparedStatement preparedStatement = connection.prepareStatement(GET_DISHES_BY_NAME);) {\n\t \t\tpreparedStatement.setString(1, '%' + dishname + '%');\n\t\t\t\tSystem.out.println(preparedStatement);\n\t \t\t//Execute the query\n\t \t\tResultSet rs = preparedStatement.executeQuery();\n\t \t\t// Process Result\n\t \t\twhile(rs.next()) {\n\t \t\t\tint dishId = Integer.parseInt(rs.getString(\"dish_id\"));\n\t \t\t\tString dishName = rs.getString(\"dish_name\");\n\t \t\t\tString dishImage = rs.getString(\"dish_image\");\n\t \t\t\tint dishType = Integer.parseInt(rs.getString(\"dish_type\"));\n\t \t\t\tfloat dishPrice = Float.parseFloat(rs.getString(\"dish_price\"));\n\t \t\t\tdishes.add(new Dish(dishId,dishName,dishImage,dishType,dishPrice));\n\t \t\t}\n\t \t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t \treturn dishes;\n\t}", "public List<Dish> getDishesByNameAndType(String dishname, int dishtype) {\n\t\tList<Dish> dishes = new ArrayList<>();\n\t\t\n\t\ttry (Connection connection = getConnection();\n\t \t\t// Query\n\t \t\tPreparedStatement preparedStatement = connection.prepareStatement(GET_DISHES_BY_NAME_AND_TYPE);) {\n\t \t\tpreparedStatement.setString(1, '%' + dishname + '%');\n\t \t\tpreparedStatement.setInt(2, dishtype);\n\t\t\t\tSystem.out.println(preparedStatement);\n\t \t\t//Execute the query\n\t \t\tResultSet rs = preparedStatement.executeQuery();\n\t \t\t// Process Result\n\t \t\twhile(rs.next()) {\n\t \t\t\tint dishId = Integer.parseInt(rs.getString(\"dish_id\"));\n\t \t\t\tString dishName = rs.getString(\"dish_name\");\n\t \t\t\tString dishImage = rs.getString(\"dish_image\");\n\t \t\t\tint dishType = Integer.parseInt(rs.getString(\"dish_type\"));\n\t \t\t\tfloat dishPrice = Float.parseFloat(rs.getString(\"dish_price\"));\n\t \t\t\tdishes.add(new Dish(dishId,dishName,dishImage,dishType,dishPrice));\n\t \t\t}\n\t \t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t \treturn dishes;\n\t}", "public Iterable<BookingPerOption> showReportByDish(String dish);", "@Override\n public List<Order> getByDish(int dishId) {\n return orderRepository.getByDish(dishId);\n }", "public Set<Dish> getDishes() {\n\t\treturn dishes;\n\t}", "private void loadDays(){\n MyDBHandler db = new MyDBHandler(this);\n dayOfTheWeek.clear();\n dayOfTheWeek.addAll(db.getDaysOfTheWeek());\n }", "protected void loadDiskData(String diskDataPath, int grp) throws IOException {\n\n /* Populate the disk list */\n FileInputStream fstream = new FileInputStream(diskDataPath);\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String line, p[];\n Disk d1, d2;\n\n Integer.parseInt(br.readLine()); // skip first line\n line = br.readLine();\n p = line.split(\",\");\n d1 = new Disk(Integer.parseInt(p[0]), 1000 - Integer.parseInt(p[1]), Integer.parseInt(p[2]),\n Integer.parseInt(p[3]));\n\n while ((line = br.readLine()) != null) {\n p = line.split(\",\");\n d2 = new Disk(Integer.parseInt(p[0]), 1000 - Integer.parseInt(p[1]), Integer.parseInt(p[2]),\n Integer.parseInt(p[3]));\n\n if (!(d2.x == d1.x && d2.y == d1.y)) d1.max = true;\n\n d1.group = grp;\n diskFullList.add(d1);\n d1 = d2;\n\n }\n\n in.close();\n\n diskPlotList = new ArrayList<Disk>(20);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Processes an NxN adjacency matrix A, created from an undirected graph, to produce its Laplacian matrix. This is done by calculating the graph's degree matrix and subtracting the input adjacency matrix.
public static long[][] createLaplacian(long[][] A) { long length = A.length; // stores length of NxN matrix for traversal // nested for loop to traverse through entire matrix for(int i = 0; i < length; i++) { // counts number of adjacent connections per node to produce each node's degree int count = 0; for(int j = 0; j < length; j++) { if(A[i][j] == 1) { count++; A[i][j] = -1; // 'subtract' each value in the adjacency matrix } } A[i][i] = count; // set the diagonal of each similar row/column pair to its degree } // return the modified array A, which is now equal to its Laplacian matrix return A; }
[ "public int[][] getAdjacencyMatrix();", "private DoubleMatrix invertCholesky(DoubleMatrix matrix) {\n int numOfRows = matrix.rows;\n double sum;\n int i, j, k;\n // ______ Compute inv(L) store in lower of A ______\n for (i = 0; i < numOfRows; ++i) {\n matrix.put(i, i, 1. / matrix.get(i, i));\n for (j = i + 1; j < numOfRows; ++j) {\n sum = 0.;\n for (k = i; k < j; ++k) {\n sum -= matrix.get(j, k) * matrix.get(k, i);\n }\n matrix.put(j, i, sum / matrix.get(j, j));\n }\n }\n // ______ Compute inv(A)=inv(LtL) store in lower of A ______\n for (i = 0; i < numOfRows; ++i) {\n for (j = i; j < numOfRows; ++j) {\n sum = 0.;\n for (k = j; k < numOfRows; ++k) {\n sum += matrix.get(k, i) * matrix.get(k, j); // transpose\n }\n matrix.put(j, i, sum);\n }\n }\n return matrix;\n }", "static void llenar_Matriz(){\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++){\n A[i][j] = 2 * i + j;\n B[i][j] = 2 * i - j;\n C[i][j] = 0;\n }\n }", "static void adjoint(int A[][],int [][]adj) \n { \n \n \n // temp is used to store cofactors of A[][] \n int sign = 1; \n int [][]temp = new int[N][N]; \n \n for (int i = 0; i < N; i++) \n { \n for (int j = 0; j < N; j++) \n { \n // Get cofactor of A[i][j] \n getCofactor(A, temp, i, j, N); \n \n // sign of adj[j][i] positive if sum of row \n // and column indexes is even. \n sign = ((i + j) % 2 == 0)? 1: -1; \n \n // Interchanging rows and columns to get the \n // transpose of the cofactor matrix \n adj[j][i] = (sign)*(determinant(temp, N-1)); \n adj[j][i] = adj[j][i]%26;\n } \n } \n }", "public static int[][] FindLongestPath(boolean[][] adjacencyMatrix) {\n\t\tint[] distances = new int[adjacencyMatrix.length];\n\t\tArrayList[] paths = new ArrayList[distances.length];\n\t\tdistances[0] = 0;\n\t\tpaths[0] = new ArrayList();\n\t\tArrayList Temp = new ArrayList();\n\t\tTemp.add(new Integer(0));\n\t\tpaths[0].add(Temp);\n\t\tfor (int i = 1; i < distances.length; ++i) {\n\t\t\tdistances[i] = Integer.MIN_VALUE;\n\t\t\tpaths[i] = new ArrayList();\n\t\t}\n\n\t\tfor (int CurrNode = 0; CurrNode < distances.length; ++CurrNode) {\n\t\t\tfor (int PrevNode = 0; PrevNode < CurrNode; ++PrevNode) {\n\t\t\t\tif (adjacencyMatrix[PrevNode][CurrNode]) {\n\t\t\t\t\tif (distances[PrevNode] + 1 > distances[CurrNode]) {\n\t\t\t\t\t\tdistances[CurrNode] = distances[PrevNode] + 1;\n\t\t\t\t\t\tpaths[CurrNode] = new ArrayList();\n\t\t\t\t\t\tfor (int i = 0; i < paths[PrevNode].size(); ++i) {\n\t\t\t\t\t\t\tTemp = AntibodyUtils\n\t\t\t\t\t\t\t\t\t.CopyIntArrayList((ArrayList) (paths[PrevNode]\n\t\t\t\t\t\t\t\t\t\t\t.get(i)));\n\t\t\t\t\t\t\tTemp.add(new Integer(CurrNode));\n\t\t\t\t\t\t\tpaths[CurrNode].add(Temp);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/**\n\t\t * Once we have computed the longest paths to each node, determine the\n\t\t * distance of the longest paths overall. maxNode is only one of several\n\t\t * nodes that could have a longest path from node 0.\n\t\t */\n\t\tint maxDist = 0;\n\t\tint maxNode = 0;\n\t\tfor (int i = 0; i < distances.length; ++i) {\n\t\t\tif (distances[i] >= maxDist) {\n\t\t\t\tmaxDist = distances[i];\n\t\t\t\tmaxNode = i;\n\t\t\t}\n\t\t}\n\n\t\tif (Debug && !Debug) {\n\t\t\tSystem.out.println(\"Distance to \" + (distances.length - 1) + \" = \"\n\t\t\t\t\t+ distances[distances.length - 1]);\n\n\t\t\tSystem.out.println(\"Longest path ends at node \" + maxNode\n\t\t\t\t\t+ \" at distance \" + maxDist);\n\n\t\t}\n\t\tint[][] finalPaths = new int[paths[maxNode].size()][maxDist + 1];\n\t\t/**\n\t\t * Determine the final paths, by converting the path[maxNode]. Keep in\n\t\t * mind that this is only 1 of several possible longest paths from node\n\t\t * 0 to maxNode, and only 1 of several nodes which may have a path from\n\t\t * node 0 of maxDist.\n\t\t */\n\t\tfor (int p = 0; p < paths[maxNode].size(); ++p) {\n\t\t\tArrayList CurrPath = (ArrayList) (paths[maxNode].get(p));\n\t\t\tfor (int i = 0; i < maxDist; ++i) {\n\t\t\t\tfinalPaths[p][i] = ((Integer) (CurrPath.get(i))).intValue();\n\n\t\t\t}\n\t\t\tfinalPaths[p][maxDist] = maxNode;\n\t\t}\n\t\treturn finalPaths;\n\n\t}", "public static Long compactForwardAlgorithm(ArrayList<Integer>[] graph) {\n // define injective function eta - takes O(n log(n)) time\n Set<Pair<Integer, ArrayList<Integer>>> pairs = Utils.getSortedArrays(graph);\n Map<Integer, Integer> etas = Utils.getEtasMap(pairs);\n\n // sort adjacency arrays according to eta\n pairs.forEach(p -> Collections.sort(p.getSecond(), new Comparator<Integer>() {\n @Override\n public int compare(Integer first, Integer second) {\n if (etas.get(first) > etas.get(second))\n return 1;\n else\n return -1;\n }\n }));\n\n int triangleCount = 0;\n\n // main part, in which we actually count triangles\n Iterator<Pair<Integer, ArrayList<Integer>>> iterator = pairs.iterator();\n while (iterator.hasNext()) {\n Pair<Integer, ArrayList<Integer>> pair = iterator.next();\n Integer v = pair.getFirst();\n ArrayList<Integer> v_neighbors = graph[v];\n\n for (int u : v_neighbors) {\n if (etas.get(u) > etas.get(v)) {\n ArrayList<Integer> u_neighbors = graph[u];\n\n Iterator<Integer> uIterator = u_neighbors.iterator(), vIterator = v_neighbors.iterator();\n\n if (uIterator.hasNext() && vIterator.hasNext()) {\n Integer u_ = uIterator.next(), v_ = vIterator.next();\n while (uIterator.hasNext() && vIterator.hasNext() && etas.get(u_) < etas.get(v)\n && etas.get(v_) < etas.get(v)) {\n if (etas.get(u_) < etas.get(v_))\n u_ = uIterator.next();\n else if (etas.get(u_) > etas.get(v_))\n v_ = vIterator.next();\n else {\n triangleCount++;\n u_ = uIterator.next();\n v_ = vIterator.next();\n }\n }\n\n }\n }\n }\n }\n return new Long(triangleCount);\n }", "public FloydWarshall(AdjMatrixEdgeWeightedDigraph G) {\n int V = G.V();\n distTo = new double[V][V];\n edgeTo = new DirectedEdge[V][V];\n\n // initialize distances to infinity\n for (int v = 0; v < V; v++) {\n for (int w = 0; w < V; w++) {\n distTo[v][w] = Double.POSITIVE_INFINITY;\n }\n }\n\n // initialize distances using edge-weighted digraph's\n for (int v = 0; v < G.V(); v++) {\n for (DirectedEdge e : G.adj(v)) {\n distTo[e.from()][e.to()] = e.weight();\n edgeTo[e.from()][e.to()] = e;\n }\n // in case of self-loops\n if (distTo[v][v] >= 0.0) {\n distTo[v][v] = 0.0;\n edgeTo[v][v] = null;\n }\n }\n\n // Floy-Warshall update\n for (int i = 0; i < V; i++) {\n // compute shortest paths using only 0, 1, ,,, i as intermediate vertices\n for (int v = 0; v < V; v++) {\n if (edgeTo[v][i] == null) {\n continue; // optimization\n }\n for (int w = 0; w < V; w++) {\n if (distTo[v][w] > distTo[v][i] + distTo[i][w]) {\n distTo[v][w] = distTo[v][i] + distTo[i][w];\n edgeTo[v][w] = edgeTo[i][w];\n }\n }\n // check for negative cycle\n if (distTo[v][v] < 0.0) {\n hasNegativeCycle = true;\n return;\n }\n }\n }\n assert check(G);\n }", "public Matrix adj() {\r\n Matrix cof = new Matrix(rows,cols);\r\n for (int i=0;i<rows;i++) {\r\n for (int j=0;j<cols;j++) {\r\n Matrix tmp = new Matrix(rows-1,cols-1);\r\n for (int k=0; k < rows; k++) {\r\n for (int l=0;l < cols;l++) {\r\n // i = 2, j = 1\r\n if (k > i && l > j) {\r\n tmp.set(k-1,l-1,this.get(k,l));\r\n } else if (k > i && l < j) {\r\n tmp.set(k-1,l,this.get(k,l));\r\n } else if (k < i && l > j) {\r\n tmp.set(k,l-1,this.get(k,l));\r\n } else if (k < i && l < j) {\r\n tmp.set(k,l,this.get(k,l));\r\n } else {\r\n\r\n }\r\n }\r\n }\r\n cof.set(i,j,Math.pow(-1,(i+1+j+1))*tmp.det());\r\n }\r\n }\r\n return cof.transpose();\r\n }", "public static double[][] matrixInversion(double[][] a) {\r\n\t\t// Code for this function and the functions it calls was adapted from\r\n\t\t// http://mrbool.com/how-to-use-java-for-performing-matrix-operations/26800\r\n\t\t\r\n\t\treturn (divideBy(transpose(cofactor(a)), determinant(a)));\r\n\t}", "public static void floydsAlgorithm(int[][] graph) {\n\t\t// Iterate through adjacency matrix\n\t\tfor (int a = 0; a < 5; a++) {\n\t\t\tfor (int b = 0; b < 5; b++) {\n\t\t\t\t// Ignore looping edges\n\t\t\t\tif (a != b) {\n\t\t\t\t\t// If there is a value\n\t\t\t\t\tif (graph[a][b] != Integer.MAX_VALUE) {\n\t\t\t\t\t\t// Run through values in column of row letter\n\t\t\t\t\t\tfor (int c = 0; c < 5; c++) {\n\t\t\t\t\t\t\t// Ignore looping edges\n\t\t\t\t\t\t\tif (c != a) {\n\t\t\t\t\t\t\t\t// If there is a value in the column\n\t\t\t\t\t\t\t\tif (graph[c][a] != Integer.MAX_VALUE) {\n\t\t\t\t\t\t\t\t\t// Compute path length\n\t\t\t\t\t\t\t\t\tint tempSum = graph[a][b] + graph[c][a];\n\t\t\t\t\t\t\t\t\t// Ignore looping edges\n\t\t\t\t\t\t\t\t\tif (c != b) {\n\t\t\t\t\t\t\t\t\t\t// If path length is INF, update path length and print graph\n\t\t\t\t\t\t\t\t\t\tif (graph[c][b] == Integer.MAX_VALUE) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tgraph[c][b] = tempSum;\n\t\t\t\t\t\t\t\t\t\t\t// Print graph after each update\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"All-pairs shortest paths are:\");\n\t\t\t\t\t\t\t\t\t\t\tdisplayGraph(graph);\n\t\t\t\t\t\t\t\t\t\t\t// Prompt user to continue\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Press enter to continue:\");\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t// If user hit enter\n\t\t\t\t\t\t\t\t\t\t\t\tif (input.read() == 13) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t// If path length is less than current, update path length and print graph\n\t\t\t\t\t\t\t\t\t\t\tif (tempSum < graph[c][b]) {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tgraph[c][b] = tempSum;\n\t\t\t\t\t\t\t\t\t\t\t\t// Print graph after each update\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"All-pairs shortest paths are:\");\n\t\t\t\t\t\t\t\t\t\t\t\tdisplayGraph(graph);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t// Prompt user to continue\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Press enter to continue:\");\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// If user hit enter\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (input.read() == 13) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t} // End double for loop\n\t}", "public static void computeAndDisplaySumOfDiagonals( int A[][] ){\n int sumOfLeftDiagonal=0, sumOfRightDiagonal=0;\n for( int i=0; i < A.length; i++ ){\n sumOfLeftDiagonal += A[i][i];\n sumOfRightDiagonal += A[i][A.length -i -1];\n }\n System.out.println( \"The sum of the left diagonal = \" + sumOfLeftDiagonal );\n System.out.println( \"The sum of the right diagonal = \" + sumOfRightDiagonal );\n }", "public int[][] APD (int[][] A) {\n int[][] D = new int[A.length][A.length];\n int[][] Z = matrixMultiply(A, A, 1);\n\n // A[i][j] = 1 <=> es existiert Weg der Laenge 1 oder 2 von i nach j\n int[][] A_ = new int[A.length][A.length];\n int j = 0;\n for (int i = 1; i < A_.length; ++i) {\n for (j = 1; j < A_.length; ++j) {\n if (i != j && (A[i][j] == 1 || Z[i][j] > 0)) {\n A_[i][j] = 1;\n }\n }\n }\n\n boolean terminate = true;\n for (int i = 1; i < A_.length; ++i) {\n for (j = 1; j < A_.length; ++j) {\n if (i != j && A_[i][j] != 1) {\n terminate = false;\n i = j = A_.length; // terminate loops asap\n }\n }\n }\n\n if (terminate) {\n for (int i = 1; i < D.length; ++i) {\n for (j = 1; j < D.length; ++j) {\n D[i][j] = 2 * A_[i][j] - A[i][j];\n }\n }\n\n return D;\n }\n\n int[][] D_ = APD(A_);\n int[][] S = matrixMultiply(A, D_, 1);\n\n for (int i = 1; i < D.length; ++i) {\n for (j = 1; j < D.length; ++j) {\n D[i][j] = 2 * D_[i][j];\n \n if (S[i][j] < D_[i][j] * Z[i][i]) {\n D[i][j] -= 1;\n }\n }\n }\n\n return D;\n }", "private void decomposeSVD(double[][] A)\n {\n int i, j, k;\n double [] Vrowi, Urowi, Arowk;\n \n // Derived from LINPACK code. (not good ... lapack is better ... jrh)\n\n /*\n * Apparently the failing cases are only a proper subset of (m<n), so let's\n * not throw error. Correct fix to come later? if (m<n) { throw new\n * IllegalArgumentException(\"Jama SVD only works for m >= n\"); }\n */\n int nu = min(m, n);\n createArrays(nu);\n //for (int ii = 0; ii < U.length; ++ii) for (int jj = 0; jj < U[0].length; ++jj) U[ii][jj] = 0.0;\n boolean wantu = true;\n boolean wantv = true;\n\n // Reduce A to bi-diagonal form, storing the diagonal elements\n // in SV and the super-diagonal elements in e.\n\n int nct = min(m - 1, n);\n int nrt = max(0, min(n - 2, m));\n for (k = 0; k < max(nct, nrt); k++)\n {\n Arowk = A[k];\n if (k < nct)\n {\n // Compute the transformation for the k-th column and\n // place the k-th diagonal in SV[k].\n // Compute 2-norm of k-th column without under/overflow.\n \n SV[k] = 0;\n for (i = k; i < m; i++) SV[k] = Matrix.hypot(SV[k], A[i][k]);\n if (SV[k] != 0.0)\n {\n if (Arowk[k] < 0.0) SV[k] = -SV[k];\n for (i = k; i < m; i++) A[i][k] /= SV[k];\n Arowk[k] += 1.0;\n }\n SV[k] = -SV[k];\n }\n \n for (j = k + 1; j < n; j++)\n {\n if ((k < nct) & (SV[k] != 0.0))\n {\n // Apply the transformation.\n\n double t = 0;\n for (i = k; i < m; i++) t += A[i][k] * A[i][j];\n t = -t / Arowk[k];\n for (i = k; i < m; i++) A[i][j] += t * A[i][k];\n }\n\n // Place the k-th row of A into e for the\n // subsequent calculation of the row transformation.\n\n e[j] = Arowk[j];\n }\n \n if (wantu & (k < nct))\n {\n // Place the transformation in U for subsequent back\n // multiplication.\n\n for (i = 0; i < k; i++) U[i][k] = 0.0;\n for (i = k; i < m; i++) U[i][k] = A[i][k];\n }\n \n if (k < nrt)\n {\n // Compute the k-th row transformation and place the\n // k-th super-diagonal in e[k].\n // Compute 2-norm without under/overflow.\n \n e[k] = 0;\n for (i = k + 1; i < n; i++) e[k] = Matrix.hypot(e[k], e[i]);\n if (e[k] != 0.0)\n {\n if (e[k + 1] < 0.0) e[k] = -e[k];\n for (i = k + 1; i < n; i++) e[i] /= e[k];\n e[k + 1] += 1.0;\n }\n e[k] = -e[k];\n if ((k + 1 < m) & (e[k] != 0.0))\n {\n // Apply the transformation.\n\n for (i = k + 1; i < m; i++) work[i] = 0.0;\n for (j = k + 1; j < n; j++)\n {\n for (i = k + 1; i < m; i++) work[i] += e[j] * A[i][j];\n }\n for (j = k + 1; j < n; j++)\n {\n double t = -e[j] / e[k + 1];\n for (i = k + 1; i < m; i++) A[i][j] += t * work[i];\n }\n }\n \n if (wantv)\n {\n // Place the transformation in V for subsequent\n // back multiplication.\n\n for (i = k + 1; i < n; i++) V[i][k] = e[i];\n }\n }\n }\n\n // Set up the final bi-diagonal matrix or order p.\n\n int p = min(n, m + 1);\n if (nct < n) SV[nct] = A[nct][nct];\n if (m < p) SV[p - 1] = 0.0;\n if (nrt + 1 < p) e[nrt] = A[nrt][p - 1];\n e[p - 1] = 0.0;\n\n // If required, generate U.\n\n if (wantu)\n {\n for (j = nct; j < nu; j++)\n {\n for (i = 0; i < m; i++) U[i][j] = 0.0;\n U[j][j] = 1.0;\n }\n \n for (k = nct - 1; k >= 0; k--)\n {\n if (SV[k] != 0.0)\n {\n for (j = k + 1; j < nu; j++)\n {\n double t = 0;\n for (i = k; i < m; i++) t += U[i][k] * U[i][j];\n t = -t / U[k][k];\n for (i = k; i < m; i++) U[i][j] += t * U[i][k];\n }\n \n for (i = k; i < m; i++) U[i][k] = -U[i][k];\n U[k][k] = 1.0 + U[k][k];\n for (i = 0; i < k - 1; i++) U[i][k] = 0.0;\n }\n else\n {\n for (i = 0; i < m; i++) U[i][k] = 0.0;\n U[k][k] = 1.0;\n }\n }\n }\n\n // If required, generate V.\n\n if (wantv)\n {\n for (k = n - 1; k >= 0; k--)\n {\n if ((k < nrt) & (e[k] != 0.0))\n {\n for (j = k + 1; j < nu; j++)\n {\n double t = 0;\n for (i = k + 1; i < n; i++) t += V[i][k] * V[i][j];\n t = -t / V[k + 1][k];\n for (i = k + 1; i < n; i++) V[i][j] += t * V[i][k];\n }\n }\n for (i = 0; i < n; i++) V[i][k] = 0.0;\n V[k][k] = 1.0;\n }\n }\n\n // Main iteration loop for the singular values.\n\n int pp = p - 1;\n int iter = 0;\n double eps = pow(2.0, -52.0);\n double tiny = pow(2.0, -966.0);\n while (p > 0)\n {\n int kase;\n\n // Here is where a test for too many iterations would go.\n\n // This section of the program inspects for\n // negligible elements in the s and e arrays. On\n // completion the variables kase and k are set as follows.\n\n // kase = 1 if s(p) and e[k-1] are negligible and k<p\n // kase = 2 if s(k) is negligible and k<p\n // kase = 3 if e[k-1] is negligible, k<p, and\n // s(k), ..., s(p) are not negligible (qr step).\n // kase = 4 if e(p-1) is negligible (convergence).\n\n for (k = p - 2; k >= -1; k--)\n {\n if (k == -1) break;\n if (abs(e[k]) <= tiny + eps * (abs(SV[k]) + abs(SV[k + 1])))\n {\n e[k] = 0.0;\n break;\n }\n }\n if (k == p - 2)\n kase = 4;\n else\n {\n int ks;\n for (ks = p - 1; ks >= k; ks--)\n {\n if (ks == k)\n {\n break;\n }\n double t = (ks != p ? abs(e[ks]) : 0.)\n + (ks != k + 1 ? abs(e[ks - 1]) : 0.);\n if (abs(SV[ks]) <= tiny + eps * t)\n {\n SV[ks] = 0.0;\n break;\n }\n }\n if (ks == k)\n kase = 3;\n else if (ks == p - 1)\n kase = 1;\n else\n {\n kase = 2;\n k = ks;\n }\n }\n k++;\n\n // Perform the task indicated by kase.\n\n switch (kase)\n {\n\n // Deflate negligible s(p).\n\n case 1:\n {\n double f = e[p - 2];\n e[p - 2] = 0.0;\n for (j = p - 2; j >= k; j--)\n {\n double t = Matrix.hypot(SV[j], f);\n double cs = SV[j] / t;\n double sn = f / t;\n SV[j] = t;\n if (j != k)\n {\n f = -sn * e[j - 1];\n e[j - 1] = cs * e[j - 1];\n }\n if (wantv)\n {\n for (i = 0; i < n; i++)\n {\n Vrowi = V[i];\n t = cs * Vrowi[j] + sn * Vrowi[p - 1];\n Vrowi[p - 1] = -sn * Vrowi[j] + cs * Vrowi[p - 1];\n Vrowi[j] = t;\n }\n }\n }\n }\n break;\n\n // Split at negligible s(k).\n\n case 2:\n {\n int km1 = k - 1;\n double f = e[km1];\n e[km1] = 0.0;\n for (j = k; j < p; j++)\n {\n double t = Matrix.hypot(SV[j], f);\n double cs = SV[j] / t;\n double sn = f / t;\n SV[j] = t;\n f = -sn * e[j];\n e[j] = cs * e[j];\n if (wantu)\n {\n for (i = 0; i < m; i++)\n {\n Urowi = U[i];\n t = cs * Urowi[j] + sn * Urowi[km1];\n Urowi[km1] = -sn * Urowi[j] + cs * Urowi[km1];\n Urowi[j] = t;\n }\n }\n }\n }\n break;\n\n // Perform one qr step.\n\n case 3:\n {\n\n // Calculate the shift.\n\n double scale = max(max(max(max(abs(SV[p - 1]), abs(SV[p - 2])),\n abs(e[p - 2])), abs(SV[k])), abs(e[k]));\n double sp = SV[p - 1] / scale;\n double spm1 = SV[p - 2] / scale;\n double epm1 = e[p - 2] / scale;\n double sk = SV[k] / scale;\n double ek = e[k] / scale;\n double b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2.0;\n double c = (sp * epm1) * (sp * epm1);\n double shift = 0.0;\n if ((b != 0.0) | (c != 0.0))\n {\n shift = sqrt(b * b + c);\n if (b < 0.0) shift = -shift;\n shift = c / (b + shift);\n }\n double f = (sk + sp) * (sk - sp) + shift;\n double g = sk * ek;\n\n // Chase zeros.\n\n for (j = k; j < p - 1; j++)\n {\n double t = Matrix.hypot(f, g);\n double cs = f / t;\n double sn = g / t;\n int jp1 = j + 1;\n if (j != k)\n {\n e[j - 1] = t;\n }\n f = cs * SV[j] + sn * e[j];\n e[j] = cs * e[j] - sn * SV[j];\n g = sn * SV[jp1];\n SV[jp1] = cs * SV[jp1];\n if (wantv)\n {\n for (i = 0; i < n; i++)\n {\n Vrowi = V[i];\n t = cs * Vrowi[j] + sn * Vrowi[jp1];\n Vrowi[jp1] = -sn * Vrowi[j] + cs * Vrowi[jp1];\n Vrowi[j] = t;\n }\n }\n t = Matrix.hypot(f, g);\n cs = f / t;\n sn = g / t;\n SV[j] = t;\n f = cs * e[j] + sn * SV[jp1];\n SV[jp1] = -sn * e[j] + cs * SV[jp1];\n g = sn * e[j + 1];\n e[jp1] = cs * e[jp1];\n if (wantu && (j < m - 1))\n {\n for (i = 0; i < m; i++)\n {\n Urowi = U[i];\n t = cs * Urowi[j] + sn * Urowi[jp1];\n Urowi[jp1] = -sn * Urowi[j] + cs * Urowi[jp1];\n Urowi[j] = t;\n }\n }\n }\n e[p - 2] = f;\n ++iter;\n }\n break;\n\n // Convergence.\n\n case 4:\n {\n\n // Make the singular values positive.\n\n if (SV[k] <= 0.0)\n {\n SV[k] = (SV[k] < 0.0 ? -SV[k] : 0.0);\n if (wantv)\n {\n for (i = 0; i <= pp; i++)\n {\n V[i][k] = -V[i][k];\n }\n }\n }\n\n // Order the singular values.\n\n while (k < pp)\n {\n int kp1 = k + 1;\n if (SV[k] >= SV[kp1]) break;\n \n double t = SV[k];\n SV[k] = SV[kp1];\n SV[kp1] = t;\n if (wantv && (k < n - 1))\n {\n for (i = 0; i < n; i++)\n {\n Vrowi = V[i];\n t = Vrowi[kp1];\n Vrowi[kp1] = Vrowi[k];\n Vrowi[k] = t;\n }\n }\n if (wantu && (k < m - 1))\n {\n for (i = 0; i < m; i++)\n {\n Urowi = U[i];\n t = Urowi[kp1];\n Urowi[kp1] = Urowi[k];\n Urowi[k] = t;\n }\n }\n k++;\n }\n iter = 0;\n p--;\n }\n break;\n }\n }\n }", "public void printAdjacencyMatrix();", "private Double[][] makeAdjacencyMatrix()\n {\n Double[][] matrix = new Double[this.numIntxns][this.numIntxns];\n\n for (int i = 0; i < this.numIntxns; i++)\n {\n for (int j = 0; j < this.numIntxns; j++)\n {\n // if the indices are the same the distance is 0.0.\n // otherwise, it's infinite.\n matrix[i][j] = (i != j) ? null : 0.0;\n }\n }\n\n // populate the matrix\n for (int intxn = 0; intxn < this.numIntxns; intxn++)\n {\n for (Road road : this.roads)\n {\n if (intxn == road.start())\n {\n matrix[intxn][road.end()] = road.length();\n matrix[road.end()][intxn] = road.length();\n }\n }\n }\n\n return matrix;\n }", "public void decompose(double[][] A)\n {\n int i, j;\n double [] atr, ar;\n\n // check validity of A\n \n m = A.length;\n n = A[0].length;\n\n // set A into Atmp\n\n if (max(m, n) > 100) svdTrnsp = true;\n if (svdTrnsp)\n {\n if ((Ain == null) ||\n (Ain.length != n) || (Ain[0].length != m))\n Ain = new double [n][m];\n\n // copy array\n\n for (i = 0; i < m; ++i)\n {\n ar = A[i];\n for (j = 0; j < n; ++j) Ain[j][i] = ar[j]; \n }\n decomposeSVDTrnsp(Ain);\n U = Matrix.transpose(U);\n V = Matrix.transpose(V);\n }\n else\n {\n if ((Ain == null) ||\n (Ain.length != m) || (Ain[0].length != n))\n Ain = new double [m][n];\n\n // copy array\n\n for (i = 0; i < m; ++i)\n {\n atr = Ain[i];\n ar = A[i];\n for (j = 0; j < n; ++j) atr[j] = ar[j]; \n }\n decomposeSVD(Ain);\n }\n }", "public void buildAdjacencyMatrix() {\r\n\t\tfor (int i = 0; i < nodes.size(); i++) {\r\n\t\t\tfor (int j = 0; j < 4; j++) {\r\n\t\t\t\tadjacencyMatrix[i][j] = findNeighborIndex(nodes.get(i), j);\r\n\t\t\t\tnodes.get(i).setNeighbor(j, nodes.get(adjacencyMatrix[i][j]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public double[] clusterMatrix(double[][] graph)\n\t{\n\t\tdouble[] clusterArray = new double[graph.length];\n\t\tint element;\n\t\t\n\t\t//go through matrix and cluster connected elements\n\t\tfor(int i=0; i<graph.length; i++)\n\t\t\tfor(int j=0; j<graph.length; j++)\n\t\t\t{\n\t\t\t\tif(i == j)\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif(graph[i][j] > clusteringThresh)\n\t\t\t\t\tclusterElements(i,j);\n\t\t\t}\n\t\t\n\t\t\n\t\tnumClusters = clusters.size();\n\t\t\n\t\t//Assign each node to a cluster\n\t\tfor(int i=0; i<clusters.size(); i++)\n\t\t{\n\t\t\tVector v = (Vector)clusters.elementAt(i);\n\t\t\t\n\t\t\tfor(int j=0; j < v.size(); j++)\n\t\t\t{\n\t\t\t\telement = ((Integer)v.elementAt(j)).intValue();\n\t\t\t\tclusterArray[element] = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn clusterArray;\n\t}", "private int[][] searchAdjNodes(int nodeA) {\n\t\tint[] backNodes = new int[vertices[nodeA].length];\n\t\tint backNodesIndex = 0;\n\t\tint[] forwardNodes = new int[vertices[nodeA].length];\n\t\tint forwardNodesIndex = 0;\n\t\tfor (int nodeB : vertices[nodeA]) {\n\t\t\tif (edgeVisited[connectivity[nodeA][nodeB]])\n\t\t\t\tcontinue;\n\t\t\telse if (nodeVisited[nodeB] >= 0)\n\t\t\t\tbackNodes[backNodesIndex++] = nodeB;\n\t\t\telse\n\t\t\t\tforwardNodes[forwardNodesIndex++] = nodeB;\n\t\t}\n\t\tint[][] result = new int[2][];\n\t\t// Then arrange backNodes with depth from small to large\n\t\tint[] backNodesKey = new int[backNodesIndex];\n\t\tfor (int i = 0; i < backNodesIndex; i++)\n\t\t\tbackNodesKey[i] = nodeVisited[backNodes[i]];\n\t\tresult[0] = SortIntSet.sort(Arrays.copyOf(backNodes, backNodesIndex),\n\t\t\t\tbackNodesKey);\n\n\t\t// arrange forward edge/nodes with label from small to large\n\t\tint[] forwardNodesKey = new int[forwardNodesIndex];\n\t\tint[] forwardEdgeKey = new int[forwardNodesIndex];\n\t\tfor (int i = 0; i < forwardNodesIndex; i++) {\n\t\t\tint nodeID = forwardNodes[i];\n\t\t\tforwardNodesKey[i] = connectivity[nodeID][nodeID];\n\t\t\tforwardEdgeKey[i] = edgeLabel[connectivity[nodeA][nodeID]];\n\t\t}\n\t\tresult[1] = SortIntSet.sort(\n\t\t\t\tArrays.copyOf(forwardNodes, forwardNodesIndex), forwardEdgeKey,\n\t\t\t\tforwardNodesKey);\n\t\treturn result;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new faction with the given unit as a member, connected to the given world.
@Raw public Faction(Unit unit, World world) throws IllegalArgumentException{ if ((unit.hasProperWorld()) && (unit.getWorld() != world)) throw new IllegalArgumentException("the unit's world is not the given world."); if (! this.canHaveAsUnit(unit)) throw new IllegalArgumentException("Rejected unit" + unit.toString()); unit.setFaction(this); this.setWorld(world); this.addUnit(unit); world.addFaction(this); Scheduler scheduler = new Scheduler(this); this.setScheduler(scheduler); if (! world.hasAsEntity(unit)) world.addEntity(unit); }
[ "@Raw\n\tpublic Faction(Unit unit) throws IllegalArgumentException{\t\n\t\tunit.setFaction(this);\n\t\tthis.setWorld(unit.getWorld());\n\t\tthis.addUnit(unit);\n\t\tthis.getWorld().addFaction(this);\n\t\t\n\t\tScheduler scheduler = new Scheduler(this);\n\t\tthis.setScheduler(scheduler);\n\t}", "@Raw\n\tpublic Faction(World world) throws IllegalArgumentException {\t\n\t\tthis.setWorld(world);\n\t\tworld.addFaction(this);\n\t\t\n\t\tScheduler scheduler = new Scheduler(this);\n\t\tthis.setScheduler(scheduler);\n\t}", "public void addUnit(Unit unit) {\r\n\t\tRandom rand = new Random();\r\n\t\tassert unit != null;\r\n\t\tint[] a = validRandPos();\r\n\t\tif (getNbOfUnits() <= this.maxNbOfUnits){\r\n\t\t\tdouble x = a[0];\r\n\t\t\tdouble y = a[1];\r\n\t\t\tdouble z = a[2];\r\n\t\t\tdouble[] pos = {x,y,z};\r\n\t\t\tunit.setPosition(pos);\r\n\t\t\tunit.setName(randName());\r\n\t\t\tunit.setStength(rand.nextInt(Unit.maxInitStrength - Unit.minInitStrength) + Unit.minInitStrength);\r\n\t\t\tunit.setAgility(rand.nextInt(Unit.maxInitAgility - Unit.minInitAgility) + Unit.minInitAgility);\r\n\t\t\tunit.setToughness(rand.nextInt(Unit.maxInitThoughness - Unit.minInitThoughness) + Unit.minInitThoughness);\r\n\t\t\tunit.setWeight((unit.getStength()+unit.getAgility())/2);\r\n\t\t\tunit.setHitpoints(200*unit.getToughness()/100*unit.getWeight()/100);\r\n\t\t\tunit.setStamina(200*unit.getToughness()/100*unit.getWeight()/100);\r\n\t\t\tif (getNbFactions() < this.maxNbOfUnits){\r\n\t\t\t\tString name = makeFactionName();\r\n\t\t\t\tFaction faction = new Faction(name);\r\n\t\t\t\tassert faction.canHaveAsName(name);\r\n\t\t\t\tfaction.addUnitToFact(unit);\r\n\t\t\t\tunit.setFaction(faction);\r\n\t\t\t\taddFaction(faction);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tFaction faction = getSmallestFaction();\r\n\t\t\t\tfaction.addUnitToFact(unit);\r\n\t\t\t\tunit.setFaction(faction);\r\n\t\t\t}\t\r\n\t\t\tint b = getNbOfUnits();\r\n\t\t\tsetNbOfUnits(++b);;\r\n\t\t}\r\n\t}", "@NotNull\n @Override\n public Faction createFaction(@NotNull String name) throws IllegalStateException {\n Faction fac = getFactionByName(name);\n if (fac != null && !fac.isServerFaction()) {\n throw new IllegalStateException(\"Faction already exists.\");\n }\n String fId = MStore.createId();\n com.massivecraft.factions.entity.Faction faction = FactionColl.get().create(fId);\n faction.setName(name);\n return new MassiveCoreFactionsFaction(faction);\n }", "@Override\n public Faction getFactionAt(@NotNull Location location) {\n return new MassiveCoreFactionsFaction(BoardColl.get().getFactionAt(PS.valueOf(location)));\n }", "private void createWorld() {\n\t\tworld = new World();\n\t}", "World createWorld();", "FuelingStation createFuelingStation();", "public TileEntity createNewTileEntity(World par1World) {\n\t\treturn new TileEntityCobaltFurnace();\n\t}", "public World createWorld(){\r\n\t\tint n = getNbOfCubes();\r\n\t\tArrayList<Vector> allPositions = allPositionsGenerator();\r\n\t\t\r\n\t\t//uncomment the line below for cubes with different colors\r\n\t\t//ArrayList<Vector> allColors = colorGenerator();\r\n\t\t\r\n\t\t//uncomment the line below for red cubes only\r\n\t\tArrayList<Vector> allColors = redGenerator();\r\n\r\n\t\t//the current objective is visit all\r\n\t\tWorld world = new World(World.VISIT_ALL_OBJECTIVE);\r\n\t\tRandom r = new Random();\t\r\n\t\t\r\n\t\tfor (int i = 0; i < n; i++){\r\n\t\t\tint range = n-i;\r\n\t\t\tint index = r.nextInt(range);\r\n\t\t\t\r\n\t\t\tVector pos = allPositions.get(i);\r\n\t\t\tVector clr = allColors.get(index);\r\n\t\t\tallColors.remove(index);\r\n\t\t\t\r\n\t\t\tBlock block = new Block(pos);\r\n\t\t\tCube cube = new Cube(pos.convertToVector3f(), clr.convertToVector3f());\r\n\t\t\tblock.setAssocatedCube(cube);\r\n\t\t\t\r\n\t\t\tworld.addWorldObject(block);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn world;\r\n\t}", "public void create() {\n\t\tworldAABB = new AABB();\r\n\t\tworldAABB.lowerBound.set(new Vec2(Constants.lowerBoundx - Constants.boundhxy, Constants.lowerBoundy - Constants.boundhxy));\r\n\t\tworldAABB.upperBound.set(new Vec2(Constants.upperBoundx + Constants.boundhxy, Constants.upperBoundy + Constants.boundhxy));\r\n\r\n\t\t// Step 2: Create Physics World with Gravity\r\n\t\tVec2 gravity = new Vec2(Constants.gravityx, Constants.gravityy);\r\n\t\tboolean doSleep = true;\r\n\t\tworld = new World(worldAABB, gravity, doSleep);\r\n\t}", "public GameWorld createWorld() {\n\t\tGameWorld world = universe.createWorld();\n\t\tworlds.add(world);\n\t\treturn world;\n\t}", "public WorldFactory() {\n\n\t}", "@Override\n public Faction getFaction(@NotNull OfflinePlayer player) {\n return new MassiveCoreFactionsFaction(MPlayer.get(player).getFaction());\n }", "Unit createUnit();", "private static WorldDescription createWorld() {\r\n \t\tWorldDescription world = new WorldDescription();\t \r\n \t\tworld.setPlaneSize(100);\t\t\r\n \t \tObstacleGenerator generator = new ObstacleGenerator();\r\n \t generator.obstacalize(obstacleType, world); // activate to add obstacles\r\n \t // world.setPlaneTexture(WorldDescription.WHITE_GRID_TEXTURE);\r\n \t\treturn world;\r\n \t}", "private FordFulkerson createFordFulkerson(String team){\n int netWorkTeams = teamNum-1;\n int numGameVertices = (netWorkTeams*(netWorkTeams-1))/2;\n int s = 0;\n int t = numGameVertices+netWorkTeams+2-1;\n return new FordFulkerson(createFlowNetWork(team),s,t);\n\n }", "private static void spawn(Actor actor, ActorWorld world)\n {\n Random generator = new Random();\n int row = generator.nextInt(10);\n int col = generator.nextInt(10);\n Location loc = new Location(row, col);\n while(world.getGrid().get(loc) != null)\n {\n row = generator.nextInt(10);\n col = generator.nextInt(10);\n loc = new Location(row, col);\n }\n world.add(loc, actor);\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 350, 1);Borboleta borboleta = new Borboleta(); //criar \"Borboleta\".\n addObject(borboleta, 35, 175); //adicionar \"Borboleta\" no mundo. \n\n criarVespa(); //chama o método \"criarVespa\".\n criarVespa(); //chama o método \"criarVespa\".\n addObject(new Flor(), 503, 328); //criar e adicionar \"Flor\" no mundo. \n addObject(new Placar(), 0, 0); //criar e adicionar \"Placar\" no mundo.\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleS_Species" $ANTLR start "ruleS_Species" InternalGaml.g:323:1: ruleS_Species : ( ( rule__S_Species__Group__0 ) ) ;
public final void ruleS_Species() throws RecognitionException { int ruleS_Species_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return ; } // InternalGaml.g:327:2: ( ( ( rule__S_Species__Group__0 ) ) ) // InternalGaml.g:328:1: ( ( rule__S_Species__Group__0 ) ) { // InternalGaml.g:328:1: ( ( rule__S_Species__Group__0 ) ) // InternalGaml.g:329:1: ( rule__S_Species__Group__0 ) { if ( state.backtracking==0 ) { before(grammarAccess.getS_SpeciesAccess().getGroup()); } // InternalGaml.g:330:1: ( rule__S_Species__Group__0 ) // InternalGaml.g:330:2: rule__S_Species__Group__0 { pushFollow(FollowSets000.FOLLOW_2); rule__S_Species__Group__0(); state._fsp--; if (state.failed) return ; } if ( state.backtracking==0 ) { after(grammarAccess.getS_SpeciesAccess().getGroup()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { if ( state.backtracking>0 ) { memoize(input, 20, ruleS_Species_StartIndex); } restoreStackSize(stackSize); } return ; }
[ "public final void rule__S_Species__Group__0() throws RecognitionException {\n int rule__S_Species__Group__0_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 318) ) { return ; }\n // InternalGaml.g:6083:1: ( rule__S_Species__Group__0__Impl rule__S_Species__Group__1 )\n // InternalGaml.g:6084:2: rule__S_Species__Group__0__Impl rule__S_Species__Group__1\n {\n pushFollow(FollowSets000.FOLLOW_17);\n rule__S_Species__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Species__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 318, rule__S_Species__Group__0_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__S_Species__Group__1() throws RecognitionException {\n int rule__S_Species__Group__1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 320) ) { return ; }\n // InternalGaml.g:6112:1: ( rule__S_Species__Group__1__Impl rule__S_Species__Group__2 )\n // InternalGaml.g:6113:2: rule__S_Species__Group__1__Impl rule__S_Species__Group__2\n {\n pushFollow(FollowSets000.FOLLOW_17);\n rule__S_Species__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Species__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 320, rule__S_Species__Group__1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__S_Species__Group__2() throws RecognitionException {\n int rule__S_Species__Group__2_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 322) ) { return ; }\n // InternalGaml.g:6141:1: ( rule__S_Species__Group__2__Impl rule__S_Species__Group__3 )\n // InternalGaml.g:6142:2: rule__S_Species__Group__2__Impl rule__S_Species__Group__3\n {\n pushFollow(FollowSets000.FOLLOW_15);\n rule__S_Species__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Species__Group__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 322, rule__S_Species__Group__2_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void entryRuleS_Species() throws RecognitionException {\n int entryRuleS_Species_StartIndex = input.index();\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 19) ) { return ; }\n // InternalGaml.g:315:1: ( ruleS_Species EOF )\n // InternalGaml.g:316:1: ruleS_Species EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_SpeciesRule()); \n }\n pushFollow(FollowSets000.FOLLOW_1);\n ruleS_Species();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_SpeciesRule()); \n }\n match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 19, entryRuleS_Species_StartIndex); }\n }\n return ;\n }", "public final void rule__S_Species__Group__3() throws RecognitionException {\n int rule__S_Species__Group__3_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 324) ) { return ; }\n // InternalGaml.g:6170:1: ( rule__S_Species__Group__3__Impl rule__S_Species__Group__4 )\n // InternalGaml.g:6171:2: rule__S_Species__Group__3__Impl rule__S_Species__Group__4\n {\n pushFollow(FollowSets000.FOLLOW_15);\n rule__S_Species__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Species__Group__4();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 324, rule__S_Species__Group__3_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleS_Definition() throws RecognitionException {\n int ruleS_Definition_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 42) ) { return ; }\n // InternalGaml.g:635:2: ( ( ( rule__S_Definition__Group__0 ) ) )\n // InternalGaml.g:636:1: ( ( rule__S_Definition__Group__0 ) )\n {\n // InternalGaml.g:636:1: ( ( rule__S_Definition__Group__0 ) )\n // InternalGaml.g:637:1: ( rule__S_Definition__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_DefinitionAccess().getGroup()); \n }\n // InternalGaml.g:638:1: ( rule__S_Definition__Group__0 )\n // InternalGaml.g:638:2: rule__S_Definition__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Definition__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_DefinitionAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 42, ruleS_Definition_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rulespeciesOrGridDisplayStatement() throws RecognitionException {\n int rulespeciesOrGridDisplayStatement_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 66) ) { return ; }\n // InternalGaml.g:971:2: ( ( ( rule__SpeciesOrGridDisplayStatement__Group__0 ) ) )\n // InternalGaml.g:972:1: ( ( rule__SpeciesOrGridDisplayStatement__Group__0 ) )\n {\n // InternalGaml.g:972:1: ( ( rule__SpeciesOrGridDisplayStatement__Group__0 ) )\n // InternalGaml.g:973:1: ( rule__SpeciesOrGridDisplayStatement__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getSpeciesOrGridDisplayStatementAccess().getGroup()); \n }\n // InternalGaml.g:974:1: ( rule__SpeciesOrGridDisplayStatement__Group__0 )\n // InternalGaml.g:974:2: rule__SpeciesOrGridDisplayStatement__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__SpeciesOrGridDisplayStatement__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getSpeciesOrGridDisplayStatementAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 66, rulespeciesOrGridDisplayStatement_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleS_Experiment() throws RecognitionException {\n int ruleS_Experiment_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 22) ) { return ; }\n // InternalGaml.g:355:2: ( ( ( rule__S_Experiment__Group__0 ) ) )\n // InternalGaml.g:356:1: ( ( rule__S_Experiment__Group__0 ) )\n {\n // InternalGaml.g:356:1: ( ( rule__S_Experiment__Group__0 ) )\n // InternalGaml.g:357:1: ( rule__S_Experiment__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_ExperimentAccess().getGroup()); \n }\n // InternalGaml.g:358:1: ( rule__S_Experiment__Group__0 )\n // InternalGaml.g:358:2: rule__S_Experiment__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Experiment__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_ExperimentAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 22, ruleS_Experiment_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__S_Species__Group__4() throws RecognitionException {\n int rule__S_Species__Group__4_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 326) ) { return ; }\n // InternalGaml.g:6199:1: ( rule__S_Species__Group__4__Impl )\n // InternalGaml.g:6200:2: rule__S_Species__Group__4__Impl\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Species__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 326, rule__S_Species__Group__4_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__TypeRef__Group_1_1__0__Impl() throws RecognitionException {\n int rule__TypeRef__Group_1_1__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 919) ) { return ; }\n // InternalGaml.g:15444:1: ( ( 'species' ) )\n // InternalGaml.g:15445:1: ( 'species' )\n {\n // InternalGaml.g:15445:1: ( 'species' )\n // InternalGaml.g:15446:1: 'species'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getTypeRefAccess().getSpeciesKeyword_1_1_0()); \n }\n match(input,23,FollowSets000.FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getTypeRefAccess().getSpeciesKeyword_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 919, rule__TypeRef__Group_1_1__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__S_Species__Group__1__Impl() throws RecognitionException {\n int rule__S_Species__Group__1__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 321) ) { return ; }\n // InternalGaml.g:6124:1: ( ( ( rule__S_Species__FirstFacetAssignment_1 )? ) )\n // InternalGaml.g:6125:1: ( ( rule__S_Species__FirstFacetAssignment_1 )? )\n {\n // InternalGaml.g:6125:1: ( ( rule__S_Species__FirstFacetAssignment_1 )? )\n // InternalGaml.g:6126:1: ( rule__S_Species__FirstFacetAssignment_1 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_SpeciesAccess().getFirstFacetAssignment_1()); \n }\n // InternalGaml.g:6127:1: ( rule__S_Species__FirstFacetAssignment_1 )?\n int alt77=2;\n int LA77_0 = input.LA(1);\n\n if ( (LA77_0==76) ) {\n alt77=1;\n }\n switch (alt77) {\n case 1 :\n // InternalGaml.g:6127:2: rule__S_Species__FirstFacetAssignment_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Species__FirstFacetAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_SpeciesAccess().getFirstFacetAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 321, rule__S_Species__Group__1__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleS_Var() throws RecognitionException {\n int ruleS_Var_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 46) ) { return ; }\n // InternalGaml.g:691:2: ( ( ( rule__S_Var__Group__0 ) ) )\n // InternalGaml.g:692:1: ( ( rule__S_Var__Group__0 ) )\n {\n // InternalGaml.g:692:1: ( ( rule__S_Var__Group__0 ) )\n // InternalGaml.g:693:1: ( rule__S_Var__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_VarAccess().getGroup()); \n }\n // InternalGaml.g:694:1: ( rule__S_Var__Group__0 )\n // InternalGaml.g:694:2: rule__S_Var__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Var__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_VarAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 46, ruleS_Var_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__S_Species__Group__2__Impl() throws RecognitionException {\n int rule__S_Species__Group__2__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 323) ) { return ; }\n // InternalGaml.g:6153:1: ( ( ( rule__S_Species__NameAssignment_2 ) ) )\n // InternalGaml.g:6154:1: ( ( rule__S_Species__NameAssignment_2 ) )\n {\n // InternalGaml.g:6154:1: ( ( rule__S_Species__NameAssignment_2 ) )\n // InternalGaml.g:6155:1: ( rule__S_Species__NameAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_SpeciesAccess().getNameAssignment_2()); \n }\n // InternalGaml.g:6156:1: ( rule__S_Species__NameAssignment_2 )\n // InternalGaml.g:6156:2: rule__S_Species__NameAssignment_2\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Species__NameAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_SpeciesAccess().getNameAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 323, rule__S_Species__Group__2__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__SpeciesOrGridDisplayStatement__Group__0() throws RecognitionException {\n int rule__SpeciesOrGridDisplayStatement__Group__0_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 534) ) { return ; }\n // InternalGaml.g:9443:1: ( rule__SpeciesOrGridDisplayStatement__Group__0__Impl rule__SpeciesOrGridDisplayStatement__Group__1 )\n // InternalGaml.g:9444:2: rule__SpeciesOrGridDisplayStatement__Group__0__Impl rule__SpeciesOrGridDisplayStatement__Group__1\n {\n pushFollow(FollowSets000.FOLLOW_5);\n rule__SpeciesOrGridDisplayStatement__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FollowSets000.FOLLOW_2);\n rule__SpeciesOrGridDisplayStatement__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 534, rule__SpeciesOrGridDisplayStatement__Group__0_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleS_Action() throws RecognitionException {\n int ruleS_Action_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 44) ) { return ; }\n // InternalGaml.g:663:2: ( ( ( rule__S_Action__Group__0 ) ) )\n // InternalGaml.g:664:1: ( ( rule__S_Action__Group__0 ) )\n {\n // InternalGaml.g:664:1: ( ( rule__S_Action__Group__0 ) )\n // InternalGaml.g:665:1: ( rule__S_Action__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_ActionAccess().getGroup()); \n }\n // InternalGaml.g:666:1: ( rule__S_Action__Group__0 )\n // InternalGaml.g:666:2: rule__S_Action__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Action__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_ActionAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 44, ruleS_Action_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleTypeDefinition() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:132:2: ( ( ( rule__TypeDefinition__Group__0 ) ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:133:1: ( ( rule__TypeDefinition__Group__0 ) )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:133:1: ( ( rule__TypeDefinition__Group__0 ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:134:1: ( rule__TypeDefinition__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeDefinitionAccess().getGroup()); \r\n }\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:135:1: ( rule__TypeDefinition__Group__0 )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:135:2: rule__TypeDefinition__Group__0\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__TypeDefinition__Group__0_in_ruleTypeDefinition222);\r\n rule__TypeDefinition__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeDefinitionAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__S_Species__Group__0__Impl() throws RecognitionException {\n int rule__S_Species__Group__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 319) ) { return ; }\n // InternalGaml.g:6095:1: ( ( ( rule__S_Species__KeyAssignment_0 ) ) )\n // InternalGaml.g:6096:1: ( ( rule__S_Species__KeyAssignment_0 ) )\n {\n // InternalGaml.g:6096:1: ( ( rule__S_Species__KeyAssignment_0 ) )\n // InternalGaml.g:6097:1: ( rule__S_Species__KeyAssignment_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_SpeciesAccess().getKeyAssignment_0()); \n }\n // InternalGaml.g:6098:1: ( rule__S_Species__KeyAssignment_0 )\n // InternalGaml.g:6098:2: rule__S_Species__KeyAssignment_0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Species__KeyAssignment_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_SpeciesAccess().getKeyAssignment_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 319, rule__S_Species__Group__0__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void entryRule_SpeciesKey() throws RecognitionException {\n int entryRule_SpeciesKey_StartIndex = input.index();\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 71) ) { return ; }\n // InternalGaml.g:1047:1: ( rule_SpeciesKey EOF )\n // InternalGaml.g:1048:1: rule_SpeciesKey EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.get_SpeciesKeyRule()); \n }\n pushFollow(FollowSets000.FOLLOW_1);\n rule_SpeciesKey();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.get_SpeciesKeyRule()); \n }\n match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 71, entryRule_SpeciesKey_StartIndex); }\n }\n return ;\n }", "public final void rule__SpeciesOrGridDisplayStatement__Group__1() throws RecognitionException {\n int rule__SpeciesOrGridDisplayStatement__Group__1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 536) ) { return ; }\n // InternalGaml.g:9472:1: ( rule__SpeciesOrGridDisplayStatement__Group__1__Impl rule__SpeciesOrGridDisplayStatement__Group__2 )\n // InternalGaml.g:9473:2: rule__SpeciesOrGridDisplayStatement__Group__1__Impl rule__SpeciesOrGridDisplayStatement__Group__2\n {\n pushFollow(FollowSets000.FOLLOW_15);\n rule__SpeciesOrGridDisplayStatement__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FollowSets000.FOLLOW_2);\n rule__SpeciesOrGridDisplayStatement__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 536, rule__SpeciesOrGridDisplayStatement__Group__1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a class constructor to create an object for simulation of disturbances of the type "DISTURB_GAUSS_EXP". This must also be the provided type. Otherwise, the function will issue an error. For the Gaussian distribution, the initial variance is provided. The math expectation of the Gaussian distribution is always 0. The exponential decay is defined by the provided degree coefficient.
public MathDistortion(distortion_E type, int num_out, double sigma, double coef, int period, int seed) { int i; if(type!=distortion_E.DISTORT_GAUSS_EXP) { System.err.println("MathDisturbance: parameters do not match the chosen disturbance type"); System.exit(1); } if(period <= 0) { System.err.println("MathDisturbance: provided period must be a positive number"); System.exit(1); } _strength = new double[num_out]; _period = new int[num_out]; _exp_coef = new double[num_out]; _gauss_sigma = new double[num_out]; _rand = new Random(seed); _type = type; for(i=0; i<num_out; i++) { _strength [i] = Double.NaN; _period [i] = period; _exp_coef [i] = coef; _gauss_sigma[i] = sigma; } }
[ "public MathDistortion(distortion_E type, double[] sigma_0, double[] sigma_i, int seq_len, int[] period, int seed)\r\n\t{\r\n\t\tint i;\r\n\t\tint num_elements;\r\n\t\t\r\n\t\tnum_elements = sigma_0.length;\r\n\t\tif(type!=distortion_E.DISTORT_GAUSS_EXP)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"MathDisturbance: parameters do not match the chosen disturbance type\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\tfor(i=0; i<num_elements; i++)\r\n\t\t{\r\n\t\t\tif(period[i] <= 0)\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"MathDisturbance: provided period must be a positive number\");\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t_strength = new double[num_elements];\r\n\t\t_period = new int [num_elements];\r\n\t\t_exp_coef = new double[num_elements];\r\n\t\t_gauss_sigma = new double[num_elements];\r\n\t _rand = new Random(seed);\r\n\t\t\r\n\t\t_type = type;\r\n\t\tfor(i=0; i<num_elements; i++)\r\n\t\t{\r\n\t\t\t_strength [i] = Double.NaN;\r\n\t\t\t_period [i] = period[i];\r\n\t\t\t_gauss_sigma[i] = sigma_0[i];\r\n\t\t\t//compute the degree coefficient from Sigma(time_step) = exp(-a * seq_len)\r\n\t\t\t// it leads to a = ln( Sigma(time_step) ) / (-seq_len)\r\n\t\t\t_exp_coef[i] = Math.log(sigma_i[i]) / (- seq_len);\r\n\t\t}\r\n\t}", "GaussianType createGaussianType();", "public GaussianFactor()\n {\n this.var=\"\";\n instantiate(0,1,Double.NEGATIVE_INFINITY,Double.POSITIVE_INFINITY);\n }", "public Gaussian() {\n\t}", "public MathDistortion(distortion_E type, double[] strength, int[] period)\r\n\t{\r\n\t\tint i;\r\n\t\tint num_elements;//number of element in the array of disturbance\r\n\t\t\r\n\t\tnum_elements = strength.length;\r\n\t\tif(type!=distortion_E.DISTORT_CONST)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"MathDisturbance: parameters do not match the chosen disturbance type\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\tfor(i=0; i<num_elements; i++)\r\n\t\t{\r\n\t\t\tif(period[i] <= 0)\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"MathDisturbance: provided period must be a positive number\");\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t_strength = new double[num_elements];\r\n\t\t_period = new int [num_elements];\r\n\t\t_exp_coef = new double[num_elements];\r\n\t\t_gauss_sigma = new double[num_elements];\r\n\t\t_rand = null;\r\n\t\t\r\n\t\t_type = type;\r\n\t\tfor(i=0; i<num_elements; i++)\r\n\t\t{\r\n\t\t\t_strength [i] = strength[i];\r\n\t\t\t_period [i] = period[i];\r\n\t\t\t_exp_coef [i] = Double.NaN;\r\n\t\t\t_gauss_sigma[i] = Double.NaN;\r\n\t\t}\r\n\t}", "public Gaussian(Properties properties) {\n\t\ttry {\n\t\t\tthis.sigma = Double.parseDouble(properties\n\t\t\t\t\t.getProperty(\"transferFunction.sigma\"));\n\t\t} catch (NullPointerException e) {\n\t\t\t// if properties are not set just leave default values\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"Invalid transfer function properties! Using default values.\");\n\t\t}\n\t}", "public Gaussian() {\r\n this(1, 0, 1);\r\n }", "public NormalDistribution(float mean, float std)\n\t{\n\t\tthis.mean = mean;\n\t\tthis.std = std;\n\t}", "public GaussianFactor(double min, double max, double n, String var)\n {\n this.var=var;\n instantiate((min+max)/2,((max-min)/2)/n, min, max);\n }", "public GaussianMutation(Environment _environment, RealVectorLimits _limits,\n double[] _sigma) {\n super(_environment);\n limits = _limits;\n sigma = _sigma;\n g = new GaussianNumberGenerator(0.0, 1.0);\n }", "public HypergeometricDistribution(){\n\t\tthis(100, 50, 10);\n\t}", "public static double gaussian()\n {\n double x, y;\n x = uniform(0.0,1.0);\n y = uniform(0.0,1.0);\n return Math.cos(2 * Math.PI * x) * Math.sqrt(-2 * Math.log(y));\n }", "@Factory\n public static GaussianDistribution normalDistribution() {\n return INSTANCE;\n }", "@Factory\n public static GaussianDistribution normalDistribution(long seed) {\n return new GaussianDistribution(seed);\n }", "public EDistribution generate()\n\t{\n\t\t\n\t\tGARunner ru = new GARunner(qDist);\n\t\tGenotype best = ru.runGA(100);\n\t\tint[] arr = best.getCodeSet();\n\t\t//Let us calculate the eDist from this x.\n//\t\tMake a double array of x\n\t\tdouble[] x = new double[arr.length];\n\t\tfor(int i=0;i<x.length;i++)\n\t {\n\t\t\t x[i] = arr[i] / 10000.0; //TODO: Get rid of this magic number\n\t }\n\t\t\n\t\tdouble[] q = qDist.getDist();\n\t\t//Use Newman Formula\n\t\tdouble[][] eArr = new double[q.length][q.length];\n\t\tfor (int j = 0; j < eArr.length; j++) {\n\t\t\tfor (int k = 0; k < eArr.length; k++)\n\t\t\t{\n\t\t\t\teArr[j][k] = (q[j] * x[k]) + (q[k] * x[j]) - (x[j] * x[k]);\n\t\t\t\t//eArr[j][k] = (q[q.length-1-j] * x[q.length-1-k]) + (q[q.length-1-k] * x[q.length-1-j]) - (x[q.length-1-j] * x[q.length-1-k]);\t\n\t\t\t}\n\n\t\t}\n\t\tEDistribution ed = new EDistribution(eArr);\n\t\t//Calculate The Assortativeness for this EDist\n\t\tEDistributionGenerator egg = new EDistributionGenerator();\n\t\tdouble r = egg.calculate_r(ed,qDist);\n\t\tSystem.out.println(\"best rmin \"+r);\n\t\treturn ed;\n\t}", "public final EObject ruleGaussianTypeSpecifier() throws RecognitionException {\n EObject current = null;\n\n EObject lv_unit_3_0 = null;\n\n EObject lv_dimensions_6_0 = null;\n\n EObject lv_dimensions_8_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1989:6: ( ( () 'gauss' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )? ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1990:1: ( () 'gauss' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )? )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1990:1: ( () 'gauss' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )? )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1990:2: () 'gauss' ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )?\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1990:2: ()\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1991:5: \n {\n \n temp=factory.create(grammarAccess.getGaussianTypeSpecifierAccess().getGaussianTypeSpecifierAction_0().getType().getClassifier());\n current = temp; \n temp = null;\n CompositeNode newNode = createCompositeNode(grammarAccess.getGaussianTypeSpecifierAccess().getGaussianTypeSpecifierAction_0(), currentNode.getParent());\n newNode.getChildren().add(currentNode);\n moveLookaheadInfo(currentNode, newNode);\n currentNode = newNode; \n associateNodeWithAstElement(currentNode, current); \n \n\n }\n\n match(input,37,FOLLOW_37_in_ruleGaussianTypeSpecifier3490); \n\n createLeafNode(grammarAccess.getGaussianTypeSpecifierAccess().getGaussKeyword_1(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2005:1: ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )?\n int alt29=2;\n int LA29_0 = input.LA(1);\n\n if ( (LA29_0==25) ) {\n alt29=1;\n }\n switch (alt29) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2005:3: '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')'\n {\n match(input,25,FOLLOW_25_in_ruleGaussianTypeSpecifier3501); \n\n createLeafNode(grammarAccess.getGaussianTypeSpecifierAccess().getLeftParenthesisKeyword_2_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2009:1: ( (lv_unit_3_0= ruleUnitExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2010:1: (lv_unit_3_0= ruleUnitExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2010:1: (lv_unit_3_0= ruleUnitExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2011:3: lv_unit_3_0= ruleUnitExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getGaussianTypeSpecifierAccess().getUnitUnitExpressionParserRuleCall_2_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleUnitExpression_in_ruleGaussianTypeSpecifier3522);\n lv_unit_3_0=ruleUnitExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getGaussianTypeSpecifierRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"unit\",\n \t \t\tlv_unit_3_0, \n \t \t\t\"UnitExpression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n match(input,26,FOLLOW_26_in_ruleGaussianTypeSpecifier3532); \n\n createLeafNode(grammarAccess.getGaussianTypeSpecifierAccess().getRightParenthesisKeyword_2_2(), null); \n \n\n }\n break;\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2037:3: ( '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']' )?\n int alt31=2;\n int LA31_0 = input.LA(1);\n\n if ( (LA31_0==33) ) {\n alt31=1;\n }\n switch (alt31) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2037:5: '[' ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )* ']'\n {\n match(input,33,FOLLOW_33_in_ruleGaussianTypeSpecifier3545); \n\n createLeafNode(grammarAccess.getGaussianTypeSpecifierAccess().getLeftSquareBracketKeyword_3_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2041:1: ( (lv_dimensions_6_0= ruleArrayDimensionSpecification ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2042:1: (lv_dimensions_6_0= ruleArrayDimensionSpecification )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2042:1: (lv_dimensions_6_0= ruleArrayDimensionSpecification )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2043:3: lv_dimensions_6_0= ruleArrayDimensionSpecification\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getGaussianTypeSpecifierAccess().getDimensionsArrayDimensionSpecificationParserRuleCall_3_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleArrayDimensionSpecification_in_ruleGaussianTypeSpecifier3566);\n lv_dimensions_6_0=ruleArrayDimensionSpecification();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getGaussianTypeSpecifierRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"dimensions\",\n \t \t\tlv_dimensions_6_0, \n \t \t\t\"ArrayDimensionSpecification\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2065:2: ( ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) ) )*\n loop30:\n do {\n int alt30=2;\n int LA30_0 = input.LA(1);\n\n if ( (LA30_0==14) ) {\n alt30=1;\n }\n\n\n switch (alt30) {\n \tcase 1 :\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2065:4: ',' ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) )\n \t {\n \t match(input,14,FOLLOW_14_in_ruleGaussianTypeSpecifier3577); \n\n \t createLeafNode(grammarAccess.getGaussianTypeSpecifierAccess().getCommaKeyword_3_2_0(), null); \n \t \n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2069:1: ( (lv_dimensions_8_0= ruleArrayDimensionSpecification ) )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2070:1: (lv_dimensions_8_0= ruleArrayDimensionSpecification )\n \t {\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2070:1: (lv_dimensions_8_0= ruleArrayDimensionSpecification )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2071:3: lv_dimensions_8_0= ruleArrayDimensionSpecification\n \t {\n \t \n \t \t currentNode=createCompositeNode(grammarAccess.getGaussianTypeSpecifierAccess().getDimensionsArrayDimensionSpecificationParserRuleCall_3_2_1_0(), currentNode); \n \t \t \n \t pushFollow(FOLLOW_ruleArrayDimensionSpecification_in_ruleGaussianTypeSpecifier3598);\n \t lv_dimensions_8_0=ruleArrayDimensionSpecification();\n \t _fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = factory.create(grammarAccess.getGaussianTypeSpecifierRule().getType().getClassifier());\n \t \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t \t }\n \t \t try {\n \t \t \t\tadd(\n \t \t \t\t\tcurrent, \n \t \t \t\t\t\"dimensions\",\n \t \t \t\tlv_dimensions_8_0, \n \t \t \t\t\"ArrayDimensionSpecification\", \n \t \t \t\tcurrentNode);\n \t \t } catch (ValueConverterException vce) {\n \t \t\t\t\thandleValueConverterException(vce);\n \t \t }\n \t \t currentNode = currentNode.getParent();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop30;\n }\n } while (true);\n\n match(input,34,FOLLOW_34_in_ruleGaussianTypeSpecifier3610); \n\n createLeafNode(grammarAccess.getGaussianTypeSpecifierAccess().getRightSquareBracketKeyword_3_3(), null); \n \n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public HyperExponentialVariate() {\r\n\t}", "public GaussianFilter(int dimension, double deviationConstant) {\n\t\tsuper(dimension);\n\t\ta = deviationConstant;\n\t\tvalues = new float[x][y];\n\t\trecalculate();\n\t}", "Distribution<T> newDistribution();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
does this board equal y?
public boolean equals(Object y) { if (y == this) return true; if (y == null) return false; if (y.getClass() != this.getClass()) return false; Board that = (Board) y; if (this.n != that.n) return false; for (int row = 0; row < n; row++) for (int col = 0; col < n; col++) if (that.tiles[row][col] != this.tiles[row][col]) return false; return true; }
[ "public boolean equals(Object y) {\n if (y == this) return true;\n if (y == null) return false;\n if (y.getClass() != this.getClass()) return false;\n Board that = (Board) y;\n if (that.n != this.n) return false;\n for (int i = 0; i < n * n; i++) {\n if (that.tileAt(i / n, i % n) != board[i / n][i % n]) return false;\n }\n return true;\n }", "public boolean equals(Object y) {\n if (y == this) \n return true;\n if (y == null)\n return false;\n if (y.getClass() != this.getClass())\n return false;\n Board that = (Board) y;\n if (this.dim != that.dim)\n return false;\n \n for (int i = 0; i < dim; i++) {\n for (int j = 0; j < dim; j++) {\n if (this.board[i][j] != that.board[i][j]) {\n return false;\n }\n }\n }\n return true;\n \n }", "public boolean equals(Object y){\n\t\tif(y == null) return false;\n\t\telse if (this == y) return true;\n\t\telse if (this.getClass() != y.getClass()) return false;\n\t\telse {\n\t\t\tBoard that = (Board) y;\n\t\t\tif(this.size != that.size) return false;\n\t\t\tfor(int i = 0; i < size;i++){\n\t\t\t\tfor(int j = 0;j < size;j++){\n\t\t\t\t\tif(this.board[i][j] != that.board[i][j]) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean equals(Object y) {\n if (y == this) return true;\n if (y == null) return false;\n if (y.getClass() != this.getClass()) return false;\n Board that = (Board) y;\n if (that.dim != this.dim) return false;\n for (int i = 0; i < this.tiles.length; i++) {\n if (this.tiles[i] != that.tiles[i])\n return false;\n }\n return true;\n }", "public boolean equals(Object y) {\n if (y == this) return true;\n if (y == null) return false;\n if (y.getClass() != this.getClass()) return false;\n Board that = (Board) y;\n if (that.dimension() != this.dimension())\n return false;\n for (int i = 0; i < this.N; i++) {\n for (int j = 0; j < this.N; j++) {\n if (this.tiles[i][j] != that.tiles[i][j]) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean equals(Object y) {\n \tif (y == this) return true;\r\n \tif (y == null) return false;\r\n \tif (y.getClass() != this.getClass()) return false;\r\n \tBoard cmp = (Board) y;\r\n \tif (cmp.dimension() != this.dimension()) return false;\r\n \tfor (int i = 0; i < dimension(); i++)\r\n \t\tfor (int j = 0; j < dimension(); j++)\r\n \t\t\tif (this.blocks[i][j] != cmp.blocks[i][j]) return false;\r\n \treturn true;\r\n }", "boolean compareBoard();", "private boolean checkVertical(int piece, int x, int y) {\n\t\tint count = 0;\n\t\tint coord = x;\n\t\twhile (coord >= 0 && omokBoard[coord][y] == piece) { // counting up\n\t\t\tcount++;\n\t\t\tcoord--;\n\t\t}\n\t\tcoord = x + 1;\n\t\twhile (coord < omokBoard.length && omokBoard[coord][y] == piece) { // counting down\n\t\t\tcount++;\n\t\t\tcoord++;\n\t\t}\n\t\t\n\t\treturn count >= WIN_AMOUNT;\n\t}", "boolean equals(Board b) {\n\n for (int i = 0; i < SIZE; i++)\n for (int j = 0; j < SIZE; j++)\n if (board[i][j] != b.board[i][j]) return false;\n return true;\n\n }", "protected boolean check_place(int x, int y){\n\n for(int i=0;i<8;i++){\n for(int j=0;j<8;j++){\n if(i==x){\n if(bgrid[i][j]) {\n return false;\n }\n }else if(j==y){\n if(bgrid[i][j]) {\n return false;\n }\n }else if(y-x==j-i){\n //row-col matches diagonal going from top left to bottom right\n if(bgrid[i][j]) {\n return false;\n }\n }else if(y+x==j+i){\n //row+col matches diagonal going from bottom left up to top right\n if(bgrid[i][j]) {\n return false;\n }\n }\n }\n }\n\n return true;\n }", "private boolean isInsideBoard(int x, int y){\n if(x < 0 || x > getWidth() - 1 || y < 0 || y > getHeight() - 1)\n return false;\n\n return true;\n }", "private boolean winCheck(int x, int y, char symbol){\n\t\t/* Horizontal */\n\t\tif(y>=2 && board[x][y-2]==symbol && board[x][y-1]==symbol && board[x][y]==symbol)\n\t\t\treturn true;\n\t\tif(y>=1 && y+1<size && board[x][y-1]==symbol && board[x][y]==symbol && board[x][y+1]==symbol)\n\t\t\treturn true;\n\t\tif(y+2<size && board[x][y]==symbol && board[x][y+1]==symbol && board[x][y+2]==symbol)\n\t\t\treturn true;\n\t\t\n\t\t/* Vertical */\n\t\tif(x>=2 && board[x-2][y]==symbol && board[x-1][y]==symbol && board[x][y]==symbol)\n\t\t\treturn true;\n\t\tif(x>=1 && x+1<size && board[x-1][y]==symbol && board[x][y]==symbol && board[x+1][y]==symbol)\n\t\t\treturn true;\n\t\tif(x+2<size && board[x][y]==symbol && board[x+1][y]==symbol && board[x+2][y]==symbol)\n\t\t\treturn true;\n\t\t\n\t\t/* Main Diagonal */\n\t\tif(x>=2 && y>=2 && board[x-2][y-2]==symbol && board[x-1][y-1]==symbol && board[x][y]==symbol)\n\t\t\treturn true;\n\t\tif(x>=1 && x+1<size && y>=1 && y+1<size && board[x-1][y-1]==symbol && board[x][y]==symbol && board[x+1][y+1]==symbol)\n\t\t\treturn true;\n\t\tif(x+2<size && y+2<size && board[x][y]==symbol && board[x+1][y+1]==symbol && board[x+2][y+2]==symbol)\n\t\t\treturn true;\n\t\t\n\t\t/* Anti Diagonal */\n\t\tif(x>=2 && y+2<size && board[x-2][y+2]==symbol && board[x-1][y+1]==symbol && board[x][y]==symbol)\n\t\t\treturn true;\n\t\tif(x>=1 && x+1<size && y>=1 && y+1<size && board[x+1][y-1]==symbol && board[x][y]==symbol && board[x-1][y+1]==symbol)\n\t\t\treturn true;\n\t\tif(x+2<size && y>=2 && board[x][y]==symbol && board[x+1][y-1]==symbol && board[x+2][y-2]==symbol)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "private boolean isPossibleY(int[][] game, int x, int number) {\n for (int y = 0; y < 9; y++) \n if (game[y][x] == number)\n return false;\n return true;\n }", "boolean equals(GameState b) {\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n if (board[i][j] != b.board[i][j]) {\n return false;\n }\n }\n }\n return true;\n\n }", "public boolean checkVertical(int player, int x, int y) {\n\t\tif (y > board[x].length-INROW) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (int i = 0; i < INROW; i++) {\n\t\t\tif (board[x][y+i] != player) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean equals(Object board) {\n try {\n Board b = (Board) board;\n for (int i = 0; i < DIMENSION; i++) {\n for (int j = 0; j < DIMENSION; j++) {\n if (b.board[i][j] != this.board[i][j]) {\n return false;\n }\n }\n }\n return true;\n } catch (ClassCastException c) {\n System.out.println(\"Object is not board.\");\n return false;\n }\n }", "public boolean isGameSquare(int x, int y) {\n return (x >= 0 && y >= 0 && x < 8 && y < 8 && (x + y) % 2 > 0);\n }", "private boolean verticalWin (int row, int col, char piece) {\n int count = 0;\n\n for (int i = row; i < ROWS; i++) {\n if (board[i][col] == piece) {\n count++;\n } else {\n break;\n }\n }\n\n for (int i = row - 1; i >= 0; i--) {\n if (board[i][col] == piece) {\n count++;\n } else {\n break;\n }\n }\n\n return count >= 4;\n }", "boolean tileOnBoard(int x, int y) {\r\n return x < width && x >= 0 && y < height && y >=0;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all values of property InternationalStandardRecordingCode as an Iterator over RDF2Go nodes
public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllInternationalStandardRecordingCode_asNode() { return Base.getAll_asNode(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE); }
[ "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllInternationalStandardRecordingCode_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_asNode(model, instanceResource, INTERNATIONALSTANDARDRECORDINGCODE);\r\n\t}", "Iterator listRDFProperties();", "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllInternationalStandardRecordingCode_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllRecordingYear_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), RECORDINGYEAR);\r\n\t}", "public ReactorResult<java.lang.String> getAllInternationalStandardRecordingCode_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE, java.lang.String.class);\r\n\t}", "public CodeUnitIterator getCodeUnitIterator(String property, Address addr, boolean forward);", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllRecordingDate_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), RECORDINGDATE);\r\n\t}", "public abstract Iterator<RName> getAttributeIterator();", "Iterator<XSComplexType> iterateComplexTypes();", "public CodeUnitIterator getCodeUnitIterator(String property, boolean forward);", "public Iterator<OpenERPRecord> iterator() {\r\n\t\treturn records.iterator();\r\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllOfficialAudioSourceWebpage_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), OFFICIALAUDIOSOURCEWEBPAGE);\r\n\t}", "public void addInternationalStandardRecordingCode( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE, value);\r\n\t}", "public void setInternationalStandardRecordingCode( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE, value);\r\n\t}", "public Iterator<ULiteral> iterator() {\r\n return literals.iterator();\r\n }", "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllRecordingYear_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_asNode(model, instanceResource, RECORDINGYEAR);\r\n\t}", "Collection getRDFProperties();", "public Iterator<String> getPrimitiveEntityIterator();", "@Override\n public Iterator<Value> iterator()\n {\n return values.iterator();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CURegistrar Crea una instancia del caso de uso Registrar
public CURegistrar(){ }
[ "public VentanaRegistrar() {\n initComponents();\n }", "Register createRegister();", "public static Registrar getRegistrar() {\n \t\treturn flagRegistrar;\n \t}", "public Registration() {\n\t\tsuper();\n\t}", "public Registration() {\n\t}", "@Override\n public void registrar()\n {\n \n new CRegistrarProveedor(user);\n ventana.dispose();\n \n }", "private Register() {\r\n\t\tinitialise();\r\n\t}", "RegistrationModule createRegistrationModule();", "@Test\r\n public void testRegistrarSesion() throws Exception {\r\n testtutoria.registrarSesion(\"S12251425\", 3);\r\n }", "public void register(){\n }", "public RegistrarBean() {\n \n }", "public static void adicionarRegisto(){\n \n }", "public register() {\n }", "@Test\n public void testRegistrar() throws Exception { \n long sufijo = System.currentTimeMillis();\n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(sufijo); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin());\n assertNotNull(usuarioRegistrado);\n }", "public ChequesRegister() {\n }", "protected Registrar getRegistrar() {\n EntityManager em = JPAFilter.getEntityManager();\n StudentDAO studentDao = new StudentJPADAO();\n ((StudentJPADAO)studentDao).setEntityManager(em);\n Registrar registrar = new RegistrarImpl();\n ((RegistrarImpl)registrar).setStudentDAO(studentDao);\n return registrar;\n }", "public reg_linea_inv_registrar() {\n initComponents();\n \n }", "@Override\n\tpublic ReglasJuego creaReglas() {\n\t\treturn new ReglasConecta4();\n\t}", "public RegistryCreator(){\n\n\t\tthis.accounting = new Accounting();\n\t\tthis.inventory = new Inventory();\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the maximum illumination level this Race's creatures can see in.
public int getMaximumVisibleIllumination();
[ "public static int getMaxDamage() {\n\t\treturn MAX_DAMAGE;\n\t}", "public float getMaxMana()\n {\n return maxMana;\n }", "public int getMaximumLevel() {\n return Math.min(maximumLevel, 127);\n }", "public int highestLevel() {\n\t\tint max = 1;\n\t\tfor (Hero hero:teamOfHeros) {\n\t\t\tif (hero.getLevel() > max) {\n\t\t\t\tmax = hero.getLevel();\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "int getMaxLevel();", "public int getMaxPhysicalConstitution();", "public int getLevel(){\n \t\treturn (strength + intelligence + stamina + Math.abs(charm) + Math.abs(cuteness))/5;\n \t}", "int getLum();", "public int getMaxLvl() {\n return maxLvl;\n }", "public int getMaxLevel()\r\n\t{\treturn this.maxLevel;\t}", "public int getMoistureLevel() {\n\n\t\tif (!ASConfig.statusMoisture) return MAX_MOISTURE_LEVEL;\n\n\t\treturn this.moistureLevel;\n\t}", "public int getMaxLevel() {\n\t\treturn maxLevel;\n\t}", "public Integer getLevelMax() {\r\n return levelMax;\r\n }", "int getMaxMana();", "public int getMaxPhysicalDexterity();", "public int getMaxMentalStrength();", "public double getMaxHealthPerLevel()\r\n\t{\treturn this.maxHealthPerLevel;\t}", "public int getMaxHealth();", "public float getMaximumElevation() {\n return getMaximumLength() / 10;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new handler with the specified character encoding.
public DefaultRequestHandler(String characterEncoding) { this.characterEncoding = characterEncoding; }
[ "Handler createHandler();", "public NewTextLineCodecFactory(String charset,String encodingDelimiter, String decodingDelimiter){\n\t\tsuper(Charset.forName(charset),encodingDelimiter,decodingDelimiter);\n\t}", "protected void addCharacterEncoding(int code, String name) {\n\t}", "Builder addEncoding(String value);", "protected InputHandler createInputHandler() {\n\t\treturn new InputHandler();\n\t}", "private Function<String, String> createDecoder(String charset, String encoding) {\n // base64 decoder\n if (encoding.equalsIgnoreCase(\"B\")) {\n return (text) -> {\n try {\n return new String(Base64.getDecoder().decode(text), charset);\n } catch (Exception e) {\n // ignore\n }\n return null;\n };\n }\n\n // quoted printable decoder\n if (encoding.equalsIgnoreCase(\"Q\")) {\n return (text) -> {\n try {\n return new String(QuotedPrintableDecoder.decode(text.getBytes()), charset);\n } catch (Exception e) {\n // ignore\n }\n return null;\n };\n }\n\n return null;\n }", "public final SslHandler newHandler(ByteBufAllocator alloc) {\n return newHandler(alloc, startTls);\n }", "public DecodeHandler(ChannelHandler handler) {\n super(handler);\n }", "private CharsetDecoder getJavaEncoding(String encoding) {\n Charset charset = Charset.forName(encoding);\n return charset.newDecoder();\n }", "protected SslHandler newHandler(ByteBufAllocator alloc, boolean startTls, Executor executor) {\n return new SslHandler(newEngine(alloc), startTls, executor);\n }", "protected SslHandler newHandler(ByteBufAllocator alloc, boolean startTls) {\n return new SslHandler(newEngine(alloc), startTls);\n }", "public abstract String getEncoding(char c);", "public void setInputEncoding(String inputEncoding) {\r\n this.inputEncoding = inputEncoding;\r\n }", "public void setLexicalHandler(LexicalHandler handler) { }", "public void setInputEncoding(String encoding)\n {\n configuration.setInCharEncodingName(encoding);\n }", "Handler create(Encounter<? extends Collector> encounter);", "public BaseValueParser(String characterEncoding)\n {\n this(characterEncoding, Locale.getDefault());\n }", "EthHandler create(EthVersion version);", "public WiredEncodingHandler() {\n super(1e-3);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set a channel pool to start with. Usually loaded during server start.
public static void setPool(Map<String, SocketChannel> newChannelPool){ channelPool = newChannelPool; }
[ "public void setChPool(Set chPool) {\n\t\tthis.chPool = chPool;\n\t}", "public Set getChPool() {\n\t\treturn chPool;\n\t}", "void setPoolNumber(int poolNumber);", "protected void setPool(final Pool<PoolType, Long> pool) {\n this.pool = pool;\n }", "public void setWorkerpool(Executor workerpool) {\n\t pool.setWorkerpool(workerpool);\n\t}", "public void setPoolSize(int aPoolSize) {\n poolSize = aPoolSize;\n }", "public void setConnectionPool(ConnectionPool tmp) {\n this.connectionPool = tmp;\n }", "public static void setConnectionPool(BoneCP connectionPool) {\n\t\tSQLDataBaseConnector.connectionPool = connectionPool;\n\t}", "private void setJedisFromPool() {\n\t\tjedis = jedisPool.getResource();\n\t}", "public void initPools(){\r\n\t\tConnection conn = null;\r\n\t\twhile(freeConnections.size()<minConn){\r\n\t\t\tconn = newConnection();\r\n\t\t\tif(conn!=null){\r\n\t\t\t\tfreeConnections.add(conn);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private synchronized void enablePool()\n {\n _poolMode.setMode(PoolV2Mode.ENABLED);\n _poolStatusCode = 0;\n _poolStatusMessage = \"OK\";\n \n _pingThread.sendPoolManagerMessage(true);\n esay(\"New Pool Mode : \" + _poolMode);\n }", "public void startThread() {\n\t\tif (this.serverConnectorUsed <= Byte.MAX_VALUE) {\n\t\t\tthis.serverConnectorUsed++;\n\t\t\tLOG.info(\"Running new thread. Now pool is \"+Integer.toString(MAX_THREADS-this.serverConnectorUsed)+\" / \"+Integer.toString(MAX_THREADS));\n\t\t}\n\t}", "void init(int corePoolSize);", "void connect(FmqPool pool);", "void setThreadPoolSize(Integer threadPoolSize);", "void setPoolId(java.lang.String poolId);", "public void setThreadPoolChooser(String componentId, ThreadPoolChooser aThreadPoolChooser);", "private void init() {\n\t\tJedisPoolConfig config = new JedisPoolConfig();\r\n\t\tconfig.setMaxTotal(1024);\r\n\t\tconfig.setMaxIdle(200);\r\n\t\tconfig.setMaxWaitMillis(1000);\r\n\t\tconfig.setTestOnBorrow(false);\r\n\t\tconfig.setTestOnReturn(true);\r\n\t\tString ip = \"sg-redis-new.jo1mjq.0001.apse1.cache.amazonaws.com\";\r\n\t\tint port = 6379;\r\n\t\tjedisPool = new JedisPool(config, ip, port);\r\n\t\tlog.info(\"init redis pool[ip:\" + ip + \",port:\" + port + \"]\");\r\n\t}", "void setPoolName(java.lang.String poolName);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a download keys promise
private List<String> addDownloadKeysPromise(List<String> userIds, ApiCallback<MXUsersDevicesMap<MXDeviceInfo>> callback) { if (null != userIds) { List<String> filteredUserIds = new ArrayList<>(userIds); synchronized (mUserKeyDownloadsInProgress) { filteredUserIds.removeAll(mUserKeyDownloadsInProgress); mUserKeyDownloadsInProgress.addAll(userIds); } synchronized (mPendingUsersWithNewDevices) { mPendingUsersWithNewDevices.removeAll(userIds); } mDownloadKeysQueues.add(new DownloadKeysPromise(userIds, callback)); return filteredUserIds; } else { return null; } }
[ "private void onKeysDownloadSucceed(List<String> userIds, Map<String, Map<String, Object>> failures) {\n if (null != failures) {\n Set<String> keys = failures.keySet();\n\n for (String k : keys) {\n Map<String, Object> value = failures.get(k);\n\n if (value.containsKey(\"status\")) {\n Object statusCodeAsVoid = value.get(\"status\");\n int statusCode = 0;\n\n if (statusCodeAsVoid instanceof Double) {\n statusCode = ((Double) statusCodeAsVoid).intValue();\n } else if (statusCodeAsVoid instanceof Integer) {\n statusCode = ((Integer) statusCodeAsVoid).intValue();\n }\n\n if (statusCode == 503) {\n synchronized (mNotReadyToRetryHS) {\n mNotReadyToRetryHS.add(k);\n }\n }\n }\n }\n }\n\n if (null != userIds) {\n if (mDownloadKeysQueues.size() > 0) {\n ArrayList<DownloadKeysPromise> promisesToRemove = new ArrayList<>();\n\n for (DownloadKeysPromise promise : mDownloadKeysQueues) {\n promise.mPendingUserIdsList.removeAll(userIds);\n\n if (promise.mPendingUserIdsList.size() == 0) {\n // private members\n final MXUsersDevicesMap<MXDeviceInfo> usersDevicesInfoMap = new MXUsersDevicesMap<>();\n\n for (String userId : promise.mUserIdsList) {\n Map<String, MXDeviceInfo> devices = mxCrypto.getCryptoStore().getUserDevices(userId);\n\n if (null == devices) {\n synchronized (mPendingUsersWithNewDevices) {\n if (canRetryKeysDownload(userId)) {\n mPendingUsersWithNewDevices.add(userId);\n Log.e(LOG_TAG, \"failed to retry the devices of \" + userId + \" : retry later\");\n } else {\n Log.e(LOG_TAG, \"failed to retry the devices of \" + userId + \" : the HS is not available\");\n }\n }\n } else {\n // And the response result\n usersDevicesInfoMap.setObjects(devices, userId);\n }\n }\n\n if (!mxCrypto.hasBeenReleased()) {\n final ApiCallback<MXUsersDevicesMap<MXDeviceInfo>> callback = promise.mCallback;\n\n if (null != callback) {\n mxCrypto.getUIHandler().post(new Runnable() {\n @Override\n public void run() {\n callback.onSuccess(usersDevicesInfoMap);\n }\n });\n }\n }\n promisesToRemove.add(promise);\n }\n }\n mDownloadKeysQueues.removeAll(promisesToRemove);\n }\n\n mUserKeyDownloadsInProgress.removeAll(userIds);\n }\n\n mIsDownloadingKeys = false;\n }", "private void doKeyDownloadForUsers(final List<String> downloadUsers, final ApiCallback<MXUsersDevicesMap<MXDeviceInfo>> callback) {\n Log.d(LOG_TAG, \"## doKeyDownloadForUsers() : doKeyDownloadForUsers \" + downloadUsers);\n\n // get the user ids which did not already trigger a keys download\n final List<String> filteredUsers = addDownloadKeysPromise(downloadUsers, callback);\n\n // if there is no new keys request\n if (0 == filteredUsers.size()) {\n // trigger nothing\n return;\n }\n\n // sanity check\n if ((null == mxSession.getDataHandler()) || (null == mxSession.getDataHandler().getStore())) {\n return;\n }\n\n mIsDownloadingKeys = true;\n\n mxSession.getCryptoRestClient().downloadKeysForUsers(filteredUsers, mxSession.getDataHandler().getStore().getEventStreamToken(), new ApiCallback<KeysQueryResponse>() {\n @Override\n public void onSuccess(final KeysQueryResponse keysQueryResponse) {\n mxCrypto.getEncryptingThreadHandler().post(new Runnable() {\n @Override\n public void run() {\n\n Log.d(LOG_TAG, \"## doKeyDownloadForUsers() : Got keys for \" + filteredUsers.size() + \" users\");\n MXDeviceInfo myDevice = mxCrypto.getMyDevice();\n IMXCryptoStore cryptoStore = mxCrypto.getCryptoStore();\n\n for (String userId : filteredUsers) {\n Map<String, MXDeviceInfo> devices = keysQueryResponse.deviceKeys.get(userId);\n\n Log.d(LOG_TAG, \"## doKeyDownloadForUsers() : Got keys for \" + userId + \" : \" + devices);\n\n if (null != devices) {\n HashMap<String, MXDeviceInfo> mutableDevices = new HashMap<>(devices);\n ArrayList<String> deviceIds = new ArrayList<>(mutableDevices.keySet());\n\n for (String deviceId : deviceIds) {\n // the user has been logged out\n if (null == cryptoStore) {\n break;\n }\n\n // Get the potential previously store device keys for this device\n MXDeviceInfo previouslyStoredDeviceKeys = cryptoStore.getUserDevice(deviceId, userId);\n MXDeviceInfo deviceInfo = mutableDevices.get(deviceId);\n\n // in some race conditions (like unit tests)\n // the self device must be seen as verified\n if (TextUtils.equals(deviceInfo.deviceId, myDevice.deviceId) &&\n TextUtils.equals(userId, myDevice.userId)) {\n deviceInfo.mVerified = MXDeviceInfo.DEVICE_VERIFICATION_VERIFIED;\n }\n\n // Validate received keys\n if (!validateDeviceKeys(deviceInfo, userId, deviceId, previouslyStoredDeviceKeys)) {\n // New device keys are not valid. Do not store them\n mutableDevices.remove(deviceId);\n\n if (null != previouslyStoredDeviceKeys) {\n // But keep old validated ones if any\n mutableDevices.put(deviceId, previouslyStoredDeviceKeys);\n }\n } else if (null != previouslyStoredDeviceKeys) {\n // The verified status is not sync'ed with hs.\n // This is a client side information, valid only for this client.\n // So, transfer its previous value\n mutableDevices.get(deviceId).mVerified = previouslyStoredDeviceKeys.mVerified;\n }\n }\n\n // Update the store\n // Note that devices which aren't in the response will be removed from the stores\n cryptoStore.storeUserDevices(userId, mutableDevices);\n }\n }\n\n onKeysDownloadSucceed(filteredUsers, keysQueryResponse.failures);\n }\n });\n }\n\n @Override\n public void onNetworkError(Exception e) {\n mxCrypto.getEncryptingThreadHandler().post(new Runnable() {\n @Override\n public void run() {\n onKeysDownloadFailed(filteredUsers);\n }\n });\n\n Log.e(LOG_TAG, \"##doKeyDownloadForUsers() : onNetworkError \" + e.getMessage());\n if (null != callback) {\n callback.onNetworkError(e);\n }\n }\n\n @Override\n public void onMatrixError(MatrixError e) {\n Log.e(LOG_TAG, \"##doKeyDownloadForUsers() : onMatrixError \" + e.getMessage());\n\n mxCrypto.getEncryptingThreadHandler().post(new Runnable() {\n @Override\n public void run() {\n onKeysDownloadFailed(filteredUsers);\n }\n });\n\n if (null != callback) {\n callback.onMatrixError(e);\n }\n }\n\n @Override\n public void onUnexpectedError(Exception e) {\n Log.e(LOG_TAG, \"##doKeyDownloadForUsers() : onUnexpectedError \" + e.getMessage());\n\n mxCrypto.getEncryptingThreadHandler().post(new Runnable() {\n @Override\n public void run() {\n onKeysDownloadFailed(filteredUsers);\n }\n });\n\n if (null != callback) {\n callback.onUnexpectedError(e);\n }\n }\n });\n }", "java.util.concurrent.Future<GetTagKeysResult> getTagKeysAsync(GetTagKeysRequest getTagKeysRequest);", "public void downloadKeys(List<String> userIds, boolean forceDownload, final ApiCallback<MXUsersDevicesMap<MXDeviceInfo>> callback) {\n Log.d(LOG_TAG, \"## downloadKeys() : forceDownload \" + forceDownload + \" : \" + userIds);\n\n // Map from userid -> deviceid -> DeviceInfo\n final MXUsersDevicesMap<MXDeviceInfo> stored = new MXUsersDevicesMap<>();\n\n // List of user ids we need to download keys for\n final ArrayList<String> downloadUsers;\n\n if (forceDownload) {\n downloadUsers = (null == userIds) ? new ArrayList<String>() : new ArrayList<>(userIds);\n } else {\n downloadUsers = new ArrayList<>();\n\n if (null != userIds) {\n IMXCryptoStore store = mxCrypto.getCryptoStore();\n\n for (String userId : userIds) {\n\n Map<String, MXDeviceInfo> devices = store.getUserDevices(userId);\n\n if (null == devices) {\n downloadUsers.add(userId);\n } else {\n // the keys download won't be triggered twice\n // but the callback requires the dedicated keys\n if (isKeysDownloading(userId)) {\n downloadUsers.add(userId);\n } else {\n stored.setObjects(devices, userId);\n }\n }\n }\n }\n }\n\n if (0 == downloadUsers.size()) {\n Log.d(LOG_TAG, \"## downloadKeys() : no new user device\");\n\n if (null != callback) {\n mxCrypto.getUIHandler().post(new Runnable() {\n @Override\n public void run() {\n callback.onSuccess(stored);\n }\n });\n }\n } else {\n Log.d(LOG_TAG, \"## downloadKeys() : starts\");\n final long t0 = System.currentTimeMillis();\n\n doKeyDownloadForUsers(downloadUsers, new ApiCallback<MXUsersDevicesMap<MXDeviceInfo>>() {\n public void onSuccess(MXUsersDevicesMap<MXDeviceInfo> usersDevicesInfoMap) {\n Log.d(LOG_TAG, \"## downloadKeys() : doKeyDownloadForUsers succeeds after \" + (System.currentTimeMillis() - t0) + \" ms\");\n\n usersDevicesInfoMap.addEntriesFromMap(stored);\n\n if (null != callback) {\n callback.onSuccess(usersDevicesInfoMap);\n }\n }\n\n @Override\n public void onNetworkError(Exception e) {\n Log.e(LOG_TAG, \"## downloadKeys() : doKeyDownloadForUsers onNetworkError \" + e.getMessage());\n if (null != callback) {\n callback.onNetworkError(e);\n }\n }\n\n @Override\n public void onMatrixError(MatrixError e) {\n Log.e(LOG_TAG, \"## downloadKeys() : doKeyDownloadForUsers onMatrixError \" + e.getLocalizedMessage());\n if (null != callback) {\n callback.onMatrixError(e);\n }\n }\n\n @Override\n public void onUnexpectedError(Exception e) {\n Log.e(LOG_TAG, \"## downloadKeys() : doKeyDownloadForUsers onUnexpectedError \" + e.getMessage());\n if (null != callback) {\n callback.onUnexpectedError(e);\n }\n }\n });\n }\n }", "public CompletionStage<Result> download()\n {\n IRequestValidator requestValidator=new CertDownloadRequestValidator();\n return handleRequest(request(),requestValidator, JsonKeys.CERT_DOWNLOAD);\n }", "public void DownloadApkNeedDownload() {\n\t\tif (!MeGeneralMethod.IsWifiConnected(context)) {\n\t\t\treturn;\n\t\t}\n\t\t// MELOG.v( \"ME_RTFSC\" , \" DownloadApkNeedDownload 111111 \" );\n\t\tList<dl_info> DlInfoList = MeApkDlMgr.GetSdkApkDlMgr()\n\t\t\t\t.ResGetTaskListNeedDownload();\n\t\tArrayList<String> pkgNameLsit = new ArrayList<String>();\n\t\t// MELOG.v( \"ME_RTFSC\" , \" DownloadApkNeedDownload 2222 \" );\n\t\tif (null != DlInfoList && !DlInfoList.isEmpty()) {\n\t\t\tfor (dl_info dl_info : DlInfoList) {\n\t\t\t\tString pkgName = null;\n\t\t\t\tif (null != (String) dl_info.getValue(\"r4\")) {\n\t\t\t\t\tpkgName = (String) dl_info.getValue(\"r4\");\n\t\t\t\t} else {\n\t\t\t\t\tpkgName = (String) dl_info.getValue(\"p2\");\n\t\t\t\t}\n\t\t\t\tif (null != pkgName) {\n\t\t\t\t\t// MeApkDlMgr.ReStartDownload( curShowType , pkgName ,\n\t\t\t\t\t// WebMainApkDownloadCallBack );\n\t\t\t\t\tpkgNameLsit.add(pkgName);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// MELOG.v( \"ME_RTFSC\" , \" DownloadApkNeedDownload 333\" );\n\t\tif (null != pkgNameLsit && !pkgNameLsit.isEmpty()) {\n\t\t\tMELOG.v(\"ME_RTFSC\", \"DownloadApkNeedDownload: pkgNameLsit:\"\n\t\t\t\t\t+ pkgNameLsit);\n\t\t\tIntent mIntent = new Intent(context, MEServiceActivity.class);\n\t\t\tmIntent.putExtra(\"MeServiceType\",\n\t\t\t\t\tMeServiceType.MEApkReStartByEntryID);\n\t\t\tmIntent.putExtra(\"moudleName\", moudleName);\n\t\t\tmIntent.putExtra(\"entryID\", mDLManagerID);\n\t\t\tmIntent.putExtra(\"PkgNameList\", pkgNameLsit);\n\t\t\tcontext.startActivity(mIntent);\n\t\t}\n\t}", "public void addPermissionFor(String userName, String fileName) throws InterruptedException {\n Log.i(\"addPermissionFor\",\n \"About to add permissions for \" + userName + \" on file \" + fileName);\n String userPublicKey = getUserKeyFromUserName(userName);\n\n EncryptionKey encryptionKeyDecrypted =\n new EncryptionKey(MainActivity.databaseController.getEncKeyFor(fileName),\n userPublicKey, true, context);\n\n EncryptionKey encryptionKeyEncrypted = new EncryptionKey(\n encryptionKeyDecrypted.getDecryptedKey(), userPublicKey, false, context);\n\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"EncKey\", encryptionKeyEncrypted.getEncryptedKey());\n contentValues.put(\"UserPublicKey\", userPublicKey);\n contentValues.put(\"File\", fileName);\n contentValues.put(\"isOwner\", 0);\n database.insert(\"FileKeys\", null, contentValues);\n AsyncTask.execute(new Runnable() {\n @Override\n public void run() {\n updateDatabaseFile();\n Log.i(\"AsyncTask\", \"database file updated\");\n finished = true;\n }\n });\n customWait();\n }", "private void downloadQAData() {\n StringRequest qaDownloadRequest = new StringRequest(Request.Method.GET, GET_QA_URL, this::addQAData,\n error -> Toast.makeText(this, String.valueOf(error), Toast.LENGTH_SHORT).show()) {\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"Authorization\", \"Token \" + Constants.getToken());\n return headers;\n }\n };\n qaDownloadRequest.setTag(\"Download QuestionAnswer Table from Server Db\");\n MySingleton.getInstance(this.getApplicationContext()).addToRequestQueue(qaDownloadRequest);\n }", "private void downloadAnswerData() {\n StringRequest ansDownloadRequest = new StringRequest(Request.Method.GET, GET_ANSWER_URL, this::addAnswerData,\n error -> Toast.makeText(this, String.valueOf(error), Toast.LENGTH_SHORT).show()) {\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"Authorization\", \"Token \" + Constants.getToken());\n return headers;\n }\n };\n ansDownloadRequest.setTag(\"Download Answer Table from Server Db\");\n MySingleton.getInstance(this.getApplicationContext()).addToRequestQueue(ansDownloadRequest);\n }", "String downloadBunch(Collection<Download> toDownload);", "public void importKeys() {\n\n if (mListFragment.getSelectedEntries().size() == 0) {\n Notify.create(this, R.string.error_nothing_import_selected, Notify.Style.ERROR)\n .show((ViewGroup) findViewById(R.id.import_snackbar));\n return;\n }\n\n ServiceProgressHandler serviceHandler = new ServiceProgressHandler(this) {\n @Override\n public void handleMessage(Message message) {\n // handle messages by standard KeychainIntentServiceHandler first\n super.handleMessage(message);\n\n ImportKeysActivity.this.handleMessage(message);\n }\n };\n\n // Send all information needed to service to import key in other thread\n Intent intent = new Intent(this, KeychainNewService.class);\n ImportKeyringParcel operationInput = null;\n CryptoInputParcel cryptoInput = null;\n\n ImportKeysListFragment.LoaderState ls = mListFragment.getLoaderState();\n if (ls instanceof ImportKeysListFragment.BytesLoaderState) {\n Log.d(Constants.TAG, \"importKeys started\");\n\n // get DATA from selected key entries\n IteratorWithSize<ParcelableKeyRing> selectedEntries = mListFragment.getSelectedData();\n\n // instead of giving the entries by Intent extra, cache them into a\n // file to prevent Java Binder problems on heavy imports\n // read FileImportCache for more info.\n try {\n // We parcel this iteratively into a file - anything we can\n // display here, we should be able to import.\n ParcelableFileCache<ParcelableKeyRing> cache =\n new ParcelableFileCache<>(this, \"key_import.pcl\");\n cache.writeCache(selectedEntries);\n\n operationInput = new ImportKeyringParcel(null, null);\n cryptoInput = new CryptoInputParcel();\n\n } catch (IOException e) {\n Log.e(Constants.TAG, \"Problem writing cache file\", e);\n Notify.create(this, \"Problem writing cache file!\", Notify.Style.ERROR)\n .show((ViewGroup) findViewById(R.id.import_snackbar));\n }\n } else if (ls instanceof ImportKeysListFragment.CloudLoaderState) {\n ImportKeysListFragment.CloudLoaderState sls = (ImportKeysListFragment.CloudLoaderState) ls;\n\n // get selected key entries\n ArrayList<ParcelableKeyRing> keys = new ArrayList<>();\n {\n // change the format into ParcelableKeyRing\n ArrayList<ImportKeysListEntry> entries = mListFragment.getSelectedEntries();\n for (ImportKeysListEntry entry : entries) {\n keys.add(new ParcelableKeyRing(\n entry.getFingerprintHex(), entry.getKeyIdHex(), entry.getExtraData())\n );\n }\n }\n\n operationInput = new ImportKeyringParcel(keys, sls.mCloudPrefs.keyserver);\n if (mProxyPrefs != null) { // if not null means we have specified an explicit proxy\n cryptoInput = new CryptoInputParcel(mProxyPrefs.parcelableProxy);\n } else {\n cryptoInput = new CryptoInputParcel();\n }\n }\n\n intent.putExtra(KeychainNewService.EXTRA_OPERATION_INPUT, operationInput);\n intent.putExtra(KeychainNewService.EXTRA_CRYPTO_INPUT, cryptoInput);\n\n // Create a new Messenger for the communication back\n Messenger messenger = new Messenger(serviceHandler);\n intent.putExtra(KeychainService.EXTRA_MESSENGER, messenger);\n\n // show progress dialog\n serviceHandler.showProgressDialog(\n getString(R.string.progress_importing),\n ProgressDialog.STYLE_HORIZONTAL, true\n );\n\n // start service with intent\n startService(intent);\n }", "abstract ImmutableMap<Path, Supplier<byte[]>> files();", "public void DownloadApkNeedDownload() {\n\t\tif (MeGeneralMethod.IsWifiConnected(getApplicationContext())\n\t\t\t\t|| true == isStartByNotiy) {\n\t\t\t// MELOG.v( \"ME_RTFSC\" , \" DownloadApkNeedDownload 111111 \" );\n\t\t\tList<dl_info> DlInfoList = MeapkDlMgr.GetSdkApkDlMgr()\n\t\t\t\t\t.ResGetTaskListNeedDownload();\n\t\t\tArrayList<String> pkgNameLsit = new ArrayList<String>();\n\t\t\t// MELOG.v( \"ME_RTFSC\" , \" DownloadApkNeedDownload 2222 \" );\n\t\t\tif (null != DlInfoList && !DlInfoList.isEmpty()) {\n\t\t\t\tfor (dl_info dl_info : DlInfoList) {\n\t\t\t\t\tString pkgName = null;\n\t\t\t\t\tif (null != (String) dl_info.getValue(\"r4\")) {\n\t\t\t\t\t\tpkgName = (String) dl_info.getValue(\"r4\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpkgName = (String) dl_info.getValue(\"p2\");\n\t\t\t\t\t}\n\t\t\t\t\tif (null != pkgName) {\n\t\t\t\t\t\t// MeApkDlMgr.ReStartDownload( curShowType , pkgName ,\n\t\t\t\t\t\t// WebMainApkDownloadCallBack );\n\t\t\t\t\t\tpkgNameLsit.add(pkgName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// MELOG.v( \"ME_RTFSC\" , \" DownloadApkNeedDownload 333\" );\n\t\t\tif (null != pkgNameLsit && !pkgNameLsit.isEmpty()) {\n\t\t\t\tMELOG.v(\"ME_RTFSC\", \"DownloadApkNeedDownload: pkgNameLsit:\"\n\t\t\t\t\t\t+ pkgNameLsit);\n\t\t\t\tIntent mIntent = new Intent(getApplicationContext(),\n\t\t\t\t\t\tMEServiceActivity.class);\n\t\t\t\tmIntent.putExtra(\"MeServiceType\",\n\t\t\t\t\t\tMeServiceType.MEApkReStartByEntryID);\n\t\t\t\tmIntent.putExtra(\"moudleName\", moudleName);\n\t\t\t\tmIntent.putExtra(\"entryID\", entryId);\n\t\t\t\tmIntent.putExtra(\"PkgNameList\", pkgNameLsit);\n\t\t\t\tstartActivity(mIntent);\n\t\t\t}\n\t\t}\n\t}", "private void onKeysDownloadFailed(final List<String> userIds) {\n if (null != userIds) {\n synchronized (mUserKeyDownloadsInProgress) {\n mUserKeyDownloadsInProgress.removeAll(userIds);\n }\n\n synchronized (mPendingUsersWithNewDevices) {\n mPendingUsersWithNewDevices.addAll(userIds);\n }\n }\n\n mIsDownloadingKeys = false;\n }", "@Test\n public void attachmentDownloadedByBuyer() throws ExecutionException, InterruptedException {\n CordaFuture<SignedTransaction> future = a.startFlow(new SendAttachment(b.getInfo().getLegalIdentities().get(0)));\n network.runNetwork();\n CordaFuture<String> future1 = b.startFlow(new DownloadAttachment(a.getInfo().getLegalIdentities().get(0), \"file.zip\"));\n network.runNetwork();\n String result = future1.get();\n System.out.println(result);\n }", "public void startMultipleFileDownload() {\n fileDownloadHelper.requestDownloadWithFiles(selectedDownloadableFiles, downloadOriginal);\n }", "public Blob downloadFile(String inKey, File inDestFile);", "@Before\n public void setKeys() {\n someKey0 = new AxArtifactKey();\n someKey1 = new AxArtifactKey(\"name\", \"0.0.1\");\n someKey2 = new AxArtifactKey(someKey1);\n someKey3 = new AxArtifactKey(someKey1.getId());\n someKey4 = new AxArtifactKey(someKey1);\n someKey5 = new AxArtifactKey(someKey1);\n someKey6 = new AxArtifactKey(someKey1);\n }", "PackageDownloads packageDownloads();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ main reads in system inputs which get fed to the operate function to populate the all_prices vector, and another input for best_price, which reads an int argument to print out the company with the best price on offer
public static void main(String[] args) { all_prices = new Vector<Company>(); Scanner in; String fileName; Boolean correctRead = false; while(!correctRead) { //reads in txt filename with operators from system input in = new Scanner(System.in); System.out.print("Enter the file name: "); fileName = in.nextLine(); correctRead = operate(fileName); } correctRead = false; while(!correctRead) { //reads phone number from system input try{ in = new Scanner(System.in); System.out.print("Enter the phone number: "); input_num = in.nextLong(); correctRead = true; } catch (Exception e) { System.out.println(e.getMessage() + " Please enter a valid phone number."); } } Company result = best_price(input_num); if (result.getMatching_price() == Double.MAX_VALUE) { final_operator_name = ""; final_operator_price = -1; System.out.println("No phone operator can provide services for this phone number."); } else { final_operator_name = result.getName(); final_operator_price = result.getMatching_price(); System.out.println("The lowest price you have to pay is $"+final_operator_price+"/min with "+ final_operator_name+"."); } }
[ "public void calculateThePrice() { \n findCategories(programInfo.getFurnitureCategory());\n\n int[] array = new int[numOfItems]; //sets an array to be used as an index with values from 0 to the number of possible items\n for(int i = 0; i < numOfItems; i++){\n array[i] = i;\n }\n\n int n = 2;\n while( n <= numOfItems){ \n int[] data = new int[n]; //different sized combinations of arrays starting from 2 which is {0,0} until the greatest size\n allCombinations(array, data, 0, array.length-1, 0, n); //recursively goes through all index \n n++;\n } \n \n if(fulfilled){ //if order sucesfull create your order .txt file\n System.out.println(\"The cheapest furniture combo is $\" + this.cheapestPrice);\n OrderForm order= new OrderForm(programInfo, cheapestPrice, itemCombination);\n order.createFile(\"OrderForm\");\n infoToRestore = order.storedItemInfo;\n } else { //if unsucessfull go to the class which outputs possible manufactures and print to terminal\n UnfulfilledRequest checkClass = new UnfulfilledRequest(programInfo);\n checkClass.print();\n } \n }", "public static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint numberOfItems = sc.nextInt();\n\t\n\t// Initialize itemNames and itemPrices arrays\n\tString[] itemNames = new String[numberOfItems];\n\tdouble[] itemPrices = new double[numberOfItems];\n\t\n\t// Fill itemNames and itemPrices arrays\n\tfor (int i=0; i < numberOfItems; i++) {\n\t\t\n\t\titemNames[i] = sc.next();\n\t\titemPrices[i] = sc.nextDouble();\n\t}\n\t\n\t// Find number of customers\n\tint numberOfCustomers = sc.nextInt();\n\t\n\t// Create firstName, lastName, and amountSpent arrays\n\tString[] firstNames = new String[numberOfCustomers];\n\tString[] lastNames = new String[numberOfCustomers];\n\tdouble[] amountSpent = new double[numberOfCustomers];\n\t\n\t// For each customer:\n\tfor (int i=0; i<numberOfCustomers; i++ ) {\n\t\t\n\t\t// find their names\n\t\tfirstNames[i] = sc.next();\n\t\tlastNames[i] = sc.next();\n\t\t\n\t\t// find their number of unique items bought\n\t\tint uniqueItemsBought = sc.nextInt();\n\t\t\n\t\t// For each unique item:\n\t\tfor (int j=0; j<uniqueItemsBought; j++) {\n\t\t\t\n\t\t\t// find quantity of that item, index of that item in the String array, and price of the item\n\t\t\tint quantityOfItem = sc.nextInt();\n\t\t\tint itemIndex = indexOfItem(itemNames, sc.next());\n\t\t\tdouble priceOfItem = itemPrices[itemIndex];\n\t\t\t\n\t\t\t// add product of the quantity of item and price of item to the amountSpent array\n\t\t\tamountSpent[i] += ((double) quantityOfItem) * priceOfItem;\n\t\t\t\n\t\t}\n\t\n\t\t\n\t}\n\t\n\t// get the max and min indices with the defined static methods\n\tint maxIndex = indexOfMostSpent(amountSpent);\n\tint minIndex = indexOfLeastSpent(amountSpent);\n\t\n\t// calculate the average with the defined static method\n\tdouble average = calculateAverage(amountSpent);\n\t\n\t// Print out results in proper format\n\tSystem.out.println(\"Biggest: \" + firstNames[maxIndex] + \" \" + lastNames[maxIndex] + \" (\" +\n\t\t\t\t\t\tString.format(\"%.2f\", amountSpent[maxIndex]) + \")\");\n\tSystem.out.println(\"Smallest: \" + firstNames[minIndex] + \" \" + lastNames[minIndex] + \" (\" + \n\t\t\t\t\t\tString.format(\"%.2f\", amountSpent[minIndex]) + \")\");\n\tSystem.out.println(\"Average: \" + String.format(\"%.2f\", average));\n\t\t\n\n}", "public static void Cars(Portofolio user1)\n {\n String ans;\n Market car1;\n while(true)\n {\n ans = InputString(\"In which car manufacturers do you want to invest in? Porsche | Volkswagen | Audi\");\n if(ans.equalsIgnoreCase(\"Porsche\"))\n {\n car1 = new Porsche();\n ans = \"Porsche\";\n break;\n }\n else if(ans.equalsIgnoreCase(\"Volkswagen\") || ans.equalsIgnoreCase(\"vw\"))\n {\n car1 = new Volkswagen(); \n ans = \"Volkswagen\";\n break;\n }\n else if(ans.equalsIgnoreCase(\"Audi\"))\n {\n car1 = new Audi();\n ans = \"Audi\";\n break;\n }\n else \n {\n Print(\"Sorry, we dont support this car manufacturer at this moment. Please try again.\");\n \n }\n }\n \n Print(\"\\nStatistics:\");\n System.out.println(\"Current Value: \"+car1.getValue());\n System.out.println(\"Highest Value recorded: \"+car1.getHighestValue());\n System.out.println(\"Highest Value in the last 24 hours: \"+car1.getM24High());\n System.out.println(\"Lowest Value in the last 24 hours: \"+car1.getM24Low());\n \n // Marketing Stage 1\n buyShares(user1, ans, car1); // the account is on 0, so we need to buy something.\n \n // Marketing Stage 2\n while(true)\n {\n String ansContinue = InputString(\"\\nDo you want to do any other transactions?\");\n if(ansContinue.equalsIgnoreCase(\"yes\") || ansContinue.equalsIgnoreCase(\"y\"))\n {\n continueTransaction(user1, ans, car1);\n break;\n }\n else if(ansContinue.equalsIgnoreCase(\"no\") || ansContinue.equalsIgnoreCase(\"n\"))\n {\n Print(\"\\nThank you for using the App\\n\");\n System.exit(0);\n }\n else\n {\n Print(\"Please answer with Yes/No\");\n }\n }\n }", "public static void Technology(Portofolio user1)\n {\n String ans;\n Market tech1;\n while(true)\n {\n ans = InputString(\"In which car manufacturers do you want to invest in? Apple | Samsung | Google\");\n if(ans.equalsIgnoreCase(\"Apple\"))\n {\n tech1 = new Apple();\n ans = \"Apple\";\n break;\n }\n else if(ans.equalsIgnoreCase(\"Samsung\"))\n {\n tech1 = new Samsung(); \n ans = \"Samsung\";\n break;\n }\n else if(ans.equalsIgnoreCase(\"Google\"))\n {\n tech1 = new Google();\n ans = \"Google\";\n break;\n }\n else \n {\n Print(\"Sorry, we dont support this Technology company at this moment. Please try again.\");\n \n }\n }\n \n Print(\"\\nStatistics:\");\n System.out.println(\"Current Value: \"+tech1.getValue());\n System.out.println(\"Highest Value recorded: \"+tech1.getHighestValue());\n System.out.println(\"Highest Value in the last 24 hours: \"+tech1.getM24High());\n System.out.println(\"Lowest Value in the last 24 hours: \"+tech1.getM24Low());\n \n // Marketing Stage 1\n buyShares(user1, ans, tech1); // the account is on 0, so we need to buy something.\n \n // Marketing Stage 2\n while(true)\n {\n String ansContinue = InputString(\"\\nDo you want to do any other transactions?\");\n if(ansContinue.equalsIgnoreCase(\"yes\") || ansContinue.equalsIgnoreCase(\"y\"))\n {\n continueTransaction(user1, ans, tech1);\n break;\n }\n else if(ansContinue.equalsIgnoreCase(\"no\") || ansContinue.equalsIgnoreCase(\"n\"))\n {\n Print(\"\\nThank you for using the App\\n\");\n System.exit(0);\n }\n else\n {\n Print(\"Please answer with Yes/No\");\n }\n }\n }", "private static Company best_price(long input) {\n\t\tif(all_prices.isEmpty()) { //if no company was successfully parsed/empty file\n\t\t\tCompany temp = new Company(\"Empty\",new TreeMap<Long,Double>(),0,Long.MAX_VALUE,Double.MAX_VALUE);\n\t\t\treturn temp;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<all_prices.size(); i++) { //for each operator\n\t\t\tCompany operatr = all_prices.elementAt(i);\n\t\t\tMap<Long,Double> operator_price_map = operatr.getPrices(); //take its ext to price map\n\t\t\t//find which extension is the longest for a certain operator.\n\t\t\t//in so doing we are able cut the input number's digit search\n\t\t\t//to the longest extension (in terms of number of digits) available \n\t\t\tint longest_extension_digits = operatr.getMost_digits_ext(); \n\t\t\tString str_input = String.valueOf(input);\n\t\t\tfor(int j=longest_extension_digits; j>0; j--) { //going from longest possible substring of input num for an operator\n\t\t\t\tString input_digit_substring = str_input.substring(0, j);\n\t\t\t\tlong digit_prefix = Long.valueOf(input_digit_substring);\n\t\t\t\tif (operator_price_map.containsKey(digit_prefix)) { //if the operator has a match with the number, we terminate search because the longest possible extension has been chosen\n\t\t\t\t\toperatr.setLongest_matching_extension(digit_prefix);\n\t\t\t\t\toperatr.setMatching_price(operator_price_map.get(digit_prefix));\n\t\t\t\t\tbreak; //break because we want to prioritize the longest extension that matches\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.sort(all_prices, new CompanyComparator());\n\t\t\n\t\tCompany result = all_prices.elementAt(0);\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Please enter the dimensions of the room and the the price per square foot of the desired carpeting\");\n System.out.print(\"Enter the length of the room: \");\n double lengthOfRoom = sc.nextDouble();\n\n System.out.print(\"Enter the width of the room: \");\n double widthOfRoom = sc.nextDouble();\n\n System.out.print(\"Enter the price per square foot of the desired carpeting: \");\n double costOfCarpet = sc.nextDouble();\n\n System.out.println(\"Which type of carpet do you want?\");\n System.out.println(\"W - Wool, N - Nylon, S - Smartstrand, P - Polyester, O - Olefin\");\n String carpetType = sc.next();\n\n System.out.println(\"Which Living do you prefer? \");\n System.out.println(\"A - Apartment or Rental, M - Middle class, D - Durable Home, L- Luxury home\");\n String livingType = sc.next();\n\n sc.close();\n\n PricePerSquareFoot pricePerSquareFoot = new PricePerSquareFoot(carpetType);\n costOfCarpet = pricePerSquareFoot.getCost(costOfCarpet);\n\n LivingSituation living = new LivingSituation(livingType);\n costOfCarpet = living.getCost(costOfCarpet);\n\n RoomCarpet roomCarpet = new RoomCarpet(lengthOfRoom, widthOfRoom, costOfCarpet);\n\n System.out.println(\"Total Cost of the Carpet is $\" + String.format(\"%.2f\", roomCarpet.getTotalCostOfCarpet()));\n }", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Hello! Welcome to CineShow package calculator. We will help you\"\r\n\t\t\t\t+ \"determine how you could save the most money while enjoying our services.\\n\");\r\n\t\t//These constants are to simplify the operations that will be used to calculate the price\r\n\t\t//of each package.\r\n\t\tfinal double showPPV = 0.99, moviePPV = 3.99, showLimited = 1.99, \r\n\t\t\t\tmovieLimited = 3.99;\r\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\t\r\n\t\t//Number of shows input will be integers but the prices of the packages have to be exact\r\n\t\t//and they contain decimals, so doubles are used.\r\n\t\tint shows, movies;\r\n\t\tdouble PayPerView, limited, unlimited;\r\n\t\t\r\n\t\t//Since the number of shows input is per week, we will need to multiply by 4 to calculate\r\n\t\t//the equivalence for the month as the packages are priced by month.\r\n\t\tSystem.out.print(\"How many shows a week do you watch? \");\r\n\t\tshows = 4*keyboard.nextInt();\r\n\t\tSystem.out.print(\"How many movies a month do you watch? \");\r\n\t\tmovies = keyboard.nextInt();\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\t//PayPerView has a fixed calculation based on the amount of shows and movies.\r\n\t\tPayPerView = (shows * showPPV) + (movies * moviePPV);\r\n\t\t\r\n\t\t//LIMITED PACKAGE CALCULATION\r\n\t\t//The limited package is priced for a limited amount of movies and shows, but might still\r\n\t\t//be the best option if the price is less than the other packages.\r\n\t\tlimited = 15.95; //set price for up to 2 movies and 20 shows\r\n\t\tif (movies >= 2)\r\n\t\t\tlimited = limited + ((movies - 2)*movieLimited); //price if movies limit is surpassed\r\n\t\tif (shows >= 20)\r\n\t\t\tlimited = limited + ((shows - 20)*showLimited); //price if shows limit is surpassed\r\n\t\t//at every step we add onto the limited calculation depending on user input.\r\n\t\t\r\n\t\t//unlimited package has a fixed priced no matter the user input.\r\n\t\tunlimited = 25.95;\r\n\t\t\r\n\t\t//We use the if, else if, and else statements because there is only one condition that \r\n\t\t//will be acceptable.\r\n\t\tif (PayPerView < unlimited && PayPerView < limited)\r\n\t\t\t\tSystem.out.println(\"The cost of Pay-per-view would be: $.\\n\"\r\n\t\t\t\t\t\t+ PayPerView);\r\n\t\telse if (limited < unlimited)\r\n\t\t{\t\r\n\t\t\tSystem.out.println(\"The cost of the limited package would be $\" + limited + \". We \"\r\n\t\t\t\t\t+ \"recommend getting the limited package!\");\r\n\t\t\tSystem.out.println(\"You would save $\" + (PayPerView - limited) +\r\n\t\t\t\t\t\" from pay-per-view!\\n\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The cost of the limited package would be $\" + unlimited + \". We \"\r\n\t\t\t\t\t+ \"recommend getting the unlimited package!\");\r\n\t\t\tSystem.out.println(\"You would save $\" + (limited - unlimited) + \" from\"\r\n\t\t\t+ \" the limited package and $\" + (PayPerView - unlimited) \r\n\t\t\t\t\t\t\t+ \" from the pay-per-view!\\n\");\r\n\t\t}\r\n\t\tSystem.out.println(\"Thank you for using the CineShow package calculator. Happy streaming!\");\r\n\t\tkeyboard.close();\r\n\r\n\t\t}", "public static void main(String[] args)\r\n{\r\n\tint[] stock_prices_yesterday = {10, 7, 5, 8, 11, 9};\r\n\t//int[] stock_prices_yesterday = {10, 9,8,7,6,5,4,3};\r\n//\tint selling = 0;\r\n//\tint buying = 0;\r\n//\tint best_buying = stock_prices_yesterday[0];\r\n//\tint best_selling_idx = 1;\r\n//\tint best_buying_idx = 0;\r\n// int best_selling = 0;\r\n//\tfor(int i=0; i<stock_prices_yesterday.length-1; i++)\r\n//\t{ \r\n//\t\tbuying = stock_prices_yesterday[i];\r\n//\t\tselling = stock_prices_yesterday[i+1];\r\n//\t\tif(selling > best_selling || best_selling_idx < best_buying_idx)\r\n//\t\t\t{best_selling = selling;\r\n//\t\t\tbest_selling_idx = i+1;\r\n//\t\t\t}\r\n//\t\tif(best_buying > buying)\r\n//\t\t{\r\n//\t\t\tbest_buying = buying;\r\n//\t\t\tbest_buying_idx =i;\r\n//\t\t}\r\n//\t}\r\n//\t\tSystem.out.println(\"Best Buyng: \"+best_buying + \" Best Selling \" + best_selling);\r\n//\t}\t\r\n//\t\r\n\tint min_price = stock_prices_yesterday[0];\r\n\tint max_profit = -1;\r\n\tint curr_price =0;\r\n\tint curr_profit =0;\r\n\tfor(int i= 1; i < stock_prices_yesterday.length-1; i++)\r\n\t{\r\n\t\tcurr_price = stock_prices_yesterday[i];\r\n\t\tcurr_profit = curr_price - min_price;\r\n\t\tmin_price = Math.min(min_price, curr_price);\r\n\t\t\r\n\t\tmax_profit = Math.max(curr_profit, max_profit);\r\n\t}\r\n\tSystem.out.println(\"Minimum buying price: \" + min_price + \" Maximum Profit: \"+ max_profit);\r\n}", "public static void main (String[] args) {\n\t\t\n\t\t\n\t\tScanner inp = new Scanner(System.in);\n\t\tSystem.out.println(\"Is there a sale? True or False\");\n\t\tboolean sale = inp.nextBoolean();\n\t\t\n\t\t\n\t double discount;\n\t\tdouble finalPrice;\n\t\tdouble price;\n\t\t\n\t\tif (!sale) {\n\t\t\tSystem.out.println(\"I am not shopping\");\n\t\t}else {\n\t\t\tSystem.out.println(\"What is the actual price?\");\n\t\t\tprice = inp.nextDouble();\n\t\t\t\n\t\tif (price<20) {\n\t\t\tdiscount = price *0.10;\n\t\t\t//finalPrice = price - discount;\n\t\t} else if (price>=20 && price<=100) {\n\t\t\tdiscount = price *0.20;\n\t\t\t//finalPrice = price - discount;\n\t\t} else if (price>=100 && price<=500) {\n\t\t\tdiscount = price *0.30;\n\t\t\t//finalPrice = price - discount;\n\t\t} else {\n\t\t\tdiscount = price *0.50;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t finalPrice = price - discount;\n\t\t\t\nSystem.out.println(\"After discount \"+discount+\" the price of the item reduce from \"+price+\" to \"+finalPrice);\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\tgetUserInput(); //ask the user to define the number of customers to ferry, and the number of floors in the building\r\n\t\tcreateCustomerList(numberCustomers,numberFloors); //initialise and populate the list of customers\r\n\t\t\r\n\t\t//run each of the strategies and report the results\r\n\t\tSystem.out.println(String.valueOf(numberCustomers) + \" customers require the lift in a building with \" + \r\n\t\t\t\t String.valueOf(numberFloors) + \" floors\");\r\n\t\t\r\n\t\tArrayList<Integer> strategies = returnStrategies(); //get a list of each strategy id\r\n\t\tArrayList<Integer> results = new ArrayList<Integer>(); //holds the number of results for each strategy so can be compared\r\n\t\t\r\n\t\t//run the main elevator method for each strategy\r\n\t\tfor(int i = 0; i < strategies.size(); i++){\r\n\t\t\t\r\n\t\t\tArrayList<Customer> copy = new ArrayList<Customer>(customerList); //take a copy of the class variable so each strategy starts with the same, unaltered customerList\r\n\t\t\tcreateBuilding(copy,numberFloors); //initialise the building\r\n\t\t\tbuilding.elevator.go(strategies.get(i)); //run the strategy\r\n\t\t\tresults.add(building.elevator.getNumberMoves()); //add the number of moves to the results arrayList\r\n\t\t\t\r\n\t\t\t//report and compare the results\r\n\t\t\tString stResult = \"Strategy \" + String.valueOf(strategies.get(i)) +\" made \" + building.elevator.getNumberMoves() + \" moves\";\r\n\t\t\t\r\n\t\t\tif(i > 0){ //more than one strategy has run so we can compare to the last\r\n\t\t\t\t\r\n\t\t\t\tdouble difference = (results.get(i - 1) / results.get(i)); \r\n\t\t\t\t\r\n\t\t\t\tif(difference > 1){\r\n\t\t\t\t\tstResult += \" which is \" + String.valueOf(difference * 100) + \"% more efficient than strategy \" + String.valueOf(strategies.get(i - 1));\r\n\t\t\t\t}\r\n\t\t\t\telse if(difference < 1){\r\n\t\t\t\t\tstResult += \" which is \" + String.valueOf(difference * 100) + \"% less efficient than strategy \" + String.valueOf(strategies.get(i - 1));\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\tstResult += \" which has the same efficiency as strategy \" + String.valueOf(strategies.get(i - 1));\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(stResult);\r\n\t\t}\r\n\t\t\t\t\r\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n LimitsAndGoalHolder holder = new LimitsAndGoalHolder();\n BestPointCalculator calculator = new MonteCarloCalculator(50000,000001.0);\n Solver s = new Solver(calculator,holder);\n Point best;\n\n try {\n s.holder.inputData(sc);\n s.presentProblem();\n calculator.setCalculationProperties(holder);\n best = s.proceedCalculations();\n s.presentResults(best);\n } catch (IncorrectCalculationException e1) {\n e1.printStackTrace();\n } catch (DifferentDimensionException e2) {\n e2.printStackTrace();\n }\n }", "public static void modifyStocks(String CompanyName[]) throws IOException {\n String inData;\n int menu, a = 1;\n \n while (a != 0) {\n System.out.println(\"\\nPlease select a company to change the stock price.\");\n System.out.println(\"1. \" + CompanyName[0]);\n System.out.println(\"2. \" + CompanyName[1]);\n System.out.println(\"3. \" + CompanyName[2]);\n System.out.println(\"4. \" + CompanyName[3]);\n System.out.println(\"5. \" + CompanyName[4]);\n System.out.println(\"6. \" + CompanyName[5]);\n System.out.println(\"7. Return to Main Menu\\n\");\n \n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n InputStreamReader inStream = new InputStreamReader(System.in);\n BufferedReader stdin = new BufferedReader(inStream);\n \n try {\n menu = Integer.parseInt(in.readLine());\n switch (menu) {\n \n case 1:\n \n System.out.println(\"\\nPlease enter the new price: \");\n inData = stdin.readLine();\n System.out.println(\"\\nAre you sure you want to change the stock price from \"+ CompanyName[0]+ \" for the price of $\"+ inData + \".\");\n System.out.println(\"Yes / No ?\");\n new BufferedReader(new InputStreamReader(System.in));\n String yesORno = (in.readLine());\n if (yesORno.equalsIgnoreCase(\"yes\")) {\n StockPrice[0] = Double.parseDouble(inData);\n StockPrice[0] = round(StockPrice[0], 2, BigDecimal.ROUND_HALF_UP);\n break;\n } else if (yesORno.equalsIgnoreCase(\"no\")) {\n break;\n } else\n System.out.print(\"\\nPlease enter only 'Yes' or 'No'.\\n\");\n break;\n \n case 2:\n \n System.out.println(\"\\nPlease enter the new price: \");\n inData = stdin.readLine();\n System.out.println(\"\\nAre you sure you want to change the stock price from \"+ CompanyName[1]+ \" for the price of \"+ inData + \".\");\n \n System.out.println(\"Yes / No ?\");\n new BufferedReader(new InputStreamReader(System.in));\n String yesORno2 = (in.readLine());\n if (yesORno2.equalsIgnoreCase(\"yes\")) {\n StockPrice[1] = Double.parseDouble(inData);\n StockPrice[1] = round(StockPrice[1], 2, BigDecimal.ROUND_HALF_UP);\n break;\n } else if (yesORno2.equalsIgnoreCase(\"no\")) {\n break;\n } else\n System.out.print(\"\\nPlease enter only 'Yes' or 'No'.\\n\");\n break;\n \n case 3:\n \n System.out.println(\"\\nPlease enter the new price: \");\n inData = stdin.readLine();\n System.out.println(\"\\nAre you sure you want to change the stock price from \"+ CompanyName[2]+ \" for the price of \"+ inData + \".\");\n System.out.println(\"Yes / No ?\");\n new BufferedReader(new InputStreamReader(System.in));\n String yesORno3 = (in.readLine());\n if (yesORno3.equalsIgnoreCase(\"yes\")) {\n StockPrice[2] = Double.parseDouble(inData);\n StockPrice[2] = round(StockPrice[2], 2, BigDecimal.ROUND_HALF_UP);\n break;\n } else if (yesORno3.equalsIgnoreCase(\"no\")) {\n break;\n } else\n System.out.print(\"\\nPlease enter only 'Yes' or 'No'.\\n\");\n break;\n \n case 4:\n \n System.out.println(\"\\nPlease enter the new price: \");\n inData = stdin.readLine();\n System.out.println(\"\\nAre you sure you want to change the stock price from \"+ CompanyName[3]+ \" for the price of \"+ inData + \".\");\n System.out.println(\"Yes / No ?\");\n new BufferedReader(new InputStreamReader(System.in));\n String yes = (in.readLine());\n if (yes.equalsIgnoreCase(\"yes\")) {\n StockPrice[3] = Double.parseDouble(inData);\n StockPrice[3] = round(StockPrice[3], 2, BigDecimal.ROUND_HALF_UP);\n break;\n } else if (yes.equalsIgnoreCase(\"no\")) {\n break;\n } else\n System.out.print(\"\\nPlease enter only 'Yes' or 'No'.\\n\");\n break;\n \n case 5:\n \n System.out.println(\"\\nPlease enter the new price: \");\n inData = stdin.readLine();\n System.out.println(\"\\nAre you sure you want to change the stock price from \"+ CompanyName[4] + \" for the price of \"+ inData + \".\");\n System.out.println(\"Yes / No ?\");\n new BufferedReader(new InputStreamReader(System.in));\n String yesORno5 = in.readLine();\n if (yesORno5.equalsIgnoreCase(\"yes\")) {\n StockPrice[4] = Double.parseDouble(inData);\n StockPrice[4] = round(StockPrice[4], 2, BigDecimal.ROUND_HALF_UP);\n break;\n } else if (yesORno5.equalsIgnoreCase(\"no\")) {\n break;\n } else\n System.out.print(\"\\nPlease enter only 'Yes' or 'No'.\\n\");\n break;\n \n case 6:\n \n System.out.println(\"\\nPlease enter the new price: \");\n inData = stdin.readLine();\n System.out.println(\"\\nAre you sure you want to change the stock price from \"+ CompanyName[5]+ \" for the price of \"+ inData + \".\");\n System.out.println(\"Yes / No ?\");\n new BufferedReader(new InputStreamReader(System.in));\n String yesORno1 = (in.readLine());\n if (yesORno1.equalsIgnoreCase(\"yes\")) {\n StockPrice[5] = Double.parseDouble(inData);\n StockPrice[5] = round(StockPrice[5], 2, BigDecimal.ROUND_HALF_UP);\n break;\n } else if (yesORno1.equalsIgnoreCase(\"no\")) {\n break;\n } else\n System.out.print(\"\\nPlease enter only 'Yes' or 'No'.\\n\");\n break;\n \n case 7:\n a = 0;\n break;\n default:\n System.out.println(\"Invalid entry!\");\n break;\n }\n } catch (NumberFormatException ex) {\n System.out.println(ex.getMessage() + \" is not a numeric value.\");\n \n }\n }\n }", "public static void main(String[] args) throws InterruptedException {\n String welcome = \"--WELCOME TO THE AUTO SHOW CENTER--\";\n String msg1 = \"As mentioned in our range options above, Please enter your price range here to find your vehicles: \";\n String declined = \"Invalid Entry!! There are no vehicles in the database within that price range\";\n String msg2 = \"Starting price: $\";\n String msg3 = \"Ending price: $\";\n\n //show up in console before user input\n Thread.sleep(1000);\n System.out.println(welcome);\n Thread.sleep(4000);\n System.out.println(msg1);\n Thread.sleep(7000);\n System.out.print(msg2);\n\n Scanner startingRange = new Scanner(System.in);\n Scanner endingRange = new Scanner(System.in);\n\n double startingPrice = startingRange.nextDouble();\n System.out.print(msg3);\n double endingPrice = endingRange.nextDouble();\n\n //conditions of price ranges\n if (startingPrice >= 20000.00 && endingPrice <= 40000.00)\n {\n Thread.sleep(1000);\n System.out.print(\"Vehicle_1:\"+\"\\nMake: \"+Vehicle.TOYOTA.getVehicleMake()+\" || \");\n System.out.print(\"Model: \"+Vehicle.TOYOTA.getVehicleModel()+\" || \");\n System.out.print(\"Year: \"+Vehicle.TOYOTA.getVehicleYear()+\" || \");\n System.out.print(\"Color: \"+Vehicle.TOYOTA.getVehicleColor()+\" || \");\n System.out.println(\"Price: \"+'$'+Vehicle.TOYOTA.getVehiclePrice());\n\n Thread.sleep(1000);\n System.out.print(\"\\nVehicle_2:\"+\"\\nMake: \"+Vehicle.HONDA.getVehicleMake()+\" || \");\n System.out.print(\"Model: \"+Vehicle.HONDA.getVehicleModel()+\" || \");\n System.out.print(\"Year: \"+Vehicle.HONDA.getVehicleYear()+\" || \");\n System.out.print(\"Color: \"+Vehicle.HONDA.getVehicleColor()+\" || \");\n System.out.println(\"Price: \"+'$'+Vehicle.HONDA.getVehiclePrice());\n }else if (startingPrice >= 41000.00 && endingPrice <= 65000.00)\n {\n Thread.sleep(1000);\n System.out.print(\"Vehicle_1:\"+\"\\nMake: \"+Vehicle.ACURA.getVehicleMake()+\" || \");\n System.out.print(\"Model: \"+Vehicle.ACURA.getVehicleModel()+\" || \");\n System.out.print(\"Year: \"+Vehicle.ACURA.getVehicleYear()+\" || \");\n System.out.print(\"Color: \"+Vehicle.ACURA.getVehicleColor()+\" || \");\n System.out.println(\"Price: \"+'$'+Vehicle.ACURA.getVehiclePrice());\n\n Thread.sleep(1000);\n System.out.print(\"\\nVehicle_2:\"+\"\\nMake: \"+Vehicle.CORVETTE.getVehicleMake()+\" || \");\n System.out.print(\"Model: \"+Vehicle.CORVETTE.getVehicleModel()+\" || \");\n System.out.print(\"Year: \"+Vehicle.CORVETTE.getVehicleYear()+\" || \");\n System.out.print(\"Color: \"+Vehicle.CORVETTE.getVehicleColor()+\" || \");\n System.out.println(\"Price: \"+'$'+Vehicle.CORVETTE.getVehiclePrice());\n }else if (startingPrice >= 66000.00 && endingPrice <= 125000.00)\n {\n Thread.sleep(1000);\n System.out.print(\"Vehicle_1:\"+\"\\nMake: \"+Vehicle.MERCEDES_BENZ.getVehicleMake()+\" || \");\n System.out.print(\"Model: \"+Vehicle.MERCEDES_BENZ.getVehicleModel()+\" || \");\n System.out.print(\"Year: \"+Vehicle.MERCEDES_BENZ.getVehicleYear()+\" || \");\n System.out.print(\"Color: \"+Vehicle.MERCEDES_BENZ.getVehicleColor()+\" || \");\n System.out.println(\"Price: \"+'$'+Vehicle.MERCEDES_BENZ.getVehiclePrice());\n\n Thread.sleep(1000);\n System.out.print(\"\\nVehicle_2:\"+\"\\nMake: \"+Vehicle.BMW.getVehicleMake()+\" || \");\n System.out.print(\"Model: \"+Vehicle.BMW.getVehicleModel()+\" || \");\n System.out.print(\"Year: \"+Vehicle.BMW.getVehicleYear()+\" || \");\n System.out.print(\"Color: \"+Vehicle.BMW.getVehicleColor()+\" || \");\n System.out.println(\"Price: \"+'$'+Vehicle.BMW.getVehiclePrice());\n }else if (startingPrice >= 126000.00 && endingPrice <= 500000.00)\n {\n Thread.sleep(1000);\n System.out.print(\"Vehicle_1:\"+\"\\nMake: \"+Vehicle.LAMBORGHINI.getVehicleMake()+\" || \");\n System.out.print(\"Model: \"+Vehicle.LAMBORGHINI.getVehicleModel()+\" || \");\n System.out.print(\"Year: \"+Vehicle.LAMBORGHINI.getVehicleYear()+\" || \");\n System.out.print(\"Color: \"+Vehicle.LAMBORGHINI.getVehicleColor()+\" || \");\n System.out.println(\"Price: \"+'$'+Vehicle.LAMBORGHINI.getVehiclePrice());\n }else\n {\n Thread.sleep(1000);\n System.out.println(declined);\n }\n\n\n\n\n }", "public void start(){\n\t\t\n\t\tSystem.out.print(\"Enter prize values separated by commas(integers only): \");\n\t\tString ofPrizes = getUserInput(PRIZE);\n\n\t\tSystem.out.print(\"Enter winners' names separated by commas: \");\n\t\tString ofWinners = getUserInput(WINNER);\n\n\t\t//make a winners list and shuffle it\n\t\tArrayList<String> winnersList = new ArrayList<String>(Arrays.asList(ofWinners.split(\",\")));\n\t\tCollections.shuffle(winnersList);\n\n\t\t//convert prize values to numbers\n\t\tArrayList<Integer> prizeList = new ArrayList<Integer>();\n\t\tfor(String number : Arrays.asList(ofPrizes.split(\",\"))) {\n\t\t\tprizeList.add(Integer.parseInt(number));\n\t\t};\n\n\t\t//sort prizes in descending order\n\t\tCollections.sort(prizeList ,Collections.reverseOrder());\n\n\t\t//create map to hold prize and winner values\n\t\tHashMap <String,ArrayList<Integer>> prizeAndWinners = new HashMap <String,ArrayList<Integer>>();\n\n\t\t//add winners to the map\t\t\t\n\t\tfor(String winner:winnersList){\n\t\t\tprizeAndWinners.put(winner, new ArrayList<Integer>());\n\t\t}\n\n\t\t//add prizes to the map\n\t\tfor(int i = 0; i < winnersList.size(); i++){\n\t\t\tif(winnersList.size() <= prizeList.size()){\n\t\t\t\tprizeAndWinners.get(winnersList.get(i)).add(prizeList.get(i));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(i < prizeList.size()){\n\t\t\t\t\tprizeAndWinners.get(winnersList.get(i)).add(prizeList.get(i));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tprizeAndWinners.get(winnersList.get(i)).add(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t//if there are more prizes than there are winners\n\t\tif(winnersList.size() < prizeList.size()){\n\t\t\t//make a list of the extra prizes\t\t\t\n\t\t\tArrayList<Integer> prizesLeftToDistribute = new ArrayList<Integer>();\n\t\t\tfor(int i = winnersList.size(); i < prizeList.size(); i++){\n\t\t\t\tprizesLeftToDistribute.add(prizeList.get(i));\n\t\t\t}\n\t\t\t//assign the extra prize(s) to a winner with the lowest total wins\n\t\t\tfor(Integer prize : prizesLeftToDistribute){\n\t\t\t\tString receipient = winnerWithLowestPrizeTotal(prizeAndWinners,winnersList);\n\t\t\t\tprizeAndWinners.get(receipient).add(prize);\n\t\t\t}\n\t\t}\n\n\t\t//print the output\n\t\tprintOutput(prizeAndWinners);\n\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner input;\n\t\tString sale;\n\t\tdouble price;\n\t\n\t\tdouble discount = 0;\n\t\tdouble finalprice = 0;\n\t\t\n\t\t Scanner scan = new Scanner(System.in);\n\t\t\n\t\t\n\t\t\tSystem.out.println(\"is there any sale today\");\n\t\t\tsale=scan.nextLine();\n\t\t\tif (sale.equalsIgnoreCase(\"yes\")) {\n\t\t\tSystem.out.println(\"please enter your price\");\n\t\t\t\n\t\t\tprice=scan.nextDouble();\n\t\t\tif (price<=20) {\n\t\t\t\tdiscount=price*0.1;\n\t\t\t\tfinalprice=price-discount;\n\t\t\t}else if(price>20 && price<=100) {\n\t\t\t\tdiscount=price*0.2;\n\t\t\t\tfinalprice=price-discount;\n\t\t\t}else if(price>=100 && price<=500) {\n\t\t\t\tdiscount=price*0.3;\n\t\t\t\tfinalprice=price-discount;\n\t\t\t}else if(price >500) {\n\t\t\t\tdiscount=price*0.5;\n\t\t\t\tfinalprice=price-discount;\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(\"after \"+ discount +\" discount the price of the item reduced from \"+ price +\" to \"+finalprice );\n\t\t}else {\n\t\t\tSystem.out.println(\"not going to shopping today\");\n\n\n\t}\n\t}", "public static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.print(\"Enter the number of Companies : \");\n\t\tint numOfComp=sc.nextInt();\n\t\t\n\t for (int i=0;i<numOfComp;i++) {\n\t \tScanner sc2=new Scanner(System.in);\n\t \tSystem.out.print(\"Enter the Company Name : \");\n\t \tString compName = sc2.nextLine();\n\t \tSystem.out.print(\"Enter the Wage per Hour : \");\n\t \tint wagePerHr = sc.nextInt();\n\t \tSystem.out.print(\"Enter Full Day Hour : \");\n\t \tint fullDayHr=sc.nextInt();\n\t \tSystem.out.print(\"Enter Half Day Hour : \");\n\t \tint halfDayHr=sc.nextInt();\n\t \tSystem.out.print(\"Enter the days in a month : \");\n\t \tint day=sc.nextInt();\n\t \tSystem.out.print(\"Enter the working hour in a month : \");\n\t \tint workingHr=sc.nextInt();\n\t \tobj.EmpWageBuilder(compName,wagePerHr,fullDayHr,halfDayHr,day ,workingHr);\n\t }\t\n\t \tobj.calculateWage();\n\t \n\t \tobj.getQuery();\n}", "public static void main(String[] args) {\n\n\t\tInventory inventory = new Inventory();\n\t\ttry {\n\t\t\tinventory.load(\"./inventory.txt\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\tMoney bank = new Money(10, 10, 10, 10);\n\t\tVendingMachine a = new VendingMachine(inventory, bank);\n\n\t\t// print inventory\n\t\tSystem.out.println(inventory.toString());\n\t\t// make selection\n\t\tSystem.out.println(\"Add Money/Make Selection?\");\n\t\tSystem.out.println(\"1. Dollar\\n2. Quarter\\n3. Dime\\n4. Nickle\");\n\t\tSystem.out.println(\"or enter in the Item Code\");\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tDecimalFormat formatter = new DecimalFormat(\"$0.00\");\n\n\t\tMoney change = new Money();\n\n\t\twhile (change.getTotal() == 0) {\n\t\t\tString choice = keyboard.next();\n\t\t\tchoice.toUpperCase();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\ta.pay(new Money(1, 0, 0, 0));\n\t\t\t\tSystem.out.println(\"Balance \"\n\t\t\t\t\t\t+ formatter.format(a.getPaid().getTotal()));\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\ta.pay(new Money(0, 1, 0, 0));\n\t\t\t\tSystem.out.println(\"Balance \"\n\t\t\t\t\t\t+ formatter.format(a.getPaid().getTotal()));\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\ta.pay(new Money(0, 0, 1, 0));\n\t\t\t\tSystem.out.println(\"Balance \"\n\t\t\t\t\t\t+ formatter.format(a.getPaid().getTotal()));\n\t\t\t\tbreak;\n\t\t\tcase \"4\":\n\t\t\t\ta.pay(new Money(0, 0, 0, 1));\n\t\t\t\tSystem.out.println(\"Balance \"\n\t\t\t\t\t\t+ formatter.format(a.getPaid().getTotal()));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttry {\n\t\t\t\t\tif (inventory.get(choice).getQuantity() == 0) {\n\t\t\t\t\t\tSystem.out.println(\"Out of stock\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\tchange = a.buy(choice);\n\t\t\t\t\tSystem.out.println(\"Dispensing \"\n\t\t\t\t\t\t\t+ inventory.get(choice).getName());\n\t\t\t\t\tSystem.out.println(\"Change \"\n\t\t\t\t\t\t\t+ formatter.format(change.getTotal()));\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} catch (CodeNotFoundException e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t} catch (NotEnoughPaidException e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t} catch (NotEnoughChangeException e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t} catch(NullPointerException e){\n\t\t\t\t\tSystem.out.println(\"Code Not Found\");\n\t\t\t\t}\n\t\t\t}// end switch case\n\t\t}// end while\n\t\tkeyboard.close();\n\t}", "public static void Crypto(Portofolio user1)\n {\n String ans;\n Market Coin1;\n while(true)\n {\n ans = InputString(\"In which Crypto-Currency do you want to invest in? Bitcoin(BTC) | Litecoin(LTC) | Ethereum(ETH)\");\n if(ans.equalsIgnoreCase(\"bitcoin\") || ans.equalsIgnoreCase(\"btc\"))\n {\n Coin1 = new Bitcoin();\n ans = \"Bitcoin\";\n break;\n }\n else if(ans.equalsIgnoreCase(\"litecoin\") || ans.equalsIgnoreCase(\"ltc\"))\n {\n Coin1 = new Litecoin(); \n ans = \"Litecoin\";\n break;\n }\n else if(ans.equalsIgnoreCase(\"ethereum\") || ans.equalsIgnoreCase(\"eth\"))\n {\n Coin1 = new Ethereum();\n ans = \"Ethereum\";\n break;\n }\n else \n {\n Print(\"Sorry, we dont support this coin at this moment. Please try again.\");\n \n }\n }\n \n Print(\"\\nStatistics at this moment:\");\n System.out.println(\"Current Value: \"+Coin1.getValue());\n System.out.println(\"Highest Value recorded: \"+Coin1.getHighestValue());\n System.out.println(\"Highest Value in the last 24 hours: \"+Coin1.getM24High());\n System.out.println(\"Lowest Value in the last 24 hours: \"+Coin1.getM24Low());\n \n // Marketing Stage 1\n buyShares(user1, ans, Coin1); // the account is on 0, so we need to buy something.\n \n // Marketing Stage 2\n while(true)\n {\n String ansContinue = InputString(\"\\nDo you want to do any other transactions?\");\n if(ansContinue.equalsIgnoreCase(\"yes\") || ansContinue.equalsIgnoreCase(\"y\"))\n {\n continueTransaction(user1, ans, Coin1);\n break;\n }\n else if(ansContinue.equalsIgnoreCase(\"no\") || ansContinue.equalsIgnoreCase(\"n\"))\n {\n Print(\"\\nThank you for using the App\\n\");\n System.exit(0);\n }\n else\n {\n Print(\"Please answer with Yes/No\");\n }\n }\n\n }", "public static void main(String[] args){\n int[] prices1 = {10, 22, 5, 75, 65, 80}; // k = 2\n int[] prices2 = {12, 14, 17, 10, 14, 13, 12, 15};\n System.out.println(maxProfit(prices1, 2));\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calculate the cost of the evening and weekend calls
public double EveningCallCost(){ return EveningCallPrice*EveningCalls; }
[ "public double DaytimeCallCost(){\n\t\treturn DaytimeCallPrice*DaytimeCalls;\n\t}", "public static void calculations()\n {\n \n overtimePay = 0;\n if (hoursWorked <= 40)\n regularPay = hoursWorked * hourlyRate;\n else\n {\n regularPay = 40 * hourlyRate;\n overtimePay = (hoursWorked - 40) * hourlyRate * 1.5;\n }\n \n grossPay = regularPay + overtimePay;\n \n fedTax = grossPay * FED_TAX_RATE;\n \n stateTax = grossPay * STATE_TAX_RATE;\n \n netPay = grossPay - fedTax - stateTax;\n \n dateCreated = new Date();\n \n }", "public double usageCost() {\r\n double totalCost = 0;\r\n for (Booking aBooking: getBookings()) {\r\n long diff = (aBooking.getDateTo().getTime() \r\n - aBooking.getDateFrom().getTime());\r\n int noOfDays = (int) ((diff / (1000 * 60 * 60 * 24)) + 1);\r\n totalCost += noOfDays * 50;\r\n }\r\n return totalCost;\r\n }", "public static BigDecimal calcDayCharge (long sTime, long eTime, int dayOfWeek) {\n\n BigDecimal decimalSTime = new BigDecimal(sTime);\n\n BigDecimal decimalETime = new BigDecimal(eTime);\n\n BigDecimal dayCharge = new BigDecimal(0.0);\n\n // Put start of business hours into milliseconds format\n\n Calendar startBusHours = Calendar.getInstance();\n\n startBusHours.setTimeInMillis(sTime);\n\n startBusHours.set(Calendar.HOUR_OF_DAY, START_BUS_HOURS.intValue());\n\n long sBusHours = startBusHours.getTimeInMillis();\n\n BigDecimal decimalSBusHours = new BigDecimal(sBusHours);\n\n // Put end of business hours into milliseconds format\n\n Calendar endBusHours = Calendar.getInstance();\n\n endBusHours.setTimeInMillis(eTime);\n\n BigDecimal testBusHours = new BigDecimal(END_BUS_HOURS.longValue());\n\n int testHourOfDay = endBusHours.get(Calendar.HOUR_OF_DAY);\n\n endBusHours.set(Calendar.HOUR_OF_DAY, END_BUS_HOURS.intValue());\n\n long eBusHours = endBusHours.getTimeInMillis();\n\n BigDecimal decimalEBusHours = new BigDecimal(eBusHours);\n\n boolean isBusinessDay = true;\n\n if (dayOfWeek == 1 || dayOfWeek == 2 || dayOfWeek == 3 || dayOfWeek == 4 || dayOfWeek == 5) {\n\n isBusinessDay = true;\n\n } else {\n\n isBusinessDay = false;\n\n }\n\n if (isBusinessDay) {\n\n if (sTime <= sBusHours) {\n\n dayCharge = (decimalETime.subtract(decimalSTime)).multiply(OUT_OF_HOURS_RATE);\n\n } else if (sTime >= eBusHours) {\n\n dayCharge = (decimalETime.subtract(decimalSTime)).multiply(OUT_OF_HOURS_RATE);\n\n } else if (sTime >= sBusHours && eTime <= eBusHours) {\n\n dayCharge = (decimalETime.subtract(decimalSTime)).multiply(BUSINESS_HOURS_RATE);\n\n } else if (sTime < sBusHours && eTime <= eBusHours) {\n\n dayCharge = (decimalSBusHours.subtract(decimalSTime)).multiply(OUT_OF_HOURS_RATE);\n\n dayCharge = ((dayCharge.add(decimalETime)).subtract(decimalEBusHours)).multiply(BUSINESS_HOURS_RATE);\n\n } else if (sTime >= sBusHours && sTime < eBusHours &&\n eTime > eBusHours) {\n\n dayCharge = (decimalEBusHours.subtract(decimalSTime)).multiply(BUSINESS_HOURS_RATE);\n\n dayCharge = ((dayCharge.add(decimalETime)).subtract(decimalEBusHours)).multiply(OUT_OF_HOURS_RATE);\n\n } else if (sTime < sBusHours && eTime > eBusHours) {\n\n dayCharge = (decimalSBusHours.subtract(decimalSTime)).multiply(OUT_OF_HOURS_RATE);\n\n dayCharge = ((dayCharge.add(decimalEBusHours).subtract(decimalSBusHours))).multiply(BUSINESS_HOURS_RATE);\n\n dayCharge = ((dayCharge.add(decimalETime).subtract(decimalEBusHours))).multiply(OUT_OF_HOURS_RATE);\n\n } else {\n\n throw new RuntimeException(\"CalcAdhocTicketCharge error: start and end hours of day are invalid\");\n\n }\n\n } else { // not a business day\n\n dayCharge = (decimalETime.subtract(decimalSTime)).multiply(OUT_OF_HOURS_RATE);\n\n }\n\n BigDecimal testDayCharge = new BigDecimal(0);\n\n testDayCharge = dayCharge.divide(HOURS_CONVERTER);\n\n return dayCharge.divide(HOURS_CONVERTER);\n }", "public void calculatePaintAndLabor(){\n this.numGallons = squareFeet/115;\n System.out.println(\"Number of Gallons: \" + numGallons);\n this.laborHours = numGallons * 8;\n System.out.println(\"Number of Hours: \" + laborHours);\n this.paintCost = numGallons * pricePerGallon;\n System.out.println(\"Price of Paint: $\" + paintCost);\n this.laborCost = laborHours * 20.00;\n System.out.println(\"Price of Labor: $\" + laborCost);\n this.totalCost = paintCost + laborCost;\n System.out.println(\"Total Cost: $\" + totalCost);\n\n }", "private String calculateCharges() {\r\n\r\n\t\tString timeTotal = \"\";\r\n\r\n\t\t// converts hour in 24 hours format (0-23), day calculation\r\n\t\tSimpleDateFormat format = new SimpleDateFormat(ENTRY_FORMAT);\r\n\r\n\t\tDate d1 = null;\r\n\t\tDate d2 = null;\r\n\r\n\t\ttry\r\n\r\n\t\t{\r\n\t\t\td1 = format.parse(this.start);\r\n\t\t\td2 = format.parse(this.stop);\r\n\r\n\t\t\t// difference between start date/time and stop date/time in milliseconds\r\n\t\t\tlong diff = d2.getTime() - d1.getTime();\r\n\r\n\t\t\t// if multi days and crosses to a new year (ex., dec 28 - jan 10)\r\n\t\t\tif (this.multi) {\r\n\t\t\t\tif (isNewYear()) { \r\n\t\t\t\t\tif (wasLeapYear()) {\r\n\t\t\t\t\t\tdiff = (d2.getTime() + MILLS_IN_LEAP_YEAR) - d1.getTime();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdiff = (d2.getTime() + MILLS_IN_YEAR) - d1.getTime();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// days, hours, minutes, total mins, total hrs\r\n\t\t\tlong diffMinutes = diff / (MIN_PER_HOUR * MILLS_PER_SEC) % MIN_PER_HOUR;\r\n\t\t\tlong diffHours = diff / (MIN_PER_HOUR * MIN_PER_HOUR * MILLS_PER_SEC) % HOUR_PER_DAY;\r\n\t\t\tlong diffDays = diff / (HOUR_PER_DAY * MIN_PER_HOUR * MIN_PER_HOUR * MILLS_PER_SEC);\r\n\t\t\tlong totalMins = (diffDays * (HOUR_PER_DAY * MIN_PER_HOUR)) + (diffHours * MIN_PER_HOUR) + diffMinutes;\r\n\t\t\tdouble totalHours = (diffDays * HOUR_PER_DAY) + (diffHours) + (diffMinutes / (double) MIN_PER_HOUR);\r\n\r\n\t\t\t// multiple days?\r\n\t\t\tif (this.multi) {\r\n\t\t\t\t\r\n\t\t\t\t// for iterating through the proper number of days\r\n\t\t\t\tint numberOfDays = numDaysToCalculate(this.start, this.stop);\t\t\t\t\r\n\t\t\t\tint thisDay = SINGLE;\r\n\t\t\t\t// for generating a string date\r\n\t\t\t\tString currentDate = \"\";\r\n\t\t\t\tCalendar cal = Calendar.getInstance();\r\n\t\t\t\tcal.setTime(d1);\r\n\t\t\t\tDateFormatSymbols dfs = new DateFormatSymbols();\r\n\t\t\t\t\r\n\t\t\t\twhile (thisDay <= numberOfDays) {\r\n \r\n\t\t\t\t\tlong minutes;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// get first day\r\n\t\t\t\t\tif (thisDay == SINGLE) {\r\n\t\t\t\t\t\tminutes = numberOfMinutes(this.start.substring(TIME_START), LAST_MIN_OF_DAY) + SINGLE;\r\n\t\t\t\t\t} else if (thisDay == numberOfDays) {\r\n\t\t\t\t\t\tminutes = numberOfMinutes(MIDNIGHT, this.stop.substring(TIME_START));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tminutes = numberOfMinutes(MIDNIGHT, LAST_MIN_OF_DAY) + SINGLE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tcurrentDate = \"\" + dfs.getMonths()[cal.get(Calendar.MONTH)] + \r\n\t\t\t\t\t\t\t\" \" + cal.get(Calendar.DAY_OF_MONTH);\r\n\t\t\t\t\ttimeTotal += \"Mintues for \" + currentDate + \": \\t\" + splitMins(minutes) + \"\\n\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t// move to next day\r\n\t\t\t\t\tthisDay++;\r\n\t\t\t\t\tcal.add(Calendar.DAY_OF_MONTH, SINGLE);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// get hours only\r\n\t\t\t\tint hours = (int) totalHours;\r\n\t\t\t\t// get minutes left\r\n\t\t\t\tdouble minutesLeft = (totalHours - hours) * MIN_PER_HOUR;\r\n\t\t\t\tint minutesOnly = (int) round(minutesLeft, 0);\r\n\t\t\t\t// use proper grammar (minute vs. minutes)\r\n\t\t\t\tif (minutesOnly == SINGLE) {\r\n\t\t\t\t\ttimeTotal += (\"\\nHours, minutes: \\t\" + hours + \" hours, \" + minutesOnly + \" minute\\n\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttimeTotal += (\"\\nHours, minutes: \\t\" + hours + \" hours, \" + minutesOnly + \" minutes\\n\");\r\n\t\t\t\t}\r\n\t\t\t\tif (totalMins == SINGLE) {\r\n\t\t\t\t\ttimeTotal += (\"Total minutes: \\t\\t\" + totalMins + \" minute\\n\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttimeTotal += (\"Total minutes: \\t\\t\" + totalMins + \" minutes\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// single day, total minutes only to be displayed\r\n\t\t\t} else {\r\n\t\t\t\ttimeTotal = \"Total minutes: \\t\" + splitMins(totalMins) + \" minutes\\n\";\r\n\t\t\t}\r\n\r\n\t\t\treturn timeTotal;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new IllegalArgumentException(\"Invalid calculation in date/times\");\r\n\t\t}\r\n\t}", "public double boardingCost() { \n return (BASE_RATE + weight * 0.01 + exerciseFee) * days;\n }", "double calculateDeliveryCost(Cart cart);", "@Override\n public double calculatePayDay()\n {\n double perWeekEarned = hourlyRate * hoursPerWeek;\n return (double)Math.round(perWeekEarned * 100) / 100;\n }", "public final void calcCharge()\n {\n switch (passengerType)\n {\n case \"Under 5\":\n cost = 0.0;\n break;\n case \"Under 18\":\n cost = 15.0;\n break;\n case \"Adult\":\n cost = 30.0;\n break;\n case \"Pensioner\":\n cost = 15.0;\n break;\n default:\n cost = -1;\n break;\n }\n\n // extra weekend charge\n if (this.date.getDayOfWeek() == this.date.getDayOfWeek().SATURDAY || this.date.getDayOfWeek() == this.date.getDayOfWeek().SUNDAY)\n {\n cost = cost + 2.0;\n }\n\n // adjust time dependant upon time of day\n if (this.departureTime.isAfter(LocalTime.of(8, 29)) && this.departureTime.isBefore(LocalTime.of(11, 31)))\n {\n cost = cost + 2.0;\n } else if (this.departureTime.isAfter(LocalTime.of(15, 59)) && this.departureTime.isBefore(LocalTime.of(18, 31)))\n {\n cost = cost + 4.0;\n }\n }", "private void getDataCostsCalls(Node node) throws Exception {\n NamedNodeMap nmp = node.getAttributes();\n for (int i = 0; i < nmp.getLength(); i++) {\n String attrName = nmp.item(i).getNodeName();\n String attrValue = nmp.item(i).getNodeValue();\n // get COSTS_CALLS_ALL\n if (attrName.equals(\"all\")) {\n costs.put(\"COSTS_CALLS_ALL\", attrValue);\n }\n // get COSTS_CALLS_ROAMING\n else if (attrName.equals(\"roaming\")) {\n costs.put(\"COSTS_CALLS_ROAMING\", attrValue);\n }\n // get COSTS_CALLS_PREMIUM\n else if (attrName.equals(\"premium\")) {\n costs.put(\"COSTS_CALLS_PREMIUM\", attrValue);\n }\n // get COSTS_CALLS_LASTCALL_DATETIME\n else if (attrName.equals(\"last_call_date\")) {\n if (!isEmpty(attrValue)) {\n // convertion of date format UNBA -> VO\n sdf.applyPattern(DATE_FORMAT_UNBA);\n Date tmp = sdf.parse(attrValue);\n sdf.applyPattern(DATE_FORMAT_VO);\n attrValue = sdf.format(tmp);\n // put result (converted date) to table\n costs.put(\"COSTS_CALLS_LASTCALL_DATETIME\", attrValue);\n }\n }\n }\n }", "public void computeDays()\r\n\t{\n\t\tCalendar cal1=Calendar.getInstance();\r\n\t cal1.setTime(travelRequest.getTravelDetails().getStartDate());\r\n\t cal1.add(Calendar.HOUR, -1);\r\n\t Calendar cal2=Calendar.getInstance();\r\n\t cal2.setTime(travelRequest.getTravelDetails().getEndDate());\r\n\t float diff = getDaysBetween (cal1,cal2);\r\n\t if(cal1.get(Calendar.HOUR_OF_DAY)>=12)\r\n\t \tdiff-=0.5;\r\n\t if(cal2.get(Calendar.HOUR_OF_DAY)<12)\r\n\t \tdiff-=0.5;\r\n\t\ttravelRequest.getTravelDetails().getAllowance().setDays(diff+1);\r\n\t\t//this.calculateAmount();\r\n\t}", "double calculateCost() {\n double cost = 0;\n InspectionDTO[] DTOArray = this.currentInspectionChecklist.inspectionDTOArray;\n for (int i = 0; i <= DTOArray.length - 1; i++) {\n cost += DTOArray[i].getCost();\n }\n return cost;\n }", "public void updateCost() {\n double costPlanning = 0.0;\n\n Set<Integer> techniciansUsed = new HashSet<>();\n\n for (DayHorizon day : days) {\n //we get the day costs\n costPlanning += day.getCost();\n\n //we want to know the used cost\n for (Itinerary itinerary : day.getItineraries()) {\n if (itinerary instanceof TechnicianItinerary\n && ((TechnicianItinerary) itinerary).getCustomersDemands().size() > 0\n && !techniciansUsed.contains(((TechnicianItinerary) itinerary).getTechnician().getIdPoint())) {\n techniciansUsed.add(((TechnicianItinerary) itinerary).getTechnician().getIdPoint());\n costPlanning += (((TechnicianItinerary) itinerary).getTechnician()).getUsageCost();\n }\n }\n }\n //on recupere le cout journalier des camions\n costPlanning += this.getVehicleInstance().getUsageCost() * this.computeMaxTrucksUsed();\n\n //costPlanning += (double) this.computeIdleMachineCosts();\n this.cost = costPlanning;\n }", "public static void calculations()\n {\n //Computes: costKg \n if (weight <= 1) \n {\n costKg = 1.70;\n if (distance > 1000)\n {\n costKg = 2 * costKg; \n }\n \n }\n else if (weight >1 && weight <= 5)\n { \n costKg = 2.20;\n if (distance > 1000)\n {\n costKg = 2 * costKg; \n }\n \n }\n else if (weight >5 && weight <= 10)\n {\n costKg = 6.70;\n if (distance > 1000)\n {\n costKg = 2 * costKg; \n }\n \n }\n else if (weight >10)\n {\n costKg = 9.80;\n if (distance > 1000)\n {\n costKg = 2 * costKg; \n }\n \n } \n //Computes date and time from the system\n dateCreated = new Date(); \n \n }", "private static void calculateCalories() {\n totalCaloriesConsumed = day1CalConsumed;\n totalCaloriesConsumed += day2CalConsumed;\n totalCaloriesConsumed += day3CalConsumed;\n totalCaloriesConsumed += day4CalConsumed;\n totalCaloriesConsumed += day5CalConsumed;\n totalCaloriesConsumed += day6CalConsumed;\n totalCaloriesConsumed += day7CalConsumed;\n \n totalCaloriesBurned = day1CalBurned;\n totalCaloriesBurned += day2CalBurned;\n totalCaloriesBurned += day3CalBurned;\n totalCaloriesBurned += day4CalBurned;\n totalCaloriesBurned += day5CalBurned;\n totalCaloriesBurned += day6CalBurned;\n totalCaloriesBurned += day7CalBurned;\n \n averageCaloriesConsumed = (double) totalCaloriesConsumed / DAYS_IN_WEEK;\n averageCaloriesBurned = (double) totalCaloriesBurned / DAYS_IN_WEEK;\n \n netWeeklyPounds = (double) (totalCaloriesConsumed - totalCaloriesBurned) / CALORIES_PER_POUND;\n }", "public double generatePrice (String email, String title, String hallClass, String movieType, String day)\n\t{\n\t\tUser user;\n\t\t// to determine the day rate, default: weekday since higher probability\n\t\tString dayType = \"weekday\"; \n\t\tHashMap <String, Double> dayRateHash = new HashMap <String, Double>();\n\t\tdouble price;\n\t\t// set a fixed String Array for weekend \n\t\tString [] weekend = {\"Saturday\", \"Sunday\"}; \t\n\t\t// to get the user object based on the email\n\t\tuser = userManager.getUserObject(email);\n\t\t// to get the movie rate based on the type of the movie chosen\n\t\tdouble movieRate = movieManager.getMovieTypeRateHash().get(movieType);\n\t\t// to get the class rate based on the class of the movie\n\t\tdouble classRate = hallManager.getClassRateHash().get(hallClass);\n\t\t// to get the user rate based on the age group of the user\n\t\tdouble userRate = userManager.getUserAgeRateHash().get(user.getAgeGroup());\n\t\t// to get the hash map of the type of day and day rate\n\t\tdayRateHash= showtimeManager.getDayRateHash();\n\t\tdouble dayRate;\n\t\t// since day is in the format like \"Sunday, November 12, 2017\", we just want the day thus split with \",\"\n\t\tString []dayOnly = day.split(\",\"); \n\t\t\n\t\t// check if the selected day is public holiday\n\t\tfor (int i = 0; i < showtimeManager.getPHList().size(); i++){\n\t\t\tif (day.equals(showtimeManager.getPHList().get(i))){\n\t\t\t\tdayType = \"PH\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\n\t\t// only check for weekend if the selected day is not declared as PH\n\t\tif (dayType.equals(\"PH\") == false){\n\t\t\tfor (int i = 0 ; i < 2; i++){\n\t\t\t\tif (weekend[i].equals(dayOnly[0])){\n\t\t\t\t\tdayType = \"weekend\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// to get the rate of the day type\n\t\tdayRate = dayRateHash.get(dayType);\n\t\t// ticket price is the aggregation of all the 4 type rates\n\t\tprice = movieRate + classRate +userRate + dayRate;\n\t\treturn price;\n\t}", "public double calculateFees(){\n switch (reservation.getRouter().getModel()) {\n case \"Huawei310\":\n fees = (reservation.numberOfRentingDays)*2;\n break;\n case \"Huawei330\":\n fees = (reservation.numberOfRentingDays)*3;\n break;\n case \"Huawei350\":\n fees = (reservation.numberOfRentingDays)*5;\n break;\n default:\n break;\n }\n if(isDiscount)\n {\n fees = fees - (fees*25/100);\n }\n System.out.println(\"#\" + reservation.reservationID);\n System.out.println(\"Customer Name: \" + customerName);\n System.out.println(\"Router Model: \"+ reservation.getRouter().getModel());\n System.out.println(\"Number of Ports \"+reservation.getRouter().getNumOfPorts());\n System.out.println(\"Start Date: \"+reservation.getStartDate().day + \"/\" + reservation.getStartDate().month + \"/\" +reservation.getStartDate().year);\n System.out.println(\"Due Date: \"+reservation.getDueDate().day+ \"/\" + reservation.getDueDate().month + \"/\" +reservation.getDueDate().year);\n System.out.println(\"Renting Fees: \" + fees + \" pounds\");\n return fees;\n }", "@Override\n public double calculateCosts()\n {\n cost = (labourCost.getCost() + capitalCost.getCost() + materialCost.getCost()) * (1 + PROFITMARGIN);\n return cost;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Service function to retrieve COVID19 Cases based on the facility. Data consist of: 1. fid 2. age 3. gender 4. nationality 5. residence 6. travelHistory 7. symptoms 8. confirmed 9. facility 10. status 11. date
public void retrievePHCovidCaseByFacility() { System.out.println("Start retrieving List!"); try { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(PH_COVID_URL_CASE_BY_FACILITY)).build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); JSONObject jsonObject = new JSONObject(response.body()); JSONArray caseMap = jsonObject.getJSONArray("features"); List<PHCasesByFacility> casesByFacilityList = new ArrayList<>(); for (int i = 0; i < caseMap.length(); i++) { JSONObject caseObject = caseMap.getJSONObject(i).getJSONObject("attributes"); PHCasesByFacility casesByFacility = new PHCasesByFacility(); if (caseObject == null) continue; casesByFacility.setFid(Long.parseLong(caseObject.get("FID").toString())); casesByFacility.setAge(Integer.parseInt(caseObject.get("edad").toString())); casesByFacility.setGender(caseObject.get("kasarian").toString()); casesByFacility.setNationality(caseObject.get("nationalit").toString()); casesByFacility.setResidence(caseObject.get("residence").toString()); casesByFacility.setTravelHistory(caseObject.get("travel_hx").toString()); casesByFacility.setSymptoms(caseObject.get("symptoms").toString()); casesByFacility.setConfirmed(caseObject.get("confirmed").toString()); casesByFacility.setFacility(caseObject.get("facility").toString()); casesByFacility.setStatus(caseObject.get("status").toString()); casesByFacility.setDate(caseObject.get("petsa").toString()); casesByFacilityList.add(casesByFacility); } phCasesByFacilityRepository.saveAll(casesByFacilityList); System.out.println("Save List!"); } catch (Exception e) { e.printStackTrace(); } }
[ "@ApiOperation( value = \"Covid19 AllCaseReport\")\n @GetMapping(path = \"/cases\", produces = \"application/json\")\n public Covid19CaseReport cases () {\n return caseService.getCaseReport();\n }", "public void getActivities(Facility facility){\n \n \t}", "public List<ICase> searchCases(Date date, String CPR, int id) {\n List<ICase> cases = new ArrayList<>();\n for (ICase aCase : allCases) {\n if (aCase.getCreationDate().equals(calendar.formatToString(date)) && aCase.getCPR().equals(CPR) && aCase.getCaseNumber() == id) {\n cases.add(aCase);\n }\n }\n return cases;\n }", "Case readCase(int caseID);", "@Override\n public List<Cases> findAllCases(CasesApiContext cac) {\n\n LOGGER.info(\"Get all cases from database\");\n final String sql = cac.getApplicationProps().getProperty(Const.SQL_QUERY_FOR_CASES);\n List<Cases> cases = new ArrayList<>();\n try {\n LOGGER.info(\"Run sql query, sqlQuery={}\", sql);\n cases = jdbcTemplate.query(sql, (rs, rowNum) ->\n new Cases(\n rs.getInt(\"case_id\"),\n rs.getInt(\"customer_id\"),\n rs.getInt(\"provider_id\"),\n rs.getInt(\"created_error_code\"),\n rs.getString(\"status\").trim(),\n rs.getDate(\"ticket_creation_date\"),\n rs.getDate(\"last_modified_date\"),\n rs.getString(\"product_name\").trim()\n ));\n } catch (Exception e) {\n LOGGER.error(\"Could not get results for cases from database, exception={}\", e.getMessage());\n }\n LOGGER.info(\"Got results for cases from database, cases={}\", cases);\n return cases;\n }", "public List<ICase> searchCases(String CPR, int id) {\n List<ICase> cases = new ArrayList<>();\n for (ICase aCase : allCases) {\n if (aCase.getCPR().equals(CPR) && aCase.getCaseNumber() == id) {\n cases.add(aCase);\n }\n }\n\n return cases;\n }", "public int getCovidCases() {\r\n\t\treturn covidCases;\r\n\t}", "public CashDrawer getByCampusCode(String campusCode);", "public Map<String, String> findCoursesForFacilityFee() throws Exception\n\t{\n\t throw new Exception(\"Not Implemented.\");\n }", "public List<CaseObject> getCaseObject(String citizenCPR) {\n List<CaseObject> caseObjects = new ArrayList<>();\n \n for (String[] simpleCase : reader.getSimpleCases(citizenCPR)) {\n int id = Integer.parseInt(simpleCase[0]);\n int employeeID = Integer.parseInt(simpleCase[1]);\n String description = simpleCase[2];\n Date dateCreated = new Date(Long.parseLong(simpleCase[3]));\n \n CaseObject caseObject = new CaseObject(id, employeeID, \"Case\", description, dateCreated);\n caseObjects.add(caseObject);\n }\n \n for (String[] simpleCase : reader.getSimpleCaseRequests(citizenCPR)) {\n int id = Integer.parseInt(simpleCase[0]);\n int employeeID = Integer.parseInt(simpleCase[1]);\n String description = simpleCase[2];\n Date dateCreated = new Date(Long.parseLong(simpleCase[3]));\n \n CaseObject caseObject = new CaseObject(id, employeeID, \"CaseRequest\", description, dateCreated);\n caseObjects.add(caseObject);\n }\n \n return caseObjects;\n }", "public List<ICase> searchCases(Date date, int id) {\n List<ICase> cases = new ArrayList<>();\n for (ICase aCase : allCases) {\n if (aCase.getCreationDate().equals(calendar.formatToString(date)) && aCase.getCaseNumber() == id) {\n cases.add(aCase);\n }\n }\n return cases;\n }", "private List<CourtCase> getAllCasesInTheCourt(Court court) {\n HttpComponentsClientHttpRequestFactory clientHttpRequestFactory = new HttpComponentsClientHttpRequestFactory(\n HttpClientBuilder.create().build());\n RestTemplate restTemplate = new RestTemplate(clientHttpRequestFactory);\n //ObjectMapper mapper = new ObjectMapper();\n\n HttpHeaders headers = new HttpHeaders();\n headers.set(\"Host\", court.getHost());\n headers.set(\"Accept\", \"application/json, text/javascript, */*; q=0.01\");\n headers.set(\"Accept-Language\", \"ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3\");\n headers.set(\"Accept-Encoding\", \"gzip, deflate\");\n headers.set(\"Content-Type\", \"application/x-www-form-urlencoded\");\n headers.set(\"X-Requested-With\", \"XMLHttpRequest\");\n headers.set(\"Referer\", court.getReferer());\n String body = \"q_court_id=\" + court.getCourtId();\n\n HttpEntity<String> httpEntity = new HttpEntity<>(body, headers);\n ResponseEntity<String> response = restTemplate.exchange(court.getUrl(), HttpMethod.POST, httpEntity, String.class);\n try {\n List<CourtCase> courtCases = Arrays.asList(mapper.readValue(response.getBody(), CourtCase[].class));\n courtCases.forEach(c -> {\n c.setCourtName(court.getName());\n c.setJudge(c.getJudge().trim());\n });\n return courtCases;\n } catch (IOException e) {\n throw new RuntimeJsonMappingException(e.getMessage());\n }\n }", "public List<ICase> searchCases(Date date, String CPR) {\n List<ICase> cases = new ArrayList<>();\n for (ICase aCase : allCases) {\n if (aCase.getCreationDate().equals(calendar.formatToString(date)) && aCase.getCPR().equals(CPR)) {\n cases.add(aCase);\n }\n }\n return cases;\n }", "@ApiOperation( value = \"Covid19 Find case by gender type\")\n @GetMapping(path = \"/cases/gender\", produces = \"application/json\")\n public Map findCasesByGender (@ApiParam(required = true,example = \"Male\")@RequestParam(\"sex\") String sex) {\n Map data = new HashMap<>();\n data.put(\"Data\", caseService.findCaseByGender(sex));\n data.put(\"UpdateDate\", caseService.getCaseReport().getUpdateDate());\n return data;\n }", "public List<Map<String,String>> getCCIData(int iusid, int timeperiodid,\n\t\t\tint areaId);", "public List<ICase> searchCases(int id) {\n List<ICase> cases = new ArrayList<>();\n for (ICase aCase : allCases) {\n if (aCase.getCaseNumber() == id) {\n cases.add(aCase);\n }\n }\n return cases;\n }", "public void setCaseList() {\n ResultSet rs = Business.getInstance().getData().getAllCases();\n try {\n while (rs.next()) {\n allCases.add(new Case(rs.getInt(\"caseid\"),\n rs.getString(\"case_directory\"),\n rs.getString(\"creation_date\"),\n rs.getString(\"cpr\"),\n rs.getBoolean(\"is_active\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "String getCcV(String bookingRef);", "public MapInfo getAllCovidCasesMapinfo() {\n GeoJsonGenerator generator = new GeoJsonGenerator();\n return generator.getAllMapInfo(getMapParamsOfMany(covidDataRepository.findAll()));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find all TdDepEco entities that matches the condition 'where idParentesco is equals to'.
@FindByCondition(value=TdDepEco.class, condition="ID_PARENTESCO=?") List<TdDepEco> findByIdParentesco(java.lang.Boolean idParentesco);
[ "@FindByCondition(value=TdDepEco.class, condition=\"ID_PARENTESCO=?\")\n TdDepEco getByIdParentesco(java.lang.Boolean idParentesco);", "@Override\n public List<Regionalizacion> getByParent(Long parent) {\n List<Regionalizacion> list = null;\n try {\n System.out.println(\"RegionalizacionDAOOBjectify getByParent [\" + parent);\n Query<Regionalizacion> query = ofy().load().type(Regionalizacion.class)\n .ancestor(Key.create(Contrato.class, parent));\n list = query.list();\n System.out.println(\"RegionalizacionDAOOBjectify getByParent [\" + parent\n + \"] full load size: \" + list.size());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n // query= query.filter(\"parent ==\", parent);\n // System.out.println(\"RegionalizacionDAOOBjectify getByParent [\"+parent+\"] filtered size: \"+query.list().size());\n return list;\n }", "@FindByCondition(value=TdDepEco.class, condition=\"ID_NIV_ESCOLAR=?\")\n List<TdDepEco> findByIdNivEscolar(java.lang.Integer idNivEscolar);", "@Override\n\tpublic List<EntityRelationshipType> findEntityRelationListByEntityId(String entityId) {\n\t\tList<EntityRelationshipType> relationList = new ArrayList<>();\n\t\tLosConfigDetails owner = configLookupRepository.findByConfigId(LOSEntityConstants.OWNER);\n\t\tLosConfigDetails owned = configLookupRepository.findByConfigId(LOSEntityConstants.OWNED);\n\t\tLosConfigDetails affilated = configLookupRepository.findByConfigId(LOSEntityConstants.AFFILIATED);\n\t\tLosConfigDetails subsidary = configLookupRepository.findByConfigId(LOSEntityConstants.SUBSIDIARY);\n\t\tint parentCount = findParentEntityIsNotDeletedCount(entityId);\n\t\tif (parentCount == 0) {\n\t\t\tList<String> commercialEntityId2List = new ArrayList<String>();\n\t\t\tList<String> cToCRelation = new ArrayList<String>();\n\t\t\tList<String> iToCRelation = new ArrayList<String>();\n\t\t\tCommercialEntity parentEntity = new CommercialEntity();\n\t\t\tList<EntityRelationshipType> parents = entityRelationshipTypeRepository\n\t\t\t\t\t.findByEntityId1AndDeletedAndStatus(Arrays.asList(entityId));\n\t\t\tif (parents.isEmpty()) {\n\t\t\t\treturn entityRelationshipTypeRepository.findByEntityId2AndDeleted(Arrays.asList(entityId));\n\t\t\t}\n\t\t\tparentNotPresent(entityId, relationList, owner, affilated, subsidary, commercialEntityId2List, cToCRelation,\n\t\t\t\t\tiToCRelation, parentEntity, parents);\n\t\t\trelationList.addAll(parents);\n\t\t} else {\n\t\t\tList<EntityRelationshipType> children = parentPresent(entityId, relationList, owner, owned, affilated,\n\t\t\t\t\tsubsidary);\n\t\t\trelationList.addAll(children);\n\t\t}\n\t\treturn relationList;\n\t}", "@FindByCondition(value=TdDepEco.class, condition=\"ID_GENERO=?\")\n List<TdDepEco> findByIdGenero(java.lang.String idGenero);", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "@Override\n\tpublic ParentEntityNode findEntityRelationTreeByParentEntityId(String entityId) {\n\t\tLosConfigDetails owner = configLookupRepository.findByConfigId(LOSEntityConstants.OWNER);\n\t\tLosConfigDetails owned = configLookupRepository.findByConfigId(LOSEntityConstants.OWNED);\n\t\tLosConfigDetails affilated = configLookupRepository.findByConfigId(LOSEntityConstants.AFFILIATED);\n\t\tLosConfigDetails subsidary = configLookupRepository.findByConfigId(LOSEntityConstants.SUBSIDIARY);\n\t\tString commercialSuffix = LOSEntityConstants.COMMERCIAL_SUFFIX_CODE;\n\t\tLong parentCount = findParentEntityCount(entityId);\n\t\tList<EntityRelationshipType> relationDetails = entityRelationshipTypeRepository\n\t\t\t\t.findByEntityId1AndDeleted(Arrays.asList(entityId));\n\t\tif (!relationDetails.isEmpty()) {\n\t\t\tList<String> iterationChildIds = new ArrayList<>();\n\t\t\tList<EntityRelationshipType> isOwnerRelation = relationDetails.stream().filter(\n\t\t\t\t\tcheckRelationType -> getEntityRelationId(checkRelationType).equals(LOSEntityConstants.OWNER))\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\tif (!isOwnerRelation.isEmpty()) {\n\t\t\t\tList<String> entityIds = new ArrayList<>();\n\t\t\t\tList<ParentEntityNode> treeData = new ArrayList<>();\n\t\t\t\tList<String> levelTwoChildIds = new ArrayList<>();\n\t\t\t\tfor (EntityRelationshipType eachRelation : relationDetails) {\n\t\t\t\t\tif (getEntityRelationId(eachRelation).equals(LOSEntityConstants.OWNER)\n\t\t\t\t\t\t\t&& eachRelation.getEntityId1().endsWith(commercialSuffix)\n\t\t\t\t\t\t\t&& eachRelation.getEntityId2().endsWith(commercialSuffix)) {\n\t\t\t\t\t\tentityIds.add(eachRelation.getEntityId2());\n\t\t\t\t\t\tList<ParentEntityNode> rootData = parentEntityNodeRepository.findEntityTreeData(entityId);\n\t\t\t\t\t\ttreeData.addAll(rootData);\n\t\t\t\t\t}\n\t\t\t\t\tif (!entityIds.isEmpty()) {\n\t\t\t\t\t\treturn cToCOwnerCheckLeveOneHavingParentOrChildren(entityId, owner, affilated, commercialSuffix, // NOSONAR\n\t\t\t\t\t\t\t\titerationChildIds, entityIds, treeData, levelTwoChildIds);// NOSONAR\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (parentCount == 0) {\n\t\t\tList<ParentEntityNode> treeData = entityParentIsNotPresent(entityId, subsidary, affilated, owner,\n\t\t\t\t\tcommercialSuffix);\n\t\t\treturn entityRelationshipTreeServiceImpl.createTreeFromParent(treeData, entityId);\n\t\t} else if (parentCount > 0) {\n\t\t\tList<ParentEntityNode> treeData = entityParentIsPresent(entityId, owner, owned, affilated, subsidary,\n\t\t\t\t\tcommercialSuffix);\n\t\t\treturn entityRelationshipTreeServiceImpl.createTreeFromParent(treeData, entityId);\n\t\t}\n\t\tList<ParentEntityNode> parentEntityNode = parentEntityNodeRepository.findEntityTreeData(entityId);\n\t\treturn entityRelationshipTreeServiceImpl.createTreeFromParent(parentEntityNode, entityId);\n\t}", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "@FindByCondition(value=TdDepEco.class, condition=\"ID_NIV_ESCOLAR=?\")\n TdDepEco getByIdNivEscolar(java.lang.Integer idNivEscolar);", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "@FindByCondition(value=TdDepEco.class, condition=\"DE_CICLO=?\")\n List<TdDepEco> findByDeCiclo(java.lang.Integer deCiclo);", "Set<KidDTO> findByParentId(@Param(\"parentId\") long parentId);", "@FindByCondition(value=TdDepEco.class, condition=\"ID_GENERO=?\")\n TdDepEco getByIdGenero(java.lang.String idGenero);", "@SuppressWarnings(\"unchecked\")\n \tpublic List<Integer> getParents(Integer childId){\n \t Query query = getSession()\n .createSQLQuery(\"select a.item_id from item_dependency a \" +\n \t\t\"WHERE a.child_item_id=:childId ORDER BY a.item_id ASC\")\n \t\t.setParameter(\"childId\", childId);\n \t \n \t if(query.list()!=null && !query.list().isEmpty() && query.list().get(0) instanceof BigDecimal){\n \t\t List<Integer> x=new ArrayList<Integer>();\n \t\t List<BigDecimal> a=query.list();\n \t\tfor(int i=0;i<a.size();i++){\n \t\tx.add(Integer.valueOf(a.get(i).intValue()));\n \t}\n \t\treturn x;\n \t }\n \t else{\n \t\treturn query.list();\n \t }\n }", "List<FecetDocExpediente> findWhereIdDocExpedienteEquals(BigDecimal idDocExpediente);", "@FindByCondition(value=TdDepEco.class, condition=\"DE_CICLO=?\")\n TdDepEco getByDeCiclo(java.lang.Integer deCiclo);", "CompositeOtoChild findById(CompositeOtoParentId compositeotochildId);", "List<FecetDocExpediente> findWhereIdPropuestaEqualsOrderByFecha(BigDecimal idPropuesta);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the persisted attribute types where code = &63;.
public java.util.List<PersistedAttributeType> findBycode(String code);
[ "public java.util.List<PersistedAttributeType> findBycode(\n\t\tString code, int start, int end);", "public AttributeType getAttributeTypeByCode(int typeCode);", "public java.util.List<PersistedAttributeType> findBycode(\n\t\tString code, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<PersistedAttributeType>\n\t\t\torderByComparator);", "public java.util.List<PersistedAttributeType> findBycode(\n\t\tString code, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<PersistedAttributeType>\n\t\t\torderByComparator,\n\t\tboolean useFinderCache);", "Collection<CodeAttribute<?>> getCodeAttributes();", "public AttributeType getAttributeTypeByCode(int vendorId, int typeCode);", "List<CodeValue> getByType(String type);", "public java.util.List<PersistedAttributeType> findAll();", "public PersistedAttributeType fetchBycode_Last(\n\t\tString code,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<PersistedAttributeType>\n\t\t\torderByComparator);", "public PersistedAttributeType fetchBycode_First(\n\t\tString code,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<PersistedAttributeType>\n\t\t\torderByComparator);", "public static GamePackTypes getTypeFromCode(int code)\n {\n return typesByCode.get(code);\n }", "public java.util.List<PersistedAttribute> findBytypeId(long typeId);", "@Override\n public List<GenderType> getGenderTypes(String languageCode) {\n return getRepository().getCodeList(GenderType.class, languageCode);\n }", "@Override\n public List<PartyType> getPartyTypes(String languageCode) {\n return getRepository().getCodeList(PartyType.class, languageCode);\n }", "public static Collection<AttributeType> findAll( )\n {\n return _dao.selectDocumentAttributeTypeList( );\n }", "protected Collection getTypeCodes(String feeMethodCode) {\r\n Collection typeCodes = new ArrayList();\r\n Collection<FeeTransaction> feeTransactions = new ArrayList();\r\n\r\n if (StringUtils.isNotBlank(feeMethodCode)) {\r\n Map<String, String> crit = new HashMap<String, String>();\r\n\r\n Criteria criteria = new Criteria();\r\n criteria.addEqualTo(EndowPropertyConstants.FEE_METHOD_CODE, feeMethodCode);\r\n criteria.addEqualTo(EndowPropertyConstants.FEE_TRANSACTION_INCLUDE, EndowConstants.YES);\r\n QueryByCriteria query = QueryFactory.newQuery(FeeTransaction.class, criteria);\r\n\r\n feeTransactions = getPersistenceBrokerTemplate().getCollectionByQuery(query);\r\n for (FeeTransaction feeTransaction : feeTransactions) {\r\n typeCodes.add(feeTransaction.getDocumentTypeName());\r\n }\r\n }\r\n\r\n return typeCodes;\r\n }", "public PersistedAttributeType[] findBycode_PrevAndNext(\n\t\t\tlong id, String code,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator\n\t\t\t\t<PersistedAttributeType> orderByComparator)\n\t\tthrows NoSuchPersistedAttributeTypeException;", "public static ReferenceList getAttributeTypesList( Locale locale )\n {\n return _dao.selectAttributeTypeList( locale );\n }", "public Set<Class<?>> getAttributeTypes() {\n return Collections.unmodifiableSet(attributes.keySet());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add board to the initial UI
public void initUI() { add(board); //Set if frame is resizable by user setResizable(false); //call pack method to fit the //preferred size and layout of subcomponents //***important head might not work correctly with collision of bottom and right borders pack(); //set title for frame setTitle("Snake"); //set location on screen(null centers it) setLocationRelativeTo(null); //set default for close button of frame setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); }
[ "public void createChessBoardScreen(){\n //screen.setContentPane(chessBoard);\n screen.add(chessBoard);\n screen.setVisible(true);\n }", "private void _createBoard() {\n\t\t_boardPanels = new JPanel(new GridLayout(_gameState.getBoard().getNumberOfRows() + 1,\n\t\t\t\t_gameState.getBoard().getNumberOfColumns()));\n\t\tgetContentPane().add(_boardPanels, \"Center\");\n\t}", "public void newBoard() {\r\n Deck deck = Deck.copy(mainDeck);\r\n this.board = new Board(this, player, deck);\r\n board.printUI();\r\n\r\n }", "private void addGameBoardDisplay()\n {\n gbd = coord.getGameBoardDisplay();\n root.getChildren().add(gbd);\n }", "private void setupBoard() {\n setBackground(Color.BLACK);\n setPreferredSize(new Dimension(myWidth, myHeight));\n myBoard.addObserver(this);\n enableStartupKeys();\n }", "public void displayBoard() {\r\n\t\tboard = new JButton[6][7];\r\n\t\tfor (int row = 0; row < board.length; row++) {\r\n\t\t\tfor (int col = 0; col < board[row].length; col++) {\r\n\t\t\t\tboard[row][col] = new JButton();\r\n\t\t\t\tboard[row][col].addActionListener(this);\r\n\t\t\t\tboard[row][col].setBorder(new EtchedBorder());\r\n\t\t\t\tboard[row][col].setEnabled(true);\r\n\t\t\t\tboardPanel.add(board[row][col]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public BoardGUI() {\n initComponents();\n b = new Board();\n display(b);\n setVisible(true);\n }", "private void initializeBoard() {\n boardManager.createNewEmptyBoard();\n }", "public ChessBoard() {\n initComponents();\n createChessBoard();\n\n }", "private void createBoard() {\n\t\tthis.board = new Board(this.players, this);\n\t\tthis.boardRender = new BoardRender(this.board, this);\n\t}", "private void initBoardPanel()\r\n {\r\n for(int i = 0; i < 3; i++)\r\n {\r\n for(int j = 0; j < 3; j++)\r\n {\r\n buttons[i][j] = new JButton(\" \");\r\n buttons[i][j].addActionListener(bh);\r\n buttons[i][j].setEnabled(false);\r\n boardpanel.add(buttons[i][j]);\r\n }\r\n }\r\n }", "public void createBoard() {\n String name = peerport + \":board\" + Instant.now().toEpochMilli();\n Whiteboard whiteboard = new Whiteboard(name, false);\n addBoard(whiteboard, true);\n }", "public void makeNewBoard() {\n createFields();\n cellsToZero();\n\n for (int i = 0; i < 81; i++) {\n setCellValue(i, 0);\n }\n }", "Board createLayout();", "private void createBoard() {\n my_next_piece_board = new Board();\n my_next_piece_board.setCurrentPiece(my_panel.getNextPiece());\n \n my_next_piece_board.step();\n my_next_piece_board.step();\n my_next_piece_board.step();\n my_next_piece_board.step();\n my_next_piece_board.step();\n my_next_piece_board.moveLeft();\n my_next_piece_board.moveLeft();\n my_next_piece_board.moveLeft();\n }", "public void setBoard(){\r\n for (Card c : cards){\r\n panel.add(c);\r\n }\r\n }", "private void setUpLeftSide() { \n add(myGameBoard);\n }", "MainBoard createMainBoard();", "public Board1() {\n initComponents();\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copy last pressed values from current values, read new and device state
private void updateButtons(VRControllerState state) { lastPressedFlags = curPressedFlags; curPressedFlags = state.ulButtonPressed(); this.state = state; //Update state someButtonDown = (curPressedFlags - lastPressedFlags) > 0; someButtonUp = (lastPressedFlags - curPressedFlags) > 0; someButton = curPressedFlags > 0; //Store currently pressed buttons, also update touchpad axis if the touchpad was pressed if(someButton) { pressedButtons = getPressedButtons(); if(pressedButtons.contains(DeviceButton.STEAMVR_TOUCHPAD)) { updateTouchpadAxis(state); } } }
[ "public void updateStates() {\n for (int i = 0; i < 256; i++) {\n if (keys[i] == keyState.JUST_PRESSED) {\n keys[i] = keyState.DOWN;\n } else if (keys[i] == keyState.JUST_RELEASED) {\n keys[i] = keyState.UP;\n }\n }\n }", "static CM readBtnPressed(PlayerState oldP, PlayerState newP){\n //System.out.println(\"--------------------------\");\n for (CM key : CM.values()) {\n switch(key){\n case LEFT_ANALOG_STICK_X:\n case LEFT_ANALOG_STICK_Y:\n case RIGHT_ANALOG_STICK_X:\n case RIGHT_ANALOG_STICK_Y:\n break; //break switch (NOT for each)\n default:\n if(newP.readButton(key) && !oldP.readButton(key)){\n return key;\n }\n break;\n }\n }\n return null;\n }", "private void copyStateToLast(){\n \tint numC = manager.getNumConditions();\n \tfor(int c=0; c<numC; c++){\n \t\tfor(int j=0; j<numComponents; j++){\n \t\t\tlastPi[c][j] = pi[c][j];\n \t\t\tlastMu[c][j] = mu[c][j];\n \t\t\tfor(int x=0; x<rBind[c][j].length; x++){\n \t\t\t\tlastRBind[c][j][x] = rBind[c][j][x];\n \t\t\t}\n \t\t}\n \t}\n }", "private void boardCurrentState() {\n Intent sendIntent = new Intent(Constants.UiControl.UPDATE_UI);\n sendIntent.putExtra(\"current\", current);\n sendIntent.putExtra(\"isPlay\", isPlay);\n currentTime = player.getCurrentPosition();\n sendIntent.putExtra(\"currentTime\", currentTime);\n sendIntent.putExtra(\"songId\", currentSongId);\n sendIntent.putExtra(\"mode\", mode);\n sendIntent.putExtra(\"listName\", listName);\n sendBroadcast(sendIntent);\n if (hasNotify)\n showButtonNotify();\n }", "public void setPreviousValues() {\r\n \tjustInTime = prevJustInTime;\r\n panics = prevPanics;\r\n debugInfo = prevDebugInfo; \t\r\n setChangedAndNotifyObservers();\r\n }", "private void resetLastPressedCell()\n\t{\n\t\tlastPressedCell = new int[2];\n\t\tlastPressedCell[0] = -1;\n\t\tlastPressedCell[1] = -1;\n\t}", "private void updateLightSensorValues()\n {\n sendMessage((byte)Constants.LIGHTSENSVAL,(byte)Constants.REQ);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.POTVAL, (byte)Constants.REQ);\n if(progPotToggleButton.isChecked())\n {\n int x =0;\n try {\n x = Integer.parseInt(progValueEditText.getText().toString());\n if(x>=0 && x<256)\n sendMessage((byte)Constants.PROGVAL,(byte)x);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.USEPOT,(byte)Constants.NO);\n } catch (NumberFormatException e) {\n messageView.append(\"int för helvete\");\n }\n }else\n sendMessage((byte)Constants.USEPOT,(byte)Constants.YES);\n\n }", "public int getLastKeyPressed () {\r\n int keyPressed = myLastKeyPressed;\r\n myLastKeyPressed = NO_KEY_PRESSED;\r\n return keyPressed;\r\n }", "public void updateFocusState() {\n float FFT_freq_Hz, FFT_value_uV;\n int alpha_count = 0, beta_count = 0;\n\n for (int Ichan=0; Ichan < 2; Ichan++) { // only consider first two channels\n for (int Ibin=0; Ibin < fftBuff[Ichan].specSize(); Ibin++) {\n FFT_freq_Hz = fftBuff[Ichan].indexToFreq(Ibin);\n FFT_value_uV = fftBuff[Ichan].getBand(Ibin);\n\n if (FFT_freq_Hz >= 7.5f && FFT_freq_Hz <= 12.5f) { //FFT bins in alpha range\n alpha_avg += FFT_value_uV;\n alpha_count ++;\n }\n else if (FFT_freq_Hz > 12.5f && FFT_freq_Hz <= 30) { //FFT bins in beta range\n beta_avg += FFT_value_uV;\n beta_count ++;\n }\n }\n }\n\n alpha_avg = alpha_avg / alpha_count; // average uV per bin\n beta_avg = beta_avg / beta_count; // average uV per bin\n\n // version 1\n if (alpha_avg > alpha_thresh && alpha_avg < alpha_upper && beta_avg < beta_thresh) {\n isFocused = true;\n } else {\n isFocused = false;\n }\n }", "private void reflectNewState() {\n updateWheelView();\n reflectHVACOnState();\n reflectActualTemps();\n reflectDefrosterState();\n }", "private void saveState() {\n // Increase capacity if necessary\n if (nSaved == savedC.length) {\n Object tmp;\n tmp = savedC;\n savedC = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedC,0,nSaved);\n tmp = savedCT;\n savedCT = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedCT,0,nSaved);\n tmp = savedA;\n savedA = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedA,0,nSaved);\n tmp = savedB;\n savedB = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedB,0,nSaved);\n tmp = savedDelFF;\n savedDelFF = new boolean[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedDelFF,0,nSaved);\n }\n // Save the current sate\n savedC[nSaved] = c;\n savedCT[nSaved] = cT;\n savedA[nSaved] = a;\n savedB[nSaved] = b;\n savedDelFF[nSaved] = delFF;\n nSaved++;\n }", "public void update(Gamepad gamepad1, Gamepad gamepad2) {\n // Set previous values\n for (GamepadButtons button : GamepadButtons.values()) {\n GamepadButtonState state1 = gamepad1State.get(button);\n GamepadButtonState state2 = gamepad2State.get(button);\n state1.prev_pressed = state1.pressed;\n state2.prev_pressed = state2.pressed;\n }\n\n updateValuesForButton(GamepadButtons.a, gamepad1.a, gamepad2.a);\n updateValuesForButton(GamepadButtons.b, gamepad1.b, gamepad2.b);\n updateValuesForButton(GamepadButtons.x, gamepad1.x, gamepad2.x);\n updateValuesForButton(GamepadButtons.y, gamepad1.y, gamepad2.y);\n updateValuesForButton(GamepadButtons.dpad_up, gamepad1.dpad_up, gamepad2.dpad_up);\n updateValuesForButton(GamepadButtons.dpad_left, gamepad1.dpad_left, gamepad2.dpad_left);\n updateValuesForButton(GamepadButtons.dpad_right, gamepad1.dpad_right, gamepad2.dpad_right);\n updateValuesForButton(GamepadButtons.dpad_down, gamepad1.dpad_down, gamepad2.dpad_down);\n updateValuesForButton(GamepadButtons.start, gamepad1.start, gamepad2.start);\n updateValuesForButton(GamepadButtons.back, gamepad1.back, gamepad2.back);\n updateValuesForButton(GamepadButtons.bumper_left, gamepad1.left_bumper, gamepad2.left_bumper);\n updateValuesForButton(GamepadButtons.bumper_right, gamepad1.right_bumper, gamepad2.right_bumper);\n updateValuesForButton(GamepadButtons.left_stick, gamepad1.left_stick_button, gamepad2.left_stick_button);\n updateValuesForButton(GamepadButtons.right_stick, gamepad1.right_stick_button, gamepad2.right_stick_button);\n updateValuesForButton(GamepadButtons.guide, gamepad1.guide, gamepad2.guide);\n }", "public static void getInput()\r\n {\r\n\r\n for (int i=0; i < Keyboard.KEYBOARD_SIZE; i++)\r\n {\r\n buffer[i] = false;\r\n wasKeyDown[i]=isKeyDown[i];\r\n isKeyDown[i]=Keyboard.isKeyDown(i);\r\n \r\n if (!isKeyDown[i])\r\n {\r\n timer[i] = 0;\r\n } else\r\n {\r\n timer[i]++;\r\n }\r\n\r\n }\r\n for (int i=Keyboard.KEYBOARD_SIZE; i < Keyboard.KEYBOARD_SIZE+3; i++)\r\n {\r\n buffer[i] = false;\r\n wasKeyDown[i]=isKeyDown[i];\r\n isKeyDown[i]=Mouse.isButtonDown(i-Keyboard.KEYBOARD_SIZE);\r\n }\r\n \r\n if (keyRelease(Key.LBUTTON))\r\n {\r\n sinceL = DOUBLE_CLICK_TOLERANCE;\r\n }\r\n \r\n if (keyRelease(Key.RBUTTON))\r\n {\r\n sinceR = DOUBLE_CLICK_TOLERANCE;\r\n }\r\n \r\n if (keyRelease(Key.MBUTTON))\r\n {\r\n sinceS = DOUBLE_CLICK_TOLERANCE;\r\n }\r\n \r\n if (sinceL > 0)\r\n {\r\n sinceL--;\r\n }\r\n \r\n if (sinceR > 0)\r\n {\r\n sinceR--;\r\n }\r\n \r\n if (sinceS > 0)\r\n {\r\n sinceS--;\r\n }\r\n \r\n if (isKeyDown[Keyboard.KEY_NUMLOCK] && !wasKeyDown[Keyboard.KEY_NUMLOCK])\r\n {\r\n numLock = !numLock;\r\n }\r\n \r\n if (isKeyDown[Keyboard.KEY_CAPITAL] && !wasKeyDown[Keyboard.KEY_CAPITAL])\r\n {\r\n capsLock = !capsLock;\r\n }\r\n \r\n \r\n }", "private void getBackValues()\n {\n mean = backMean;\n stdDev = backStdDev;\n distType = backDistType;\n }", "private void downVal() {\n\t\tint numDown = Globals.mmu.read(currentProcess.segment, ++currentProcess.programCounter);\n\t\tint val = Globals.mmu.pop(currentProcess);\n\n\t\tif (numDown > getStackSize()) {\n\t\t\t//Globals.osShell.shellBsod.execute()\n\t\t}\n\t\tint[] tempStorage = new int[numDown];\n\n\t\tfor (int i = 0; i < numDown; i++)\n\t\t\ttempStorage[i] = Globals.mmu.pop(currentProcess);\n\n\t\tGlobals.mmu.push(currentProcess, val);\n\n\t\tfor (int i = numDown - 1; i >= 0; i--)\n\t\t\tGlobals.mmu.push(currentProcess, tempStorage[i]);\n\n\t\tcurrentProcess.programCounter++;\n\t}", "@Override\n public void stateChanged() {\n this.pitch = sensorHandler.getPitch();\n this.roll = sensorHandler.getRoll();\n this.update();\n }", "private void setState() {\n mem[i] = arr[0];\n mem[i + 1] = arr[1];\n mem[i + 2] = arr[2];\n mem[i + 3] = arr[3];\n mem[i + 4] = arr[4];\n mem[i + 5] = arr[5];\n mem[i + 6] = arr[6];\n mem[i + 7] = arr[7];\n }", "public void update() {\n boolean allPressed = true;\n for (PressurePoint pressurePoint : pressurePoints) {\n if (pressurePoint.isPressed()) {\n allPressed = true;\n } else {\n allPressed = false;\n break;\n }\n }\n door.isOpen = allPressed;\n }", "public abstract void inputChangeEvent( float time, int dstPin, boolean v );" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ assuming d1 and d2 are sorted, merge their contents into a single sorted Deque, and return it
public static Deque<Integer> merge(Deque<Integer> d1, Deque<Integer> d2) { int size1=d1.getSize(); int size2=d2.getSize(); LinkedListDeque<Integer> deque=new LinkedListDeque(); int count1 =0, count2=0; int length = size1+size2; int temp1=0; int temp2=0; for(int i=0; i<length; i++){ try { temp1 = d1.popFromFront(); } catch (Exception ex) { System.out.println(ex.getMessage()); } try { temp2 = d2.popFromFront(); } catch (Exception ex) { System.out.println(ex.getMessage()); } if(count1==size1){ deque.pushToBack(temp2); count2++; }else if(count2 == size2){ deque.pushToBack(temp1); count1++; } else if(temp1<temp2){ deque.pushToBack(temp1); count1++; d2.pushToFront(temp2); } else{ deque.pushToBack(temp2); d1.pushToFront(temp1); count2++; } } return deque; }
[ "public static LinkedQueue<Object> merge(LinkedQueue<Object> q1, LinkedQueue<Object> q2) {\n if (q1.size() == 0) {\n return q2;\n } else if (q2.size() == 0) {\n return q1;\n }\n\n LinkedQueue<Object> mergeQueue = new LinkedQueue<>();\n int i = 0;\n int j = 0;\n int size1 = q1.size();\n int size2 = q2.size();\n\n while (i < size1 && j < size2) {\n int flag = q1.peek().toString().compareTo(q2.peek().toString());\n if (flag < 0) {\n mergeQueue.enqueue(q1.dequeue());\n i++;\n } else {\n mergeQueue.enqueue(q2.dequeue());\n j++;\n }\n }\n\n while (i < size1) {\n mergeQueue.enqueue(q1.dequeue());\n i++;\n }\n while (j < size2) {\n mergeQueue.enqueue(q2.dequeue());\n j++;\n }\n\n return mergeQueue;\n }", "public static LinkedQueue mergeSortedQueues(LinkedQueue q1, LinkedQueue q2) {\n // Replace the following line with your solution.\n LinkedQueue bigQueue = new LinkedQueue();\n while (!q1.isEmpty() && !q2.isEmpty())\n {\n try\n {\n Object qOneItem = q1.front();\n Object qTwoItem = q2.front();\n if (((Comparable) qOneItem).compareTo(qTwoItem) > 0)\n {\n bigQueue.enqueue(q2.dequeue());\n }\n else if (((Comparable) qOneItem).compareTo(qTwoItem) < 0)\n {\n bigQueue.enqueue(q1.dequeue()); \n }\n else\n {\n bigQueue.enqueue(q1.dequeue()); \n bigQueue.enqueue(q2.dequeue());\n }\n }\n catch (QueueEmptyException e)\n {\n e.printStackTrace(); \n }\n }\n \n if (!q1.isEmpty())\n {\n bigQueue.append(q1);\n }\n if (!q2.isEmpty())\n {\n bigQueue.append(q2);\n }\n \n return bigQueue;\n }", "MyQueue mergingFunction(MyQueue q1, MyQueue q2) {\n String element = \"\";\n MyQueue mergedQueue = new MyQueue();\n while( !(q1.isEmpty() && q2.isEmpty()) ) {\n\n if(!q1.isEmpty()) {\n element = q1.dequeue();\n if(!mergedQueue.findElement(element))\n mergedQueue.enqueue(element);\n }\n\n if(!q2.isEmpty()) {\n element = q2.dequeue();\n if(!mergedQueue.findElement(element))\n mergedQueue.enqueue(element);\n }\n\n }\n\n return mergedQueue;\n\n }", "public static Deck merge (Deck d1, Deck d2) {\r\n Deck result = new Deck (d1.cards.length + d2.cards.length);\r\n int i =0, j =0;\r\n Card w;\r\n for (int k = 0; k<result.cards.length; k++ ) {\r\n if (i>=d1.cards.length)w = d2.cards[j];\r\n else if (j>=d2.cards.length)w = d1.cards[i];\r\n else {\r\n int hold = Card.compareCard(d1.cards[i], d2.cards[j]);\r\n if (hold==1)w = d1.cards[i];\r\n else w = d2.cards[j];\r\n }\r\n result.cards[k] = w;\r\n if (Card.compareCard(w, d1.cards[i])==0)i++;\r\n else j++;\r\n }\r\n return result;\r\n }", "private static <Item extends Comparable> Queue<Item> catenate(Queue<Item> q1, Queue<Item> q2) {\n Queue<Item> catenated = new Queue<Item>();\n for (Item item : q1) {\n catenated.enqueue(item);\n }\n for (Item item: q2) {\n catenated.enqueue(item);\n }\n return catenated;\n }", "private static void sort(Queue<Integer> q) {\n\t\t if (q.size() > 1) { // if size is <= 1, then nothing needs to be done\n\t\t Queue<Integer> q1, q2; \n\t\t // Initialize q1 and q2 to empty instances of ArrayQueue as implemented in previous lab.\n\t\t q1 = new ArrayQueue<Integer>(); \n\t\t q2 = new ArrayQueue<Integer>(); \n\n\t\t // split the elements of q in two halves (or close to), first half into q1 and second half into q2\n\t\t int n = q.size(); \n\t\t for (int i=0; i<n/2; i++) \n\t\t q1.enqueue(q.dequeue());\n\t\t while (!q.isEmpty())\n\t\t q2.enqueue(q.dequeue()); \n\n\t\t sort(q1); // recursively sort q1\n\t\t sort(q2); // recursively sort q2\n\n\t\t // What is left to do now is the merging operation. Given that q1 and q2 are each sorted, \n\t\t // efficiently combine is elements back into q so that they are placed in order from first to last. \n\t\t // This process efficiently exploits the property that both, q1 and q2, are sorted.\n\t\t while (!q1.isEmpty() && !q2.isEmpty())\n\t\t if (((Comparable<Integer>) q1.front()).compareTo(q2.front()) <= 0)\n\t\t q.enqueue(q1.dequeue()); \n\t\t else \n\t\t q.enqueue(q2.dequeue()); \n\t\t // At this moment, one of the two queues, either q1 or q2, is empty.\n\t\t Queue<Integer> r = (!q1.isEmpty() ? q1 : q2); // find which, q1 or q2, is not empty yet\n\t\t while (!r.isEmpty())\n\t\t q.enqueue(r.dequeue()); \n\t\t } \n\t\t}", "public static PostingsList orMerge(PostingsList posting1, PostingsList posting2){\n\t\tPostingsList merged = new PostingsList();\n\t\t\n\t\tNode p1 = null;\n\t\tNode p2 = null;\n\t\t\n\t\tif( posting1 != null ){\n\t\t\tp1 = posting1.head;\n\t\t}\n\t\t\n\t\tif( posting2 != null ){\n\t\t\tp2 = posting2.head;\n\t\t}\n\t\t\t\n\t\twhile( p1 != null && p2 != null ){\n\t\t\tif( p1.docID() == p2.docID() ){\n\t\t\t\t// we found a match, so add it to the list\n\t\t\t\tmerged.addDoc(p1.docID());\n\t\t\t\tp1 = p1.next();\n\t\t\t\tp2 = p2.next();\n\t\t\t}else if( p1.docID() < p2.docID() ){\n\t\t\t\t// move up p1 and add it\n\t\t\t\tmerged.addDoc(p1.docID());\n\t\t\t\tp1 = p1.next();\n\t\t\t}else{\n\t\t\t\t// move up p2 and add it\n\t\t\t\tmerged.addDoc(p2.docID());\n\t\t\t\tp2 = p2.next();\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif( p1 != null && p2 != null ){\n\t\t\tthrow new RuntimeException(\"Houston, we have a problem...\");\n\t\t}\n\t\t\t\n\t\twhile( p1 != null ){\n\t\t\tmerged.addDoc(p1.docID());\n\t\t\tp1 = p1.next();\n\t\t}\n\t\t\t\n\t\twhile( p2 != null ){\n\t\t\tmerged.addDoc(p2.docID());\n\t\t\tp2 = p2.next();\n\t\t}\n\t\t\t\n\t\treturn merged;\n\t}", "public static DoubleArraySortedSeq concat(DoubleArraySortedSeq b1, DoubleArraySortedSeq b2)\r\n\t{\r\n\t\tDoubleArraySortedSeq concatination = (DoubleArraySortedSeq)b1.clone();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tconcatination.ensureCapacity(b1.getCapacity()+b2.getCapacity());\r\n\t\t\tconcatination.addAll(b2);\r\n\t\t}\r\n\t\tcatch(NullPointerException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"One of the two arguments is null.\");\r\n\t\t}\r\n\t\tcatch(OutOfMemoryError e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Insufficient memory for the concat().\");\r\n\t\t}\r\n\t\treturn concatination;\r\n\t}", "private static int[] merge (int[] list1, int[] list2) {\n //Creates an array twice as long as the ones beinged merged\n int[] mergedList = new int[list1.length+list2.length];\n int i = 0, j = 0;\n \n //Loops as long as both lists have unsorted values\n while (i < list1.length && j < list2.length) {\n //Places the lower one of the lowest indexed values into the \n //newly created list\n if (list1[i] < list2[j]) {\n mergedList[i+j] = list1[i];\n i++;\n }\n else {\n mergedList[i+j] = list2[j];\n j++;\n }\n }\n //After one of the list is out of values, it appends everything else \n while (i < list1.length) {\n mergedList[i+j] = list1[i];\n i++;\n }\n while (j < list2.length) {\n mergedList[i+j] = list2[j];\n j++;\n }\n //Assumption is that the sorter always gets lists that are internally\n //sorted already, so appending doesn't unsort them \n \n //Returns the new list\n return mergedList;\n }", "static Node merge(Node first, Node second) { \n\t\t// If first list is empty \n\t\tif (first == null) return second; \n\n\t\t// If second list is empty \n\t\tif (second == null) return first; \n\t\t// Pick the smaller value and adjust the links \n\t\tif (first.data < second.data) { \n\t\t\tfirst.next = merge(first.next, second); \n\t\t\tfirst.next.prev = first; \n\t\t\tfirst.prev = null; \n\t\t\treturn first; \n\t\t} else { \n\t\t\tsecond.next = merge(first, second.next); \n\t\t\tsecond.next.prev = second; \n\t\t\tsecond.prev = null; \n\t\t\treturn second; \n\t\t} \n\t}", "public void combine(final DoubleList<T> source1,\n\t final DoubleList<T> source2) {\n\t\twhile(source1.front != null && source2.front != null) {\n\t\t\tthis.insert(-1,source1.removeFront());\n\t\t\tthis.insert(-1,source2.removeFront());\n\t\t}\n\t\t\n\t\twhile( source1.front != null) \n\t\t\tthis.insert(-1,source1.removeFront());\n\t\t\n\t\twhile( source2.front != null) \n\t\t\tthis.insert(-1,source2.removeFront());\n\t\t\n\t\treturn;\n }", "public static BookCollection merge(BookCollection coll1, BookCollection coll2) {\r\n\r\n BookCollection combinedColl;\r\n\r\n // If the number of \"actual\" Book objects inside the two BookCollections\r\n // is greater than the public field constant LIMIT the new merged\r\n // BookCollection will have a capacity equal to the LIMIT.\r\n int numBooks = coll1.getSize() + coll2.getSize();\r\n if (numBooks > LIMIT){\r\n combinedColl = new BookCollection(LIMIT);\r\n\r\n // Otherwise the merged collection will have a capacity equal to\r\n // the number of \"actual\" Book objects in the two BookCollections\r\n } else {\r\n combinedColl = new BookCollection(numBooks);\r\n }\r\n\r\n // The Book objects from the first BookCollection are added into the\r\n // new merged BookCollection\r\n for(int i = 0; i < coll1.getSize(); i++){\r\n\r\n // Note that each Book object added into the merged BookCollection\r\n // is a new Object with its state equal to that of one of the Book\r\n // Objects in the previous BookCollection, the first one in this case\r\n Book theBook1 = new Book(coll1.objectAt(i));\r\n combinedColl.addBook(theBook1);\r\n }\r\n\r\n // The Book objects from the second BookCollection are added into the\r\n // new merged BookCollection\r\n for (int j = 0; j < coll2.getSize(); j++){\r\n\r\n // Again, note that each new Book Object that the program attempts to add\r\n // is a new Book object that has the same state as one of the Book objects\r\n // inside the second BookCollection\r\n Book theBook2 = new Book(coll2.objectAt(j));\r\n\r\n // Also note that if the Book object from the second collection has\r\n // the same ISBN as a pre-existing Book object in the merged\r\n // BookCollection, the Book object inside the merged BookCollection has\r\n // its Stock and Price fields updated\r\n if ( combinedColl.findBook(theBook2.getIsbn()) != null ){\r\n Book matchingBook = combinedColl.findBook(theBook2.getIsbn());\r\n\r\n // The Book object inside the merged BookCollection has its Stock field\r\n // increased by the Stock of the Book Object (the \"matching book\") from\r\n // the second BookCollection\r\n matchingBook.changeStock(theBook2.getStock());\r\n\r\n // The Book object inside the merged BookCollection has its Price field\r\n // updated to the lowest Price value listed among the first and second\r\n // BookCollections\r\n matchingBook.setPrice(Math.min(matchingBook.getPrice(), theBook2.getPrice()));\r\n\r\n // If Book Object from the second BookCollection does not have a\r\n // duplicate present in the merged BookCollection, it is added\r\n } else {\r\n combinedColl.addBook(theBook2);\r\n // Note that in the possibility that the merged BookCollection has no more\r\n // free space, the addBook method will throw a CollectionFull exception\r\n }\r\n }\r\n return combinedColl;\r\n }", "private Node sortedMerge(Node node1, Node node2 ){ \n\t\tNode sortedList = null; \n\t\t/* Base cases */\n\t\tif (node1 == null) \n\t\t\treturn node2; \n\t\tif (node2 == null) \n\t\t\treturn node1; \n\n\t\t/* Pick either a or b, and recur */\n\t\tif (node1.dataObj.getSalary() > node2.dataObj.getSalary()) { \n\t\t\tsortedList = node1; \n\t\t\tsortedList.next = sortedMerge(node1.next, node2); \n\t\t}else if(node1.dataObj.getSalary() == node2.dataObj.getSalary()){ //if the salaries are Equal\n\t\t\tif(node1.dataObj.getAge() < node2.dataObj.getAge()){\n\t\t\t\tsortedList = node1; \n\t\t\t\tsortedList.next = sortedMerge(node1.next, node2); \n\t\t\t}else{\n\t\t\t\tsortedList = node2; \n\t\t\t\tsortedList.next = sortedMerge(node1, node2.next); \n\t\t\t}\n\t\t}else{ \n\t\t\tsortedList = node2; \n\t\t\tsortedList.next = sortedMerge(node1, node2.next); \n\t\t} \n\t\treturn sortedList; \n\t}", "protected Stack merge(Stack stack1, Stack stack2){\n if (stack2 == null || stack2.size() < 1) return stack1;\n if (stack1 == null || stack1.size() < 1) return stack2;\n\n while (!stack1.isEmpty()){\n int x = stack1.pop();\n while (!stack2.isEmpty() && stack2.peek() < x)\n stack1.push(stack2.pop());\n stack2.push(x);\n }\n return stack2;\n }", "static LinkedList merge(LinkedList list1, LinkedList list2){\n\t\tLinkedList merge;\n\t\t//decides where head of merge list should be at\n\t\tif(list1.value > list2.value){\n\t\t\tmerge = list2;\n\t\t} else{\n\t\t\tmerge = list1;\n\t\t}\n\t\t// combines lists in ascending sorted order - up until last node of lists\n\t\twhile(list1 != null && list2 != null){\n\t\t\tif(list1.value > list2.value){ // list 2 pointer smaller\n\t\t\t\tif(list2.next != null){// before end of list 2\n\t\t\t\t\tif(list2.next.value <= list1.value){\n\t\t\t\t\t\tlist2 = list2.next;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else{\n\t\t\t\t\t\tLinkedList temp = list2.next;\n\t\t\t\t\t\tlist2.next = list1;\n\t\t\t\t\t\tlist2 = temp;\n\t\t\t\t\t}\n\t\t\t\t} else{ // end of list 2\n\t\t\t\t\tlist2.next = list1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\tif(list1.next != null){ //before end of list 1\n\t\t\t\t\tif(list1.next.value <= list2.value){\n\t\t\t\t\t\tlist1 = list1.next;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else{ //list 1 pointer smaller\n\t\t\t\t\t\tLinkedList temp = list1.next;\n\t\t\t\t\t\tlist1.next = list2;\n\t\t\t\t\t\tlist1 = temp;\n\t\t\t\t\t}\n\t\t\t\t} else{ // end of list 1\n\t\t\t\t\tlist1.next = list2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn merge;\n\t}", "private ArrayList<Integer> merge(ArrayList<Integer> a,\n\t\t\t\t ArrayList<Integer> b){\n\n\tArrayList<Integer> result = new ArrayList<Integer>();\n\n\t// merge by moving indices down the ArrayLists\n\t// int aIndex = 0;\n\t// int bIndex = 0;\n\t// while (aIndex < a.size() && bIndex < b.size()){\n\t// if (a.get(aIndex) < b.get(bIndex)){\n\t// \tresult.add(a.get(aIndex));\n\t// \taIndex = aIndex + 1;\n\t// } else {\n\t// \tresult.add(b.get(bIndex));\n\t// \tbIndex = bIndex + 1;\n\t// }\n\t// }\n\n\t// // copy over anthing else\n\t// // we know that either a or b will be finished\n\t// while (aIndex < a.size()){\n\t// result.add(a.get(aIndex));\n\t// aIndex = aIndex + 1;\n\t// }\n\n\t// while (bIndex < b.size()){\n\t// result.add(b.get(bIndex));\n\t// bIndex = bIndex + 1;\n\t// }\n\n\twhile (!a.isEmpty() && !b.isEmpty()){\n\t if (a.get(0) < b.get(0)) {\n\t\tresult.add(a.get(0));\n\t\ta.remove(0);\n\t } else {\n\t\t// remove also returns the value so we\n\t\t// don't really need the get we used above\n\t\tresult.add(b.remove(0));\n\t }\n\n\t}\n\n\t// copy the rest once we're at the end of one of the lists\n\twhile (!a.isEmpty()){\n\t result.add(a.remove(0));\n\t}\n\twhile (!b.isEmpty()){\n\t result.add(b.remove(0));\n\t}\n\t\n\t\n\treturn result;\n\t}", "public static PostingsList andMerge(PostingsList posting1, PostingsList posting2){\n\t\tPostingsList merged = new PostingsList();\n\t\t\n\t\tif( posting1 != null && posting2 != null &&\n\t\t\tposting1.size() > 0 && posting2.size() > 0 ){\n\t\t\t\n\t\t\tNode p1 = posting1.head;\n\t\t\tNode p2 = posting2.head;\n\t\t\t\n\t\t\twhile( p1 != null && p2 != null ){\n\t\t\t\tif( p1.docID() == p2.docID() ){\n\t\t\t\t\t// we found a match, so add it to the list\n\t\t\t\t\tmerged.addDoc(p1.docID());\n\t\t\t\t\tp1 = p1.next();\n\t\t\t\t\tp2 = p2.next();\n\t\t\t\t}else if( p1.docID() < p2.docID() ){\n\t\t\t\t\t// move up p1\n\t\t\t\t\tp1 = p1.next();\n\t\t\t\t}else{\n\t\t\t\t\t// move up p2\n\t\t\t\t\tp2 = p2.next();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn merged;\n\t}", "public void sort(){\n\t\t\n\t\tif(Q.size() != 1){\n\t\t\tArrayQueue<E> tempQueue1 = Q.dequeue();\n\t\t\tArrayQueue<E> tempQueue2 = Q.dequeue();\n\t\t\tArrayQueue<E> tempQueue3 = merge(tempQueue1, tempQueue2);\n\t\t\tQ.enqueue(tempQueue3);\n\t\t\tsort();\n\t\t}\n\t\t\n\t}", "public FibonacciHeap<V> union(FibonacciHeap<V> h1, FibonacciHeap<V> h2)\r\n\t{\r\n\t\tFibonacciHeap<V> H = new FibonacciHeap<V>();\r\n\t\tif(h1 != null && h2 != null)\r\n\t\t{\r\n\t\t\tH.min = h1.min;\r\n\t\t\tif(H.min != null)\r\n\t\t\t{\r\n\t\t\t\tif(h2.min != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tH.min.right.left = h2.min.left;\r\n\t\t\t\t\th2.min.left.right = H.min.right;\r\n\t\t\t\t\tH.min.right = h2.min;\r\n\t\t\t\t\th2.min.left = H.min;\r\n\t\t\t\t\tif(h2.min.getKey() < h1.min.getKey())\r\n\t\t\t\t\t\tH.min = h2.min;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tH.min = h2.min;\r\n\t\t\t}\r\n\t\t\tH.n = h1.n + h2.n;\r\n\t\t}\r\n\t\treturn H;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
initializeObjects() creates all the objects needed for the game to start normally. This includes the following: the default Maze the Player the Camera the User input Remember that every object that should be visible on the screen, should be added to the visualObjects list of MazeRunner through the add method, so it will be displayed automagically.
private void initObjects() { // We define an ArrayList of VisibleObjects to store all the objects that need to be // displayed by MazeRunner. visibleObjects = new ArrayList<VisibleObject>(); visibleObjects.add(main.maze); //taking care of necessary sets main.player.setControl(main.input); main.player.getMaze(main.maze); for(Enemy e: main.enemies){ e.setMaze(main.maze); } if(!rw){ main.sword.setPlayer(main.player); main.shield.setPlayer(main.player); } else{ main.rWeapon.setPlayer(main.player); } for(int i =0; i<main.doors.size();i++){ main.doors.get(i).setPlayer(main.player); } }
[ "private void initGameObjects() {\n\t\taddGameWorldObject(sceneManager.addSkyBox(this, origin));\n\t\t\n\t\t/*boundaryGroup = new Group();\n\t\tRectangle wall1 = new Rectangle(\"North wall\", 400, 60);\n\t\twall1.translate(0, 1, 150);\n\t\t\n\t\tRectangle wall2 = new Rectangle(\"South wall\", 400, 60);\n\t\twall2.translate(0, 1, -150);\n\t\t\n\t\tRectangle wall3 = new Rectangle(\"East wall\", 300, 60);\n\t\twall3.rotate(90, new Vector3D(0,1,0));\n\t\twall3.translate(-200, 1, 0);\n\t\t\n\t\tRectangle wall4 = new Rectangle(\"West wall\", 300, 60);\n\t\twall4.rotate(90, new Vector3D(0,1,0));\n\t\twall4.translate(200, 1, 0);\n\t\t\n\t\tboundaryGroup.addChild(wall1);\n\t\tboundaryGroup.addChild(wall2);\n\t\tboundaryGroup.addChild(wall3);\n\t\tboundaryGroup.addChild(wall4);*/\n\t\t\n\t\tsolarSystemGroup = sceneManager.createSolarSystem();\n\t\tsolarSystemGroup.translate(0f, 70f, 0f);\n\t\tsolarSystemGroup.scale(.15f, .15f, .15f);\n\t\taddGameWorldObject(solarSystemGroup);\n\t\t\n\t\taddGameWorldObject(boundaryGroup);\n\t\tsceneManager.updateBoundaryGroup(boundaryGroup);\n\t\t\n\t\t//Add ground plane\n\t\tsceneManager.addGameFloor(environmentGroup);\n\t\taddGameWorldObject(environmentGroup);\n\t\t\n\t\t//---------------------------------------------------------------------------\n\t\t//\t\t\t\tAdd the 4 colored blocks as obstacles into the gameworld\n\t\t//---------------------------------------------------------------------------\n\t\t//NOTE TO SELF: DON'T TEXTURE SAGE-NATIVE SCENENODES/SHAPES. IT WILL FUCK UP OTHER OBJECTS' COLORS\n\t\t//EXPORT SIMPLE TEXTURED SHAPES FROM BLENDER!!!\n\t\t\n\t\tredBlock = sceneManager.addRedBlock();\n\t\tredBlock.translate(-100, 0, 65);\n\t\tredBlock.scale(20, 10, 12);\n\t\tredBlock.updateGeometricState(1.0f, true);\n\t\taddGameWorldObject(redBlock);\n\t\t\n\t\tyellowBlock = sceneManager.addYellowBlock();\n\t\tyellowBlock.translate(-100, 0, -65);\n\t\tyellowBlock.scale(20, 10, 12);\n\t\tyellowBlock.updateGeometricState(1.0f, true);\n\t\taddGameWorldObject(yellowBlock);\n\t\t\n\t\tgreenBlock = sceneManager.addGreenBlock();\n\t\tgreenBlock.translate(100, 0, -65);\n\t\tgreenBlock.scale(20, 10, 12);\n\t\tgreenBlock.updateGeometricState(1.0f, true);\n\t\taddGameWorldObject(greenBlock);\n\t\t\n\t\tblueBlock = sceneManager.addBlueBlock();\n\t\tblueBlock.translate(100, 0, 65);\n\t\tblueBlock.scale(20, 10, 12);\n\t\tblueBlock.updateGeometricState(1.0f, true);\n\t\taddGameWorldObject(blueBlock);\n\t\t\n\t\t//---------------------------------------------------------------------------\n\t\t//\t\t\t\tAdd Loot Boxes into the gameworld\t\t\n\t\t//---------------------------------------------------------------------------\n\t\t\n\t\t//* * * CENTER LOOT BOXES * * *\n\t\t\n\t\tloot1 = sceneManager.addDiamond();\n\t\tloot1.translate(0, 2, 0);\n\t\tloot1.scale(2.0f, 2.0f, 2.0f);\n\t\tloot1.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot2 = sceneManager.addDiamond();\n\t\tloot2.translate(-18, 2, 18);\n\t\tloot2.scale(2.0f, 2.0f, 2.0f);\n\t\tloot2.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot3 = sceneManager.addDiamond();\n\t\tloot3.translate(-18, 2, -18);\n\t\tloot3.scale(2.0f, 2.0f, 2.0f);\n\t\tloot3.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot4 = sceneManager.addDiamond();\n\t\tloot4.translate(18, 2, 18);\n\t\tloot4.scale(2.0f, 2.0f, 2.0f);\n\t\tloot4.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot5 = sceneManager.addDiamond();\n\t\tloot5.translate(18, 2, -18);\n\t\tloot5.scale(2.0f, 2.0f, 2.0f);\n\t\tloot5.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot6 = sceneManager.addDiamond();\n\t\tloot6.translate(-25, 2, 0);\n\t\tloot6.scale(2.0f, 2.0f, 2.0f);\n\t\tloot6.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot7 = sceneManager.addDiamond();\n\t\tloot7.translate(25, 2, 0);\n\t\tloot7.scale(2.0f, 2.0f, 2.0f);\n\t\tloot7.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot8 = sceneManager.addDiamond();\n\t\tloot8.translate(0, 2, -25);\n\t\tloot8.scale(2.0f, 2.0f, 2.0f);\n\t\tloot8.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot9 = sceneManager.addDiamond();\n\t\tloot9.translate(0, 2, 25);\n\t\tloot9.scale(2.0f, 2.0f, 2.0f);\n\t\tloot9.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot10 = sceneManager.addDiamond();\n\t\tloot10.translate(-12, 2, 0);\n\t\tloot10.scale(2.0f, 2.0f, 2.0f);\n\t\tloot10.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot11 = sceneManager.addDiamond();\n\t\tloot11.translate(12, 2, 0);\n\t\tloot11.scale(2.0f, 2.0f, 2.0f);\n\t\tloot11.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot12 = sceneManager.addDiamond();\n\t\tloot12.translate(0, 2, 12);\n\t\tloot12.scale(2.0f, 2.0f, 2.0f);\n\t\tloot12.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot13 = sceneManager.addDiamond();\n\t\tloot13.translate(0, 2, -12);\n\t\tloot13.scale(2.0f, 2.0f, 2.0f);\n\t\tloot13.updateGeometricState(1.0f, true);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t//* * * RED-YELLOW INTERSECTION BOXES * * *\n\t\t\n\t\tloot14 = sceneManager.addDiamond();\n\t\tloot14.translate(-172, 2, 0);\n\t\tloot14.scale(2.0f, 2.0f, 2.0f);\n\t\tloot14.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot15 = sceneManager.addDiamond();\n\t\tloot15.translate(-187, 2, 15);\n\t\tloot15.scale(2.0f, 2.0f, 2.0f);\n\t\tloot15.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot16 = sceneManager.addDiamond();\n\t\tloot16.translate(-187, 2, -15);\n\t\tloot16.scale(2.0f, 2.0f, 2.0f);\n\t\tloot16.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot17 = sceneManager.addDiamond();\n\t\tloot17.translate(-157, 2, 15);\n\t\tloot17.scale(2.0f, 2.0f, 2.0f);\n\t\tloot17.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot18 = sceneManager.addDiamond();\n\t\tloot18.translate(-157, 2, -15);\n\t\tloot18.scale(2.0f, 2.0f, 2.0f);\n\t\tloot18.updateGeometricState(1.0f, true);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t//* * * GREEN-BLUE INTERSECTION BOXES * * *\n\t\t\n\t\tloot19 = sceneManager.addDiamond();\n\t\tloot19.translate(172, 2, 0);\n\t\tloot19.scale(2.0f, 2.0f, 2.0f);\n\t\tloot19.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot20 = sceneManager.addDiamond();\n\t\tloot20.translate(187, 2, 15);\n\t\tloot20.scale(2.0f, 2.0f, 2.0f);\n\t\tloot20.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot21 = sceneManager.addDiamond();\n\t\tloot21.translate(187, 2, -15);\n\t\tloot21.scale(2.0f, 2.0f, 2.0f);\n\t\tloot21.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot22 = sceneManager.addDiamond();\n\t\tloot22.translate(157, 2, 15);\n\t\tloot22.scale(2.0f, 2.0f, 2.0f);\n\t\tloot22.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot23 = sceneManager.addDiamond();\n\t\tloot23.translate(157, 2, -15);\n\t\tloot23.scale(2.0f, 2.0f, 2.0f);\n\t\tloot23.updateGeometricState(1.0f, true);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t//* * * YELLOW-GREEN INTERSECTION BOXES * * *\n\t\t\n\t\tloot24 = sceneManager.addDiamond();\n\t\tloot24.translate(0, 2, -124);\n\t\tloot24.scale(2.0f, 2.0f, 2.0f);\n\t\tloot24.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot25 = sceneManager.addDiamond();\n\t\tloot25.translate(15, 2, -139);\n\t\tloot25.scale(2.0f, 2.0f, 2.0f);\n\t\tloot25.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot26 = sceneManager.addDiamond();\n\t\tloot26.translate(15, 2, -109);\n\t\tloot26.scale(2.0f, 2.0f, 2.0f);\n\t\tloot26.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot27 = sceneManager.addDiamond();\n\t\tloot27.translate(-15, 2, -139);\n\t\tloot27.scale(2.0f, 2.0f, 2.0f);\n\t\tloot27.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot28 = sceneManager.addDiamond();\n\t\tloot28.translate(-15, 2, -109);\n\t\tloot28.scale(2.0f, 2.0f, 2.0f);\n\t\tloot28.updateGeometricState(1.0f, true);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t//* * * RED-BLUE INTERSECTION BOXES * * *\n\t\t\n\t\tloot29 = sceneManager.addDiamond();\n\t\tloot29.translate(0, 2, 124);\n\t\tloot29.scale(2.0f, 2.0f, 2.0f);\n\t\tloot29.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot30 = sceneManager.addDiamond();\n\t\tloot30.translate(15, 2, 139);\n\t\tloot30.scale(2.0f, 2.0f, 2.0f);\n\t\tloot30.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot31 = sceneManager.addDiamond();\n\t\tloot31.translate(15, 2, 109);\n\t\tloot31.scale(2.0f, 2.0f, 2.0f);\n\t\tloot31.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot32 = sceneManager.addDiamond();\n\t\tloot32.translate(-15, 2, 139);\n\t\tloot32.scale(2.0f, 2.0f, 2.0f);\n\t\tloot32.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot33 = sceneManager.addDiamond();\n\t\tloot33.translate(-15, 2, 109);\n\t\tloot33.scale(2.0f, 2.0f, 2.0f);\n\t\tloot33.updateGeometricState(1.0f, true);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t//* * * RED CORNER BOXES * * *\n\t\t\n\t\tloot34 = sceneManager.addDiamond();\n\t\tloot34.translate(-172, 2, 124);\n\t\tloot34.scale(2.0f, 2.0f, 2.0f);\n\t\tloot34.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot35 = sceneManager.addDiamond();\n\t\tloot35.translate(-157, 2, 109);\n\t\tloot35.scale(2.0f, 2.0f, 2.0f);\n\t\tloot35.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot36 = sceneManager.addDiamond();\n\t\tloot36.translate(-187, 2, 139);\n\t\tloot36.scale(2.0f, 2.0f, 2.0f);\n\t\tloot36.updateGeometricState(1.0f, true);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t//* * * YELLOW CORNER BOXES * * *\n\t\t\n\t\tloot37 = sceneManager.addDiamond();\n\t\tloot37.translate(-172, 2, -124);\n\t\tloot37.scale(2.0f, 2.0f, 2.0f);\n\t\tloot37.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot38 = sceneManager.addDiamond();\n\t\tloot38.translate(-157, 2, -109);\n\t\tloot38.scale(2.0f, 2.0f, 2.0f);\n\t\tloot38.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot39 = sceneManager.addDiamond();\n\t\tloot39.translate(-187, 2, -139);\n\t\tloot39.scale(2.0f, 2.0f, 2.0f);\n\t\tloot39.updateGeometricState(1.0f, true);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t//* * * GREEN CORNER BOXES * * *\n\t\t\n\t\tloot40 = sceneManager.addDiamond();\n\t\tloot40.translate(172, 2, -124);\n\t\tloot40.scale(2.0f, 2.0f, 2.0f);\n\t\tloot40.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot41 = sceneManager.addDiamond();\n\t\tloot41.translate(157, 2, -109);\n\t\tloot41.scale(2.0f, 2.0f, 2.0f);\n\t\tloot41.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot42 = sceneManager.addDiamond();\n\t\tloot42.translate(187, 2, -139);\n\t\tloot42.scale(2.0f, 2.0f, 2.0f);\n\t\tloot42.updateGeometricState(1.0f, true);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t//* * * BLUE CORNER BOXES * * *\n\t\t\n\t\tloot43 = sceneManager.addDiamond();\n\t\tloot43.translate(172, 2, 124);\n\t\tloot43.scale(2.0f, 2.0f, 2.0f);\n\t\tloot43.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot44 = sceneManager.addDiamond();\n\t\tloot44.translate(157, 2, 109);\n\t\tloot44.scale(2.0f, 2.0f, 2.0f);\n\t\tloot44.updateGeometricState(1.0f, true);\n\t\t\n\t\tloot45 = sceneManager.addDiamond();\n\t\tloot45.translate(187, 2, 139);\n\t\tloot45.scale(2.0f, 2.0f, 2.0f);\n\t\tloot45.updateGeometricState(1.0f, true);\n\t\t\n\t\t//-------------------- Add all Loot Boxes into a Group ---------------------\n\t\t//-------------------- then add to gameworld ---------------------\n\t\t\n\t\tlootBoxes = new Group();\n\t\t\n\t\t//CENTER BOXES\n\t\tlootBoxes.addChild(loot1);\n\t\tlootBoxes.addChild(loot2);\n\t\tlootBoxes.addChild(loot3);\n\t\tlootBoxes.addChild(loot4);\n\t\tlootBoxes.addChild(loot5);\n\t\tlootBoxes.addChild(loot6);\n\t\tlootBoxes.addChild(loot7);\n\t\tlootBoxes.addChild(loot8);\n\t\tlootBoxes.addChild(loot9);\n\t\tlootBoxes.addChild(loot10);\n\t\tlootBoxes.addChild(loot11);\n\t\tlootBoxes.addChild(loot12);\n\t\tlootBoxes.addChild(loot13);\n\t\t\n\t\t//RED-YELLOW INTERSECTION BOXES\n\t\tlootBoxes.addChild(loot14);\n\t\tlootBoxes.addChild(loot15);\n\t\tlootBoxes.addChild(loot16);\n\t\tlootBoxes.addChild(loot17);\n\t\tlootBoxes.addChild(loot18);\n\t\t\n\t\t//GREEN-BLUE INTERSECTION BOXES\n\t\tlootBoxes.addChild(loot19);\n\t\tlootBoxes.addChild(loot20);\n\t\tlootBoxes.addChild(loot21);\n\t\tlootBoxes.addChild(loot22);\n\t\tlootBoxes.addChild(loot23);\n\t\t\n\t\t//YELLOW-GREEN INTERSECTION BOXES\n\t\tlootBoxes.addChild(loot24);\n\t\tlootBoxes.addChild(loot25);\n\t\tlootBoxes.addChild(loot26);\n\t\tlootBoxes.addChild(loot27);\n\t\tlootBoxes.addChild(loot28);\n\t\t\n\t\t//RED-BLUE INTERSECTION BOXES\n\t\tlootBoxes.addChild(loot29);\n\t\tlootBoxes.addChild(loot30);\n\t\tlootBoxes.addChild(loot31);\n\t\tlootBoxes.addChild(loot32);\n\t\tlootBoxes.addChild(loot33);\n\t\t\n\t\t//RED CORNER BOXES\n\t\tlootBoxes.addChild(loot34);\n\t\tlootBoxes.addChild(loot35);\n\t\tlootBoxes.addChild(loot36);\n\t\t\n\t\t//YELLOW CORNER BOXES\n\t\tlootBoxes.addChild(loot37);\n\t\tlootBoxes.addChild(loot38);\n\t\tlootBoxes.addChild(loot39);\n\t\t\n\t\t//GREEN CORNER BOXES\n\t\tlootBoxes.addChild(loot40);\n\t\tlootBoxes.addChild(loot41);\n\t\tlootBoxes.addChild(loot42);\n\t\t\n\t\t//BLUE CORNER BOXES\n\t\tlootBoxes.addChild(loot43);\n\t\tlootBoxes.addChild(loot44);\n\t\tlootBoxes.addChild(loot45);\n\t\t\n\t\taddGameWorldObject(lootBoxes);\n\t\t\n\t\t//---------------------------------------------------------------------------\n\t\t//\t\t\t\tSetup Rotation/Translation controllers for the Loot Boxes\t\n\t\t//---------------------------------------------------------------------------\n\t\tMyRotationController rotCtr = new MyRotationController();\n\t\trotCtr.addControlledNode(lootBoxes);\n\t\tlootBoxes.addController(rotCtr);\n\t\t\n\t\tMyTranslationController transCtr = new MyTranslationController();\n\t\ttransCtr.addControlledNode(lootBoxes);\n\t\tlootBoxes.addController(transCtr);\n\t\t\n\t\t//----------- X,Y,Z Axes (for testing) --------------\n\t\t\n\t\t/*Point3D origin = new Point3D(0,0,0);\n\t\tPoint3D xEnd = new Point3D(100,0,0);\n\t\tPoint3D yEnd = new Point3D(0,100,0);\n\t\tPoint3D zEnd = new Point3D(0,0,100);\n\t\tLine xAxis = new Line(origin, xEnd, Color.red, 2);\n\t\tLine yAxis = new Line(origin, yEnd, Color.green, 2);\n\t\tLine zAxis = new Line(origin, zEnd, Color.blue, 2);\n\t\taddGameWorldObject(xAxis);\n\t\taddGameWorldObject(yAxis);\n\t\taddGameWorldObject(zAxis);*/\n\t}", "public final void startGameObjects() {\r\n for (GameObject gameObject : gameObjects) {\r\n gameObject.start();\r\n this.renderer.add(gameObject);\r\n this.lightmapRenderer.add(gameObject);\r\n this.debugRenderer.add(gameObject);\r\n rendererRegistry.forEach(r -> r.add(gameObject));\r\n }\r\n isRunning = true;\r\n }", "private void init()\n {\n batch = new SpriteBatch();\n \n camera = new OrthographicCamera(Constants.VIEWPORT_WIDTH, Constants.VIEWPORT_HEIGHT);\n camera.position.set(0, 0, 0);\n camera.update();\n \n cameraGui = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraGui.position.set(0, 0, 0);\n cameraGui.setToOrtho(true); // flip y-axis\n cameraGui.update();\n \n cameraBg = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraBg.position.set(0, 0, 0);\n //cameraBg.setToOrtho(true);\n cameraBg.update();\n \n b2Debug = new Box2DDebugRenderer();\n }", "private void initGameObjects() {\n\t\tskybox = new SkyBox(\"SkyBox\", 20.0f, 20.0f, 20.0f);\n\t\t// load skybox textures\n\t\tTexture frontTex = TextureManager.loadTexture2D(\"./images/lakes_ft.bmp\");\n\t\tTexture backTex = TextureManager.loadTexture2D(\"./images/lakes_bk.bmp\");\n\t\tTexture leftTex = TextureManager.loadTexture2D(\"./images/lakes_lf.bmp\");\n\t\tTexture rightTex = TextureManager.loadTexture2D(\"./images/lakes_rt.bmp\");\n\t\tTexture topTex = TextureManager.loadTexture2D(\"./images/lakes_up.bmp\");\n\t\tTexture bottomTex = TextureManager.loadTexture2D(\"./images/lakes_dn.bmp\");\n\n\t\t//...etc...\n\t\t// attach textures to skybox\n\t\tskybox.setTexture(SkyBox.Face.North, frontTex);\n\t\tskybox.setTexture(SkyBox.Face.South, backTex);\n\t\tskybox.setTexture(SkyBox.Face.East, leftTex);\n\t\tskybox.setTexture(SkyBox.Face.West, rightTex);\n\t\tskybox.setTexture(SkyBox.Face.Up, topTex);\n\t\tskybox.setTexture(SkyBox.Face.Down, bottomTex);\n\t\taddGameWorldObject(skybox);\n\n\t\t/*\n\t\tPoint3D origin = new Point3D(0, 0, 0);\n\t\tPoint3D xEnd = new Point3D(100, 0, 0);\n\t\tPoint3D yEnd = new Point3D(0, 100, 0);\n\t\tPoint3D zEnd = new Point3D(0, 0, 100);\n\t\tLine xAxis = new Line(origin, xEnd, Color.red, 2);\n\t\tLine yAxis = new Line(origin, yEnd, Color.green, 2);\n\t\tLine zAxis = new Line(origin, zEnd, Color.blue, 2);\n\t\t\n\t\tLine xAxis = (Line) jsEngine.get(\"xAxis\");\n\t\taddGameWorldObject(xAxis);\n\t\tLine yAxis = (Line) jsEngine.get(\"yAxis\");\n\t\taddGameWorldObject(yAxis);\n\t\tLine zAxis = (Line) jsEngine.get(\"zAxis\");\n\t\taddGameWorldObject(zAxis);\n\t\t*/\n\n\t\t//TODO: Remove demo sphere, add objects for game.\n\t\t//Valid range for players is 5,0,5 to 285,0,285.\n\n\t\tthis.executeScript(jsEngine, scriptFileName);\n\n\t\tmineCount = (int) jsEngine.get(\"mineCount\");\n\t\tmineDistance = (int) jsEngine.get(\"mineDistance\");\n\t\t\n\t\tplayer1Loc = (Point3D) jsEngine.get(\"player1Loc\");\n\t\tplayer2Loc = (Point3D) jsEngine.get(\"player2Loc\");\n\t\tcrashPod = new Cylinder(2, 1, 16, 16);\n\t\tcrashPod.setColor(Color.white);\n\t\tcrashPod.setSolid(true);\n\n\t\tMatrix3D translateM = new Matrix3D();\n\t\tif (hostingStatus == 'h') {\n\t\t\ttranslateM.translate((float) player2Loc.getX(), 25f, (float) player2Loc.getZ());\n\t\t} else {\n\t\t\ttranslateM.translate((float) player1Loc.getX(), 25f, (float) player1Loc.getZ());\n\t\t}\n\t\tcrashPod.setLocalTranslation(translateM);\n\n\t\taddGameWorldObject(crashPod);\n\n\t\tcrashPod.updateGeometricState(1.0f, true);\n\n\t\tfloat mass = 1.0f;\n\t\tcrashPodP = physicsEngine.addSphereObject(physicsEngine.nextUID(), mass,\n\t\t\t\tcrashPod.getWorldTransform().getValues(), 1.0f);\n\t\tcrashPodP.setBounciness(1.0f);\n\t\tcrashPod.setPhysicsObject(crashPodP);\n\t}", "public void initializeScene() {\n initiliazePlayer();\n ended = false;\n }", "public void initializeObliqueLaunch(){\r\n world = new Environment();\r\n cannon = new Thrower();\r\n ball = new Projectile();\r\n this.setInitialValues();\r\n }", "public void initialize() {\n // create a runner using a function\n this.createScreenBorders();\n // create a keyboard sensor.\n this.keyboard = this.runner.getGUI().getKeyboardSensor();\n //create the environment for the game (game environment and sprites collection)\n this.createEnvironment();\n // BACKGROUND CREATION //\n this.createBackground();\n // create the counters for the game.\n this.createCounters();\n // LISTENERS CREATION //\n //create a message printing listener.\n HitListener phl = new PrintingHitListener();\n //create a new block remover listener.\n HitListener blockrmv = new BlockRemover(this, blockCounter);\n //create a new ball remover listener.\n HitListener ballrmv = new BallRemover(this, ballCounter);\n //create a new score counter listener.\n HitListener scorelstn = new ScoreTrackingListener(this.scoreCounter);\n // BLOCKS CREATION //\n this.createBlocks(phl, blockrmv, scorelstn);\n // SIDE BLOCKS CREATION //\n this.createSideBlocks();\n // DEATH BLOCK CREATION //\n this.createDeathBlock(ballrmv);\n // LEVEL'S NAME //\n LevelsName name = new LevelsName(this.levelInfo.levelName());\n // add the whole-game indicators to the sprites list.\n this.sprites.addSprite(scoreIndi);\n this.sprites.addSprite(lifeIndi);\n this.sprites.addSprite(name);\n }", "public Screen(List<GameObject> objects) {\n\t\tthis();\n\t\taddObject(objects);\n\t}", "public void initialiseEngine() {\n\t\ttry {\n\t\t\tsetNumberOfPlayers(gameState.getPlayers().size());\n\t\t\tturn.allocateCountries(gameState.getPlayers(), getGameState().getGameMapObject().getAllCountries());\n\t\t\tallocateInitialArmies();\n\t\t\tgameState.setActivePlayer(gameState.getPlayers().get(0));\n\t\t\t//allocateBots();\n\t\t\tSystem.out.println(\"bots done \");\n\t\t} catch (NullPointerException nullEx) {\n\t\t\tSystem.out.println(nullEx.toString());\n\t\t\tSystem.out.println(\"\\n\\n\");\n\t\t\tnullEx.printStackTrace();\n\t\t\tSystem.out.println(\"Objects not initialized properly\");\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Something went wrong during initialization\");\n\t\t}\n\t}", "public void buildGraphicalObjects()\n\t{\n\t\ttry\n\t\t{\n\t\t\tDisplay.setDisplayMode(new DisplayMode(this.WINDOW_DIMENSION, this.WINDOW_DIMENSION));\n\t\t\tDisplay.create();\n\t\t}\n\t\tcatch(LWJGLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tDisplay.destroy();\n\t\t}\n\t\t\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\t//Not sure what this does but apparently it's \"Not important\"\n\t\tGL11.glLoadIdentity();\n\t\t//Initialize the orthoprojection so upper left corner is 0x0y, \n\t\t//Param 1 : zero X coordinate: 0.\"Left\"\n\t\t//Param 2 : max X coordinate: \"width\" constant \"Right:\n\t\t//Param 3 : zero Y coordinate: 0 \"Bottom\"\n\t\t//Param 4 : max Y coordinate: \"height\" constant \"top\n\t\t//Param 5&6 are used for 3d, so set to +/- 1 for now.\n\t\tGL11.glOrtho(0,this.WINDOW_DIMENSION, this.WINDOW_DIMENSION, 0, 1,-1);\n\t\t//No explanation here. I guess it defines how openGL renders the objects\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\t\n\t}", "public void initWorld() {\n //add powerup, obstacle, and traffic managers and lists\n obstacles = new ArrayList<Actor>();\n motorists = new ArrayList<Actor>();\n powerUps = new ArrayList<Actor>();\n clouds = new ArrayList<Actor>();\n trafficManager = new TrafficManager(this, motorists);\n obstacleManager = new ObstacleManager(this, obstacles);\n powerUpManager = new PowerUpManager(this, powerUps);\n cloudManager = new CloudManager(this, clouds);\n player = new Player(this); //add player\n\n //load background\n backgroundTile = ResourceLoader.getInstance().getSprite(\"environment/road0.png\");\n background = ResourceLoader.createCompatible(WIDTH, HEIGHT + backgroundTile.getHeight(), Transparency.OPAQUE);\n Graphics2D g = (Graphics2D) background.getGraphics();\n g.setPaint(new TexturePaint(backgroundTile, new Rectangle(0, 0, backgroundTile.getWidth(), backgroundTile.getHeight())));\n g.fillRect(0, 0, background.getWidth(), background.getHeight());\n backgroundY = backgroundTile.getHeight();\n }", "protected void loadObjects()\r\n {\n String contents = \"Welcome to The Old House. You are trapped here, for our amusement. Collect the three Golden Keys to find your way out. Good luck. Or not.\";\r\n NoteObject noteSupplyRoom = new NoteObject(instance, \"old note\", contents, \"There is an old note lying on the floor.\");\r\n BucketObject bucket = new BucketObject(instance, \"bucket\", \"In the corner, there is an empty bucket slowly being filled with water from the ceiling.\");\r\n BookObject bookSupplyRoom = new BookObject(instance, \"book\", \"On a shelf lies a book suspiciously out of place.\");\r\n\r\n //Adding the object to the scene\r\n this.addObject(noteSupplyRoom);\r\n this.addObject(bucket);\r\n this.addObject(bookSupplyRoom);\r\n }", "public void spawnDefaultObjects() {\n this.player = new Character(mainGame.GAME_CAM_WIDTH / 2, 2f, this);\n gameObjects.add(player);\n\n gameObjects.add(new Rat(1f,2f,this));\n\n //sun\n this.sun = new Sun(mainGame);\n graphicObjects.add(sun);\n this.pauseButton = new PauseButton(mainGame);\n buttons.add(pauseButton);\n\n //clouds\n for (int i = 0; i < 3; i++) {\n if (i==0) {\n this.cloud = new Cloud(Cloud.texture1, mainGame);\n graphicObjects.add(cloud);\n }\n if (i==1) {\n this.cloud = new Cloud(Cloud.texture2, mainGame);\n graphicObjects.add(cloud);\n }\n if (i==2) {\n this.cloud = new Cloud(Cloud.texture3, mainGame);\n graphicObjects.add(cloud);\n }\n }\n\n //healthbar\n healthbar = new Healthbar(mainGame, player.healthPoints);\n graphicObjects.add(healthbar);\n\n //forcemeter\n this.meter = new ForceMeter(mainGame);\n graphicObjects.add(meter);\n }", "public void initialize(){\n //Initalize the avatar\n this.minidisc = new Avatar(\"Minidisc\",3, 3, 1, new Rectangle(72,72,100,100));\n this.minidisc.setPosition(); ///\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/ IMPORTANT we want to make sure tha the origianl position of the avatar is at the starting points\n \n //Initialize Collectibles -- Add 3 collectibles -- make sure the positions of collectibles are correct\n addCollectible(3);\n \n //Initalize Obstacles\n addObstacle(3, 3); \n \n }", "private void initializeRendering(){\n // Initialize camera object\n OrthographicCamera camera = new OrthographicCamera();\n\n // for card deck\n float cardDeckSize = 1.5f;\n\n // for side menu scaling\n float sideMenuSize = 2f;\n\n // Set camera to orthographic, size board dimensions\n camera.setToOrtho(false, BOARD_X + (sideMenuSize*2), BOARD_Y +(cardDeckSize)*2);\n // Set camera X-position\n camera.position.x = (BOARD_X/2)+(sideMenuSize);\n camera.position.y = (BOARD_Y/2)-(cardDeckSize);\n camera.update();\n\n // Initialize renderer v--- 300F is tile size\n renderer = new OrthogonalTiledMapRenderer(tiledMap, 1F/300F);\n // Set renderer to view camera\n renderer.setView(camera);\n }", "@Override\n public void init() {\n super.init();\n\n Log.d(TAG, \"init\");\n\n planeEntity = findById(R.id.plane);\n planeRenderer = (PlaneRenderer) planeEntity.getComponent(SurfaceRendererComponent.class).getCanvasRenderer();\n\n // Cache SceneObjects\n button = findById(\"button\");\n videocam = findById(\"videocam\");\n\n LookDetectorComponent lookDetectorComponent = new LookDetectorComponent(new LookDetectorComponent.LookListener() {\n\n @Override\n public void onLookStart(Entity entity, FrameInput frame) {\n button.animate().opacity(0.5f).start();\n }\n\n @Override\n public void onLookEnd(Entity entity, FrameInput frame) {\n button.animate().opacity(1.0f).start();\n }\n\n @Override\n public void onLooking(Entity entity, FrameInput frame) {\n }\n });\n button.add(lookDetectorComponent);\n\n LookDetectorComponent videoCamLookDetector = new LookDetectorComponent(new LookDetectorComponent.LookListener() {\n Vector3f focusSize = new Vector3f(1.5f, 1.5f, 1.5f);\n Vector3f originalSize = new Vector3f(1.0f, 1.0f, 1.0f);\n\n @Override\n public void onLookStart(Entity entity, FrameInput frame) {\n\n entity.animate()\n .scaleTo(focusSize)\n .start();\n }\n\n @Override\n public void onLookEnd(Entity entity, FrameInput frame) {\n\n entity.animate()\n .scaleTo(originalSize)\n .start();\n }\n\n @Override\n public void onLooking(Entity entity, FrameInput frame) {\n }\n });\n videocam.add(videoCamLookDetector);\n }", "private void initObjects() {\n databaseHelper = new DatabaseHelper(activity);\n inputValidation = new InputValidation(activity);\n\n }", "public void initEngine()\r\n {\r\n engine.setParentGUI(mainGui);\r\n engine.setCore(mCore, mainGui.getAutofocusManager());\r\n engine.setPositionList(mainGui.getPositionList());\r\n engine.setZStageDevice(mCore.getFocusDevice());\r\n }", "public void initialize() {\n\t\tnumRows = gridConfig.getNumRows();\n\t\tnumCols = gridConfig.getNumCols();\n\t\tgridCellCount = numRows * numCols;\n\t\tcreateMaps();\n\t\tsetCurrSimulationMap();\n\t\tcellWidth = SIZE / numCols;\n\t\tcellHeight = SIZE / numRows;\n\t\tcurrentGrid = new Cell[numRows][numCols];\n\t\tnewGrid = new Cell[numRows][numCols];\n\t\tempty(currentGrid);\n\t\tempty(newGrid);\n\t\tsetShapes();\n\t\tsetInitialStates();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method displays the result of a winning hand to the user and accumulates the win into the Game purse.
private void collectWinnings() { // TODO Slow point accumulation for an "animated" win winningHandView.setText(game.getPlayerHand().getBestHand().getName()); if (game.getWin() > 0) { winView.setVisibility(View.VISIBLE); winView.setText(getWinString(game.getWin(), game.getCreditValue(), viewAsDollars)); game.setPurse(game.getPurse() + game.getWin()); purseView.setText(getPurseString(game.getPurse(), game.getCreditValue(), viewAsDollars)); } }
[ "private int drawResult() {\n int jackpotWon = 0;\n int highPrizeWon = 0;\n int midPrizeWon = 0;\n int lowPrizeWon = 0;\n\n // Calculate the individual ticket results\n for (int ticketNumber = 0; ticketNumber < ticketsBought; ticketNumber++) { // Tries every ticket\n if (Random.RInt(100) / 100D <= LOW_PRIZE_CHANCE && lowPrizeWon < LOW_PRIZE_MAX) {\n lowPrizeWon++;\n } else if (Random.RInt(100) / 100D <= MID_PRIZE_CHANCE && midPrizeWon < MID_PRIZE_MAX) {\n midPrizeWon++;\n } else if (Random.RInt(100) / 100D <= HIGH_PRIZE_CHANCE && highPrizeWon < HIGH_PRIZE_MAX) {\n highPrizeWon++;\n } else if (Random.RInt(1000) / 1000D <= JACKPOT_CHANCE && jackpotWon < JACKPOT_MAX) {\n jackpotWon++;\n unlockUnnaturalLuck = true;\n }\n }\n\n // Calculates the whole prize\n int coinsWon = jackpotWon * JACKPOT_COINS +\n highPrizeWon * HIGH_PRIZE_COINS +\n midPrizeWon * MID_PRIZE_COINS +\n lowPrizeWon * LOW_PRIZE_COINS;\n\n // Resets the ticket counter\n ticketsBought = 0;\n\n // Graduates the user for his won prizes\n if (coinsWon > 0) {\n Ui.println(\"Congratulations!\");\n Ui.println(\"Your tickets got the following results:\");\n Ui.print((jackpotWon > 0 ? \"Jackpot: \" + jackpotWon + \"x\\n\" : \"\") +\n (highPrizeWon > 0 ? \"High Prize: \" + highPrizeWon + \"x\\n\" : \"\") +\n (midPrizeWon > 0 ? \"Medium Prize: \" + midPrizeWon + \"x\\n\" : \"\") +\n (lowPrizeWon > 0 ? \"Low Prize: \" + lowPrizeWon + \"x\\n\" : \"\"));\n Ui.println(\"This rewards you with a total of \" + coinsWon + \" coins!\");\n Achievements.check();\n } else { // Wish him better luck next time\n Ui.println(\"Sadly you won nothing this time.\");\n Ui.println(\"Better luck next time!\");\n }\n\n return coinsWon;\n }", "private void result()\n {\n int choice = 99;\n \n if (outcome == 0)\n {\n choice = JOptionPane.showConfirmDialog(null, \"Tie Game!\" + \"\\n\"\n + \"Would you like to play again?\");\n }\n else if (outcome == 1)\n {\n choice = JOptionPane.showConfirmDialog(null, \"You've won \"+ name+ \"!\" + \"\\n\"\n + \"Would you like to play agian?\");\n }\n else if (outcome == 2)\n {\n choice = JOptionPane.showConfirmDialog(null, \"You've lost \"+ name+ \".\"+ \"\\n\"\n \n + \"Would you like to play again?\");\n }\n \n if (choice == 0)\n {\n intro();\n \n decideFirst();\n \n board.initializeData();\n \n turnsP = 0;\n turnsCPU = 0;\n \n simGame();\n }\n }", "public void printResult() {\n\t\tSystem.out.println(\"\\nGame Over!!!\");\n\t\tswitch (gameResult(board)) {\n\t\t\tcase -1:\n\t\t\t\tSystem.out.println(\"Circles won!\");\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\t\tSystem.out.println(\"Tie game!\");\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"X's won!\");\n\t\t\t\tbreak;\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t}", "private void winGame() {\n\t\tprintOutInterface.console(\"[Win Game]\\n\");\n\t\tPrintMessage.printConsole(\"Congrats!\");\n\n\t\tPrintMessage.printConsole(\"You've won the '\" + gameName + \"' game!\\n\");\n\t\tPrintMessage.printConsole(\"- Final score: \" + player.getScore());\n\t\tPrintMessage.printConsole(\"- Final inventory: \");\n\t\tif (player.getCollectedItems().isEmpty()) {\n\t\t\tPrintMessage.printConsole(\"You don't have any items.\");\n\t\t} else {\n\t\t\tfor (Item i : player.getCollectedItems()) {\n\t\t\t\tPrintMessage.printConsole(i.toString() + \" \");\n\t\t\t}\n\t\t}\n\t\tPrintMessage.printConsole(\"\\n\");\n\t}", "void displayWinner();", "public void winGame(){\n\t\tif (this.isHouse)\n\t\t\tthis.balance += 1.0;\n\t\telse\n\t\t\tthis.balance += 12.0;\n\t\tthis.numGameWon+=1;\n\t\t//System.out.print(\"\\n\");\n\t\t//System.out.printf(\"\\n%s won this game. His balance: %f. Win/lost: %d/%d\",this,this.balance,this.numGameWon,this.numGameLost);\n\t\t//if (!this.isHouse)\n\t\t//System.out.print(this +\" \");\n\t}", "public void displayFinalResult() {\n drawText(\"GAME OVER\");\n }", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "private static void printResult(BlackjackHand playerHand, BlackjackDealerHand dealerHand) {\n int playerScore = playerHand.getValue();\n int dealerScore = dealerHand.getValue();\n\n // if you draw greater than 21, you bust (lose)\n if (playerScore > 21) {\n System.out.println(\"You Bust!\");\n // prompts if dealer also has blackjack but dealer will prompt winning either way\n if (dealerHand.getBlackjack()) {\n System.out.println(\"Dealer wins with blackjack!\");\n }\n\n // if dealer also bust there is no winner.\n else if (dealerScore > 21) {\n System.out.println(\"Dealer also Bust!\");\n System.out.println(\"There is no winner.\");\n }\n else {\n System.out.println(\"Dealer wins!\");\n }\n\n }\n // Here is how we handle if we get equal values for each player\n else if (playerScore == dealerScore) {\n // if both player and dealer has blackjack, then its a push.\n if (dealerHand.getBlackjack() && playerHand.getBlackjack()) {\n System.out.println(\"Both player and dealer have blackjack!\");\n System.out.println(\"Push! It's a draw!\");\n }\n // if player has 21 and not by a blackjack but dealer has blackjack, dealer wins\n else if (dealerHand.getBlackjack() && playerHand.getValue() == 21 && playerHand.getNumCards() > 2) {\n System.out.println(\"Dealer has blackjack!\");\n System.out.println(\"Dealer wins!\");\n }\n // if its just a outright tie, it's a draw.\n else {\n System.out.println(\"Push! It's a draw!\");\n }\n }\n // Here we begin to determine if player wins or the dealer wins and its not a draw\n // if player is higher than dealer without going over 21, player wins\n // if player wins with a blackjack, it will prompt somewhere in the playHand method\n else if (playerScore > dealerScore || dealerScore > 21) {\n if (dealerScore > 21) {\n System.out.println(\"Dealer bust!\");\n }\n System.out.println(\"You win!\");\n }\n // if dealer is higher than player, dealer wins\n else if (playerScore < dealerScore) {\n if (dealerHand.getBlackjack()) {\n System.out.println(\"Dealer has blackjack!\");\n }\n System.out.println(\"Dealer wins.\");\n }\n System.out.println();\n\n // original code commented out\n //System.out.println(\"You win or lose!\");\n }", "public void displayWinner()\n {\n if(isWin(X))\n {\n System.out.println(\"\\n X wins...!!\");\n isEmpty=false;\n }\n else if(isWin(O))\n {\n System.out.println(\"\\n O wins...!!\");\n isEmpty=false;\n }\n else\n {\n if(!isEmpty)\n {\n System.out.println(\"its a tie\");\n }\n \n }\n }", "public static void win()\n\t{\n\t\tGame.setMoney(Game.getMoney()+bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}", "public void winGame() {\n\t\t\twinLabel.setText(\"Win record: \" + winRecord);\n\t\t\tdisableButtons();\n\t\t\trecordMoves();\n\t\t\tbestMovesLabel.setText(\"Best Moves score: \" + bestMoves);\n\t\t\t// MessageDialog informs player number of the number of moves it took to win.\n\t\t\tJOptionPane.showMessageDialog(null, \"You won with \" + moves + \" moves!\", \"WINNER!\", JOptionPane.PLAIN_MESSAGE);\n\t\t\trandomizeButton.requestFocusInWindow();\n\t}", "public void decideResult() {\n\t\t\n\t\tif (mUser.getHandValue() < 22 && mUser.getHandValue() > mDealer.getHandValue()) {\n\t\t\tmResult = \"win\";\n\t\t}else if(mUser.getHandValue() < 22 && mUser.getHandValue() == mDealer.getHandValue()) {\n\t\t\tmResult = \"draw\";\n\t\t}else {\n\t\t\tmResult = \"lose\";\n\t\t}\n\t\t\n\t}", "public void playRound(){\n int roundScoreOne = 0;\n int roundScoreTwo = 0 ;\n this.handOne.drawNewHandFrom(gameDeck);\n this.handTwo.drawNewHandFrom(gameDeck);\n roundScoreOne = this.scoreHand(handOne, handTwo);\n roundScoreTwo = this.scoreHand(handTwo, handOne);\n\n System.out.println(\"Your hand: \");\n System.out.println(handOne.toString());\n System.out.println(\"Score: \" + roundScoreOne + \"\\n\");\n\n System.out.println(\"Opponent's hand: \");\n System.out.println(handTwo.toString());\n System.out.println(\"Score: \" + roundScoreTwo + \"\\n\");\n\n if (roundScoreOne > roundScoreTwo) {\n int updateAmount = roundScoreOne - roundScoreTwo;\n this.playerScore += updateAmount;\n System.out.println(\"You score \" + updateAmount + \" points !\");\n System.out.println(\"You: \" + playerScore);\n System.out.println(\"Opponent: \" + oppoScore);\n } else if (roundScoreTwo > roundScoreOne) {\n int updateAmount = roundScoreTwo - roundScoreOne;\n this.oppoScore += updateAmount;\n System.out.println(\"Opponent scores \" + updateAmount + \" points !\");\n System.out.println(\"You: \" + playerScore);\n System.out.println(\"Opponent: \" + oppoScore);\n }\n }", "private void displayWinner() {\n\t\tint winningScore = 0; \n\t\tint winnerInt = 0;\n\t\tfor (int i = 0; i < nPlayers; i++) {\n\t\t\tif (winningScore <= playerInfo[i][TOTAL]) {\n\t\t\t\twinningScore = playerInfo[i][TOTAL];\n\t\t\t\twinnerInt = playerInfo[i][0];\n\t\t\t}\n\t\t}\n\t\tdisplay.printMessage(\"Congratulations, \" + playerNames[winnerInt] + \", you're the winner with a total score of \" + winningScore +\" points!\");\n\t}", "public void displayRoundWinners() \n\t{\n\t\tif (roundDrawn == false)\n\t\t{\n\t\t System.out.println(\"\\n- - - - - - - - - - -\");\t\n\t\t // Loop through playerList\n\t\t for(int i =0; i<playersList.getPlayers().size(); i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(playersList.getPlayers().get(i).getName() + \" has won \" + playersList.getPlayers().get(i).getNumberOfRoundsWon() + \" rounds\");\n\t\t\t}\n\t\t System.out.println(\"- - - - - - - - - - -\");\n\t\t System.out.println(totalNumberOfDraws + \" rounds were draw\");\n\t\t System.out.println(\"- - - - - - - - - - -\\n\");\n\t\t} else\n\t\t{\n\t\t\tSystem.out.println(\" \");\n\t\t\t// If the game was drawn, update deckPileWaiting for next round\n\t\t\tdeckPileWaiting = true;\n\t\t}\n\t}", "private void HumanPlayersTurn() {\n\n if(CheckForBlackjack(humanPlayer)){\n System.out.println(\"You got Blackjack!\");\n humanPlayer.hasBlackjack = true;\n Win(humanPlayer);\n }\n humanPlayer.setHandSum(CalcHandSum(humanPlayer, humanPlayer.getHand()));\n\n //Until bust or stay\n while (true) {\n\n System.out.println(\"Currently at: \" + humanPlayer.getHandSum());\n int choice = humanPlayer.HitPrompt();\n //If \"hit,\" return the sum and add another card to the humanPlayer's hand\n if (choice == 1) {\n humanPlayer.Hit(humanPlayer, deck);\n humanPlayer.setHandSum(CalcHandSum(humanPlayer, humanPlayer.getHand()));\n\n //Check to see if humanPlayer busts\n if (IsBust(humanPlayer)) {\n System.out.println(\"You busted at \" + humanPlayer.getHandSum());\n Lose(humanPlayer);\n humanPlayer.isBust = true;\n break;\n }\n }\n //If \"stay,\" return the sum and exit loop\n else {\n System.out.println(\"You stayed at \" + humanPlayer.getHandSum());\n humanPlayer.setHandSum(humanPlayer.getHandSum());\n break;\n }\n }\n }", "private void checkResults() {\n\n if (Dealer.calcTotal() == p1.calcTotal()) {\n System.out.println(\"You and the dealer Tie, Here is your money back.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (p1.calcTotal() > Dealer.calcTotal() && !bust) {\n System.out.println(\"You win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.calcTotal() > 31) {\n System.out.println(\"Dealer busts. You Win!\");\n totalWinnings += betNum;\n p1.addPointCount(betNum);\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n } else if (Dealer.getTotal() > p1.calcTotal() && Dealer.getTotal() < 32) {\n System.out.println(\"Dealer Wins.\");\n System.out.println(\"Total Winnings: \" + totalWinnings + \"\\n\");\n p1.subPointCount(betNum);\n }\n }", "private void showHand()\n\t{\n\t\tSystem.out.println(\"Your cards: \");\n\t\tfor(Card allCards : playerCards){\n\t\t\tSystem.out.println(allCards.getDescription() + \" of \" + allCards.getSuit());\n\t\t}\n\t\tSystem.out.println(\"Hand value: \" + getHandValue());\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds WaitlistEntry to database
public static void addWaitlistEntry(WaitlistEntry entry) { con = DBConnection.getConnection(); try { PreparedStatement add = con.prepareStatement("INSERT INTO Waitlist (FACULTY, DATE, SEATS, TIMESTAMP) " + "VALUES(?, ?, ?, ?)"); add.setString(1, entry.getName()); add.setDate(2, entry.getDate()); add.setInt(3, entry.getSeats()); add.setTimestamp(4, entry.getTime()); add.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
[ "public abstract void addTaskFromDB();", "ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry addNewDebts();", "public void insertBreakoutData() {\n\n SQLiteDatabase breakoutDb = dataDbHelper.getWritableDatabase();\n ContentValues breakoutValues = new ContentValues();\n\n breakoutValues.put(BreakoutEntry.COLUMN_BREAKOUT_DATE, today);\n breakoutValues.put(BreakoutEntry.COLUMN_BREAKOUT_LEVEL, breakoutLevel);\n\n long newRowId = breakoutDb.insert(DataContract.BreakoutEntry.TABLE_NAME, null, breakoutValues);\n Log.v(\"New row id\", \"New row id breakout\" + newRowId);\n }", "int insert(EventsWaitsSummaryByInstance record);", "public void addToFavourite()\n {\n List<Jobs> items = items();\n ActiveAndroid.beginTransaction();\n\n try\n {\n //Bulk Insert\n for (int i = 0; i < items.size(); i++)\n {\n Jobs o = items.get(i);\n Favourite f = new Favourite(o);\n f.save();\n }\n\n ActiveAndroid.setTransactionSuccessful();\n } finally\n {\n ActiveAndroid.endTransaction();\n }\n }", "public void addEntry(TimetableEntry entry) {\n entries.add(entry);\n }", "public void insertTicket(Ticket t){if(!this.inProgress()){this.currentTicket = t;}}", "private void addNewTask() {\n //load data from form to this.task object\n updateTask();\n //call the dbAdapter to add new task\n int result = 0;\n try {\n\t\tresult = getHelper().getTaskDao().create(this.task);\n\t\tgetHelper().getTaskDao().notifyChanges();\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n if (result == 1)\n \t Toast.makeText(getBaseContext(), \"Task added: \" + this.task.getName(), Toast.LENGTH_LONG).show();\n }", "public void AddSleepEntry(SleepData sleepData)\n {\n ContentValues values = new ContentValues();\n values.put(SLEEP_COLUMN_DATE, sleepData.getStartTime());\n values.put(SLEEP_COLUMN_DURATION, sleepData.getDuration());\n values.put(SLEEP_COLUMN_HEALTH, sleepData.getHealthStatus());\n values.put(SLEEP_COLUMN_QUALITY, sleepData.getSleepQuality());\n values.put(SLEEP_COLUMN_NOTES, sleepData.getNotes());\n\n SQLiteDatabase db = this.getWritableDatabase();\n\n db.insert(TABLE_SLEEP, null, values);\n db.close();\n }", "public void add(AddressEntry addressEntry)\n {\n try{\n Class.forName(\"oracle.jdbc.OracleDriver\");\n Connection conn = DriverManager.getConnection(\"jdbc:oracle:thin\" +\n \":@adcsdb01.csueastbay.edu:1521:mcspdb.ad.csueastbay.edu\"\n , \"MCS1018\", \"y_WrlhyT\");\n // Statement stmt = conn.createStatement();\n\n PreparedStatement stmt = conn.prepareStatement(\"INSERT INTO \" +\n \"ADDRESSENTRYTABLE values(?,?,?,?,?,?,?,?, \" +\n \"default )\");\n stmt.setString(1, addressEntry.name.firstName);\n stmt.setString(2, addressEntry.name.lastName);\n stmt.setString(3, addressEntry.address.street);\n stmt.setString(4, addressEntry.address.city);\n stmt.setString(5, addressEntry.address.state);\n stmt.setInt(6, addressEntry.address.zip);\n stmt.setString(7, addressEntry.phone);\n stmt.setString(8, addressEntry.email);\n stmt.executeUpdate();\n\n conn.close();\n }\n catch(Exception e){System.out.println(e);}\n\n addressEntryList.addElement(addressEntry);\n }", "private void uploadToDb(final List<DBCardIngredient> list){\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n uploading = true;\n viewModel.insertIngredients(list, new TaskListener() {\n @Override\n public void onTaskCompleted(Object o) {\n viewModel.getAllIngredients().observe(getViewLifecycleOwner(),uploadObserver());\n }\n });\n }\n }).start();\n }", "private void addNewRuleToDB()\n {\n Thread thread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tinsertNewRuleToDB();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLog.e(TAG, \"Exception while inserting new rule\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tthread.setPriority(Thread.NORM_PRIORITY-1);\n\t\tthread.start();\n }", "public void addVolunteer(Volunteer vtr) throws SQLException\n {\n volunteers.add(vtr);\n\n Runnable r = () ->\n {\n facadeBll.addVolunteer(vtr);\n };\n Thread t = new Thread(r);\n t.setDaemon(true);\n t.start();\n }", "private void addStartUp() {\n DatabaseReference firebaseDatabase = FirebaseDatabase.getInstance().getReference(STARTUP_FIREBASE_DATABASE_REFERENCE);\n String id = firebaseDatabase.push().getKey();\n StartUpField startUpField = new StartUpField(id, startupName.getText().toString().trim(),\n startupDescription.getText().toString().trim(), startupFounder.getText().toString().trim(),\n startupCoFounder.getText().toString().trim(), startupWebsite.getText().toString().trim(),\n facebookUrl.getText().toString().trim(), twitterUrl.getText().toString().trim(), imageUrl,\n telephone.getText().toString().trim(), email.getText().toString().trim());\n firebaseDatabase.child(id).setValue(startUpField).addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n if (getView() != null) {\n Navigation.findNavController(requireView()).navigate(R.id.action_addStartUpFragment_to_navigation_startup);\n }\n showButton(saveStartupButton);\n stopProgressBar(progressBar);\n Toast.makeText(getParentFragment().getContext(), \"Startup added\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getParentFragment().getContext(), \"Unable to add Startup\", Toast.LENGTH_SHORT).show();\n Timber.d(\"database Write Error: %s\", task.getException().getLocalizedMessage());\n showButton(saveStartupButton);\n stopProgressBar(progressBar);\n }\n });\n }", "public void addEntry(Entry entry) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_TITLE, entry.getTitle()); //Jornal title\n\t\tvalues.put(KEY_NOTE, entry.getNote()); //Journal entry\n\t\t\t\t// Inserting Row\n\t\tdb.insert(TABLE, null, values);\n\t\tdb.close(); // Closing database connection\n\t}", "public void add(String entry, int priority) {\n\t\tmy_DB = helper.getWritableDatabase();\n\t\tContentValues cv = new ContentValues();\n\t\tcv.put(\"entry\", entry);\n\t\tcv.put(\"priority\", priority);\n\t\tcv.put(\"finished\", 0);\n\t\tmy_DB.insert(\"todo\", null, cv);\n\t}", "void addNewTask();", "private void insertHabit() {\n\n\n //Get writable database\n SQLiteDatabase database = dbHelper.getWritableDatabase();\n\n //Create ContentValue Object to inset data into the database\n ContentValues values = new ContentValues();\n values.put(HabbitEntry.HABIT_NAME, \"Play the piano\");\n values.put(HabbitEntry.HABIT_START_TIME, \"13:00\");\n values.put(HabbitEntry.HABIT_END_TIME, \"14:00\");\n values.put(HabbitEntry.WEEKDAY, HabbitEntry.FRIDAY);\n\n long newRowId = database.insert(HabbitEntry.TABLE_NAME, null, values);\n\n // Show a toast message depending on whether or not the insertion was successful\n if (newRowId == -1) {\n // If the row ID is -1, then there was an error with insertion.\n Toast.makeText(this, \"Error with saving habit\", Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast with the row ID.\n Toast.makeText(this, \"Habit saved with row id: \" + newRowId, Toast.LENGTH_SHORT).show();\n }\n }", "public static void addToDB(Event event) {\n DBManager dbManager = DBManager.getInstance();\n int id = event.getId();\n String name = event.getName();\n Date date = event.getDate();\n Time time = event.getTime();\n String location = event.getLocation();\n String description = event.getDescription();\n String type = event.getType();\n ResultSet rs = dbManager.myQuery(\"select * from BOOKEDEVENTS where ID = \" + id);\n\n try {\n if (rs.next()) {\n AlreadyBooked popup = new AlreadyBooked();\n popup.setVisible(true);\n\n } else {\n dbManager.myUpdate(\"insert into BOOKEDEVENTS (id, name, date, time, location, description, type) values (\" + id + \" , '\" + name + \"' , '\"\n + date + \"' , '\" + time + \"' , '\" + location + \"' , '\" + description + \"' , '\" + type + \"')\");\n ThankyouBooking typopup = new ThankyouBooking();\n typopup.setVisible(true);\n }\n } catch (Exception ex) {\n System.out.println(\"Error: \" + ex);\n }\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserts and returns a new empty value (as xml) as the ith "measurement" element
public noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement insertNewMeasurement(int i) { synchronized (monitor()) { check_orphaned(); noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement target = null; target = (noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement)get_store().insert_element_user(MEASUREMENT$0, i); return target; } }
[ "public noNamespace.MeasurementDocument.Measurement addNewMeasurement()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.MeasurementDocument.Measurement target = null;\r\n target = (noNamespace.MeasurementDocument.Measurement)get_store().add_element_user(MEASUREMENT$0);\r\n return target;\r\n }\r\n }", "public noNamespace.MeasurementDocument.Measurement insertNewMeasurement(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.MeasurementDocument.Measurement target = null;\r\n target = (noNamespace.MeasurementDocument.Measurement)get_store().insert_element_user(MEASUREMENT$0, i);\r\n return target;\r\n }\r\n }", "public noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement addNewMeasurement()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement target = null;\r\n target = (noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Series.Measurement)get_store().add_element_user(MEASUREMENT$0);\r\n return target;\r\n }\r\n }", "public noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Nic.Series.Measurement addNewMeasurement()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Nic.Series.Measurement target = null;\r\n target = (noNamespace.HostdashletDocument.Hostdashlet.Host.Charts.Chart.Nic.Series.Measurement)get_store().add_element_user(MEASUREMENT$0);\r\n return target;\r\n }\r\n }", "public static Measurement getEmptyMeasurement() {\n return new Measurement(-1, -1, false, \"\", -1, \"\", \"\", false, false, false, false, false, -1);\n }", "private Measurement parseMeasurement(Element e) {\n if (e != null && e.getNodeName().equals(\"measurement\")) {\n NumberFormat format = NumberFormat.getInstance(Locale.GERMANY);\n Number value;\n\n try {\n // get measurement Value\n value = format.parse(e.getAttribute(\"value\"));\n\n // get timeStamp\n LocalDateTime timeStamp = LocalDateTime\n .parse(e.getAttribute(\"timestamp\"));\n\n Measurement m = new Measurement(value.doubleValue(), timeStamp);\n return m;\n } catch (ParseException e1) {\n System.err.println(\n \"Value was not a Number with Germany formation (comma)\");\n return null;\n }\n } else {\n return null;\n }\n }", "@Insert\n long insert(Measurement measurement);", "private void addAnalysisTimestamp()\r\n throws XMLStreamException\r\n {\r\n SimpleStartElement start;\r\n SimpleEndElement end;\r\n\r\n addNewline();\r\n\r\n start = new SimpleStartElement(\"analysis_timestamp\");\r\n start.addAttribute(\"analysis\", mimicXpress ? \"xpress\" : \"q3\");\r\n start.addAttribute(\"time\", now);\r\n start.addAttribute(\"id\", \"1\");\r\n add(start);\r\n\r\n addNewline();\r\n\r\n if (mimicXpress)\r\n {\r\n start = new SimpleStartElement(\"xpressratio_timestamp\");\r\n start.addAttribute(\"xpress_light\", \"0\");\r\n add(start);\r\n\r\n end = new SimpleEndElement(\"xpressratio_timestamp\");\r\n add(end);\r\n\r\n addNewline();\r\n }\r\n\r\n end = new SimpleEndElement(\"analysis_timestamp\");\r\n add(end);\r\n }", "void addMeasurement(Measurement... m);", "private void writeMeasureDatum(long measureDatumId, String dimension,\n String metric, float value) throws SQLException {\n\n PreparedStatement insStmnt = conn.prepareStatement(\n \"INSERT INTO \" + measureDatumTbl + \" VALUES (?, ?, ?, ?, ?, ?);\");\n insStmnt.setLong(1, measureDatumId);\n insStmnt.setString(2, dimension);\n insStmnt.setString(3, metric);\n insStmnt.setFloat(4, value);\n insStmnt.setLong(5, assessmentId);\n insStmnt.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\n insStmnt.executeUpdate();\n conn.commit();\n }", "private void insertOrIgnoreMeasure(LinkedList<Date> times,\r\n\t\t\tLinkedList<Float> values, int measurementID) {\r\n\r\n\t\tif (times.size() != values.size()) {\r\n\t\t\tLog.w(DT, \"times size(\" + times.size() + \") != values size (\"\r\n\t\t\t\t\t+ values.size() + \")\");\r\n\t\t} else {\r\n\r\n\t\t\tif (!(times.isEmpty())) {\r\n\r\n\t\t\t\tIterator<Date> time = times.iterator();\r\n\t\t\t\tIterator<Float> value = values.iterator();\r\n\r\n\t\t\t\twhile (time.hasNext()) {\r\n\t\t\t\t\tfloat val = value.next().floatValue();\r\n\r\n\t\t\t\t\tdb.execSQL(insertOrIgnoreMeasureBase + \"(\"\r\n\t\t\t\t\t\t\t+ time.next().getTime() + \", \"\r\n\t\t\t\t\t\t\t+ (Float.isNaN(val) ? NaN : val) + \", \"\r\n\t\t\t\t\t\t\t+ measurementID + \")\");\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// Log.w(DT, \"no data to insert\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void saveToXML(Element rootElement){\n Element sensorElement = rootElement.addElement(\"sensor\")\n .addAttribute(\"id\",String.valueOf(getModel().getId()));\n sensorElement.addElement(\"name\").addText(getModel().getName());\n sensorElement.addElement(\"refresh\").addText(String.valueOf(getModel().getRefreshTime()));\n sensorElement.addElement(\"signal\").addText(String.valueOf(getModel().getSignal()));\n sensorElement.addElement(\"battery\").addText(String.valueOf(getModel().getBattery()));\n if(getPanel() != null){\n sensorElement.addElement(\"icon\").addText(getPanel().getIconType().getName());\n sensorElement.addElement(\"header_color\").addText(getPanel().getHexHeaderColor());\n }\n Element valuesElement = sensorElement.addElement(\"values\");\n for(Value value : getModel().getValues()){\n value.saveToXML(valuesElement);\n }\n }", "public int insertSensorData(DataValue dataVal) throws Exception;", "public noNamespace.MeasureDocument.Measure insertNewMeasure(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.MeasureDocument.Measure target = null;\r\n target = (noNamespace.MeasureDocument.Measure)get_store().insert_element_user(MEASURE2$4, i);\r\n return target;\r\n }\r\n }", "@Insert\n void insertAll(Measurement... measurements);", "static Element writeDataValues2XML(Document doc, String track, int start,\r\n\t\t\tint end, int step, String valueList) {\r\n\t\tElement ele = doc.createElement(Consts.XML_TAG_VALUES);\r\n\t\tele.setAttribute(Consts.XML_TAG_ID, track);\r\n\t\tdoc.getElementsByTagName(Consts.DATA_ROOT).item(0).appendChild(ele); // Values\r\n\t\tXmlWriter\r\n\t\t\t\t.append_text_element(doc, ele, Consts.XML_TAG_FROM, start + \"\");\r\n\t\tXmlWriter.append_text_element(doc, ele, Consts.XML_TAG_TO, end + \"\");\r\n\t\tXmlWriter.append_text_element(doc, ele, Consts.XML_TAG_STEP, step + \"\");\r\n\t\tXmlWriter.append_text_element(doc, ele, Consts.XML_TAG_VALUE_LIST, valueList);\r\n\t\treturn ele;\r\n\t}", "private void saveMeasurement(Measurement measurement){\n if(db.insert(measurement)){\n listMeasurements.add(0, measurement);\n listAdapter.updateList(listMeasurements);\n Toast.makeText(this, \"Die Messung wurde gespeichert.\", Toast.LENGTH_SHORT).show();\n }else{\n Toast.makeText(this, \"Die Messung konnte nicht gespeichert werden.\", Toast.LENGTH_SHORT).show();\n }\n }", "public void add(Measurement m) {\n expand(1, true);\n MeasureThing thing = new MeasureThing(this, m);\n }", "public noNamespace.MeasureDocument.Measure addNewMeasure()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.MeasureDocument.Measure target = null;\r\n target = (noNamespace.MeasureDocument.Measure)get_store().add_element_user(MEASURE2$4);\r\n return target;\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleDECIMAL" $ANTLR start "ruleDECIMAL" InternalAnn.g:218:1: ruleDECIMAL returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_INT_0= RULE_INT kw= '.' this_INT_2= RULE_INT ) ;
public final AntlrDatatypeRuleToken ruleDECIMAL() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token this_INT_0=null; Token kw=null; Token this_INT_2=null; enterRule(); try { // InternalAnn.g:224:2: ( (this_INT_0= RULE_INT kw= '.' this_INT_2= RULE_INT ) ) // InternalAnn.g:225:2: (this_INT_0= RULE_INT kw= '.' this_INT_2= RULE_INT ) { // InternalAnn.g:225:2: (this_INT_0= RULE_INT kw= '.' this_INT_2= RULE_INT ) // InternalAnn.g:226:3: this_INT_0= RULE_INT kw= '.' this_INT_2= RULE_INT { this_INT_0=(Token)match(input,RULE_INT,FOLLOW_10); current.merge(this_INT_0); newLeafNode(this_INT_0, grammarAccess.getDECIMALAccess().getINTTerminalRuleCall_0()); kw=(Token)match(input,15,FOLLOW_5); current.merge(kw); newLeafNode(kw, grammarAccess.getDECIMALAccess().getFullStopKeyword_1()); this_INT_2=(Token)match(input,RULE_INT,FOLLOW_2); current.merge(this_INT_2); newLeafNode(this_INT_2, grammarAccess.getDECIMALAccess().getINTTerminalRuleCall_2()); } } leaveRule(); } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
[ "public final String entryRuleDECIMAL() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleDECIMAL = null;\n\n\n try {\n // InternalAnn.g:211:47: (iv_ruleDECIMAL= ruleDECIMAL EOF )\n // InternalAnn.g:212:2: iv_ruleDECIMAL= ruleDECIMAL EOF\n {\n newCompositeNode(grammarAccess.getDECIMALRule()); \n pushFollow(FOLLOW_1);\n iv_ruleDECIMAL=ruleDECIMAL();\n\n state._fsp--;\n\n current =iv_ruleDECIMAL.getText(); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final void mDECIMAL() throws RecognitionException {\n try {\n int _type = DECIMAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:429:5: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT )\n int alt20=3;\n alt20 = dfa20.predict(input);\n switch (alt20) {\n case 1 :\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:429:9: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )?\n {\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:429:9: ( '0' .. '9' )+\n int cnt14=0;\n loop14:\n do {\n int alt14=2;\n int LA14_0 = input.LA(1);\n\n if ( ((LA14_0 >= '0' && LA14_0 <= '9')) ) {\n alt14=1;\n }\n\n\n switch (alt14) {\n \tcase 1 :\n \t // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:\n \t {\n \t if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {\n \t input.consume();\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt14 >= 1 ) break loop14;\n EarlyExitException eee =\n new EarlyExitException(14, input);\n throw eee;\n }\n cnt14++;\n } while (true);\n\n\n match('.'); \n\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:429:25: ( '0' .. '9' )*\n loop15:\n do {\n int alt15=2;\n int LA15_0 = input.LA(1);\n\n if ( ((LA15_0 >= '0' && LA15_0 <= '9')) ) {\n alt15=1;\n }\n\n\n switch (alt15) {\n \tcase 1 :\n \t // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:\n \t {\n \t if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {\n \t input.consume();\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop15;\n }\n } while (true);\n\n\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:429:37: ( EXPONENT )?\n int alt16=2;\n int LA16_0 = input.LA(1);\n\n if ( (LA16_0=='E'||LA16_0=='e') ) {\n alt16=1;\n }\n switch (alt16) {\n case 1 :\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:429:37: EXPONENT\n {\n mEXPONENT(); \n\n\n }\n break;\n\n }\n\n\n }\n break;\n case 2 :\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:430:9: '.' ( '0' .. '9' )+ ( EXPONENT )?\n {\n match('.'); \n\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:430:13: ( '0' .. '9' )+\n int cnt17=0;\n loop17:\n do {\n int alt17=2;\n int LA17_0 = input.LA(1);\n\n if ( ((LA17_0 >= '0' && LA17_0 <= '9')) ) {\n alt17=1;\n }\n\n\n switch (alt17) {\n \tcase 1 :\n \t // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:\n \t {\n \t if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {\n \t input.consume();\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt17 >= 1 ) break loop17;\n EarlyExitException eee =\n new EarlyExitException(17, input);\n throw eee;\n }\n cnt17++;\n } while (true);\n\n\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:430:25: ( EXPONENT )?\n int alt18=2;\n int LA18_0 = input.LA(1);\n\n if ( (LA18_0=='E'||LA18_0=='e') ) {\n alt18=1;\n }\n switch (alt18) {\n case 1 :\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:430:25: EXPONENT\n {\n mEXPONENT(); \n\n\n }\n break;\n\n }\n\n\n }\n break;\n case 3 :\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:431:9: ( '0' .. '9' )+ EXPONENT\n {\n // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:431:9: ( '0' .. '9' )+\n int cnt19=0;\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0 >= '0' && LA19_0 <= '9')) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // /home/arv/workspace/master/meteor/meteor-meteor/src/main/java/eu/stratosphere/meteor/Meteor.g:\n \t {\n \t if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {\n \t input.consume();\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt19 >= 1 ) break loop19;\n EarlyExitException eee =\n new EarlyExitException(19, input);\n throw eee;\n }\n cnt19++;\n } while (true);\n\n\n mEXPONENT(); \n\n\n }\n break;\n\n }\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n \t// do for sure before leaving\n }\n }", "public final void entryRuleDecimal() throws RecognitionException {\n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:229:1: ( ruleDecimal EOF )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:230:1: ruleDecimal EOF\n {\n before(grammarAccess.getDecimalRule()); \n pushFollow(FollowSets000.FOLLOW_ruleDecimal_in_entryRuleDecimal420);\n ruleDecimal();\n\n state._fsp--;\n\n after(grammarAccess.getDecimalRule()); \n match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleDecimal427); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public static Tokenizer forDecimal(){\n return decimal;\n }", "public final void mRULE_DECIMAL() throws RecognitionException {\r\n try {\r\n int _type = RULE_DECIMAL;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../rs.rcpplugins.datadsl.ui/src-gen/rs/dsl/data/ui/contentassist/antlr/internal/InternalData.g:18108:14: ( RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )? )\r\n // ../rs.rcpplugins.datadsl.ui/src-gen/rs/dsl/data/ui/contentassist/antlr/internal/InternalData.g:18108:16: RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\r\n {\r\n mRULE_INT(); \r\n // ../rs.rcpplugins.datadsl.ui/src-gen/rs/dsl/data/ui/contentassist/antlr/internal/InternalData.g:18108:25: ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )?\r\n int alt7=2;\r\n int LA7_0 = input.LA(1);\r\n\r\n if ( (LA7_0=='E'||LA7_0=='e') ) {\r\n alt7=1;\r\n }\r\n switch (alt7) {\r\n case 1 :\r\n // ../rs.rcpplugins.datadsl.ui/src-gen/rs/dsl/data/ui/contentassist/antlr/internal/InternalData.g:18108:26: ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT\r\n {\r\n if ( input.LA(1)=='E'||input.LA(1)=='e' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n // ../rs.rcpplugins.datadsl.ui/src-gen/rs/dsl/data/ui/contentassist/antlr/internal/InternalData.g:18108:36: ( '+' | '-' )?\r\n int alt6=2;\r\n int LA6_0 = input.LA(1);\r\n\r\n if ( (LA6_0=='+'||LA6_0=='-') ) {\r\n alt6=1;\r\n }\r\n switch (alt6) {\r\n case 1 :\r\n // ../rs.rcpplugins.datadsl.ui/src-gen/rs/dsl/data/ui/contentassist/antlr/internal/InternalData.g:\r\n {\r\n if ( input.LA(1)=='+'||input.LA(1)=='-' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n mRULE_INT(); \r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n // ../rs.rcpplugins.datadsl.ui/src-gen/rs/dsl/data/ui/contentassist/antlr/internal/InternalData.g:18108:58: ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\r\n int alt8=3;\r\n int LA8_0 = input.LA(1);\r\n\r\n if ( (LA8_0=='B'||LA8_0=='b') ) {\r\n alt8=1;\r\n }\r\n else if ( (LA8_0=='D'||LA8_0=='F'||LA8_0=='L'||LA8_0=='d'||LA8_0=='f'||LA8_0=='l') ) {\r\n alt8=2;\r\n }\r\n switch (alt8) {\r\n case 1 :\r\n // ../rs.rcpplugins.datadsl.ui/src-gen/rs/dsl/data/ui/contentassist/antlr/internal/InternalData.g:18108:59: ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' )\r\n {\r\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n if ( input.LA(1)=='D'||input.LA(1)=='I'||input.LA(1)=='d'||input.LA(1)=='i' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../rs.rcpplugins.datadsl.ui/src-gen/rs/dsl/data/ui/contentassist/antlr/internal/InternalData.g:18108:87: ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' )\r\n {\r\n if ( input.LA(1)=='D'||input.LA(1)=='F'||input.LA(1)=='L'||input.LA(1)=='d'||input.LA(1)=='f'||input.LA(1)=='l' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "public final void mRULE_DECIMAL() throws RecognitionException {\n try {\n int _type = RULE_DECIMAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.fuin.dsl.ddd.ui/src-gen/org/fuin/dsl/ddd/ui/contentassist/antlr/internal/InternalDomainDrivenDesignDsl.g:13951:14: ( RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )? )\n // ../org.fuin.dsl.ddd.ui/src-gen/org/fuin/dsl/ddd/ui/contentassist/antlr/internal/InternalDomainDrivenDesignDsl.g:13951:16: RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\n {\n mRULE_INT(); \n // ../org.fuin.dsl.ddd.ui/src-gen/org/fuin/dsl/ddd/ui/contentassist/antlr/internal/InternalDomainDrivenDesignDsl.g:13951:25: ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )?\n int alt11=2;\n int LA11_0 = input.LA(1);\n\n if ( (LA11_0=='E'||LA11_0=='e') ) {\n alt11=1;\n }\n switch (alt11) {\n case 1 :\n // ../org.fuin.dsl.ddd.ui/src-gen/org/fuin/dsl/ddd/ui/contentassist/antlr/internal/InternalDomainDrivenDesignDsl.g:13951:26: ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT\n {\n if ( input.LA(1)=='E'||input.LA(1)=='e' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n // ../org.fuin.dsl.ddd.ui/src-gen/org/fuin/dsl/ddd/ui/contentassist/antlr/internal/InternalDomainDrivenDesignDsl.g:13951:36: ( '+' | '-' )?\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0=='+'||LA10_0=='-') ) {\n alt10=1;\n }\n switch (alt10) {\n case 1 :\n // ../org.fuin.dsl.ddd.ui/src-gen/org/fuin/dsl/ddd/ui/contentassist/antlr/internal/InternalDomainDrivenDesignDsl.g:\n {\n if ( input.LA(1)=='+'||input.LA(1)=='-' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n mRULE_INT(); \n\n }\n break;\n\n }\n\n // ../org.fuin.dsl.ddd.ui/src-gen/org/fuin/dsl/ddd/ui/contentassist/antlr/internal/InternalDomainDrivenDesignDsl.g:13951:58: ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\n int alt12=3;\n int LA12_0 = input.LA(1);\n\n if ( (LA12_0=='B'||LA12_0=='b') ) {\n alt12=1;\n }\n else if ( (LA12_0=='D'||LA12_0=='F'||LA12_0=='L'||LA12_0=='d'||LA12_0=='f'||LA12_0=='l') ) {\n alt12=2;\n }\n switch (alt12) {\n case 1 :\n // ../org.fuin.dsl.ddd.ui/src-gen/org/fuin/dsl/ddd/ui/contentassist/antlr/internal/InternalDomainDrivenDesignDsl.g:13951:59: ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' )\n {\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='D'||input.LA(1)=='I'||input.LA(1)=='d'||input.LA(1)=='i' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n case 2 :\n // ../org.fuin.dsl.ddd.ui/src-gen/org/fuin/dsl/ddd/ui/contentassist/antlr/internal/InternalDomainDrivenDesignDsl.g:13951:87: ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' )\n {\n if ( input.LA(1)=='D'||input.LA(1)=='F'||input.LA(1)=='L'||input.LA(1)=='d'||input.LA(1)=='f'||input.LA(1)=='l' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final AntlrDatatypeRuleToken ruleNumberTypes() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token this_INT_1=null;\n AntlrDatatypeRuleToken this_DECIMAL_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalAnn.g:1907:2: ( (this_DECIMAL_0= ruleDECIMAL | this_INT_1= RULE_INT ) )\n // InternalAnn.g:1908:2: (this_DECIMAL_0= ruleDECIMAL | this_INT_1= RULE_INT )\n {\n // InternalAnn.g:1908:2: (this_DECIMAL_0= ruleDECIMAL | this_INT_1= RULE_INT )\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( (LA19_0==RULE_INT) ) {\n int LA19_1 = input.LA(2);\n\n if ( (LA19_1==EOF||LA19_1==14||LA19_1==22||LA19_1==25||LA19_1==38||(LA19_1>=46 && LA19_1<=49)) ) {\n alt19=2;\n }\n else if ( (LA19_1==15) ) {\n alt19=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 19, 1, input);\n\n throw nvae;\n }\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 19, 0, input);\n\n throw nvae;\n }\n switch (alt19) {\n case 1 :\n // InternalAnn.g:1909:3: this_DECIMAL_0= ruleDECIMAL\n {\n\n \t\t\tnewCompositeNode(grammarAccess.getNumberTypesAccess().getDECIMALParserRuleCall_0());\n \t\t\n pushFollow(FOLLOW_2);\n this_DECIMAL_0=ruleDECIMAL();\n\n state._fsp--;\n\n\n \t\t\tcurrent.merge(this_DECIMAL_0);\n \t\t\n\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n\n }\n break;\n case 2 :\n // InternalAnn.g:1920:3: this_INT_1= RULE_INT\n {\n this_INT_1=(Token)match(input,RULE_INT,FOLLOW_2); \n\n \t\t\tcurrent.merge(this_INT_1);\n \t\t\n\n \t\t\tnewLeafNode(this_INT_1, grammarAccess.getNumberTypesAccess().getINTTerminalRuleCall_1());\n \t\t\n\n }\n break;\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final void mRULE_DECIMAL() throws RecognitionException {\n try {\n int _type = RULE_DECIMAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../it.rcpvision.emf.components.dsl/src-gen/it/rcpvision/emf/components/dsl/parser/antlr/internal/InternalEmfComponentsDsl.g:6368:14: ( RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )? )\n // ../it.rcpvision.emf.components.dsl/src-gen/it/rcpvision/emf/components/dsl/parser/antlr/internal/InternalEmfComponentsDsl.g:6368:16: RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\n {\n mRULE_INT(); \n // ../it.rcpvision.emf.components.dsl/src-gen/it/rcpvision/emf/components/dsl/parser/antlr/internal/InternalEmfComponentsDsl.g:6368:25: ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )?\n int alt7=2;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0=='E'||LA7_0=='e') ) {\n alt7=1;\n }\n switch (alt7) {\n case 1 :\n // ../it.rcpvision.emf.components.dsl/src-gen/it/rcpvision/emf/components/dsl/parser/antlr/internal/InternalEmfComponentsDsl.g:6368:26: ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT\n {\n if ( input.LA(1)=='E'||input.LA(1)=='e' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n // ../it.rcpvision.emf.components.dsl/src-gen/it/rcpvision/emf/components/dsl/parser/antlr/internal/InternalEmfComponentsDsl.g:6368:36: ( '+' | '-' )?\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0=='+'||LA6_0=='-') ) {\n alt6=1;\n }\n switch (alt6) {\n case 1 :\n // ../it.rcpvision.emf.components.dsl/src-gen/it/rcpvision/emf/components/dsl/parser/antlr/internal/InternalEmfComponentsDsl.g:\n {\n if ( input.LA(1)=='+'||input.LA(1)=='-' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n mRULE_INT(); \n\n }\n break;\n\n }\n\n // ../it.rcpvision.emf.components.dsl/src-gen/it/rcpvision/emf/components/dsl/parser/antlr/internal/InternalEmfComponentsDsl.g:6368:58: ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\n int alt8=3;\n int LA8_0 = input.LA(1);\n\n if ( (LA8_0=='B'||LA8_0=='b') ) {\n alt8=1;\n }\n else if ( (LA8_0=='D'||LA8_0=='F'||LA8_0=='L'||LA8_0=='d'||LA8_0=='f'||LA8_0=='l') ) {\n alt8=2;\n }\n switch (alt8) {\n case 1 :\n // ../it.rcpvision.emf.components.dsl/src-gen/it/rcpvision/emf/components/dsl/parser/antlr/internal/InternalEmfComponentsDsl.g:6368:59: ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' )\n {\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='D'||input.LA(1)=='I'||input.LA(1)=='d'||input.LA(1)=='i' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n case 2 :\n // ../it.rcpvision.emf.components.dsl/src-gen/it/rcpvision/emf/components/dsl/parser/antlr/internal/InternalEmfComponentsDsl.g:6368:87: ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' )\n {\n if ( input.LA(1)=='D'||input.LA(1)=='F'||input.LA(1)=='L'||input.LA(1)=='d'||input.LA(1)=='f'||input.LA(1)=='l' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final void mRULE_DECIMAL() throws RecognitionException {\n try {\n int _type = RULE_DECIMAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:23484:14: ( RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )? )\n // InternalSpeADL.g:23484:16: RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\n {\n mRULE_INT(); \n // InternalSpeADL.g:23484:25: ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )?\n int alt7=2;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0=='E'||LA7_0=='e') ) {\n alt7=1;\n }\n switch (alt7) {\n case 1 :\n // InternalSpeADL.g:23484:26: ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT\n {\n if ( input.LA(1)=='E'||input.LA(1)=='e' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n // InternalSpeADL.g:23484:36: ( '+' | '-' )?\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0=='+'||LA6_0=='-') ) {\n alt6=1;\n }\n switch (alt6) {\n case 1 :\n // InternalSpeADL.g:\n {\n if ( input.LA(1)=='+'||input.LA(1)=='-' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n mRULE_INT(); \n\n }\n break;\n\n }\n\n // InternalSpeADL.g:23484:58: ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\n int alt8=3;\n int LA8_0 = input.LA(1);\n\n if ( (LA8_0=='B'||LA8_0=='b') ) {\n alt8=1;\n }\n else if ( (LA8_0=='D'||LA8_0=='F'||LA8_0=='L'||LA8_0=='d'||LA8_0=='f'||LA8_0=='l') ) {\n alt8=2;\n }\n switch (alt8) {\n case 1 :\n // InternalSpeADL.g:23484:59: ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' )\n {\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='D'||input.LA(1)=='I'||input.LA(1)=='d'||input.LA(1)=='i' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n case 2 :\n // InternalSpeADL.g:23484:87: ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' )\n {\n if ( input.LA(1)=='D'||input.LA(1)=='F'||input.LA(1)=='L'||input.LA(1)=='d'||input.LA(1)=='f'||input.LA(1)=='l' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final void mRULE_DECIMAL() throws RecognitionException {\n try {\n int _type = RULE_DECIMAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalLPhy.g:18653:14: ( RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )? )\n // InternalLPhy.g:18653:16: RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\n {\n mRULE_INT(); \n // InternalLPhy.g:18653:25: ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )?\n int alt9=2;\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0=='E'||LA9_0=='e') ) {\n alt9=1;\n }\n switch (alt9) {\n case 1 :\n // InternalLPhy.g:18653:26: ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT\n {\n if ( input.LA(1)=='E'||input.LA(1)=='e' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n // InternalLPhy.g:18653:36: ( '+' | '-' )?\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( (LA8_0=='+'||LA8_0=='-') ) {\n alt8=1;\n }\n switch (alt8) {\n case 1 :\n // InternalLPhy.g:\n {\n if ( input.LA(1)=='+'||input.LA(1)=='-' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n mRULE_INT(); \n\n }\n break;\n\n }\n\n // InternalLPhy.g:18653:58: ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\n int alt10=3;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0=='B'||LA10_0=='b') ) {\n alt10=1;\n }\n else if ( (LA10_0=='D'||LA10_0=='F'||LA10_0=='L'||LA10_0=='d'||LA10_0=='f'||LA10_0=='l') ) {\n alt10=2;\n }\n switch (alt10) {\n case 1 :\n // InternalLPhy.g:18653:59: ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' )\n {\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='D'||input.LA(1)=='I'||input.LA(1)=='d'||input.LA(1)=='i' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n case 2 :\n // InternalLPhy.g:18653:87: ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' )\n {\n if ( input.LA(1)=='D'||input.LA(1)=='F'||input.LA(1)=='L'||input.LA(1)=='d'||input.LA(1)=='f'||input.LA(1)=='l' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final void mRULE_DECIMAL() throws RecognitionException {\n try {\n int _type = RULE_DECIMAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:661:14: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:661:16: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+\n {\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:661:16: ( '-' )?\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0=='-') ) {\n alt3=1;\n }\n switch (alt3) {\n case 1 :\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:661:16: '-'\n {\n match('-'); \n\n }\n break;\n\n }\n\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:661:21: ( '0' .. '9' )+\n int cnt4=0;\n loop4:\n do {\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0>='0' && LA4_0<='9')) ) {\n alt4=1;\n }\n\n\n switch (alt4) {\n \tcase 1 :\n \t // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:661:22: '0' .. '9'\n \t {\n \t matchRange('0','9'); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt4 >= 1 ) break loop4;\n EarlyExitException eee =\n new EarlyExitException(4, input);\n throw eee;\n }\n cnt4++;\n } while (true);\n\n match('.'); \n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:661:37: ( '0' .. '9' )+\n int cnt5=0;\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>='0' && LA5_0<='9')) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:661:38: '0' .. '9'\n \t {\n \t matchRange('0','9'); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt5 >= 1 ) break loop5;\n EarlyExitException eee =\n new EarlyExitException(5, input);\n throw eee;\n }\n cnt5++;\n } while (true);\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final void mRULE_DECIMAL() throws RecognitionException {\r\n try {\r\n int _type = RULE_DECIMAL;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // InternalJQVT.g:22419:14: ( RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )? )\r\n // InternalJQVT.g:22419:16: RULE_INT ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )? ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\r\n {\r\n mRULE_INT(); \r\n // InternalJQVT.g:22419:25: ( ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT )?\r\n int alt11=2;\r\n int LA11_0 = input.LA(1);\r\n\r\n if ( (LA11_0=='E'||LA11_0=='e') ) {\r\n alt11=1;\r\n }\r\n switch (alt11) {\r\n case 1 :\r\n // InternalJQVT.g:22419:26: ( 'e' | 'E' ) ( '+' | '-' )? RULE_INT\r\n {\r\n if ( input.LA(1)=='E'||input.LA(1)=='e' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n // InternalJQVT.g:22419:36: ( '+' | '-' )?\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( (LA10_0=='+'||LA10_0=='-') ) {\r\n alt10=1;\r\n }\r\n switch (alt10) {\r\n case 1 :\r\n // InternalJQVT.g:\r\n {\r\n if ( input.LA(1)=='+'||input.LA(1)=='-' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n mRULE_INT(); \r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n // InternalJQVT.g:22419:58: ( ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' ) | ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' ) )?\r\n int alt12=3;\r\n int LA12_0 = input.LA(1);\r\n\r\n if ( (LA12_0=='B'||LA12_0=='b') ) {\r\n alt12=1;\r\n }\r\n else if ( (LA12_0=='D'||LA12_0=='F'||LA12_0=='L'||LA12_0=='d'||LA12_0=='f'||LA12_0=='l') ) {\r\n alt12=2;\r\n }\r\n switch (alt12) {\r\n case 1 :\r\n // InternalJQVT.g:22419:59: ( 'b' | 'B' ) ( 'i' | 'I' | 'd' | 'D' )\r\n {\r\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n if ( input.LA(1)=='D'||input.LA(1)=='I'||input.LA(1)=='d'||input.LA(1)=='i' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalJQVT.g:22419:87: ( 'l' | 'L' | 'd' | 'D' | 'f' | 'F' )\r\n {\r\n if ( input.LA(1)=='D'||input.LA(1)=='F'||input.LA(1)=='L'||input.LA(1)=='d'||input.LA(1)=='f'||input.LA(1)=='l' ) {\r\n input.consume();\r\n\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;}\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "public final void mDecimalLiteral() throws RecognitionException {\n try {\n int _type = DecimalLiteral;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/marko/git/fj/src/be/kuleuven/cs/distrinet/chameleon/fj2/input/fj.g:172:16: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )? )\n // /Users/marko/git/fj/src/be/kuleuven/cs/distrinet/chameleon/fj2/input/fj.g:172:18: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )?\n {\n // /Users/marko/git/fj/src/be/kuleuven/cs/distrinet/chameleon/fj2/input/fj.g:172:18: ( '0' | '1' .. '9' ( '0' .. '9' )* )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0=='0') ) {\n alt4=1;\n }\n else if ( ((LA4_0>='1' && LA4_0<='9')) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n }\n switch (alt4) {\n case 1 :\n // /Users/marko/git/fj/src/be/kuleuven/cs/distrinet/chameleon/fj2/input/fj.g:172:19: '0'\n {\n match('0'); \n\n }\n break;\n case 2 :\n // /Users/marko/git/fj/src/be/kuleuven/cs/distrinet/chameleon/fj2/input/fj.g:172:25: '1' .. '9' ( '0' .. '9' )*\n {\n matchRange('1','9'); \n // /Users/marko/git/fj/src/be/kuleuven/cs/distrinet/chameleon/fj2/input/fj.g:172:34: ( '0' .. '9' )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( ((LA3_0>='0' && LA3_0<='9')) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/marko/git/fj/src/be/kuleuven/cs/distrinet/chameleon/fj2/input/fj.g:172:34: '0' .. '9'\n \t {\n \t matchRange('0','9'); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n\n }\n\n // /Users/marko/git/fj/src/be/kuleuven/cs/distrinet/chameleon/fj2/input/fj.g:172:45: ( IntegerTypeSuffix )?\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0=='L'||LA5_0=='l') ) {\n alt5=1;\n }\n switch (alt5) {\n case 1 :\n // /Users/marko/git/fj/src/be/kuleuven/cs/distrinet/chameleon/fj2/input/fj.g:172:45: IntegerTypeSuffix\n {\n mIntegerTypeSuffix(); \n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final void mDECIMAL_LITERAL() throws RecognitionException {\n try {\n int _type = DECIMAL_LITERAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:1168:17: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( INTEGER_TYPE_SUFFIX )? )\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:1168:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( INTEGER_TYPE_SUFFIX )?\n {\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:1168:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0=='0') ) {\n alt4=1;\n }\n else if ( ((LA4_0>='1' && LA4_0<='9')) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n }\n switch (alt4) {\n case 1 :\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:1168:20: '0'\n {\n match('0'); \n\n }\n break;\n case 2 :\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:1168:26: '1' .. '9' ( '0' .. '9' )*\n {\n matchRange('1','9'); \n // src/main/java/pl/ncdc/differentia/antlr/Java.g:1168:35: ( '0' .. '9' )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( ((LA3_0>='0' && LA3_0<='9')) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // src/main/java/pl/ncdc/differentia/antlr/Java.g:1168:35: '0' .. '9'\n \t {\n \t matchRange('0','9'); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n\n }\n\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:1168:46: ( INTEGER_TYPE_SUFFIX )?\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0=='L'||LA5_0=='l') ) {\n alt5=1;\n }\n switch (alt5) {\n case 1 :\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:1168:46: INTEGER_TYPE_SUFFIX\n {\n mINTEGER_TYPE_SUFFIX(); \n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final AntlrDatatypeRuleToken ruleNumber() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token this_HEX_0=null;\n Token this_INT_1=null;\n Token this_DECIMAL_2=null;\n Token kw=null;\n Token this_INT_4=null;\n Token this_DECIMAL_5=null;\n\n enterRule(); \n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();\n \n try {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5101:28: ( (this_HEX_0= RULE_HEX | ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? ) ) )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5102:1: (this_HEX_0= RULE_HEX | ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? ) )\n {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5102:1: (this_HEX_0= RULE_HEX | ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? ) )\n int alt93=2;\n int LA93_0 = input.LA(1);\n\n if ( (LA93_0==RULE_HEX) ) {\n alt93=1;\n }\n else if ( ((LA93_0>=RULE_INT && LA93_0<=RULE_DECIMAL)) ) {\n alt93=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 93, 0, input);\n\n throw nvae;\n }\n switch (alt93) {\n case 1 :\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5102:6: this_HEX_0= RULE_HEX\n {\n this_HEX_0=(Token)match(input,RULE_HEX,FOLLOW_RULE_HEX_in_ruleNumber12171); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_HEX_0);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_HEX_0, grammarAccess.getNumberAccess().getHEXTerminalRuleCall_0()); \n \n }\n\n }\n break;\n case 2 :\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5110:6: ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? )\n {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5110:6: ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5110:7: (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )?\n {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5110:7: (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL )\n int alt90=2;\n int LA90_0 = input.LA(1);\n\n if ( (LA90_0==RULE_INT) ) {\n alt90=1;\n }\n else if ( (LA90_0==RULE_DECIMAL) ) {\n alt90=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 90, 0, input);\n\n throw nvae;\n }\n switch (alt90) {\n case 1 :\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5110:12: this_INT_1= RULE_INT\n {\n this_INT_1=(Token)match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleNumber12199); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_INT_1);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_INT_1, grammarAccess.getNumberAccess().getINTTerminalRuleCall_1_0_0()); \n \n }\n\n }\n break;\n case 2 :\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5118:10: this_DECIMAL_2= RULE_DECIMAL\n {\n this_DECIMAL_2=(Token)match(input,RULE_DECIMAL,FOLLOW_RULE_DECIMAL_in_ruleNumber12225); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_DECIMAL_2);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_DECIMAL_2, grammarAccess.getNumberAccess().getDECIMALTerminalRuleCall_1_0_1()); \n \n }\n\n }\n break;\n\n }\n\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5125:2: (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )?\n int alt92=2;\n int LA92_0 = input.LA(1);\n\n if ( (LA92_0==46) ) {\n int LA92_1 = input.LA(2);\n\n if ( ((LA92_1>=RULE_INT && LA92_1<=RULE_DECIMAL)) ) {\n alt92=1;\n }\n }\n switch (alt92) {\n case 1 :\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5126:2: kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL )\n {\n kw=(Token)match(input,46,FOLLOW_46_in_ruleNumber12245); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current.merge(kw);\n newLeafNode(kw, grammarAccess.getNumberAccess().getFullStopKeyword_1_1_0()); \n \n }\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5131:1: (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL )\n int alt91=2;\n int LA91_0 = input.LA(1);\n\n if ( (LA91_0==RULE_INT) ) {\n alt91=1;\n }\n else if ( (LA91_0==RULE_DECIMAL) ) {\n alt91=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 91, 0, input);\n\n throw nvae;\n }\n switch (alt91) {\n case 1 :\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5131:6: this_INT_4= RULE_INT\n {\n this_INT_4=(Token)match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleNumber12261); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_INT_4);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_INT_4, grammarAccess.getNumberAccess().getINTTerminalRuleCall_1_1_1_0()); \n \n }\n\n }\n break;\n case 2 :\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5139:10: this_DECIMAL_5= RULE_DECIMAL\n {\n this_DECIMAL_5=(Token)match(input,RULE_DECIMAL,FOLLOW_RULE_DECIMAL_in_ruleNumber12287); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_DECIMAL_5);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_DECIMAL_5, grammarAccess.getNumberAccess().getDECIMALTerminalRuleCall_1_1_1_1()); \n \n }\n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n\n \tmyHiddenTokenState.restore();\n\n }\n return current;\n }", "public final void mDECIMAL_LITERAL() throws RecognitionException {\n try {\n int _type = DECIMAL_LITERAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:874:17: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( INTEGER_TYPE_SUFFIX )? )\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:874:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( INTEGER_TYPE_SUFFIX )?\n {\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:874:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0=='0') ) {\n alt4=1;\n }\n else if ( ((LA4_0>='1' && LA4_0<='9')) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n }\n switch (alt4) {\n case 1 :\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:874:20: '0'\n {\n match('0'); \n\n }\n break;\n case 2 :\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:874:26: '1' .. '9' ( '0' .. '9' )*\n {\n matchRange('1','9'); \n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:874:35: ( '0' .. '9' )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( ((LA3_0>='0' && LA3_0<='9')) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:874:35: '0' .. '9'\n \t {\n \t matchRange('0','9'); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n\n }\n\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:874:46: ( INTEGER_TYPE_SUFFIX )?\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0=='L'||LA5_0=='l') ) {\n alt5=1;\n }\n switch (alt5) {\n case 1 :\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:874:46: INTEGER_TYPE_SUFFIX\n {\n mINTEGER_TYPE_SUFFIX(); \n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "@Test\n public void testLiteralDecimal() throws ExpressionFormatException {\n CppParser parser = new CppParser();\n \n assertThat(parser.lex(\"14.4\"), is(new CppToken[] {new LiteralToken(0, 4, 14.4)}));\n }", "public final void mRULE_DECIMAL_LITERAL() throws RecognitionException {\n try {\n int _type = RULE_DECIMAL_LITERAL;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalParser.g:29984:22: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( RULE_INTEGER_TYPE_SUFFIX )? )\n // InternalParser.g:29984:24: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( RULE_INTEGER_TYPE_SUFFIX )?\n {\n // InternalParser.g:29984:24: ( '0' | '1' .. '9' ( '0' .. '9' )* )\n int alt11=2;\n int LA11_0 = input.LA(1);\n\n if ( (LA11_0=='0') ) {\n alt11=1;\n }\n else if ( ((LA11_0>='1' && LA11_0<='9')) ) {\n alt11=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 11, 0, input);\n\n throw nvae;\n }\n switch (alt11) {\n case 1 :\n // InternalParser.g:29984:25: '0'\n {\n match('0'); \n\n }\n break;\n case 2 :\n // InternalParser.g:29984:29: '1' .. '9' ( '0' .. '9' )*\n {\n matchRange('1','9'); \n // InternalParser.g:29984:38: ( '0' .. '9' )*\n loop10:\n do {\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( ((LA10_0>='0' && LA10_0<='9')) ) {\n alt10=1;\n }\n\n\n switch (alt10) {\n \tcase 1 :\n \t // InternalParser.g:29984:39: '0' .. '9'\n \t {\n \t matchRange('0','9'); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop10;\n }\n } while (true);\n\n\n }\n break;\n\n }\n\n // InternalParser.g:29984:51: ( RULE_INTEGER_TYPE_SUFFIX )?\n int alt12=2;\n int LA12_0 = input.LA(1);\n\n if ( (LA12_0=='L'||LA12_0=='U'||LA12_0=='l'||LA12_0=='u') ) {\n alt12=1;\n }\n switch (alt12) {\n case 1 :\n // InternalParser.g:29984:51: RULE_INTEGER_TYPE_SUFFIX\n {\n mRULE_INTEGER_TYPE_SUFFIX(); \n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final AntlrDatatypeRuleToken ruleNumber() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token this_HEX_0=null;\n Token this_INT_1=null;\n Token this_DECIMAL_2=null;\n Token kw=null;\n Token this_INT_4=null;\n Token this_DECIMAL_5=null;\n\n enterRule(); \n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();\n \n try {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6882:28: ( (this_HEX_0= RULE_HEX | ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? ) ) )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6883:1: (this_HEX_0= RULE_HEX | ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? ) )\n {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6883:1: (this_HEX_0= RULE_HEX | ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? ) )\n int alt120=2;\n int LA120_0 = input.LA(1);\n\n if ( (LA120_0==RULE_HEX) ) {\n alt120=1;\n }\n else if ( ((LA120_0>=RULE_INT && LA120_0<=RULE_DECIMAL)) ) {\n alt120=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 120, 0, input);\n\n throw nvae;\n }\n switch (alt120) {\n case 1 :\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6883:6: this_HEX_0= RULE_HEX\n {\n this_HEX_0=(Token)match(input,RULE_HEX,FOLLOW_RULE_HEX_in_ruleNumber15505); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_HEX_0);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_HEX_0, grammarAccess.getNumberAccess().getHEXTerminalRuleCall_0()); \n \n }\n\n }\n break;\n case 2 :\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6891:6: ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? )\n {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6891:6: ( (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )? )\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6891:7: (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL ) (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )?\n {\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6891:7: (this_INT_1= RULE_INT | this_DECIMAL_2= RULE_DECIMAL )\n int alt117=2;\n int LA117_0 = input.LA(1);\n\n if ( (LA117_0==RULE_INT) ) {\n alt117=1;\n }\n else if ( (LA117_0==RULE_DECIMAL) ) {\n alt117=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 117, 0, input);\n\n throw nvae;\n }\n switch (alt117) {\n case 1 :\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6891:12: this_INT_1= RULE_INT\n {\n this_INT_1=(Token)match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleNumber15533); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_INT_1);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_INT_1, grammarAccess.getNumberAccess().getINTTerminalRuleCall_1_0_0()); \n \n }\n\n }\n break;\n case 2 :\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6899:10: this_DECIMAL_2= RULE_DECIMAL\n {\n this_DECIMAL_2=(Token)match(input,RULE_DECIMAL,FOLLOW_RULE_DECIMAL_in_ruleNumber15559); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_DECIMAL_2);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_DECIMAL_2, grammarAccess.getNumberAccess().getDECIMALTerminalRuleCall_1_0_1()); \n \n }\n\n }\n break;\n\n }\n\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6906:2: (kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL ) )?\n int alt119=2;\n int LA119_0 = input.LA(1);\n\n if ( (LA119_0==66) ) {\n int LA119_1 = input.LA(2);\n\n if ( ((LA119_1>=RULE_INT && LA119_1<=RULE_DECIMAL)) ) {\n alt119=1;\n }\n }\n switch (alt119) {\n case 1 :\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6907:2: kw= '.' (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL )\n {\n kw=(Token)match(input,66,FOLLOW_66_in_ruleNumber15579); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current.merge(kw);\n newLeafNode(kw, grammarAccess.getNumberAccess().getFullStopKeyword_1_1_0()); \n \n }\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6912:1: (this_INT_4= RULE_INT | this_DECIMAL_5= RULE_DECIMAL )\n int alt118=2;\n int LA118_0 = input.LA(1);\n\n if ( (LA118_0==RULE_INT) ) {\n alt118=1;\n }\n else if ( (LA118_0==RULE_DECIMAL) ) {\n alt118=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 118, 0, input);\n\n throw nvae;\n }\n switch (alt118) {\n case 1 :\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6912:6: this_INT_4= RULE_INT\n {\n this_INT_4=(Token)match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleNumber15595); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_INT_4);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_INT_4, grammarAccess.getNumberAccess().getINTTerminalRuleCall_1_1_1_0()); \n \n }\n\n }\n break;\n case 2 :\n // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:6920:10: this_DECIMAL_5= RULE_DECIMAL\n {\n this_DECIMAL_5=(Token)match(input,RULE_DECIMAL,FOLLOW_RULE_DECIMAL_in_ruleNumber15621); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\tcurrent.merge(this_DECIMAL_5);\n \n }\n if ( state.backtracking==0 ) {\n \n newLeafNode(this_DECIMAL_5, grammarAccess.getNumberAccess().getDECIMALTerminalRuleCall_1_1_1_1()); \n \n }\n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n\n \tmyHiddenTokenState.restore();\n\n }\n return current;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getter para o atributo numero
Integer getNumero() { return (Integer) this.listOfAttributes[PatientAttributes.numero.ordinal()]; }
[ "public int getNumero() {\r\n return numero;\r\n }", "public int getNumero() {\n return numero;\n }", "public Integer getIntegerAttribute();", "int getSingleAttrInt();", "public Number getNumber(String attr) {\n return (Number) super.get(attr);\n }", "public int getValor() {\r\n return miNum;\r\n }", "int getIntAttribute1();", "public Integer getNfeNumero() {\n return nfeNumero;\n }", "int getIntAttribute2();", "public int getNumero() {\n return dado1;\n }", "int getOptionalAttrInt();", "public int getAnioNacimiento()\r\n {\r\n return this.AnioNacimiento;\r\n }", "public String getNumeroPersona() {\n\t\treturn numeroPersona;\n\t}", "public String getTallaNbr() {\n return (String)getAttributeInternal(TALLANBR);\n }", "public java.lang.Long getPeti_numero();", "public int getAnno() {\r\n return anno;\r\n }", "public String getNumeroTelefonico() {\n\t\treturn numeroTelefonico;\n\t}", "public abstract int getAttacco();", "public int getTipoAtaque(){return tipoAtaque;}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "attributeType" element
public void setAttributeType(java.lang.String attributeType) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ATTRIBUTETYPE$4, 0); if (target == null) { target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ATTRIBUTETYPE$4); } target.setStringValue(attributeType); } }
[ "public void setAttributeType(String attributeType);", "public void setAttributeType(final String attributeType);", "public void xsetAttributeType(org.apache.xmlbeans.XmlString attributeType)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ATTRIBUTETYPE$4, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(ATTRIBUTETYPE$4);\n }\n target.set(attributeType);\n }\n }", "public void setAttributeType(String attributeType) {\n this.attributeType = attributeType;\n }", "public void setAttrType(String attrType) {\n this.attrType = attrType == null ? null : attrType.trim();\n }", "public void setAttributeType(PersonAttributeType attributeType) {\n this.attributeType = attributeType;\n }", "public String getAttributeType() {\n return this.attributeType;\n }", "public void setType(final String type) {\n setAttribute(ATTRIBUTE_TYPE, type);\n }", "public void alterType(AttrType newType) { type = newType; }", "public String getAttrType() {\n return attrType;\n }", "public void setType(String value) {\n setAttributeInternal(TYPE, value);\n }", "void setAttributeTypeDisplayName(com.microsoft.schemas.xrm._2013.metadata.AttributeTypeDisplayName attributeTypeDisplayName);", "public void setStrAttribType(String strAttribType) {\r\n\t\tthis.strAttribType = strAttribType;\r\n\t}", "public void setDataType(final Class<? extends AttributeDescription> dataType);", "public final void rule__XAttributeType__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:2970:1: ( ( 'attributeType' ) )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:2971:1: ( 'attributeType' )\n {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:2971:1: ( 'attributeType' )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:2972:1: 'attributeType'\n {\n before(grammarAccess.getXAttributeTypeAccess().getAttributeTypeKeyword_0()); \n match(input,60,FOLLOW_60_in_rule__XAttributeType__Group__0__Impl6275); \n after(grammarAccess.getXAttributeTypeAccess().getAttributeTypeKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void setAttributeTypeEnum(com.mendix.systemwideinterfaces.core.IContext context, mxmodelreflection.proxies.PrimitiveTypes attributetypeenum)\n\t{\n\t\tif (attributetypeenum != null) {\n\t\t\tgetMendixObject().setValue(context, MemberNames.AttributeTypeEnum.toString(), attributetypeenum.toString());\n\t\t} else {\n\t\t\tgetMendixObject().setValue(context, MemberNames.AttributeTypeEnum.toString(), null);\n\t\t}\n\t}", "public final void rule__OseeDsl__AttributeTypesAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8936:1: ( ( ruleXAttributeType ) )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8937:1: ( ruleXAttributeType )\n {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8937:1: ( ruleXAttributeType )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8938:1: ruleXAttributeType\n {\n before(grammarAccess.getOseeDslAccess().getAttributeTypesXAttributeTypeParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleXAttributeType_in_rule__OseeDsl__AttributeTypesAssignment_1_218025);\n ruleXAttributeType();\n\n state._fsp--;\n\n after(grammarAccess.getOseeDslAccess().getAttributeTypesXAttributeTypeParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setAttchType(String value) {\r\n setAttributeInternal(ATTCHTYPE, value);\r\n }", "public final void rule__AttributeTypeRestriction__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8451:1: ( ( 'attributeType' ) )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8452:1: ( 'attributeType' )\n {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8452:1: ( 'attributeType' )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8453:1: 'attributeType'\n {\n before(grammarAccess.getAttributeTypeRestrictionAccess().getAttributeTypeKeyword_2()); \n match(input,60,FOLLOW_60_in_rule__AttributeTypeRestriction__Group__2__Impl17077); \n after(grammarAccess.getAttributeTypeRestrictionAccess().getAttributeTypeKeyword_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An interface implemented by animatable elements. Copyright Enough Software 2008
public interface Animatable { /** * Animates this element. * Subclasses can override this method to create animations. * The default implementation animates the background and the item view if present. * * @param currentTime the current time in milliseconds * @param repaintRegion the repaint area that needs to be updated when this item is animated * @see Item#addRelativeToContentRegion(ClippingRegion, int, int, int, int) */ void animate( long currentTime, ClippingRegion repaintRegion); }
[ "interface Animation { public void animate(); }", "public interface Animated {\r\n\r\n\t/**\r\n\t * Reset the animation state of this object\r\n\t */\r\n\tvoid reset();\r\n\r\n\t/**\r\n\t * Rewind the animation to the beginning\r\n\t */\r\n\tvoid rewind();\r\n\r\n\t/**\r\n\t * Pause the animation\r\n\t * @param paused\r\n\t */\r\n\tvoid setPaused(boolean paused);\r\n\r\n\t/**\r\n\t * Is the animation paused?\r\n\t * @return boolean\r\n\t */\r\n\tboolean isPaused();\r\n\r\n\t/**\r\n\t * Sets the current loop counter\r\n\t * @param i\r\n\t */\r\n\tvoid setLoop(int i);\r\n\r\n\t/**\r\n\t * Get the current loop counter\r\n\t * @return the current loop counter\r\n\t */\r\n\tint getLoop();\r\n\r\n\t/**\r\n\t * Add a value to the loop counter\r\n\t * @param d\r\n\t */\r\n\tvoid addLoop(int d);\r\n\r\n\t/**\r\n\t * Sets the current \"event\" state\r\n\t * @param id The event ID\r\n\t */\r\n\tvoid setEvent(int id);\r\n\r\n\t/**\r\n\t * @return the current \"event\" state\r\n\t */\r\n\tint getEvent();\r\n\r\n\t/**\r\n\t * Sets the current animation. The new animation is {@link #rewind()ed}, meaning it gets reset and ticked once.\r\n\t * @param animation The new animation to use\r\n\t */\r\n\tvoid setAnimation(Animation animation);\r\n\r\n\t/**\r\n\t * Gets the current animation\r\n\t * @return an Animation, or null\r\n\t */\r\n\tAnimation getAnimation();\r\n\r\n\t/**\r\n\t * Sets the current sequence number\r\n\t * @param seq The new sequence number\r\n\t */\r\n\tvoid setSequence(int seq);\r\n\r\n\t/**\r\n\t * Sets the current tick\r\n\t * @param tick The new tick\r\n\t */\r\n\tvoid setTick(int tick);\r\n\r\n\t/**\r\n\t * Deactivate the target. It will no longer animate.\r\n\t */\r\n\tvoid deactivate();\r\n\r\n\t/**\r\n\t * @return the current sequence\r\n\t */\r\n\tint getSequence();\r\n\r\n\t/**\r\n\t * @return the current tick\r\n\t */\r\n\tint getTick();\r\n\r\n\t/**\r\n\t * Fires an \"event\" to the Animated thing\r\n\t * @param event The event \"id\"\r\n\t */\r\n\tvoid eventReceived(int event);\r\n\r\n\t/**\r\n\t * Tick. Call this every frame to animate the animated thing.\r\n\t */\r\n\tvoid tick();\r\n\r\n\t/**\r\n\t * @return the current childXOffset\r\n\t */\r\n\tfloat getChildXOffset();\r\n\r\n\t/**\r\n\t * Sets the current childXOffset - for positioning additional sprites or emitters to a point in a sprite anim\r\n\t * @param childXOffset The childXOffset\r\n\t */\r\n\tvoid setChildXOffset(float childXOffset);\r\n\r\n\t/**\r\n\t * @return the current childYOffset\r\n\t */\r\n\tfloat getChildYOffset();\r\n\r\n\t/**\r\n\t * Sets the current childYOffset - for positioning additional sprites or emitters to a point in a sprite anim\r\n\t * @param childYOffset The childYOffset\r\n\t */\r\n\tvoid setChildYOffset(float childYOffset);\r\n\r\n\t/**\r\n\t * Push the current animation and sequence number onto a stack\r\n\t */\r\n\tvoid pushSequence();\r\n\r\n\t/**\r\n\t * Pop the current sequence number and animation from the stack\r\n\t */\r\n\tvoid popSequence();\r\n\r\n\t/**\r\n\t * Sets the {@link FrameList} to use.\r\n\t * @param frameList the frameList, or null to clear\r\n\t */\r\n\tvoid setFrameList(ResourceArray frameList);\r\n\r\n\t/**\r\n\t * @return the {@link FrameList} in use, or null if none is in use currently\r\n\t */\r\n\tResourceArray getFrameList();\r\n\r\n\tint getFrame();\r\n\r\n\tboolean setFrame(int newFrame);\r\n}", "public abstract Animation customizeAnimation();", "public interface Animation {\n\n /**\n * gives the caller access to the start field of the animation class.\n *\n * @return the class' start field\n */\n AnimationFrame getStart();\n\n /**\n * gives the caller access to the end field of the animation class.\n *\n * @return the class' end field\n */\n AnimationFrame getEnd();\n}", "public interface Animation {\n\t/**\n\t * Returns the texture for the current frame of the animation\n\t */\n\tpublic String getFrame();\n\t\n\t/**\n\t * Returns the animation this animation is running(?) may not need to be public\n\t */\n\tpublic Animation getAnimation();\n\t\n\t/**\n\t * Returns all the frames for this animation\n\t */\n\tAnimation[] getFrames();\n}", "protected abstract Animation getAnimation();", "public abstract Animation getAnimation();", "Animation getAnimation();", "public interface SVGAnimatedTransformList\n{\n\n public abstract SVGTransformList getBaseVal();\n\n public abstract SVGTransformList getAnimVal();\n}", "public interface GraphicObjectSpecificAnimation {\n\t/**\n\t * Get the graphic object types on which the animator works.\n\t * \n\t * @return an array of the supported types\n\t */\n\tpublic String[] getSupportedTypes();\n}", "protected abstract void animationLogicTemplate();", "@Override\n public void animate() {\n }", "protected abstract AnimationItem[] getAnimationItems();", "public interface IAnimationController {\n\n /**\n * This method should start the animation using the provided model.\n */\n void start();\n\n /**\n * Retrieve the log from this controller.\n *\n * @return The log of this controller\n * @throws UnsupportedOperationException Throws exception if the controller does not support the\n * functionality\n */\n Appendable getLog();\n\n /**\n * Retrieve the timer from this controller.\n * @return The timer of this controller\n * @throws UnsupportedOperationException Throws exception if the controller does not support the\n * functionality\n */\n Timer getTimer();\n\n /**\n * Retrieves the tempo of the controller.\n * @return tempo used by controller\n * @throws UnsupportedOperationException Throws exception if the controller does not support the\n * functionality\n */\n double getTempo();\n\n\n}", "public abstract Animation getAttackAnimation();", "Animation createAnimation();", "public interface AnimatedObject {\n\n /**\n * Get the shape as it would be animated at given time. If time doesn't map to a command interval\n * return null.\n *\n * @param time time frame\n * @return shape as it would be animated at given time or null\n * @throws IllegalArgumentException if time is negative\n */\n Shape getShape(int time) throws IllegalArgumentException;\n\n /**\n * Adds a animation command to the collection of commands on a animated object based off of its\n * start time.\n *\n * @param command command object\n * @throws IllegalArgumentException command is null or if startState of given command doesn't\n * align with endstate of previous commands if they exist.\n */\n void addCommand(AnimatedObjectCommand command) throws IllegalArgumentException;\n\n /**\n * Get all the commands called on a animatedObject.\n *\n * @return all the commands called on a animatedObject\n */\n List<AnimatedObjectCommand> getCommands();\n\n /**\n * Returns the base shape that this animatedObject is associated with.\n *\n * @return - the shape that this animatedObject is tied with\n */\n Shape getBaseShape();\n\n}", "public MyAnimation getSprite();", "public AnimateCSSImpl getAnimatable()\n {\n return animatable;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the status by user ID of this pathology data.
@Override public long getStatusByUserId() { return _pathologyData.getStatusByUserId(); }
[ "@Override\n\tpublic java.lang.String getStatusByUserUuid() {\n\t\treturn _pathologyData.getStatusByUserUuid();\n\t}", "@Override\n\tpublic long getStatusByUserId();", "@Override\n\tpublic java.lang.String getStatusByUserName() {\n\t\treturn _pathologyData.getStatusByUserName();\n\t}", "@Override\n\tpublic long getStatusByUserId() {\n\t\treturn model.getStatusByUserId();\n\t}", "@Override\n public long getStatusByUserId() {\n return _person.getStatusByUserId();\n }", "public Integer getUserStatus() {\n return userStatus;\n }", "@Override\n\tpublic String getStatusByUserUuid() {\n\t\treturn model.getStatusByUserUuid();\n\t}", "@Override\n\tpublic String getStatusByUserName() {\n\t\treturn model.getStatusByUserName();\n\t}", "public Integer getUserStatus() {\n\t\treturn userStatus;\n\t}", "public String getUserStatus() {\n return userStatus;\n }", "public java.lang.String getUserStatus() {\r\n return userStatus;\r\n }", "@Override\n\tpublic String getStatusByUserUuid();", "public String get_status_userid (String userid) throws SQLException {\r\n\t\t\r\n\t\tResultSet pengguna = get_user_userid(userid);\r\n\r\n\t\tif(pengguna != null){\r\n\t\t\treturn pengguna.getString(\"STATUS_AKTIF\");\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public java.lang.String getUserStatus() {\n return userStatus;\n }", "@Override\n\tpublic long getStatusByUserId() {\n\t\treturn _announcement.getStatusByUserId();\n\t}", "@Override\n\tpublic long getUserId() {\n\t\treturn _pathologyData.getUserId();\n\t}", "private long getStatus(Connection conn, long userId, int projectTypeId) throws RowNotFoundException {\r\n return selectLong(conn,\r\n \"rboard_user\",\r\n \"status_id\",\r\n new String[]{\"user_id\", \"project_type_id\"},\r\n new String[]{String.valueOf(userId), String.valueOf(projectTypeId)}).intValue();\r\n }", "@Override\n public java.lang.String getStatusByUserName() {\n return _person.getStatusByUserName();\n }", "@Override\n\tpublic long getStatusByUserId() {\n\t\treturn _editionGallery.getStatusByUserId();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.
public void setHealthCheckEnabled(Boolean healthCheckEnabled) { this.healthCheckEnabled = healthCheckEnabled; }
[ "public Boolean isHealthCheckEnabled() {\n return this.healthCheckEnabled;\n }", "public Boolean getHealthCheckEnabled() {\n return this.healthCheckEnabled;\n }", "@JsonIgnore\n public boolean isMigrationHealthinessThresholdSet() { return isSet.contains(\"migrationHealthinessThreshold\"); }", "public boolean isHealthCheckUsed() {\n return healthCheckUsed;\n }", "private boolean isEnabled() {\n try {\n Configuration configuration = configurationAdmin.getConfiguration(Configurations.NODE, null);\n Dictionary<String, Object> properties = configuration.getProperties();\n if (properties != null) {\n String value = properties.get(Constants.CATEGORY + Configurations.SEPARATOR + Configurations.LISTENER).toString();\n return Boolean.parseBoolean(value);\n }\n } catch (Exception e) {\n LOGGER.warn(\"CELLAR BUNDLE: can't check listener configuration\", e);\n }\n return false;\n }", "public boolean getHasCustomHealth() {\n return this.hasCustomHealth;\n }", "boolean isMonitoringEnabled();", "@Override\n public HealthResult healthCheck()\n {\n return HealthResult.RESULT_HEALTHY;\n }", "public boolean isConfigurationCheckerEnabled() {\n return Boolean.TRUE.equals(data.get(IS_CONFIGURATION_CHECKER_ENABLED));\n }", "boolean hasIngressStats();", "public boolean isEnabled() {\n return metricsEnabled;\n }", "@MBeanAttribute(name = \"getStoreHealth\", description = \"Gets the message stores health status\")\n boolean getStoreHealth();", "boolean hasBonusPercentHP();", "public void setHasCustomHealth(boolean bool) {\n this.hasCustomHealth = bool;\n }", "public void checkEnabled() throws FHIROperationException {\n boolean enabled = ConfigurationFactory.getInstance().enabled();\n if (!enabled) {\n throw buildExceptionWithIssue(\"The bulkdata feature is disabled for this server or tenant\", IssueType.FORBIDDEN);\n }\n }", "public boolean isHealthVisible() {\n\t\treturn _showHealth;\n\t}", "public boolean getMonitoringEnabledStatsServer();", "boolean isTargetStatistic();", "public boolean isSupportsFirewallRules() throws CloudException, InternalException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The implementation of Runnable interface. After connected and received process, the receiver determine which class the process is, then send a signal to the client to tell if the migration succeed.
public void run() { try { ObjectInputStream in = new ObjectInputStream(clientSocket.getInputStream()); DataOutputStream out = new DataOutputStream(clientSocket.getOutputStream()); Object object = in.readObject(); MigratableProcess process = null; if(object instanceof MigratableProcess){ process = (MigratableProcess)object; process.migrated(); out.writeBoolean(true); ProcessManager.getInstance().startProcess(process); } else { out.writeBoolean(false); } in.close(); out.close(); clientSocket.close(); } catch (IOException e) { System.out.println("processing client request error"); } catch (ClassNotFoundException e) { System.out.println("client sent unrecognized object"); } }
[ "public interface MigratableProcess extends Runnable, Serializable{\n\n\tpublic void suspend();\n}", "public void migrate(int id) {\r\n\t\tSlaveInfo worker = idToSlave.get(id);\r\n\t\tif (worker == null) {\r\n\t\t\tSystem.out.println(\"Incorrect process id\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t/*\r\n\t\t\t * Send message to the slave that is currently executing the task,\r\n\t\t\t * let it stop and send back the task.\r\n\t\t\t */\r\n\t\t\tSocket socket = new Socket(worker.getHostName(), worker.getPort());\r\n\t\t\tProcessMessage message = new ProcessMessage(id, null,\r\n\t\t\t\t\tMessage.MIGRATE);\r\n\t\t\tObjectOutputStream out = new ObjectOutputStream(\r\n\t\t\t\t\tsocket.getOutputStream());\r\n\t\t\tout.writeObject(message);\r\n\t\t\tObjectInputStream in = new ObjectInputStream(\r\n\t\t\t\t\tsocket.getInputStream());\r\n\t\t\tObject o = in.readObject();\r\n\t\t\tsocket.close();\r\n\r\n\t\t\tif (o instanceof ProcessMessage) {\r\n\t\t\t\tProcessMessage p = (ProcessMessage) o;\r\n\t\t\t\tif (p.getMessage() == Message.FINISHED) {\r\n\t\t\t\t\tSystem.out.println(\"The execution of the given task is \"\r\n\t\t\t\t\t\t\t+ \"already finished and thus cannot be migrated\");\r\n\t\t\t\t\tthis.remove(id);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * Migrate the task to a new worker to execute\r\n\t\t\t */\r\n\t\t\tMigratableProcess toMigrate = (MigratableProcess) o;\r\n\r\n\t\t\t/*\r\n\t\t\t * Assign the task to the next slave\r\n\t\t\t */\r\n\t\t\tint index = slaves.indexOf(worker);\r\n\t\t\tindex++;\r\n\t\t\tSlaveInfo newWorker = slaves.get(index % slaves.size());\r\n\t\t\tidToSlave.put(id, newWorker);\r\n\r\n\t\t\t/*\r\n\t\t\t * Send the task to the new slave for executing\r\n\t\t\t */\r\n\t\t\tsocket = new Socket(newWorker.getHostName(), newWorker.getPort());\r\n\t\t\tmessage = new ProcessMessage(id, toMigrate, Message.LAUNCH);\r\n\t\t\tSystem.out.println(\"send\");\r\n\t\t\tout = new ObjectOutputStream(socket.getOutputStream());\r\n\t\t\tout.writeObject(message);\r\n\t\t\tsocket.close();\r\n\r\n\t\t} catch (UnknownHostException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void onMigrationMsg(final MigrationMsg msg) {\n migrationMsgExecutor.submit(() -> {\n final long opId = msg.getOperationId();\n final int blockId;\n final boolean ownershipMovedMsgArrivedFirst;\n\n switch (msg.getType()) {\n case OwnershipMovedMsg:\n blockId = msg.getOwnershipMovedMsg().getBlockId();\n\n // Handles the OwnershipAckMsg from the sender that reports an update of a block's ownership.\n migrationManagerFuture.get().ownershipMoved(opId, blockId);\n\n synchronized (migrationMsgArrivedBlockIds) {\n if (migrationMsgArrivedBlockIds.contains(blockId)) {\n migrationMsgArrivedBlockIds.remove(blockId);\n ownershipMovedMsgArrivedFirst = false;\n } else {\n migrationMsgArrivedBlockIds.add(blockId);\n ownershipMovedMsgArrivedFirst = true;\n }\n }\n\n if (!ownershipMovedMsgArrivedFirst) {\n // Handles DataMovedMsg from the sender that reports data migration for a block has been finished successfully\n migrationManagerFuture.get().dataMoved(opId, blockId);\n }\n break;\n\n case DataMovedMsg:\n blockId = msg.getDataMovedMsg().getBlockId();\n final boolean moveDataAndOwnershipTogether = msg.getDataMovedMsg().getMoveOwnershipTogether();\n\n if (moveDataAndOwnershipTogether) {\n // for immutable tables, ET migrates data and ownership of block together\n migrationManagerFuture.get().dataAndOwnershipMoved(opId, blockId);\n\n } else {\n synchronized (migrationMsgArrivedBlockIds) {\n if (migrationMsgArrivedBlockIds.contains(blockId)) {\n migrationMsgArrivedBlockIds.remove(blockId);\n ownershipMovedMsgArrivedFirst = true;\n } else {\n migrationMsgArrivedBlockIds.add(blockId);\n ownershipMovedMsgArrivedFirst = false;\n }\n }\n\n if (ownershipMovedMsgArrivedFirst) {\n // Handles DataMovedMsg from the sender\n // that reports data migration for a block has been finished successfully.\n migrationManagerFuture.get().dataMoved(opId, blockId);\n }\n }\n break;\n\n default:\n throw new RuntimeException(\"Unexpected message: \" + msg);\n }\n return;\n });\n }", "@Override\n public void execute() {\n getReceiver().execute(this);\n }", "public synchronized void onRunning() {\n\n LOG.entering(CLASS_NAME, \"onRunning\");\n\n if (this.driverStatus == DriverStatus.PRE_INIT) {\n this.onInit();\n }\n\n this.clientConnection.send(this.getRunningMessage());\n this.setStatus(DriverStatus.RUNNING);\n\n LOG.exiting(CLASS_NAME, \"onRunning\");\n }", "public void migrate() throws IOException {\n \t\tMigratableProcessWrapper processToMigrate = pr.getLast();\n \t\tsck.getOut().writeObject(processToMigrate.getName());\n \t\tsck.getOut().flush();\n sck.getOut().writeObject(processToMigrate.getProcess());\n \t}", "protected void processDisconnection(){}", "public interface Process extends Remote {\n\t\n\t/**\n\t * This method tells if the process is alive and can participate in leader election.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean isAlive() throws RemoteException;\n\t\n\t/**\n\t * This method tells if the process in a leader in distributed environment.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean isLeader() throws RemoteException;\n\t\n\t/**\n\t * This method gets the logical clock value (random) for this process.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic int getLogicalClock() throws RemoteException;\n\t\n\t/**\n\t * This method gets the process name, given during initialization.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic String getProcessName() throws RemoteException;\n\t\n\t/**\n\t * This method gets called in election to compare the logical clock values.\n\t * @param message\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean inquiry(Message message) throws RemoteException;\n\t\n\t/**\n\t * This method is called to announce victory after the election.\n\t * @param message\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean victory(Message message) throws RemoteException;\n\n}", "public void onSyncStart();", "public void startMigrating();", "@Override\n public void run() {\n try {\n // This thread waits on the event processing thread to die.\n this.processingThread.join();\n\n // Activate a disconnect using the ActionEvent which is used by the disconnect button.\n EventProcessing.this.logger.finest(\"processing thread ended so automatic disconnect is happening\");\n EventProcessing.this.application.actionPerformed(new ActionEvent(Thread.currentThread(), 0,\n Commands.DISCONNECT));\n\n } catch (final InterruptedException e) {\n EventProcessing.this.logger.finest(\"SessionWatchdogThread got interrupted\");\n // This happens when the thread is interrupted by the user pressing the disconnect button.\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\texecutable.feedbackExecutionProcessRunning();\r\n\t\t\t}", "@Override\n public void run() {\n mNativeThread.queueMessage(mMessage);\n }", "@Override\n\tpublic void run() {\n\t\tProtocoleEthernet.envoie(proprietaire, this);\n\t}", "public interface PyTorchProcess extends NativeProcess {\n\n /**\n * Load the model into the process\n * @param modelId the model id\n * @param index the index where the model is stored\n * @param stateStreamer the pytorch state streamer\n * @param listener a listener that gets notified when the loading has completed\n */\n void loadModel(String modelId, String index, PyTorchStateStreamer stateStreamer, ActionListener<Boolean> listener);\n\n /**\n * @return stream of pytorch results\n */\n Iterator<PyTorchResult> readResults();\n\n /**\n * Writes an inference request to the process\n * @param jsonRequest the inference request as json\n * @throws IOException If writing the request fails\n */\n void writeInferenceRequest(BytesReference jsonRequest) throws IOException;\n}", "private void runThread ()\n {\n cb_thread = new Thread (this, \"TcpConnection\");\n cb_thread.setDaemon (true);\n cb_thread.start();\n }", "@Override\n public void run() {\n EventQueue queue = vm.eventQueue();\n while (connected) {\n try {\n EventSet eventSet = queue.remove();\n EventIterator it = eventSet.eventIterator();\n while (it.hasNext()) {\n handleEvent(it.nextEvent());\n }\n eventSet.resume();\n } catch (InterruptedException exc) {\n // Ignore\n } catch (VMDisconnectedException discExc) {\n handleDisconnectedException();\n break;\n }\n }\n }", "void onTcpMaestroConnected();", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tpartnerConn.receive();\n\t\t\t\tString message = partnerConn.getConnBuffer();\n\t\t\t\tif (isCompleteMessage(message)) {\n\t\t\t\t\tsynchronized (completedProcs) {\n\t\t\t\t\t\tcompletedProcs.add(partnerPid);\n\t\t\t\t\t\tcompletedProcs.notifyAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsynchronized (completedProcs) {\n\t\t\t\t\twhile (completedProcs.size() != nProc)\n\t\t\t\t\t\tcompletedProcs.wait();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpartnerConn.send(\"SEND_STATS\");\n\t\t\t\tpartnerConn.receiveObject();\n\t\t\t\tProcStats partnerStats = (ProcStats)partnerConn.getConnObjBuffer();\n\t\t\t\tsynchronized (procStats) {\n\t\t\t\t\tprocStats.put(partnerPid, partnerStats);\n\t\t\t\t\tprocStats.notifyAll();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'monitoring_host' field has been set
public boolean hasMonitoringHost() { return fieldSetFlags()[5]; }
[ "public boolean is_set_host() {\n return this.host != null;\n }", "public boolean isSetAgenthost()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(AGENTHOST$6) != null;\r\n }\r\n }", "public boolean isSetHost() {\r\n return this.host != null;\r\n }", "public boolean isSetHost() {\n return this.host != null;\n }", "public void setMonitoringHost(java.lang.String value) {\n this.monitoring_host = value;\n }", "public boolean is_set_hostname() {\n return this.hostname != null;\n }", "public boolean isSetServerHost() {\r\n return this.serverHost != null;\r\n }", "public boolean isHostValid() {\n return !m_remoteIpField.getText().trim().isEmpty();\n }", "public java.lang.String getMonitoringHost() {\n return monitoring_host;\n }", "public java.lang.String getMonitoringHost() {\n return monitoring_host;\n }", "public boolean hasHost()\n {\n String host = this.smtpProps.getString(KEY_SERVER_HOST,null);\n return !StringTools.isBlank(host)? true : false;\n }", "boolean isMonitoringEnabled();", "boolean isMonitoring();", "public boolean isSetHostname() {\n return this.hostname != null;\n }", "boolean hasHostsKv();", "public argo.avro.MetricDataOld.Builder setMonitoringHost(java.lang.String value) {\n validate(fields()[5], value);\n this.monitoring_host = value;\n fieldSetFlags()[5] = true;\n return this; \n }", "public boolean isConfigured() {\n\t\treturn xmppHost.length() > 0;\n\t}", "public boolean isSetSegmentationHost()\r\n {\r\n return this.segmentationHost != null;\r\n }", "boolean isMonitoringTerminated();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will try to create a file if the given path does not correspond to an existing file.
@SuppressWarnings("unused") private static File createFile(String path) { // open the file File currentFile = new File(path); // check if it is a valid file if (currentFile == null) { System.out.println("Could not create the file"); throw new NullPointerException(); } // hopefully things went perfect return currentFile; }
[ "public static void createFileIfNeeded(String path) throws IOException{\n\t\tif(!fileExists(path)){\n\t\t\tFile file = new File(path);\n\t\t\t// Works for both Windows and Linux\n\t\t\tfile.getParentFile().mkdirs(); \n\t\t\tfile.createNewFile(); \t\t\n\t\t} \t\n\t}", "public static void createFileIfRequired(Path path) {\n try {\n if (path.toFile().exists()) {\n Files.delete(path);\n }\n\n path.toFile().createNewFile();\n } catch (Exception e) {\n List<String> details = new ArrayList<>();\n details.add(\"Name of file path is: \" + path.toString());\n\n CSHRServiceStatus status = CSHRServiceStatus\n .builder()\n .code(StatusCode.FILE_SYSTEM_ERROR.getCode())\n .summary(e.getMessage())\n .detail(details)\n .build();\n\n throw CSHRServiceException\n .builder()\n .cshrServiceStatus(status)\n .build();\n }\n }", "public static void createIfMissing(Path file) throws IOException {\n if (!isFileExists(file)) {\n createFile(file);\n }\n }", "void createFile(String path) throws IOException;", "public static void createFile() {\n try {\n Files.createFile(path);\n Ui.printCreatedNewFile();\n } catch (IOException e) {\n Ui.printCreateFileError();\n }\n }", "private void createIfNotExists() {\n\t\tif (file.exists()) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tfile.createNewFile();\n\t\t\tPluginUtils.log(\"Created \" + getFileName());\n\t\t} catch (Exception e) {\n\t\t\tPluginUtils.log(\"Failed to create file: \" + getFileName(), 2);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void crear(String path) {\r\n\t\tthis.file = new File(path);\r\n\t}", "public void fileExists(){\n try{\n if(!f.exists()){\n f.createNewFile();\n }\n }catch(Exception e){common.Print(e.getMessage(), true);}\n }", "protected void ensurePathExists(String path) {\n\t\tensureExists(path, null, acl, CreateMode.PERSISTENT);\n\t}", "public void createMissingGameFile(String path) {\r\n\t\ttry {\r\n\t\t\tPrintWriter writer = new PrintWriter(new File(path));\t// creates a new game file\r\n\t\t\twriter.close();\r\n\t\t} catch(IOException ex) {\r\n\t\t\tnew Oops().start(new Stage());\r\n\t\t\tnew Lobby().start(window);\r\n\t\t}\r\n\t}", "PathExistence createPathExistence();", "protected void ensurePathExists(String path, final CreateMode flags) {\n\t\tensureExists(path, null, acl, flags);\n\t}", "void createFile(String name, String path);", "private static void createZPathIfNotExists(final ZooKeeper zkClient, final String path) throws Exception {\n if (zkClient.exists(path, false) == null) {\n try {\n ZkUtils.createFullPathOptimistic(zkClient, path, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE,\n CreateMode.PERSISTENT);\n } catch (KeeperException.NodeExistsException e) {\n // Ignore if already exists.\n }\n }\n }", "private static void createFile() {\n\t\ttry {\n\t\t\tboolean newFile = false;\n\n\t\t\tSystem.out.println(\"Is the file exist ? \" + file.exists()); // look\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// real\n\t\t\tSystem.out.println(file.canExecute());\n\t\t\tSystem.out.println(file.canRead());\n\t\t\tSystem.out.println(file.canWrite());\n\t\t\t\n\t\t\tif (!file.exists()) {\n\t\t\t\tnewFile = file.createNewFile(); // maybe create a file!\n\t\t\t}\n\t\t\tSystem.out.println(\"Has a new File been created ? \" + newFile); // already\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// there?\n\t\t\tSystem.out.println(\"Is the File Exists nows ? \" + file.exists()); // look\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// again\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void createFile()\n {\n //Check if file already exists\n try {\n File myObj = new File(\"src/main/java/ex45/exercise45_output.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());// created\n } else {\n System.out.println(\"File already exists.\"); //exists\n }\n //Error check\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public void createFile() {\n try {\n File f = new File(filepath);\n f.getParentFile().mkdirs();\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void createReportPath(String path) {\n\n\t\tFile testDirectory = new File(path);\n\t\tif (!testDirectory.exists()) {\n\t\t\tif (testDirectory.mkdir()) {\n\t\t\t\tSystem.out.println(\"Directory: \" + path + \" is created!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Failed to create directory: \" + path);\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Directory already exists: \" + path);\n\t\t}\n\t}", "public void createFile() {\n File file = new File(String.format(\"%s/%s\", FOLDER_NAME, FILE_NAME));\n boolean isCreated = false;\n try {\n isCreated = file.createNewFile();\n } catch (IOException e) {\n System.out.println(\"Something went wrong: \" + e.getMessage());\n } finally {\n if (isCreated) {\n System.out.println(\"New data file has been created.\");\n } else {\n System.out.println(\"Data file already exist.\");\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Memory read. A generic object is read from it. Virtual method, it has to be overridden in a derived data type.
protected abstract Object read ();
[ "public abstract org.omg.CORBA.Object read_Object();", "public Object read() throws IOException, RecordIOException;", "public Object read() throws IOException {\n int code = 1;\n try {\n code = in.readUnsignedByte();\n } catch (EOFException eof) {\n return null;\n }\n if (code == Type.BYTES.code) {\n return new Buffer(readBytes());\n } else if (code == Type.BYTE.code) {\n return readByte();\n } else if (code == Type.BOOL.code) {\n return readBool();\n } else if (code == Type.INT.code) {\n return readInt();\n } else if (code == Type.LONG.code) {\n return readLong();\n } else if (code == Type.FLOAT.code) {\n return readFloat();\n } else if (code == Type.DOUBLE.code) {\n return readDouble();\n } else if (code == Type.STRING.code) {\n return readString();\n } else if (code == Type.VECTOR.code) {\n return readVector();\n } else if (code == Type.LIST.code) {\n return readList();\n } else if (code == Type.MAP.code) {\n return readMap();\n } else if (code == Type.MARKER.code) {\n return null;\n } else if (50 <= code && code <= 200) { // application-specific typecodes\n return new Buffer(readBytes());\n } else {\n throw new RuntimeException(\"unknown type\");\n }\n }", "@Override\r\n\tprotected Object readObject() throws IOException, SerializeException {\r\n\t\treturn AdvancedDeserializerUtil.readObject(super.readObject());\r\n\t}", "abstract E readRecord();", "@SuppressWarnings(\"unchecked\")\n protected <R> R read(ObjectInput objectInput, Class<R> type) throws ClassNotFoundException, IOException {\n return (R) objectInput.readObject();\n }", "public Object readObject() throws IOException, ClassNotFoundException {\n if (objectInputStream == null) {\n objectInputStream = new ObjectInputStream(byteArrayInputStream);\n }\n return objectInputStream.readObject();\n }", "ReadT createReadT();", "public abstract RPacketBase readFrom(DataInputCustom din) throws IOException;", "<T> T read(BufferObjectDataInput in, int factoryId, int classId) throws IOException {\n Portable portable = createNewPortableInstance(factoryId, classId);\n if (portable != null) {\n int writeVersion = in.readInt();\n int readVersion = findPortableVersion(factoryId, classId, portable);\n DefaultPortableReader reader = createReader(in, factoryId, classId, writeVersion, readVersion);\n portable.readPortable(reader);\n reader.end();\n\n final ManagedContext managedContext = context.getManagedContext();\n return managedContext != null ? (T) managedContext.initialize(portable) : (T) portable;\n }\n GenericRecord genericRecord = readAsGenericRecord(in, factoryId, classId);\n assert genericRecord instanceof PortableGenericRecord;\n return (T) genericRecord;\n }", "public Object readObject() {\n Object fromServer = null;\n\n try {\n fromServer = inputStream.readObject();\n } catch(InvalidClassException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not deserialize the read object!\");\n e.printStackTrace();\n System.exit(1);\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - error reading an object from the socket's input stream!\");\n e.printStackTrace();\n System.exit(1);\n } catch(ClassNotFoundException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - the read object's data type is unknown!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n return fromServer;\n }", "Read createRead();", "public Object readDatum(DataInput in, byte type)\n throws IOException, ExecException;", "public Storable readStorable() throws IOException {\n Storable storable;\n String s = readString();\n\n if (s.equals(\"NULL\"))\n return null;\n\n if (s.equals(\"REF\")) {\n int ref = readInt();\n return (Storable) retrieve(ref);\n }\n\n storable = (Storable) makeInstance(s);\n map(storable);\n storable.read(this);\n return storable;\n }", "void retrieveDataIntoObject(int index, T object);", "public abstract Object deserialize(Object object);", "public T getObject() {\n if (!isDeserialized()) {\n deserializedObject = serializer.deserialize(serializedObject.get());\n }\n return deserializedObject;\n }", "private void readObjectNoData() throws ObjectStreamException {}", "public T caseReads(Reads object)\n {\n return null;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor de Controlador para unir el ModelAgenda y ViewAgenda
public ControllerAgenda(ModelAgenda modelAgenda, ViewAgenda viewAgenda) { this.modelAgenda = modelAgenda; this.viewAgenda = viewAgenda; setActionListener(); initDB(); }
[ "public CadastroAgenda() {\n initComponents();\n }", "public jTAgendaContatos() {\n initComponents();\n desabilitaDados();\n }", "public Agenda() {\n initComponents();\n \n Deshabilitar();\n LlenarTabla();\n \n }", "public Appointment()\r\n {\r\n // cView = new CalendarEventView(\"appointmentView\");\r\n }", "public CadastrarVendaView(MainView context) {\n initComponents();\n this.context = context;\n this.vendaController = new VendaController(new VendaDAO(),new EstoqueDAO());\n this.clienteController = new ClienteController(new ClienteDAO());\n this.produtoController = new ProdutoController(new ProdutoDAO(), new CategoriaDeProdutoDAO(), new TipoDeProdutoDAO(), new EstoqueDAO());\n \n this.arrCliente = clienteController.recuperarTodos();\n this.arrProdutos = produtoController.recuperarTodos();\n \n \n this.arrItems = new ArrayList<>();\n \n this.listaDeProdutos.setModel(modelProdutos);\n this.listaDeCompra.setModel(modelCompras);\n \n updateClientes();\n updateEnderecos();\n updateListaDeCompra();\n updateListaDeProdutos();\n }", "public CalculadoraView() {\n initComponents();\n }", "public ConsultarContatosView() {\n initComponents();\n }", "public AlumnoView() {\n initComponents();\n }", "public NovaVenda() {\n initComponents();\n }", "public CadVenda() {\n initComponents();\n }", "public InventarioControlador() {\n }", "public ControladorFecha() {\r\n\r\n }", "public TodoView() {\n\n\t\tsuper();\n\n\t}", "public AlumnoConsultarView() {\n initComponents();\n }", "public Controlador() {\r\n tresLineas = new Tablero();\r\n }", "public JsfVenda() {\r\n litem = new ArrayList();\r\n }", "public FecharVenda() {\n initComponents();\n }", "public JIFGestaoAgenda() {\n initComponents();\n }", "public PanelAgenda() throws ParseException\r\n\t\t{\r\n\t\tCardLayout gestionnaireCartes = new CardLayout();\r\n\t\tsetLayout(gestionnaireCartes);\r\n\t\tleAgenda = new Agenda();\r\n\t\tleAgenda.ajout(new Evenement(new Date(5, 7, 1741), \"Tourte\", \"Morrowind\"));\r\n\t\tleAgenda.ajout(new Evenement(new Date(13, 4, 2009), \"Terezi\", \"Skaia\"));\r\n\t\tleAgenda.afficherContenu();\r\n\t\tpanelCalendrier = new PanelCalendrier(new modele.Date()); panelCalendrier.setSize(300, 400);\r\n\t\tpanelFormulaire = new PanelFormulaire();\r\n\t\tchControleur = new Controleur(leAgenda, panelFormulaire, panelCalendrier, panelAffichage, this);\r\n\t\tpanelAffichage = new PanelAffichage(new Date(), leAgenda);\r\n\t\tsetLayout(new BoxLayout(this, BoxLayout.X_AXIS));\r\n\t\tadd(panelCalendrier);\r\n\t\tadd(panelFormulaire);\r\n\t\tadd(panelAffichage);\r\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the street1 of this candidate.
@Override public void setStreet1(java.lang.String street1) { _candidate.setStreet1(street1); }
[ "public void setStreet1(String street1) {\n\t\tthis.street1 = street1;\n\t}", "public void setStreetAddress1(String streetAddress1){\r\n\t\tthis.streetAddress1 = streetAddress1;\r\n\t}", "public void setStreetAddress1(String newStreetAddress1) {\r\n\t\t\r\n\t}", "public void setAddress1(final String address1)\n {\n this.address1 = address1;\n }", "public String getStreet1() {\n\t\treturn street1;\n\t}", "public void setAddress1(String address1) {\r\n this.address1 = address1;\r\n }", "public void setAddress1(java.lang.String address1) {\r\n this.address1 = address1;\r\n }", "public void setOfficeStreet1(String officeStreet1);", "public void setAddr1(String addr1) {\r\n this.addr1 = addr1;\r\n }", "@Override\n\tpublic java.lang.String getStreet1() {\n\t\treturn _candidate.getStreet1();\n\t}", "public void setAddress1(java.lang.String address1)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ADDRESS1$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ADDRESS1$0);\r\n }\r\n target.setStringValue(address1);\r\n }\r\n }", "public void setAddress1(java.lang.String address1)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ADDRESS1$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ADDRESS1$0);\n }\n target.setStringValue(address1);\n }\n }", "void setStreet(au.gov.asic.types.StreetType street);", "@Override\n\tpublic void setAddress1(String address1) {\n\t\t_registration.setAddress1(address1);\n\t}", "public String getStreetAddress1(){\r\n\t\treturn streetAddress1;\r\n\t}", "public void setAddressLine1(String addressLine1) {\r\n\t\tthis.addressLine1 = addressLine1;\r\n\t}", "public void setAddressline1(String addressline1) {\n this.addressline1 = addressline1;\n }", "public void setStreet(java.lang.String street)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STREET$26, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STREET$26);\n }\n target.setStringValue(street);\n }\n }", "public void setAddressLine1(String addressLine1) {\n this.addressLine1 = addressLine1;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fade the trigger to imply recording has started
public void fadeTrigger() { speechTrigger.setAlpha(0.5f); }
[ "public void startFadeOut()\n\t{\n\t\tthis.isFadeOut=true;\n\t}", "public void doFlashAnimation() {\n\t\tchain.start();\n\t}", "private void startRecording() {\n\n }", "public void fade() {\n if (scene != 4) {\n // checks whether fade is true\n if (fade == true) {\n\n //begins to degrees the transparency variable by 20\n transparency -= fadeSpeed;\n\n // increment the transparency variable back to normal if fade equeals false\n } else if (transparency < 255) {\n transparency += fadeSpeed;\n }\n\n //determines when to change picture and begin to fade it back in\n if (transparency < fadeBoundary) {\n fade = false;\n\n // changes to next image in the slideshow\n slider = (slider + 1) % slideAmount[scene];\n }\n }\n }", "public void flash() {\n mFlash = true;\n invalidate();\n }", "private void entryAction_main_region_digitalwatch_AlarmFlasher_AlarmFlashOn() {\n\t\ttimer.setTimer(this, 19, 250, false);\n\t\t\n\t\tsCIDisplay.operationCallback.setIndiglo();\n\t}", "public void fadeIn() {\n\t\tfadein = true;\n\t}", "public void startRecording();", "private void record(){\n clear();\n recording = true;\n paused = false;\n playing = false;\n setBtnState();\n recorder = new Recorder(audioFormat);\n new Thread(recorder).start();\n }", "public void flash(){\n phoneCam.setFlashlightEnabled(!flash);\n flash = !flash;\n }", "protected void onCompleteFadeIn() { }", "@Override\n public void postFade() {\n startCapsules();\n heartBeat.startTimer();\n }", "public boolean flashBacklight(int duration) {\n \t\treturn false;\n \t\t// TODO implement flashBacklight\n \t}", "void startRecording();", "void onPreviewStartRecord();", "public void hideTrigger() {\n speechTrigger.setAlpha(0f);\n }", "private void doFadeCompleted() {\r\n\t\tif (onStarmapClicked != null) {\r\n\t\t\tonStarmapClicked.invoke();\r\n\t\t}\r\n\t\tdarkness = 0f;\r\n\t}", "public Fade()\n\t\t{\n\t\t\ttransforms = new GLGroupTransform(color = new Color(0, 0, 0),\n\t\t\t\t\t\t\t\t\t\t\t\tnew GLReset());\n\t\t\tfadeRate = 0.0001f;\n\t\t}", "public void reTrigger() {\n\t\treset();\n\t\tthis.pause(false);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove one or managers from a context. A Context Instance must have at least one manager.
@WebMethod(operationName = "RemoveContextManagers", action = "urn:ContextOperations#RemoveContextManagers") @RequestWrapper(localName = "RemoveContextManagers", targetNamespace = "http://xmlns.oracle.com/irm/rights/wsdl", className = "com.oracle.xmlns.irm.rights.wsdl.RemoveContextManagers") @ResponseWrapper(localName = "RemoveContextManagersResponse", targetNamespace = "http://xmlns.oracle.com/irm/rights/wsdl", className = "com.oracle.xmlns.irm.rights.wsdl.RemoveContextManagersResponse") public void removeContextManagers( @WebParam(name = "context", targetNamespace = "") ContextInstanceRef context, @WebParam(name = "accounts", targetNamespace = "") List<AccountRef> accounts) throws AuthorizationDeniedFault, CannotRemoveManagersFault, UnknownContextFault ;
[ "public void destroy() throws ContextDestroyException;", "public static void clearActiveContext()\n\t{\n\t\tcontext.remove();\n\t}", "public void removeContextStatement(MemStatement st);", "public void destroy() throws org.omg.CosNaming.NamingContextPackage.NotEmpty {\n if (debug)\n dprint(\"destroy \");\n NamingContextDataStore impl = (NamingContextDataStore) this;\n synchronized (impl) {\n if (impl.IsEmpty() == true)\n // The context is empty so it can be destroyed\n impl.Destroy();\n else\n // This context is not empty!\n throw new org.omg.CosNaming.NamingContextPackage.NotEmpty();\n }\n }", "public static void removeRegisteredContexts() {\n\t\tregisteredContexts.clear();\n\t}", "public static void remove() {\n contexts.remove();\n log.finest(\"FHIRRequestContext.remove invoked.\");\n }", "public void EliminarManager() {\n\n\t\tsendSelect(DELETE_SQL_MANAGER);\n\n\t}", "public void unsetPersistenceContextType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PERSISTENCECONTEXTTYPE$6, 0);\n }\n }", "@Override\n public void removeContext(String ctx) {\n msgMgr.removeContext(ctx);\n }", "public void delContextNodes();", "public void depopulateContext(Context ctx) {\n Iterator iter = cl.getAllParameters();\n while (iter.hasNext()) {\n AbstractParameter param = (AbstractParameter) iter.next();\n String ctxKey = param.getContextKey();\n log.debug(\"remove ctx attr: \" + ctxKey + \"=\" + param.getValue());\n ctx.remove(ctxKey);\n }\n }", "private void doRemoveAllocationContext(AllocationContext ctx) {\n if (ctx.getAssemblyContext_AllocationContext() != null) {\n removeAssemblyAllocation(ctx.getAssemblyContext_AllocationContext(), Collections.emptyList());\n }\n }", "public void deactivate() {\n activeContexts.get().remove(this);\n }", "public static void clearContext()\n\t{\n\t\ts_ctx.clear();\n\t}", "public void remove() {\n\t\tProps.getProps().getPropEntityManager().killManagedEntity(this);\n\t}", "public void removeManager(Manager mg)\n {\n try\n {\n managerBll.removeManager(mg);\n }\n catch (SQLException ex)\n {\n ex.printStackTrace();\n }\n }", "void rs2_delete_context(Realsense2Library.rs2_context context);", "private void popContext() {\n getContextsStack().pop();\n }", "protected void removeSelfContextual(Contextual contextual)\n {\n if (this.selfContextuals!=null)\n { this.selfContextuals.remove(contextual);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "BeginModificationDate" element
org.apache.xmlbeans.XmlDateTime xgetBeginModificationDate();
[ "java.util.Calendar getBeginModificationDate();", "void xsetBeginModificationDate(org.apache.xmlbeans.XmlDateTime beginModificationDate);", "org.apache.xmlbeans.XmlDateTime xgetEndModificationDate();", "org.apache.xmlbeans.XmlDateTime xgetBeginCreationDate();", "void setBeginModificationDate(java.util.Calendar beginModificationDate);", "boolean isSetBeginModificationDate();", "org.apache.xmlbeans.XmlDateTime xgetStartExecDate();", "public Date getBeginDate() {\n return (Date) getAttributeInternal(BEGINDATE);\n }", "public Date getBeginDate() {\n return (Date)getAttributeInternal(BEGINDATE);\n }", "void xsetBeginCreationDate(org.apache.xmlbeans.XmlDateTime beginCreationDate);", "org.apache.xmlbeans.XmlDateTime xgetEndCreationDate();", "public DateTime minModificationTime() {\n return this.minModificationTime;\n }", "org.apache.xmlbeans.XmlDate xgetStartDate();", "java.util.Calendar getBeginCreationDate();", "public Date getBeginDate() {\r\n\t\treturn beginDate;\r\n\t}", "void setNilBeginModificationDate();", "org.apache.xmlbeans.XmlDateTime xgetIntervalBegin();", "org.apache.xmlbeans.XmlDate xgetDateStart();", "public Date getModificationDate() {\n\t\treturn modificationDate;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the BasisGNP_cur field.
public void setBasisGNP_cur(typekey.Currency value) { __getInternalInterface().setFieldValue(BASISGNP_CUR_PROP.get(), value); }
[ "private void setBasisGNP_cur(typekey.Currency value) {\n __getInternalInterface().setFieldValue(BASISGNP_CUR_PROP.get(), value);\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.Currency getBasisGNP_cur() {\n return (typekey.Currency)__getInternalInterface().getFieldValue(BASISGNP_CUR_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.Currency getBasisGNP_cur() {\n return (typekey.Currency)__getInternalInterface().getFieldValue(BASISGNP_CUR_PROP.get());\n }", "public void setCur(Integer cur) {\n this.cur = cur;\n }", "public void setCurp(String curp) {\n\t\tthis.curp = curp;\n\t}", "void setCurp(java.lang.String curp);", "public void setBasisGNP(gw.pl.currency.MonetaryAmount value) {\n __getInternalInterface().setFieldValue(BASISGNP_PROP.get(), value);\n }", "public void setBasisGNP(gw.pl.currency.MonetaryAmount value) {\n __getInternalInterface().setFieldValue(BASISGNP_PROP.get(), value);\n }", "public void setCurMoney(BigDecimal curMoney) {\n this.curMoney = curMoney;\n }", "public void setCur_elg_ind(final java.lang.String cur_elg_ind) {\n\t\tthis.cur_elg_ind = cur_elg_ind;\n\t}", "public void setCurPrice(BigDecimal curPrice) {\n this.curPrice = curPrice;\n }", "public void setCdgSIISucur(int cdgSIISucur)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CDGSIISUCUR$16, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CDGSIISUCUR$16);\r\n }\r\n target.setIntValue(cdgSIISucur);\r\n }\r\n }", "public void setCurrentBCurrent(Double currentBCurrent) {\n this.currentBCurrent = currentBCurrent;\n }", "private void setCededPremium_cur(typekey.Currency value) {\n __getInternalInterface().setFieldValue(CEDEDPREMIUM_CUR_PROP.get(), value);\n }", "public void setGrnValue (java.math.BigDecimal grnValue) {\n\t\tthis.grnValue = grnValue;\n\t}", "private void setCededPremiumMarkup_cur(typekey.Currency value) {\n __getInternalInterface().setFieldValue(CEDEDPREMIUMMARKUP_CUR_PROP.get(), value);\n }", "public void updateCurGene(int mid)\n { \n /* [GNPP] you may comment out if not debugging. */\n //gnpp.updateCurGene(mid);\n }", "public void setOcCurPoint(BigDecimal ocCurPoint) {\n this.ocCurPoint = ocCurPoint;\n }", "public void setCededPremium_cur(typekey.Currency value) {\n __getInternalInterface().setFieldValue(CEDEDPREMIUM_CUR_PROP.get(), value);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows an IPH on the feed header menu button.
public void showMenuIph(UserEducationHelper helper) { final ViewRectProvider rectProvider = new ViewRectProvider(mMenuView) { // ViewTreeObserver.OnPreDrawListener implementation. @Override public boolean onPreDraw() { boolean result = super.onPreDraw(); int minRectBottomPosPx = mToolbarHeight + mMenuView.getHeight() / 2; // Notify that the rectangle is hidden to dismiss the popup if the anchor is // positioned too high. if (getRect().bottom < minRectBottomPosPx) { notifyRectHidden(); } return result; } }; int yInsetPx = getResources().getDimensionPixelOffset(R.dimen.iph_text_bubble_menu_anchor_y_inset); HighlightParams params = new HighlightParams(HighlightShape.CIRCLE); params.setCircleRadius(new PulseDrawable.Bounds() { @Override public float getMaxRadiusPx(Rect bounds) { return Math.max(bounds.width(), bounds.height()) / 2.f; } @Override public float getMinRadiusPx(Rect bounds) { return Math.min(bounds.width(), bounds.height()) / 1.5f; } }); helper.requestShowIPH( new IPHCommandBuilder(mMenuView.getContext().getResources(), FeatureConstants.FEED_HEADER_MENU_FEATURE, R.string.ntp_feed_menu_iph, R.string.accessibility_ntp_feed_menu_iph) .setAnchorView(mMenuView) .setDismissOnTouch(false) .setInsetRect(new Rect(0, 0, 0, -yInsetPx)) .setAutoDismissTimeout(5 * 1000) .setViewRectProvider(rectProvider) // Set clipChildren is important to make sure the bubble does not get // clipped. Set back for better performance during layout. .setOnShowCallback(() -> { mContent.setClipChildren(false); mContent.setClipToPadding(false); }) .setOnDismissCallback(() -> { mContent.setClipChildren(true); mContent.setClipToPadding(true); }) .setHighlightParams(params) .build()); }
[ "public void showHeaderIph(UserEducationHelper helper) {\n helper.requestShowIPH(new IPHCommandBuilder(getContext().getResources(),\n FeatureConstants.FEATURE_NOTIFICATION_GUIDE_NTP_SUGGESTION_CARD_HELP_BUBBLE_FEATURE,\n R.string.feature_notification_guide_tooltip_message_ntp_suggestion_card,\n R.string.feature_notification_guide_tooltip_message_ntp_suggestion_card)\n .setAnchorView(mTitleView)\n .build());\n }", "public void showHomeButton(boolean show) {\r\n \t\tImageView headerView = (ImageView) findViewById(R.id.abstract_header_picto_left);\r\n \t\tif (!show) {\r\n \t\t\theaderView.setVisibility(View.GONE);\r\n \t\t} else {\r\n \t\t\theaderView.setOnClickListener(new OnClickListener() {\r\n \r\n \t\t\t\tpublic void onClick(View v) {\r\n // home button\r\n \t\t\t\t\tgoToHome();\r\n \t\t\t\t}\r\n \r\n \t\t\t});\r\n \t\t\theaderView.setVisibility(View.VISIBLE);\r\n \t\t}\r\n \t}", "private void showAddFeed() {\n addfeed.setVisible(true);\n\n if (Preferences.builtfeedsEnabled(getBaseContext())) {\n\n //show built in feeds menu if enabled\n default_feeds.setVisible(true);\n } else {\n\n //show xda menu item\n xda.setVisible(true);\n }\n }", "public void showHeader(boolean show) {}", "void headerDisplayed(Event e);", "private void displayHelpMenu() {\n HelpMenuView helpMenu = new HelpMenuView();\n helpMenu.display();\n }", "private void showFtu() {\n Menu menu = mToolbar.getMenu();\n View view = menu.findItem(R.id.media_route_menu_item).getActionView();\n if (view != null && view instanceof MediaRouteButton) {\n IntroductoryOverlay overlay = new IntroductoryOverlay.Builder(this, mMediaRouteMenuItem)\n .setTitleText(R.string.touch_to_cast)\n .setSingleTime()\n .build();\n overlay.show();\n }\n }", "public void setHeaderShown(boolean doit);", "private void displayUpButton() {\n ActionBar actionBar = this.getSupportActionBar();\n if (actionBar != null) {\n actionBar.setDisplayShowHomeEnabled(true);\n }\n }", "public void showHeader()\n {\n ConstraintLayout masterLayout = findViewById(R.id.master);\n ConstraintLayout header = findViewById(R.id.SublistHeader);\n\n int top = masterLayout.getTop();\n int left = header.getLeft();\n\n TranslateAnimation slide = new TranslateAnimation(left, left, top-300, top);\n slide.setDuration(200);\n slide.setInterpolator(new AccelerateInterpolator());\n\n header.setAlpha(1);\n header.startAnimation(slide);\n\n ImageView back = findViewById(R.id.backButton);\n back.setClickable(true);\n\n return;\n }", "private void printHeader()\n {\n // Creating the header for our menu\n System.out.println(\"------------------------------\");\n System.out.println(\"| Welcome |\");\n System.out.println(\"------------------------------\");\n }", "public void clickOnMyTraderHomeIcon() {\r\n\t\tprint(\"Click on My Trader Home Icon\");\r\n\t\tlocator = Locator.MyTrader.MyTrader_Home.value;\r\n\t\tclickOn(locator);\r\n\t}", "public ImageIcon getHeaderIcon();", "public boolean isHeaderShown();", "private void createHeader(Composite completeComposite) {\r\n\t\tComposite header = new Composite(completeComposite, SWT.NONE);\r\n\t\theader.setLayout(new GridLayout(2, false));\r\n\t\tLabel headline = new Label(header, SWT.NONE);\r\n\t\theadline.setText(\"Mein Profil\");\r\n\t\tButton logOff = new Button(header, SWT.NONE);\r\n\t\tlogOff.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tprivate static final long serialVersionUID = -1877048083214961169L;\r\n\t\t\t/**\r\n\t\t\t * Actionlistener for log-off button\r\n\t\t\t */\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//TODO log-off implementieren\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogOff.setText(\"Ausloggen\");\r\n\r\n\t}", "void onUserHeadClick();", "public void displayMenu(){\n System.out.println(\"\");\n System.out.println(this.title);\n for(int i = 0; i < this.title.length(); i++) System.out.print(\"-\");\n System.out.println(\"\");\n for(int i = 0; i < this.options.length; i++){\n System.out.println((i+1) + \" - \" + this.options[i]);\n }\n }", "public void displayHelpMenuView()\n {\n System.out.println(\"\\nHelp menu selected.\");\n }", "void aboutMenuClicked();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a SPARQL boolean result to the output stream in the specified language/syntax.
public static void write(OutputStream output, boolean result, Lang lang) { Objects.requireNonNull(lang); ResultsWriter.create() .lang(lang) .build() .write(output, result); }
[ "void writeBoolean(boolean value);", "void writeBoolean(boolean v) throws IOException;", "void writeBool(boolean value);", "public void write_boolean(boolean b) {\n this.write_atom(String.valueOf(b));\n }", "void writeBoolean(String name, boolean value);", "private void boollit() throws IOException{\n\t\tif(lex.currentToken() == \"boolit\"){\n\t\t\tswitch(lex.currentLexeme()){\n\t\t\t\tcase \"true\": //output.write(\"true\\n\");break;\n\t\t\t\tcase \"false\": //output.write(\"false\\n\");break;\n\t\t\t}\n\n\t\t\tnextToken1();\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Expected boollit received: \" + lex.currentToken());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void writeBoolean(boolean aBoolean)\n {\n String line;\n //------------\n\n // se obtiene el boolean del String\n line = Boolean.toString(aBoolean);\n line = line + newLine;\n writeLine(line);\n eof = false;\n }", "public Boolean getSparqlFlag() {\n\t\treturn sparqlFlag;\n\t}", "public static void write(OutputStream output, ResultSet resultSet, Lang lang) {\n Objects.requireNonNull(lang);\n ResultsWriter.create()\n .lang(lang)\n .write(output, resultSet);\n }", "public void writeBoolean(final boolean value) throws IOException {\n writeByte((byte) (value ? 1 : 0));\n }", "@Test\n public void testBooleanLiteralFalse2() throws Exception {\n Boolean expected = Boolean.FALSE;\n String sql = \"SELECT {b'false'}\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, expected);\n verifyProperty(constantNode, Expression.TYPE_CLASS_PROP_NAME, DataTypeName.BOOLEAN.name());\n\n verifySql(\"SELECT FALSE\", fileNode);\n }", "public void setSparqlFlag(Boolean sparqlFlag) {\n\t\tthis.sparqlFlag = sparqlFlag;\n\t}", "public final void mBool() throws RecognitionException {\n try {\n int _type = Bool;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Users\\\\Wouter Kwakernaak\\\\sea-of-ql\\\\Waldo9\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:127:5: ( ( 'true' | 'false' ) )\n // C:\\\\Users\\\\Wouter Kwakernaak\\\\sea-of-ql\\\\Waldo9\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:127:7: ( 'true' | 'false' )\n {\n // C:\\\\Users\\\\Wouter Kwakernaak\\\\sea-of-ql\\\\Waldo9\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:127:7: ( 'true' | 'false' )\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0=='t') ) {\n alt5=1;\n }\n else if ( (LA5_0=='f') ) {\n alt5=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 5, 0, input);\n\n throw nvae;\n\n }\n switch (alt5) {\n case 1 :\n // C:\\\\Users\\\\Wouter Kwakernaak\\\\sea-of-ql\\\\Waldo9\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:127:8: 'true'\n {\n match(\"true\"); \n\n\n\n }\n break;\n case 2 :\n // C:\\\\Users\\\\Wouter Kwakernaak\\\\sea-of-ql\\\\Waldo9\\\\QLJava\\\\src\\\\org\\\\uva\\\\sea\\\\ql\\\\parser\\\\antlr\\\\QL.g:127:17: 'false'\n {\n match(\"false\"); \n\n\n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n \t// do for sure before leaving\n }\n }", "public final void mBOOLEAN() throws RecognitionException {\n try {\n int _type = BOOLEAN;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // src/main/java/com/tinkerpop/gremlin/compiler/Gremlin.g:250:5: ( 'true' | 'false' )\n int alt9=2;\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0=='t') ) {\n alt9=1;\n }\n else if ( (LA9_0=='f') ) {\n alt9=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n\n throw nvae;\n }\n switch (alt9) {\n case 1 :\n // src/main/java/com/tinkerpop/gremlin/compiler/Gremlin.g:250:7: 'true'\n {\n match(\"true\"); \n\n\n }\n break;\n case 2 :\n // src/main/java/com/tinkerpop/gremlin/compiler/Gremlin.g:251:7: 'false'\n {\n match(\"false\"); \n\n\n }\n break;\n\n }\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public boolean getBoolean() throws MathLinkException;", "public final void mBOOLEAN() throws RecognitionException {\r\n try {\r\n int _type = BOOLEAN;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\Users\\\\arnold\\\\Documents\\\\grammar\\\\ComaWorkFlow.g:173:8: ( ( 'true' | 'false' ) )\r\n // C:\\\\Users\\\\arnold\\\\Documents\\\\grammar\\\\ComaWorkFlow.g:173:11: ( 'true' | 'false' )\r\n {\r\n // C:\\\\Users\\\\arnold\\\\Documents\\\\grammar\\\\ComaWorkFlow.g:173:11: ( 'true' | 'false' )\r\n int alt13=2;\r\n int LA13_0 = input.LA(1);\r\n\r\n if ( (LA13_0=='t') ) {\r\n alt13=1;\r\n }\r\n else if ( (LA13_0=='f') ) {\r\n alt13=2;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 13, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt13) {\r\n case 1 :\r\n // C:\\\\Users\\\\arnold\\\\Documents\\\\grammar\\\\ComaWorkFlow.g:173:12: 'true'\r\n {\r\n match(\"true\"); \r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:\\\\Users\\\\arnold\\\\Documents\\\\grammar\\\\ComaWorkFlow.g:173:21: 'false'\r\n {\r\n match(\"false\"); \r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "PdfToken makeBoolean(boolean value);", "@Test\n\tpublic void testStreamWriterRDFLang () throws FileNotFoundException, IOException\n\t{\n\t\ttry ( OutputStream out = new FileOutputStream ( \"target/test-stream-writer-rdf-lang.rdf\" ) )\n\t\t{\n\t\t\tStreamRDF writer = StreamRDFWriter.getWriterStream ( out, Lang.RDFXML );\n\t\t\tStreamOps.graphToStream ( model.getGraph (), writer );\n\t\t}\n\t}", "public void println(boolean v) throws IOException\n {\n print(v);\n println();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The readFriendsArray method is responsible for parsing through a JSON array and creating friend objects from each object in the JSON array.
private List<Friend> readFriendsArray(JsonReader reader) throws IOException { List<Friend> allFriends = new ArrayList<>(); reader.beginArray(); while (reader.hasNext()) { allFriends.add(readFriend(reader)); } reader.endArray(); return allFriends; }
[ "private List<Friend> readJsonStreamFriends(InputStream in) throws IOException {\n try (JsonReader reader = new JsonReader(new InputStreamReader(in, \"UTF-8\"))) {\n return readFriendsArray(reader);\n }\n }", "private Friend readFriend(JsonReader reader) throws IOException {\n String firstName = null;\n String lastName = null;\n String email = null;\n\n reader.beginObject();\n while (reader.hasNext()) {\n String name = reader.nextName();\n switch (name) {\n case \"firstName\":\n firstName = reader.nextString();\n break;\n case \"lastName\":\n lastName = reader.nextString();\n break;\n case \"email\":\n email = reader.nextString();\n break;\n default:\n reader.skipValue();\n break;\n }\n }\n reader.endObject();\n// Log.d(TAG, \"FIRST_NAME: \" + firstName);\n// Log.d(TAG, \"LAST_NAME: \" + lastName);\n return new Friend(firstName, lastName, email);\n }", "private void fillFriendsList(){\n // Access friends list\n AccessToken token = AccessToken.getCurrentAccessToken();\n GraphRequest.newMyFriendsRequest(token, new GraphRequest.GraphJSONArrayCallback() {\n @Override\n public void onCompleted(JSONArray objects, GraphResponse response) {\n if (objects != null) {\n try {\n //Create the array of friends\n // Loop through list of friends and insert array of FacebookUser\n Log.d(TAG, objects.length() + \" friends\");\n for (int index = 0; index < objects.length(); index++) {\n Log.d(TAG, \"Friend: \" + objects.getJSONObject(index).getString(\"id\"));\n // Store the friends in a tree as a FacebookUser object\n myList.add(new FacebookUser(objects.getJSONObject(index).getString(\"id\"),\n objects.getJSONObject(index).getString(\"name\")));\n }\n arrayAdapter.notifyDataSetChanged();\n populateCount();\n } catch (JSONException e) {\n System.err.println(\"Error in fillFriendsList() \" + e.getMessage());\n }\n }\n }\n }).executeAsync();\n }", "public static long[] getFriends(String name) {\r\n String line = \"\";\r\n String token = \"\";\r\n String token2 = \"\";\r\n String[] token3 = new String[3];\r\n boolean end = false;\r\n int readMode = 0;\r\n BufferedReader file = null;\r\n boolean file1 = false;\r\n long[] readFriends = new long[200];\r\n long[] friends = null;\r\n int totalFriends = 0;\r\n try {\r\n file = new BufferedReader(new FileReader(\"./Data/characters/\"\r\n + name + \".txt\"));\r\n file1 = true;\r\n } catch (FileNotFoundException fileex1) {\r\n }\r\n\r\n if (file1) {\r\n new File(\"./Data/characters/\" + name + \".txt\");\r\n } else {\r\n return null;\r\n }\r\n try {\r\n line = file.readLine();\r\n } catch (IOException ioexception) {\r\n return null;\r\n }\r\n while (end == false && line != null) {\r\n line = line.trim();\r\n int spot = line.indexOf(\"=\");\r\n if (spot > -1) {\r\n token = line.substring(0, spot);\r\n token = token.trim();\r\n token2 = line.substring(spot + 1);\r\n token2 = token2.trim();\r\n token3 = token2.split(\"\\t\");\r\n switch (readMode) {\r\n case 0:\r\n if (token.equals(\"character-friend\")) {\r\n readFriends[Integer.parseInt(token3[0])] = Long\r\n .parseLong(token3[1]);\r\n totalFriends++;\r\n }\r\n break;\r\n }\r\n } else {\r\n if (line.equals(\"[FRIENDS]\")) {\r\n readMode = 0;\r\n } else if (line.equals(\"[EOF]\")) {\r\n try {\r\n file.close();\r\n } catch (IOException ioexception) {\r\n }\r\n }\r\n }\r\n try {\r\n line = file.readLine();\r\n } catch (IOException ioexception1) {\r\n end = true;\r\n }\r\n }\r\n try {\r\n if (totalFriends > 0) {\r\n friends = new long[totalFriends];\r\n for (int index = 0; index < totalFriends; index++) {\r\n friends[index] = readFriends[index];\r\n }\r\n return friends;\r\n }\r\n file.close();\r\n } catch (IOException ioexception) {\r\n }\r\n return null;\r\n }", "public static Object[] fromJson(JSONArray array) {\n\t\tObject[] objects = new Object[array.length()];\n\t\tfor (int i = 0; i < array.length(); i++) {\n\t\t\tif (array.get(i) instanceof JSONObject) {\n\t\t\t\tobjects[i] = fromJson((JSONObject) array.get(i));\n\t\t\t} else if (array.get(i) instanceof JSONArray) {\n\t\t\t\tobjects[i] = fromJson((JSONArray) array.get(i));\n\t\t\t} else {\n\t\t\t\tobjects[i] = array.get(i);\n\t\t\t}\n\t\t}\n\n\t\tObject[] bioArray = null;\n\t\tif (objects.length > 0) {\n\t\t\tbioArray = (Object[]) Array.newInstance(objects[0].getClass(), objects.length);\n\t\t\tfor (int i = 0; i < bioArray.length; i++) {\n\t\t\t\tbioArray[i] = objects[i];\n\t\t\t}\n\t\t}\n\n\t\treturn bioArray;\n\t}", "private ArrayList<FriendList> readFriendListFromFile(File file) {\r\n ArrayList<FriendList> m = new ArrayList<>();\r\n try {\r\n FileInputStream fileInputStream = new FileInputStream(file);\r\n ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);\r\n\r\n while (true) {\r\n try {\r\n m.add((FriendList) objectInputStream.readObject());\r\n } catch (EOFException e) {\r\n break;\r\n }\r\n }\r\n fileInputStream.close();\r\n objectInputStream.close();\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n return m;\r\n }", "private void handleResponse(GraphResponse response){\n Log.d(LOG_TAG, \"fb graph response: \\n\" + response.toString());\n JSONObject object = response.getJSONObject();\n try {\n JSONArray arrayOfUsersInFriendList = object.getJSONArray(\"data\");\n int numOfFriends = arrayOfUsersInFriendList.length();\n Log.d(LOG_TAG, \"received friends number: \" + numOfFriends);\n for (int i = 0; i < numOfFriends; i++) {\n final Friend friend = new Friend();\n JSONObject user = arrayOfUsersInFriendList.getJSONObject(i);\n String userName = user.getString(\"name\");\n final String friendId = user.getString(\"id\");\n friend.setFbID(friendId);\n friend.setName(userName);\n if (dbHelper.getFriendByFBId(friendId) == null) { // do not download anything if the friend is already in DB\n Log.d(LOG_TAG, \"fb freind name: \" + userName + \" id: \" + friendId);\n if (user.has(\"picture\")) {\n URL profilePicUrl = new URL(user.getJSONObject(\"picture\").getJSONObject(\"data\").getString(\"url\"));\n insertFriendAsync(friend, profilePicUrl);\n }\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Facebook service unavailable\", Toast.LENGTH_LONG).show();\n }\n }", "public void loadFriends() {\n\n SQLiteDatabase db = BlocPartyApplication.getDbHelper().getWritableDatabase();\n\n // query to get all friends with this collection id\n Cursor cursor = db.query(\n \"Friends\",\n new String[] {\"*\"},\n \"collection_id = ?\",\n new String[] {String.valueOf(mId)},\n null,null,null\n );\n\n // get the column ints\n int idColumn = cursor.getColumnIndex(\"_id\");\n int nameColumn = cursor.getColumnIndex(\"name\");\n int uniqueIdColumn = cursor.getColumnIndex(\"unique_id\");\n int networkColumn = cursor.getColumnIndex(\"network\");\n\n while (cursor.moveToNext()) {\n\n // create a new friend object\n Friend friend = new Friend();\n friend.setId(cursor.getLong(idColumn));\n friend.setName(cursor.getString(nameColumn));\n friend.setUniqueId(cursor.getString(uniqueIdColumn));\n friend.setNetwork(cursor.getInt(networkColumn));\n friend.setCollectionId(mId);\n\n // add it to the array list\n mFriends.add(friend);\n }\n\n friendsLoaded = true;\n\n }", "public synchronized boolean getFriends(){\n\t\ttry{\n\t\t\t//open tcp connection and send request\n\t\t\ttcp.openConnection();\n\t\t\tMessage msg = new Message(Message.FRIENDLIST, this.username);\n\t\t\ttcp.getOutput().writeObject(msg.toJson());\n\t\t\ttcp.getOutput().flush();\n\t\t\t//get reply and close connection\n\t\t\tJSONObject jreplyFriends = (JSONObject) tcp.getInput().readObject();\n\t\t\tJSONObject jreplyStats = (JSONObject) tcp.getInput().readObject();\n\t\t\ttcp.closeConnection();\n\t\t\t//get data from reply\n\t\t\tMessage messageFriends = new Message(jreplyFriends);\n\t\t\tMessage messageStats = new Message(jreplyStats);\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONArray friendsArray = (JSONArray) parser.parse(messageFriends.getData());\n\t\t\tJSONArray statsArray = (JSONArray) parser.parse(messageStats.getData());\n\t\t\tIterator<?> i = friendsArray.iterator();\n\t\t\tIterator<?> j = statsArray.iterator();\n\t\t\twhile(i.hasNext() && j.hasNext()){\n\t\t\t\tString name = (String) i.next();\n\t\t\t\tBoolean status = (Boolean) j.next();\n\t\t\t\tthis.friends.put(name, status);\n\t\t\t\tArrayList<String> messages = new ArrayList<String>();\n\t\t\t\tthis.friendMessages.put(name, messages);\n\t\t\t}\n\t\t\treturn true;\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}catch(ClassNotFoundException e){\n\t\t\te.printStackTrace();\n\t\t}catch(ParseException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "private void parsingJson(JSONArray peopleArray, ArrayList<Person> data) {\r\n //parsing and assigning each person's details to variables\r\n for (Object o : peopleArray) {\r\n\r\n JSONObject jsonObj = (JSONObject) o;\r\n String name = (String) jsonObj.get(\"Name\");\r\n long age = (long) jsonObj.get(\"Age\");\r\n String latitude = (String) jsonObj.get(\"Latitude\");\r\n String longitude = (String) jsonObj.get(\"Longitude\");\r\n\r\n //parsing age, latitude and longitude variables from long, string, and string to int, double, and double respectively.\r\n int intAge = Math.toIntExact(age);\r\n double lon = Double.parseDouble(longitude);\r\n double lat = Double.parseDouble(latitude);\r\n\r\n Person node = new Person(name, intAge, lat, lon);\r\n\r\n //add people details into data arraylist\r\n data.add(node);\r\n }\r\n }", "com.vine.vinemars.net.pb.SocialMessage.FriendObj getFriendList(int index);", "public static Person[] deserializePersonArrayObject(String json) {\n var objectPattern = Pattern.compile(\"\\\\{[^{}]*}\");\n var objectMatcher = objectPattern.matcher(json);\n var personArray = new ArrayList<Person>();\n while (objectMatcher.find())\n personArray.add(deserializePersonObject(objectMatcher.group()));\n return personArray.toArray(new Person[0]);\n }", "public FavouritesList read() throws IOException {\n String jsonData = readFile(source);\n JSONObject jsonObject = new JSONObject(jsonData);\n return parseFavouritesList(jsonObject);\n }", "protected void getfriendlist(){\n\n String myfacebookid = DataUtils.getPreference(Const.FACEBOOKID,\"\");\n\n new GraphRequest(\n token,\n //\"/\" + myfacebookid + \"/taggable_friends\", //taggable_friends // friendlists // invitable_friends //excluded_ids //friends\n \"/me/friends\",\n null,\n HttpMethod.GET,\n new GraphRequest.Callback() {\n public void onCompleted(GraphResponse response) {\n /* handle the result */////////////////////////////////////////////////////////////////////\n if (response.getError() != null) {\n // get personal information\n }else {\n try {\n JSONArray rawPhotosData = response.getJSONObject().getJSONArray(\"data\");\n JSONArray useappfriend = new JSONArray();\n for (int j = 0; j < rawPhotosData.length(); j++) {\n //save whatever data you want from the result\n JSONObject photo = new JSONObject();\n photo.put(\"id\", ((JSONObject) rawPhotosData.get(j)).get(\"id\"));\n photo.put(\"name\", ((JSONObject) rawPhotosData.get(j)).get(\"name\"));\n useappfriend.put(photo);\n\n }\n\n String struseappfriend = useappfriend.toString().trim();\n DataUtils.savePreference(Const.USE_APP_FRIENDS, struseappfriend);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n isfriend = 1;\n if(istagglefriend == 1 && islogin == 1){\n gotoReadyPage();\n }\n\n// ////////////////////////////////////////////////////////////////////////////////////////////\n//\n//\n// GraphResponse rep = response;\n// new GraphRequest(\n// token,\n// //\"/\" + myfacebookid + \"/taggable_friends\", //taggable_friends // friendlists // invitable_friends //excluded_ids //friends\n// \"/me/friendlists\",\n// null,\n// HttpMethod.GET,\n// new GraphRequest.Callback() {\n// public void onCompleted(GraphResponse response) {\n// /* handle the result */\n// GraphResponse rep = response;\n//\n// ////////////////////////////////////////////////////////////\n// ////////////////// all facebook users///////////////////////\n//\n// try {\n// JSONObject json = response.getJSONObject();\n//\n// if(json.has(\"data\")){\n// JSONArray rawPhotosData =json.getJSONArray(\"data\");\n// JSONArray facebookfriend = new JSONArray();\n// for(int j=0; j<rawPhotosData.length();j++){\n// //save whatever data you want from the result\n// JSONObject photo = new JSONObject();\n// photo.put(\"id\", ((JSONObject)rawPhotosData.get(j)).get(\"id\"));\n// photo.put(\"name\",((JSONObject)rawPhotosData.get(j)).get(\"name\"));\n// photo.put(\"icon\", ((JSONObject)rawPhotosData.get(j)).get(\"picture\"));\n// facebookfriend.put(photo);\n// }\n// String strfacebookfriend = facebookfriend.toString().trim();\n// DataUtils.savePreference(Const.FACEBOOK_FRIENDS, strfacebookfriend);\n//\n// }else{\n//\n// }\n// } catch (JSONException e) {\n// Toast.makeText(MainActivity.this, e.toString(), Toast.LENGTH_SHORT).show();\n// e.printStackTrace();\n// }\n//\n// // goto setting scrreen.\n// Intent intent = new Intent(MainActivity.this,ReadyActivity.class);\n// startActivity(intent);\n// overridePendingTransition(R.anim.anim_slide_in_right, R.anim.anim_slide_out_left);\n// //\n// finish();\n// ////////////////////////////////////////////////////////////\n// }\n// }\n// ).executeAsync();\n }\n }\n\n ).executeAsync();\n }", "private ArrayList<User> processUserFile(String usersJSONfilename) {\n ArrayList<User> userList = new ArrayList<User>();\n JSONParser parser = new JSONParser();\n\n BufferedReader userFile;\n try {\n userFile = new BufferedReader(new FileReader(usersJSONfilename));\n try {\n while (userFile.ready()) {\n Object obj = parser.parse(userFile.readLine());\n\n JSONObject jsonObject = (JSONObject) obj;\n\n String user_id = (String) jsonObject.get(\"user_id\");\n String name = (String) jsonObject.get(\"name\");\n String url = (String) jsonObject.get(\"url\");\n long reviewCount = (long) jsonObject.get(\"review_count\");\n Double averageStars = (Double) jsonObject.get(\"average_stars\");\n JSONObject listOfVotes = (JSONObject) jsonObject.get(\"votes\");\n\n long funnyVotes = (long) listOfVotes.get(\"funny\");\n long usefulVotes = (long) listOfVotes.get(\"useful\");\n long coolVotes = (long) listOfVotes.get(\"cool\");\n\n User user = new User(user_id, name, url, reviewCount, averageStars, funnyVotes, coolVotes,\n usefulVotes);\n userList.add(user);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n }\n return userList;\n }", "public static long[] getFriends(String name) {\n\t\tString line = \"\";\n\t\tString token = \"\";\n\t\tString token2 = \"\";\n\t\tlong[] readFriends = new long[200];\n\t\tlong[] friends = null;\n\t\tint totalFriends = 0;\n\t\tint index = 0;\n\t\tFile input = new File(\"./Characters/\" + name + \".txt\");\n\t\tif (!input.exists()) {\n\t\t\treturn null;\n\t\t}\n\t\ttry (BufferedReader reader = new BufferedReader(new FileReader(input))) {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tint spot = line.indexOf(\"=\");\n\t\t\t\tif (spot > -1) {\n\t\t\t\t\ttoken = line.substring(0, spot);\n\t\t\t\t\ttoken = token.trim();\n\t\t\t\t\ttoken2 = line.substring(spot + 1);\n\t\t\t\t\ttoken2 = token2.trim();\n\t\t\t\t\tif (token.equals(\"character-friend\")) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treadFriends[index] = Long.parseLong(token2);\n\t\t\t\t\t\t\ttotalFriends++;\n\t\t\t\t\t\t} catch (NumberFormatException nfe) {\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\treader.close();\n\t\t\tif (totalFriends > 0) {\n\t\t\t\tfriends = new long[totalFriends];\n\t\t\t\tfor (int i = 0; i < totalFriends; i++) {\n\t\t\t\t\tfriends[i] = readFriends[i];\n\t\t\t\t}\n\t\t\t\treturn friends;\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "POGOProtos.Rpc.GetFriendsListOutProto.FriendProto getFriend(int index);", "public static void readJSON() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\tString line;\n\t\tif((line = br.readLine()) != null) {\n\t\t\tString [] flightStates = parseJSON(line);\n\t\t\tfor(String state : flightStates) {\n\t\t\t\tFlightState fs = new FlightState(state);\n\t\t\t\tsendToKafka(fs);\n\t\t\t}\n\t\t}\n\t\tbr.close();\n\t}", "public static void loadUsers() throws IOException {\n //loads user list\n Gson gson = new Gson();\n Type usersType = new TypeToken<ArrayList<User>>() {\n }.getType();\n try {\n //populate the \"users\" ArrayList with the data from the JSON file\n users = gson.fromJson(Files.readString(Paths.get(\"./Users.json\")), usersType);\n //System.out.println(\"users:\"+users);\n } catch (IOException ex) {\n ex.printStackTrace();\n\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'var3' field.
public com.dj.model.avro.LargeObjectAvro.Builder setVar3(java.lang.Double value) { validate(fields()[4], value); this.var3 = value; fieldSetFlags()[4] = true; return this; }
[ "public void setVar3(java.lang.Double value) {\n this.var3 = value;\n }", "public void setValue3(String value)\n {\n value3 = value;\n }", "public void setNum3(int value) {\n this.num3 = value;\n }", "public void setField3(java.lang.CharSequence value) {\n this.field3 = value;\n }", "public void setField3(String field3) {\n this.field3 = field3 == null ? null : field3.trim();\n }", "@Override\n\tpublic void setField3(int field3) {\n\t\t_second.setField3(field3);\n\t}", "public void setCampo3(String campo3) {\n\t\tthis.campo3 = campo3;\n\t}", "@Override\n\tpublic void setField3(int field3) {\n\t\tmodel.setField3(field3);\n\t}", "public com.dj.model.avro.LargeObjectAvro.Builder setVar33(java.lang.Integer value) {\n validate(fields()[34], value);\n this.var33 = value;\n fieldSetFlags()[34] = true;\n return this;\n }", "public void setV3(int v3) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt(__io__address + 8, v3);\n\t\t} else {\n\t\t\t__io__block.writeInt(__io__address + 8, v3);\n\t\t}\n\t}", "public void setText3(String text3) {\n this.text3 = text3 == null ? null : text3.trim();\n }", "public com.dj.model.avro.LargeObjectAvro.Builder clearVar3() {\n var3 = null;\n fieldSetFlags()[4] = false;\n return this;\n }", "public void setF3(Integer f3) {\r\n this.f3 = f3;\r\n }", "public void setPos3(String pos3) {\n this.pos3 = pos3;\n }", "public java.lang.Double getVar3() {\n return var3;\n }", "public void setValueThree(BigDecimal valueThree) {\n this.valueThree = valueThree;\n }", "public java.lang.Double getVar3() {\n return var3;\n }", "public void setAttribute3(String value)\n {\n setAttributeInternal(ATTRIBUTE3, value);\n }", "public void setAttr3(String attr3) {\n this.attr3 = attr3;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To be used to call the provider back end to get identifiers. Specifically, this is the helper that handles the case for when a refresh call ran into the corrupt identity id case, either a deleted id or a malformed id. If that happens, this is called, a new id and token are fetched, and the process is resumed.
private String retryRefresh() { // Ensure we get a new id and token setIdentityId(null); token = identityProvider.refresh(); return token; }
[ "protected void createIdTokenForRefreshRequest() {\n\t\tgenerateIdTokenClaims();\n\n\t\taddAtHashToIdToken();\n\n\t\taddCustomValuesToIdTokenForRefreshResponse();\n\n\t\tsignIdToken();\n\n\t\tcustomizeIdTokenSignatureForRefreshResponse();\n\n\t\tencryptIdTokenIfNecessary();\n\t}", "@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by making a call to your backend\n // (Call to your backend)\n\n // Call the update method with updated identityId and token to make sure\n // these are ready to be used from Credentials Provider.\n\n update(identityId, token);\n return token;\n\n }", "String refreshedEntityId();", "private void refreshIdToken() {\n googleSignInClient.silentSignIn()\n .addOnCompleteListener(this, new OnCompleteListener<GoogleSignInAccount>() {\n @Override\n public void onComplete(@NonNull Task<GoogleSignInAccount> task) {\n goToHomeActivity();\n }\n });\n }", "void resetStoredAnonymousId();", "@Override\n public String getIdentityId() {\n\n // Load the identityId from the cache\n// identityId = cachedIdentityId;\n\n if (identityId == null) {\n // Call to your backend\n identityId = mFirebaseRef.getAuth().getUid();\n }\n return identityId;\n }", "protected void startSession() {\n\n // make sure we have an identityId. In the case of cognito identity, \n // the try catch will handle a deleted or corrupted id. \n // Developer authenticated won't throw amazon exceptions, \n // and for 2hop, it will be handled below, as the getId call \n // won't fail since it is set.\n try {\n token = identityProvider.refresh();\n } catch (ResourceNotFoundException rnfe) {\n // If the identity id or identity pool is non-existant, this is thrown\n token = retryRefresh();\n } catch (AmazonServiceException ase) {\n // If it's a corrupt id, then a validation exception is thrown\n if (ase.getErrorCode().equals(\"ValidationException\")) {\n token = retryRefresh();\n }\n else {\n throw ase;\n }\n }\n\n if (useEnhancedFlow) {\n populateCredentialsWithCognito(token);\n } else {\n populateCredentialsWithSts(token);\n }\n\n }", "private void loadRevokedIds() {\n try {\n // read the file contents and populate the local cache.\n BufferedReader reader = new BufferedReader(new FileReader(this.registryFile));\n String id = reader.readLine();\n while (id != null) {\n revokedIds.add(id);\n id = reader.readLine();\n }\n reader.close();\n } catch (IOException ioe) {\n logger.debug(\"Error opening registry file: \" + ioe.getMessage());\n ioe.printStackTrace();\n }\n }", "String getIdentityId();", "public synchronized Identifier getNewIdentifier(String entityName) {\n boolean isToRead = true;\n int identifyValueInt = 0;\n \n if (dbProximity == DB_PROXIMITY_ALWAYS_READ_AND_WRITE) {\n isToRead = true;\n } else {\n Object entityIdObject = idTable.get(entityName);\n if (entityIdObject == null) isToRead = true;\n else {\n de.must.io.Logger.getInstance().debug(getClass(), \"Got Id \" + identifyValueInt + \" from hashtable for \" + entityName);\n identifyValueInt = ((Integer)entityIdObject).intValue();\n isToRead = false;\n }\n }\n\n ResultSet rs = null;\n if (isToRead) try {\n if (selectStatement == null) {\n if (connection.getMetaData().getDatabaseProductName().indexOf(\"Oracle\") > -1) { // dedicated to Oracle CHAR\n selectStatement = connection.prepareStatement(\"select * from \" + idTableName + \" where trim(\" + idEntityColumnName + \") = ?\");\n } else {\n selectStatement = connection.prepareStatement(\"select * from \" + idTableName + \" where \" + idEntityColumnName + \" = ?\");\n }\n }\n selectStatement.setString(1, entityName);\n rs = selectStatement.executeQuery();\n if (rs.next()) {\n mode = UPDATEMODE;\n int identNrInt = rs.getInt(idValueColumnName);\n if (identNrInt > 0) {\n identifyValueInt = identNrInt;\n } else {\n double identNrDouble = rs.getDouble(\"ID_VALUE_COLUMN_NAME\"); // Oracle\n if (identNrDouble > 0) {\n identifyValueInt = (int)identNrDouble;\n } else {\n de.must.io.Logger.getInstance().info(getClass(), \"failed to read IdentNr\");\n }\n }\n de.must.io.Logger.getInstance().debug(getClass(), \"Got Id \" + identifyValueInt + \" from database for \" + entityName);\n }\n else {\n mode = INSERTMODE;\n identifyValueInt = 0;\n }\n }\n catch (SQLException e) {\n de.must.io.Logger.getInstance().info(getClass(), selectStatement);\n de.must.io.Logger.getInstance().error(getClass(), e);\n return null;\n }\n finally {\n if (rs != null) try {\n rs.close();\n } catch (Exception e) {}\n }\n\n identifyValueInt++;\n\n switch (mode) {\n case INSERTMODE:\n if (!insert(identifyValueInt, entityName)) identifyValueInt = ERROR_ID;\n break;\n case UPDATEMODE:\n if (!update(identifyValueInt, entityName)) identifyValueInt = ERROR_ID;\n }\n if (identifyValueInt > 0) idTable.put(entityName, new Integer(identifyValueInt));\n return new Identifier(identifyValueInt);\n }", "@Override\r\n public void onTokenRefresh() {\r\n // Fetch updated Instance ID token and notify our app's server of any changes (if applicable).\r\n Intent intent = new Intent(this, XRegistrationIntentService.class);\r\n startService(intent);\r\n }", "@Bean\n TokenEnhancer idTokenEnhancer() {\n var idTokenEnhancer = new IdTokenGeneratingTokenEnhancer(\n userService, idTokenClaimsEnhancer(), keyPairHolder);\n idTokenEnhancer.setAccessTokenConverter(accessTokenConverter());\n return idTokenEnhancer;\n }", "public void updateIds()\n {\n this.id = Id.create();\n }", "public void onTokenRefresh() {\n // Get updated InstanceID token.\n\n\n\n\n\n\n FirebaseInstanceId.getInstance().getInstanceId()\n .addOnCompleteListener(new OnCompleteListener<InstanceIdResult> () {\n @Override\n public void onComplete(@NonNull Task<InstanceIdResult> task) {\n if (!task.isSuccessful()) {\n Log.w(TAG, \"getInstanceId failed\", task.getException());\n return;\n }\n\n // Get new Instance ID token\n String token = task.getResult().getToken();\n sendRegistrationToServer(token);\n }\n });\n\n }", "private static PlayFabResult<GetPlayFabIDsFromGameCenterIDsResult> privateGetPlayFabIDsFromGameCenterIDsAsync(GetPlayFabIDsFromGameCenterIDsRequest request) throws Exception {\n if (AuthKey == null) throw new Exception (\"Must be logged in to call this method\");\n\n FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + \"/Client/GetPlayFabIDsFromGameCenterIDs\", request, \"X-Authorization\", AuthKey);\n task.run();\n Object httpResult = task.get();\n if(httpResult instanceof PlayFabError) {\n PlayFabError error = (PlayFabError)httpResult;\n if (PlayFabSettings.GlobalErrorHandler != null)\n PlayFabSettings.GlobalErrorHandler.callback(error);\n PlayFabResult result = new PlayFabResult<GetPlayFabIDsFromGameCenterIDsResult>();\n result.Error = error;\n return result;\n }\n String resultRawJson = (String) httpResult;\n \n PlayFabJsonSuccess<GetPlayFabIDsFromGameCenterIDsResult> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<GetPlayFabIDsFromGameCenterIDsResult>>(){}.getType()); \n GetPlayFabIDsFromGameCenterIDsResult result = resultData.data;\n \n PlayFabResult<GetPlayFabIDsFromGameCenterIDsResult> pfResult = new PlayFabResult<GetPlayFabIDsFromGameCenterIDsResult>();\n pfResult.Result = result;\n return pfResult;\n }", "String allocateId() throws SessionStorageException;", "public void getOwnerID() {\n SQLiteDatabase readableDB = dbClient.getReadableDatabase();\n String getOwnerId = \"SELECT ID from owner_id\";\n Cursor response = readableDB.rawQuery(getOwnerId,null);\n if (response.moveToFirst()) {\n String ownerId = response.getString(response.getColumnIndex(\"ID\"));\n subjectInfo.putString(\"owner_id\",ownerId);\n listener.newSubComplete(subjectInfo);\n //addToRemote(subjectInfo);\n } else {\n Random rand = new Random();\n int randID = rand.nextInt(1000000);\n SQLiteDatabase writableDB = dbClient.getWritableDatabase();\n String insertID = \"INSERT INTO owner_id (ID) VALUES ('\"+randID+\"')\";\n writableDB.execSQL(insertID);\n getOwnerID();\n }\n }", "public IdentifiersList listIdentifiers(ResumptionToken resumptionToken) throws OAIException {\n try {\n \tString query = builder.buildListIdentifiersQuery(resumptionToken);\n \tDocument document = reader.read(query);\n return new IdentifiersList(document);\n } catch (ErrorResponseException e) {\n \tthrow e;\n } catch (Exception e) {\n throw new OAIException(e);\n } \n }", "private void fetchOldCalls() {\n fetchCalls(QUERY_OLD_CALLS_TOKEN, false);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new View Type test case with the given name.
public ViewTypeTest(String name) { super(name); }
[ "public static View createView(String name) {\n switch (name.toLowerCase()) {\n case \"svg\":\n return new SVGView();\n case \"text\":\n return new TextView();\n case \"visual\":\n return new VisualView();\n case \"playback\":\n return new PlaybackView();\n default:\n throw new IllegalArgumentException(\"unknown name given to factory!\");\n }\n }", "public IViews create(String viewName) {\n ReadOnlyModel model = new ReadOnlyModel(this.model);\n switch (viewName) {\n case \"text\" : return new TextView(model, this.tempo);\n case \"visual\": return new VisualAnimationView(model, this.tempo);\n case \"svg\" : return new SVGView(model, this.tempo);\n case \"interactive\": return new InteractiveView(model, this.tempo);\n default: throw new IllegalArgumentException(\"Invalid View Required to Create\");\n }\n }", "private void createView(String view) {\n switch (view.toLowerCase()) {\n case \"visual\":\n this.view = new VisualView();\n this.view.getAnimationPanel().setModel(model);\n break;\n case \"edit\":\n this.view = new ControllableView();\n this.view.getAnimationPanel().setModel(model);\n break;\n case \"svg\":\n this.view = new SVGView();\n break;\n case \"text\":\n this.view = new TextualView();\n break;\n default:\n throw new IllegalArgumentException(typeOfView + \" is not a valid view type!\");\n }\n }", "public PortViewTest(String name) {\r\n\t\tsuper(name);\r\n\t}", "private void createView(String viewName, String ctName)\n {\n IPSContentDesignWs cd = PSContentWsLocator.getContentDesignWebservice();\n String url = cd.getItemEditUrl(null, ctName, viewName);\n assertTrue(url != null);\n assertTrue(url.indexOf(\"sys_contentid\") == -1); \n }", "View createView();", "public GenModelTest(String name) {\n\t\tsuper(name);\n\t}", "Views createViews();", "public CustomJAXWSClientViewProviderTest(String name) {\n super(name);\n }", "@Test\n public void testCreateView() {\n System.out.println(\"createView\");\n int i =1;\n AfinadorModelo modeloTest = new AfinadorModelo();\n AfinadorControlador controladorTest = new AfinadorControlador(modeloTest,i);\n String test = controladorTest.vista1.bpmOutputLabel.getText();\n if( test != \"APAGADO \")\n fail(\"The test case is a prototype.\");\n }", "ViewCreator get(String userName);", "public FromTest(String name) {\n\t\tsuper(name);\n\t}", "public void setViewName(java.lang.String viewName) {\r\n this.viewName = viewName;\r\n }", "public VagueTest(String name) {\n\t\tsuper(name);\n\t}", "public static IView create(String s, int tempo) {\n if (s == null) {\n throw new IllegalArgumentException(\"Found Null Value\");\n }\n switch (s) {\n case \"text\":\n return new TextualView(tempo);\n case \"svg\":\n return new SVGView(tempo);\n case \"visual\":\n return new AnimationView(tempo);\n case \"interactive\":\n return new HybridView(tempo);\n default:\n throw new IllegalArgumentException(\"Can't Found This View\");\n }\n }", "protected final TemplateModel newView(String templateName, Object it) {\r\n\t\treturn ViewFactory.newView(TEMPLATE_PATH + templateName, it);\r\n\t}", "public View makeView(Model model, String viewType);", "private static AnimatorView constructView(String viewType, String outType, int speed) {\n AnimatorView view = null;\n if (viewType.equals(\"text\")) {\n view = new TextView(outType);\n }\n\n if (viewType.equals(\"svg\")) {\n view = new SvgView(outType, speed);\n }\n\n if (viewType.equals(\"visual\")) {\n view = new VisualGraphicsView(speed);\n }\n\n if (viewType.equals(\"edit\")) {\n view = new EditableView(new VisualGraphicsView(speed));\n }\n\n return view;\n }", "public PresentationTest(String name) {\n\t\tsuper(name);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a frequency table from an InputStream. This will create a temporary file to copy the InputStream in.
public InputStream constructTable(InputStream source, boolean copy){ freq = new int[TABLESIZE]; try { File file = null; FileOutputStream fos = null; if (copy == true) { file = File.createTempFile("huf", "tmp"); file.deleteOnExit(); fos = new FileOutputStream(file); } while (source.available() != 0) { int c = source.read(); freq[c]++; if (copy) fos.write(c); } source.close(); if (copy) { fos.close(); return new FileInputStream(file); } return null; } catch (Exception ex) { ExHandler.handle(ex); return null; } }
[ "private void createFreqTable() throws IOException { // Handle exception in compress method\n freqTable = new HashMap<Character, Integer>();\n int charVal; // Store the integer value returned by read() for each character\n\n while ((charVal = input.read()) != -1) { // While file is not empty\n Character currChar = (char)charVal; // Cast read integer to character\n\n if (freqTable.containsKey(currChar)) {\n int newFreq = freqTable.get(currChar) + 1;\n freqTable.put(currChar, newFreq); // +1 frequency if seen before\n }\n else {\n freqTable.put(currChar, 1); // Add character if not seen before, initially seen once\n }\n }\n }", "public void generateByteFrequencies(FileInput in) {\n byteFrequencies = new int[ALPHABET_SIZE];\n\n int readByte = in.readByte();\n\n while (readByte != -1) {\n byteFrequencies[readByte]++; // Character as index, frequency count as value.\n readByte = in.readByte();\n }\n\n in.resetToBeginning();\n }", "public void readEncodingTable( DataInputStream in ) throws IOException\n {\n for( int i = 0; i < BitUtils.DIFF_BYTES; i++ )\n theCounts.setCount( i, 0 );\n \n int ch;\n int num;\n \n for( ; ; )\n {\n ch = in.readByte( );\n num = in.readInt( );\n if( num == 0 )\n break;\n theCounts.setCount( ch, num );\n }\n \n createTree( );\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 }", "int[] makeFrequencyArray(String fileName) throws IOException{\n InputStream inStream = null;\n BufferedInputStream in = null; \n //Array of 0 to 255; each index corresponds to a different character\n int [] frequency = new int[256];\n try {\n inStream = new FileInputStream(fileName); //Read the file\n in = new BufferedInputStream(inStream);\n int c;\n \n //Initialize all frequencies as 0s\n for (int i = 0; i<256; i++){\n frequency[i] = 0;\n }\n \n //Find frequencies of the data\n while ((c = in.available()) >0) {\n c = in.read();\n for (int i = 0; i<256; i++){\n if (c == i){\n frequency[i]++;\n }\n }\n }\n } finally {\n if (inStream != null) { //Close the stream\n inStream.close();\n } \n if (in !=null){\n in.close();\n }\n }\n return frequency;\n }", "public void buildFreqTab (String sample) {\n for (int i=0; i<sample.length(); i++) {\n ft.incrementFreq (sample.charAt (i));\n }\n ft.print ();\n }", "public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }", "private static void fillTableFromFile(HashTable table) {\n Scanner in;\n try {\n in = new Scanner(new FileInputStream(\"File.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"File 'File.txt' not found\");\n return;\n }\n while (in.hasNext()) {\n table.add(in.next());\n }\n }", "public FrequencyTable() {\n forest = new ArrayList<>();\n occurrences = new StringBuilder();\n frequency = new HashMap<>();\n }", "private void createFreqFile(){\n\t\ttry {\n\t\t\tFile file = new File(\"Data/freqFile.dat\");\n\t\t\tPrintWriter writer = new PrintWriter(file, \"ISO-8859-1\");\n\t\t\twriter.write(freqFile);\n\t\t\twriter.close();\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "private HashMap<Byte, Double> calculateFrequencies(byte[] input) {\n HashMap<Byte, Double> freqs = new HashMap<>();\n\n for (byte b : input) {\n if (freqs.containsKey(b)) {\n freqs.put(b, freqs.get(b) + 1.0);\n } else {\n freqs.put(b, 1.0);\n }\n }\n return freqs;\n }", "public JsonDataSet(InputStream is) {\n\t\ttables = tableParser.getTables(is);\n\t}", "public LogFile(InputStream input, ArrayList<Anonymizer> typelist) {\n InputStreamReader isr = new InputStreamReader(input);\n init(isr, typelist);\n }", "@Override\n public TTFFont createFont(InputStream stream) throws FontFormatException, IOException {\n try {\n TTFFontDataFile data = new TTFFontDataFile(new TTFMemoryInput(stream));\n addUserFontData(data);\n return new TTFFont(data, 10);\n } catch (IOException e) {\n throw e;\n } catch (Exception e) {\n FontFormatException ffe = new FontFormatException(\"bad ttf format\");\n ffe.initCause(e);\n throw ffe;\n } \n }", "public static void main(String[] args) throws IOException {\n\n // TODO: String myArgs = generateWords(int words)\n // ^ easily test table's behavior by multiplexing Entry count\n File inFile = new File(IN_FILE);\n String[] myArgs = deserializeString(inFile).split(\"\\\\s+\");\n\n // deterministic method of setting up a nice hash table\n // TODO: make dynamic, implementing rehash\n int BUCKET_NUM = (int) (myArgs.length / LOAD_FACTOR);\n List<List<Entry>> hashTable = new ArrayList<>(BUCKET_NUM);\n\n // bug: there are no elements in hashTable yet to iterate over\n // additionally, wasn't making use of \"type inference for generic instance creation\"\n /*\n for (List<Entry> chain : hashTable) {\n chain = new LinkedList<Entry>();\n }\n */\n\n // no bug! initialize 'bucket' references and add them to the hash table\n for (int i = 0; i < BUCKET_NUM; i++) {\n List<Entry> chain = new LinkedList<>();\n hashTable.add(chain);\n }\n\n // add each unique String to the hash table\n for (String s : myArgs) {\n int hashCode = hashCode(s);\n int bucketIndex = compressionFunction(hashCode, BUCKET_NUM);\n\n // entries simply comprised of String key and their bucketIndex\n Entry e = new Entry(s, Integer.toString(bucketIndex));\n\n // was on the lookout for duplicates, since they weren't deduping\n // bug was, String logical equivalence isn't achieved by ==, but by String's equals() method\n if (s.equals(\"and\")) {\n boolean duplicateCandidate = true;\n }\n\n // fetch da bucket!\n List<Entry> bucket = hashTable.get(bucketIndex);\n if (! (bucket.contains(e))) {\n bucket.add(e);\n }\n }\n\n printTable(hashTable);\n }", "private void ReadFile()\n\t{\n\t\tint lineCount = 0;\n\t\tint freq = 0;\n\t\tString line, chr = \"\";\n\t\tString[] splitArr;\n\t\tScanner fileScanner = null;\n\t\tArrayList<Character> huffArr = new ArrayList<>();\n\t\tArrayList<Integer> freqArr = new ArrayList<>();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tfileScanner = new Scanner(new File(frequencyFile));\n\t\t}\n\t\t\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"Error! File \" + frequencyFile + \" couldn't found\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t\n\t\twhile (fileScanner.hasNextLine())\n\t\t{\n\t\t\tline = fileScanner.nextLine();\n\t\t\tsplitArr = line.split(\" \");\n\t\t\t++lineCount;\n\t\t\t\n\t\t\tif (splitArr.length == REQUIRED_LENGTH)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfreq = Integer.parseInt(splitArr[FREQ_INDEX]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcatch (NumberFormatException e)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Error! Frequency could not resolved\");\n\t\t\t\t\tSystem.out.println(\"file: \" + frequencyFile + \", row: \" + lineCount);\n\t\t\t\t\tSystem.out.println(\"\\\"\" + line + \"\\\"\");\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (splitArr[CHAR_INDEX].length() == 1)\n\t\t\t\t\tchr = splitArr[CHAR_INDEX];\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(splitArr[CHAR_INDEX].length());\n\t\t\t\t\tSystem.out.println(\"Error! Character could not resolved\");\n\t\t\t\t\tSystem.out.println(\"file: \" + frequencyFile + \", row: \" + lineCount);\n\t\t\t\t\tSystem.out.println(\"\\\"\" + line + \"\\\"\");\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\thuffArr.add(chr.charAt(0));\n\t\t\t\tfreqArr.add(freq);\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.print(\"Error! Unrecognizable line on \");\n\t\t\t\tSystem.out.println(\"file: \" + frequencyFile + \", row: \" + lineCount);\n\t\t\t\tSystem.out.println(\"\\\"\" + line + \"\\\"\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsymbols = new HuffData[huffArr.size()];\n\t\tfor (int i = 0; i < huffArr.size(); ++i)\n\t\t{\n\t\t\tsymbols[i] = new HuffData(freqArr.get(i), huffArr.get(i));\n\t\t}\n\t}", "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 }", "public int read(String inputFile) throws IOException {\r\n\t\tlong before = System.currentTimeMillis();\r\n\t\t/*\r\n\t\t * I used HashSet to contain words from input file. I compared between TreeSet\r\n\t\t * and HashSet and decided to use HashSet because its faster. Since its a set,\r\n\t\t * so it makes sure that only contain unique words.\r\n\t\t */\r\n\t\tSet<String> set = new HashSet<String>();\r\n\r\n\t\t/*\r\n\t\t * I had to take decision of using BufferedReader to read the huge input file\r\n\t\t * after I did some research on different options of input streams and readers.\r\n\t\t * At the end, I had two options to choose from, java.util.Scanner and\r\n\t\t * BufferedReader. BufferedReader had the advantage so I used it.\r\n\t\t */\r\n\t\tBufferedReader buff = null;\r\n\t\tint index = 0;\r\n\t\ttry {\r\n\t\t\tFile input = new File(inputFile);\r\n\t\t\tSystem.out.println(\"Going to read input file:\" + inputFile + \", size (bytes):\" + input.length());\r\n\t\t\tbuff = new BufferedReader(new FileReader(input));\r\n\t\t\tString line;\r\n\t\t\twhile ((line = buff.readLine()) != null) {\r\n\t\t\t\tString[] words = line.split(\" \");\r\n\t\t\t\tfor (String word : words) {\r\n\t\t\t\t\tset.add(word.trim());\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * Once the count of unique words reach a specific size (right now set to 5M\r\n\t\t\t\t * words), a new temp file is generated and the set is cleared. I have taken the\r\n\t\t\t\t * idea similar to Hadoop.\r\n\t\t\t\t */\r\n\t\t\t\tif (set.size() > Constants.SET_SIZE) {\r\n\t\t\t\t\tcreateTempFile(set, ++index);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (set.size() > 0) {\r\n\t\t\t\tcreateTempFile(set, ++index);\r\n\t\t\t}\r\n\r\n\t\t} finally {\r\n\t\t\tif (buff != null) {\r\n\t\t\t\tbuff.close();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (index > 0) {\r\n\t\t\tSystem.out.println(\"There are \" + index + \" temporary files created.\");\r\n\r\n\t\t\t// TODO The next four lines could be moved into a separate utility method\r\n\t\t\tlong after = System.currentTimeMillis();\r\n\t\t\tlong time = after - before;\r\n\t\t\tlong timeInSec = time / 1000;\r\n\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Time spent in reading the input files and creating temporary files (in seconds): \" + timeInSec);\r\n\r\n\t\t}\r\n\r\n\t\treturn index;\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString fname;\n\t\tFile file;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tScanner inFile;\n\n\t\tString line, word;\n\t\tStringTokenizer token;\n\t\tint[] freqTable = new int[256];\n\n\t\tSystem.out.println (\"Enter the complete path of the file to read from: \");\n\n\t\tfname = keyboard.nextLine();\n\t\tfile = new File(fname);\n\t\tinFile = new Scanner(file);\n\n\t\twhile (inFile.hasNext()) {\n\t\t\tline = inFile.nextLine();\n\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\twhile (token.hasMoreTokens()) {\n\t\t\t\tword = token.nextToken();\n\t\t\t\tfreqTable = updateFrequencyTable(freqTable, word);\n\t\t\t}\n\t\t}\n\n\t\t//print frequency table\n\n\t\tSystem.out.println(\"Table of frequencies\");\n\t\tSystem.out.println(\"Character \\t Frequency \\n\");\n\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (freqTable[i]>0)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + freqTable[i]);\n\t\t\t}\n\n\t\tQueue<BinaryTree<Pair>> S = buildQueue(freqTable);\n\n\t\tQueue<BinaryTree<Pair>> T = new Queue<BinaryTree<Pair>>();\n\n\t\tBinaryTree<Pair> huffmanTree = createTree(S, T);\n\n\t\tString[] encodingTable = findEncoding(huffmanTree);\n\n\t\tSystem.out.println(\"Encoding Table\");\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (encodingTable[i]!=null)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + encodingTable[i]);\n\t\t}\n\t\tinFile.close();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ ===================================================================== TT_Load_Glyph A function used to load a single glyph within a given glyph slot, for a given size. glyph :: A handle to a target slot object where the glyph will be loaded. size :: A handle to the source face size at which the glyph must be scaled/loaded. glyph_index :: The index of the glyph in the font file. load_flags :: A flag indicating what to load for this glyph. The FT_LOAD_XXX constants can be used to control the glyph loading process (e.g., whether the outline should be scaled, whether to load bitmaps or not, whether to hint the outline, etc). FreeType error code. 0 means success. =====================================================================
public FTError.ErrorTag TTLoadGlyph(TTSizeRec ttsize, int glyph_index, Set<Flags.Load> load_flags) { FTError.ErrorTag error; TTLoaderRec loader; Debug(0, DebugTag.DBG_LOAD_GLYPH, TAG, String.format("TT_Load_Glyph: glyph_index: %d size: " + ttsize, glyph_index)); /* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */ if (!load_flags.contains(Flags.Load.NO_SCALE) && ttsize.getTtmetrics().isValid() == false) { error = FTError.ErrorTag.LOAD_INVALID_SIZE_HANDLE; return error; } if (load_flags.contains(Flags.Load.SBITS_ONLY)) { error = FTError.ErrorTag.LOAD_INVALID_ARGUMENT; return error; } loader = new TTLoaderRec(); error = loader.tt_loader_init(ttsize, this, load_flags, false); if (error != FTError.ErrorTag.ERR_OK) { return error; } format = FTTags.GlyphFormat.OUTLINE; num_subglyphs = 0; outline.setFlags(0); Debug(0, DebugTag.DBG_LOAD_GLYPH, TAG, "load_truetype_glyph"); /* main loading loop */ error = loader.load_truetype_glyph(glyph_index, 0, false); if (error == FTError.ErrorTag.ERR_OK) { if (format == FTTags.GlyphFormat.COMPOSITE) { num_subglyphs = loader.getGloader().getBase().getNum_subglyphs(); subglyphs = loader.getGloader().getBase().getSubglyphs(); } else { outline = loader.getGloader().getBase().getOutline(); outline.setFlags(outline.getFlags() & ~Flags.Outline.SINGLE_PASS.getVal()); /* Translate array so that (0,0) is the glyph's origin. Note */ /* that this behaviour is independent on the value of bit 1 of */ /* the `flags' field in the `head' table -- at least major */ /* applications like Acroread indicate that. */ loader.getBase().showLoaderZone("TTLoadGlyph", null); Debug(0, DebugTag.DBG_LOAD_GLYPH, TAG, String.format("loader.pp1.x: %d", loader.getPp1().getX())); int i; for (i = 0; i < loader.getGloader().getCurrent().getN_points() + 4; i++) { Debug(0, DebugTag.DBG_LOAD_GLYPH, TAG, String.format("PP1: i: %d ipoints_idx: %d x: %d y: %d\n", i, loader.getGloader().getCurrent().getPoints_idx(), loader.getGloader().getCurrent().getPoint(i).getX(), loader.getGloader().getCurrent().getPoint(i).getY())); } if (loader.getPp1().getX() != 0) { outline.OutlineTranslate(-loader.getPp1().getX(), 0); } } Debug(0, DebugTag.DBG_LOAD_GLYPH, TAG, "IS_HINTED: "+!load_flags.contains(Flags.Load.NO_HINTING)); if (!load_flags.contains(Flags.Load.NO_HINTING)) { if (loader.getExec().graphics_state.isScan_control()) { /* convert scan conversion mode to FT_OUTLINE_XXX flags */ Debug(0, DebugTag.DBG_LOAD_GLYPH, TAG, String.format("IS_HINTED2: %d", loader.getExec().graphics_state.getScan_type())); switch (loader.getExec().graphics_state.getScan_type()) { case 0: /* simple drop-outs including stubs */ outline.setFlags(outline.getFlags() | Flags.Outline.INCLUDE_STUBS.getVal()); break; case 1: /* simple drop-outs excluding stubs */ /* nothing; it's the default rendering mode */ break; case 4: /* smart drop-outs including stubs */ outline.setFlags(outline.getFlags() | Flags.Outline.SMART_DROPOUTS.getVal() | Flags.Outline.INCLUDE_STUBS.getVal()); break; case 5: /* smart drop-outs excluding stubs */ outline.setFlags(outline.getFlags() | Flags.Outline.SMART_DROPOUTS.getVal()); break; default: /* no drop-out control */ outline.setFlags(outline.getFlags() | Flags.Outline.IGNORE_DROPOUTS.getVal()); break; } } else { outline.setFlags(outline.getFlags() | Flags.Outline.IGNORE_DROPOUTS.getVal()); } } loader.compute_glyph_metrics(glyph_index); } /* Set the `high precision' bit flag. */ /* This is _critical_ to get correct output for monochrome */ /* TrueType glyphs at all sizes using the bytecode interpreter. */ /* */ if (!load_flags.contains(Flags.Load.NO_SCALE) && ttsize.getMetrics().getY_ppem() < 24) { outline.setFlags(outline.getFlags() | Flags.Outline.HIGH_PRECISION.getVal()); } return error; }
[ "public abstract Glyph getGlyph();", "private void loadGlyphTexture(int par1)\n {\n String s = String.format(\"/font/glyph_%02X.png\", new Object[]\n {\n Integer.valueOf(par1)\n });\n BufferedImage bufferedimage;\n\n try\n {\n bufferedimage = ImageIO.read((net.minecraft.src.RenderEngine.class).getResourceAsStream(s));\n }\n catch (IOException ioexception)\n {\n throw new RuntimeException(ioexception);\n }\n\n glyphTextureName[par1] = renderEngine.allocateAndSetupTexture(bufferedimage);\n boundTextureName = glyphTextureName[par1];\n }", "public abstract void setGlyph(Glyph g);", "public void setGlyph(Glyph g){\n\tglyph=(VShape)g;\n }", "public Glyph getGlyph(){return glyph;}", "public void setGlyph(Glyph g){\n\tglyph=(VRectangle)g;\n }", "public void setGlyph(Glyph g){\n\tglyph=(VRoundRect)g;\n }", "public Font loadFont(String fontPath, double size) {\r\n\t\tString assetPath = fontPath;\r\n\r\n\t\tfontPath += String.valueOf(size);\r\n\r\n\t\tif (fontCache.containsKey(fontPath)) {\r\n\t\t\treturn fontCache.get(fontPath);\r\n\t\t} else {\r\n\t\t\tLOG.info(\"Loading font: {}\", fontPath);\r\n\t\t\tFont font = null;\r\n\t\t\tfont = Font.loadFont(this.getClass().getClassLoader().getResourceAsStream(assetPath), size);\r\n\t\t\tfontCache.put(fontPath, font);\r\n\t\t\treturn font;\r\n\t\t}\r\n\t}", "ShapeGlyph build( double width, double height );", "public boolean hasGlyph(String name) throws IOException;", "public GlyphFile addNewGlyph(long a_unicode) {\r\n\t\tGlyphFile retval;\r\n\r\n\t\tretval = m_typeface.createGlyph(a_unicode);\r\n\t\taddGlyphToTypeface(retval);\r\n\r\n\t\treturn retval;\r\n\t}", "@DebugSetter(ID = \"glyph\", creator = GlyphSelector.class)\n\tpublic Points setGlyph(Glyph glyph) {\n\t\tthis.glyph = glyph;\n\t\treturn this;\n\t}", "public void setGlyph(Glyph g){\n\tglyph=(VCircle)g;\n }", "@Generated\n @CFunction\n public static native char CGFontGetGlyphWithGlyphName(@Nullable CGFontRef font, @Nullable CFStringRef name);", "public void addGlyph (Glyph glyph)\r\n {\r\n glyphs.add(glyph);\r\n }", "private Glyph parseGlyph(String s)\r\n\t{\n\t\tGlyph g = new Glyph();\r\n\t\t\t\r\n\t\tfinal int id = parseInt(s, \"char id=\");\r\n\t\tg.c = (char)id;\r\n\t\tg.x = parseInt(s, \"x=\");\r\n\t\tg.y = parseInt(s, \"y=\");\r\n\t\tg.w = parseInt(s, \"width=\");\r\n\t\tg.h = parseInt(s, \"height=\");\r\n\t\tg.x_offset = parseInt(s, \"xoffset=\");\r\n\t\tg.y_offset = parseInt(s, \"yoffset=\");\r\n\t\tg.x_advance = parseInt(s, \"xadvance=\");\r\n\t\t\r\n\t\treturn g;\r\n\t}", "ShapeGlyph build();", "public void addFlagGlyph (Glyph flag)\r\n {\r\n flagGlyphs.add(flag);\r\n }", "public Glyph addGlyph (Glyph glyph)\r\n {\r\n // Get rid of composing parts if any\r\n for (Glyph part : glyph.getParts()) {\r\n part.setPartOf(glyph);\r\n part.setShape(Shape.GLYPH_PART);\r\n removeGlyph(part);\r\n }\r\n\r\n // Insert in lag, which assigns an id to the glyph\r\n Glyph oldGlyph = vLag.addGlyph(glyph);\r\n\r\n if (oldGlyph != glyph) {\r\n // Perhaps some members to carry over (TODO: check this!)\r\n oldGlyph.copyStemInformation(glyph);\r\n }\r\n\r\n system.addToGlyphsCollection(oldGlyph);\r\n\r\n return oldGlyph;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Chat by chat Id
public Chat getChatById(int id) { Optional<Chat> results = chatRepo.findById(id); return results.get(); }
[ "public Chat getChat(long chatId) {\n\n String sqlStatment = \"SELECT * FROM Chat WHERE ChatID=@chatId\";\n Statement statement = Statement.newBuilder(sqlStatment).bind(\"chatId\").to(chatId).build();\n List<Chat> resultSet = spannerTemplate.query(Chat.class, statement, null);\n \n return resultSet.get(0);\n }", "@GetMapping(\"/chat/{id}\")\n public ChatBean getChatById(@PathVariable(value = \"id\") Long chatId) {\n return chatBeanRepository.findById(chatId).get();\n }", "public Chat retrieveChat(String id) throws StorageServiceException;", "public String findChatById(int id) {\n\t\tOptional<Chat> results = chatRepo.findById(id);\n\t\treturn results.get().toString();\n\t}", "long getChatId();", "String getMessageChatId(String msgId);", "@GetMapping(\"/chat-messages/{id}\")\n @Timed\n public ResponseEntity<ChatMessage> getChatMessage(@PathVariable Long id) {\n log.debug(\"REST request to get ChatMessage : {}\", id);\n ChatMessage chatMessage = chatMessageRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(chatMessage));\n }", "@GetMapping(\"/chat-rooms/{id}\")\n public ResponseEntity<ChatRoom> getChatRoom(@PathVariable String id) {\n log.debug(\"REST request to get ChatRoom : {}\", id);\n Optional<ChatRoom> chatRoom = chatRoomRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(chatRoom);\n }", "public long getChatId(){\n return this.chatId;\n }", "ChatUser findById(Long id);", "public static GroupChat getChatSession(String chatId) {\n ApiManager instance = ApiManager.getInstance();\n if (instance == null) {\n Logger.i(TAG, \"getChatSession ApiManager instance is null\");\n return null;\n }\n ChatService messageApi = instance.getChatApi();\n if (messageApi == null) {\n Logger.d(TAG, \"getChatSession MessageingApi instance is null\");\n return null;\n }\n GroupChat chatSession = null;\n try {\n chatSession = messageApi.getGroupChat(chatId);\n return chatSession;\n } catch (JoynServiceException e) {\n Logger.e(TAG, \"getChatSession Get chat session failed\");\n e.printStackTrace();\n chatSession = null;\n return chatSession;\n }\n }", "List<Chat> findChatMessages(Long anomalyId);", "io.yuri.yuriserver.packet.Protos.Chat getChat();", "public Integer getChatid() {\n return chatid;\n }", "public String getChatId()\n {\n return chatRoomWrapper.getChatRoomID();\n }", "public abstract Object getChatIdentifier();", "public void setChatid(Integer chatid) {\n this.chatid = chatid;\n }", "@GetMapping(\"/user-offer-chats/{id}\")\n @Timed\n public ResponseEntity<UserOfferChatDTO> getUserOfferChat(@PathVariable Long id) {\n log.debug(\"REST request to get UserOfferChat : {}\", id);\n Optional<UserOfferChatDTO> userOfferChatDTO = userOfferChatService.findOne(id);\n return ResponseUtil.wrapOrNotFound(userOfferChatDTO);\n }", "public int getChatID()\n {\n return chatID;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets default table id. Using this solution all flow rules are installed on the "default" table
protected abstract FlowRule.Builder setDefaultTableIdForFlowObjective(Builder ruleBuilder);
[ "public void setTableId(int value) {\n this.tableId = value;\n }", "@Override\n public final ModelMessage setDefaultId(final String newDefaultId) {\n super.setDefaultId(newDefaultId);\n return this;\n }", "public void setDefaultIdPrefix(String prefix)\n {\n this.defaultIdPrefix = prefix;\n }", "OutputOptions<T> defaultTable(String tableName);", "public void setCurrentTableAnnotation(int id) {\r\n tableAnnotationId = id;\r\n }", "public void setTableId(int table) {\n\t\tthis.tableId = table;\n\t}", "public void setDefaultTablespace(String defaultTablespace) {\n\t\tthis.defaultTablespace = defaultTablespace == null ? null : defaultTablespace.trim();\n\t}", "public void resetTableID(int newId) {\n\t\tif(newId < 0 || newId > 1000) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid tableId\");\n\t\t}\n\t\tmTableID = newId;\n\t}", "void setDefaultClient(String id);", "private String getDefaultId() {\n Random rand = new Random();\n int anon_id = rand.nextInt(90000) + 10000;\n return Integer.toString(anon_id);\n }", "public void setAutoIncrementOnTablesWithNativeIfNotAssignedIdentityGenerator() throws SQLException {\n\t\tList<String> tables = Collections.singletonList(\"concept\");\n\t\tfor (String table : tables) {\n\t\t\tgetConnection().prepareStatement(\"ALTER TABLE \" + table + \" ALTER COLUMN \" + table + \"_id INT AUTO_INCREMENT\")\n\t\t\t\t\t.execute();\n\t\t}\n\t}", "public int getId() {\n // some code goes here\n if (tableid == 0) {\n tableid = f.getAbsoluteFile().hashCode();\n }\n return tableid;\n }", "public int getTableDefId() {\n return tableDefId;\n }", "public void setTableDefId(int tableDefId) {\n this.tableDefId = tableDefId;\n }", "public void setTableName(String table_name);", "@Test\n public void testCreationFromFlowTable() {\n assertThat(defaultFlowTable1.deviceId(), is(flowTable1.deviceId()));\n assertThat(defaultFlowTable1.appId(), is(flowTable1.appId()));\n assertThat(defaultFlowTable1.id(), is(flowTable1.id()));\n\n }", "public void setDefaultVendorId(long defaultVendorId) {\n this.defaultVendorId = defaultVendorId;\n }", "@Override\n\tpublic void setEmptyQuery(UUID tableId) {\n\t\tif (tableId == null) {\n\t\t\tthrow new DomainException(\"Cannot get a table with a null id.\");\n\t\t}\n\t\tTable table = getTable(tableId);\n\t\tif (table instanceof ComputedTable) {\n\t\t\tthis.deleteTable(tableId);\n\t\t\tthis.addTable(table.getId(), table.getName());\n\t\t}\n\t}", "public void setTABLE_ID(Long TABLE_ID) {\n this.TABLE_ID = TABLE_ID;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tests that two message maps are not equal when an additional message is added to one
@Test public void testReplace_testEquals() { final MessageMap constantMap = buildReplaceErrorMap(); MessageMap replaceMap = buildReplaceErrorMap(); assertEquals(replaceMap, replaceMap); assertEquals(replaceMap, constantMap); assertEquals(constantMap, replaceMap); replaceMap.putError("somethingElse", RiceKeyConstants.ERROR_INACTIVE, "Account Number"); assertFalse(replaceMap.equals(constantMap)); }
[ "@Test public void testMessageCollisions() {\n final String PROPERTY_NAME = \"document.sourceAccounting*,document.targetAccounting*,newSourceLine*,newTargetLine*\";\n MessageMap testMap = new MessageMap();\n\n testMap.putError(PROPERTY_NAME, \"error.inactive\", \"Chart Code\");\n testMap.putError(PROPERTY_NAME, \"error.document.subAccountClosed\", \"Sub-Account Number\");\n testMap.putError(PROPERTY_NAME, \"error.inactive\", \"Object Code\");\n testMap.putError(PROPERTY_NAME, \"error.inactive\", \"SubObject Code\");\n testMap.putError(PROPERTY_NAME, \"error.inactive\", \"Project Code\");\n\n assertEquals(5, testMap.getErrorCount());\n\n // retrieve error messages for the one known key\n Object thing = testMap.getErrorMessagesForProperty(PROPERTY_NAME);\n\n Set usedParams = new HashSet();\n for (Iterator i = testMap.getAllPropertiesAndErrors().iterator(); i.hasNext();) {\n Map.Entry entry = (Map.Entry) i.next();\n\n String propertyKey = (String) entry.getKey();\n List messageList = (List) entry.getValue();\n for (Iterator j = messageList.iterator(); j.hasNext();) {\n ErrorMessage message = (ErrorMessage) j.next();\n\n String[] params = message.getMessageParameters();\n if (usedParams.contains(params)) {\n fail(\"usedParams contains duplicate parameters object '\" + params + \"'\");\n }\n usedParams.add(params);\n }\n }\n }", "@Test\n public void shouldFindMapsWithDifferentValues() {\n Map<Integer, String> expected = new HashMap<Integer, String>();\n expected.put(ONE, NAME);\n expected.put(TWO, NAME);\n expected.put(THREE, NAME);\n \n Map<Integer, String> actual = new HashMap<Integer, String>();\n actual.put(ONE, NAME);\n actual.put(TWO, NAME + NAME);\n actual.put(THREE, NAME);\n \n try {\n assertEqualsReflectively(MESSAGE, expected, actual);\n } catch (AssertionFailedError e) {\n assertEquals(MESSAGE_IS_INCORRECT, MESSAGE + \" (HashMap)[2] expected: MyName but was MyNameMyName\", e.getMessage());\n }\n }", "@Test public void testReplace_matchingProperty_noMatchingKey() {\n final MessageMap constantMap = buildReplaceErrorMap();\n MessageMap replaceMap = buildReplaceErrorMap();\n\n assertTrue(replaceMap.equals(constantMap));\n assertFalse(replaceMap.containsMessageKey(\"fooKey\"));\n\n boolean replaced = replaceMap.replaceError(\"accountNbr\", \"fooKey\", \"fooReplaceKey\");\n assertFalse(replaced);\n\n assertTrue(replaceMap.equals(constantMap));\n assertFalse(replaceMap.containsMessageKey(\"fooKey\"));\n }", "@Test public void testReplace_noMatchingProperty() {\n final MessageMap constantMap = buildReplaceErrorMap();\n MessageMap replaceMap = buildReplaceErrorMap();\n\n assertTrue(replaceMap.equals(constantMap));\n assertFalse(replaceMap.containsMessageKey(\"fooKey\"));\n\n boolean replaced = replaceMap.replaceError(\"fooName\", \"fooKey\", \"fooReplaceKey\");\n assertFalse(replaced);\n\n assertTrue(replaceMap.equals(constantMap));\n assertFalse(replaceMap.containsMessageKey(\"fooKey\"));\n }", "@Test public void testReplace_matchingProperty_matchingKey_noParams() {\n final MessageMap constantMap = buildReplaceErrorMap();\n MessageMap replaceMap = buildReplaceErrorMap();\n\n assertTrue(replaceMap.equals(constantMap));\n assertTrue(replaceMap.containsMessageKey(RiceKeyConstants.ERROR_INACTIVE));\n assertFalse(replaceMap.containsMessageKey(RiceKeyConstants.ERROR_NOT_AMONG));\n\n List preMessages = replaceMap.getMessages(\"accountNbr\");\n assertEquals(2, preMessages.size());\n\n boolean replaced = replaceMap.replaceError(\"accountNbr\", RiceKeyConstants.ERROR_INACTIVE, RiceKeyConstants.ERROR_NOT_AMONG);\n assertTrue(replaced);\n\n assertFalse(replaceMap.equals(constantMap));\n assertFalse(replaceMap.containsMessageKey(RiceKeyConstants.ERROR_INACTIVE));\n assertTrue(replaceMap.containsMessageKey(RiceKeyConstants.ERROR_NOT_AMONG));\n\n List postMessages = replaceMap.getMessages(\"accountNbr\");\n assertEquals(2, postMessages.size());\n\n int replacedCount = 0;\n for (Iterator i = postMessages.iterator(); i.hasNext();) {\n ErrorMessage em = (ErrorMessage) i.next();\n if (em.getErrorKey().equals(RiceKeyConstants.ERROR_NOT_AMONG)) {\n String[] params = em.getMessageParameters();\n assertEquals(0, params.length);\n\n ++replacedCount;\n }\n }\n assertEquals(1, replacedCount);\n }", "public void testCloneAndMergeEmptyPersistentMap()\r\n \t{\r\n \t//\tGet UserDAO\r\n \t//\r\n \t\tIMessageDAO messageDAO = DAOFactory.getMessageDAO();\r\n \t\tassertNotNull(messageDAO);\r\n \t\t\r\n \t//\tLoad test message\r\n \t//\r\n \t\tIMessage message = messageDAO.loadDetailedMessage(TestHelper.getExistingMessageId());\r\n \t\tassertNotNull(message);\r\n \t\tif (message.countKeywords() == 0)\r\n \t\t{\r\n \t\t\tTestHelper.computeKeywords(message);\r\n \t\t\tmessageDAO.saveMessage(message);\r\n \t\t}\r\n \t\tassertTrue(message.countKeywords() > 0);\r\n \t\t\r\n \t//\tClone message\r\n \t//\r\n \t\tIMessage cloneMessage = (IMessage) _beanManager.clone(message);\r\n \t\t\r\n \t//\tTest cloned user\r\n \t//\r\n \t\tassertNotNull(cloneMessage);\r\n \t\tassertEquals(_cloneMessageClass, cloneMessage.getClass());\r\n \t\t\t\t\r\n \t\t//\tKeywords cloning verification\r\n \t\tassertEquals(message.countKeywords(), cloneMessage.countKeywords());\r\n \t\t\r\n \t\t// Add keyword\r\n \t\tcloneMessage.clearKeywords();\r\n \t\t\r\n \t//\tMerge message\r\n \t//\r\n \t\tIMessage mergeMessage = (IMessage) _beanManager.merge(cloneMessage);\r\n \t\t\r\n \t//\tTest merged message\r\n \t//\r\n \t\tassertNotNull(mergeMessage);\r\n \t\tassertEquals(_domainMessageClass, \r\n \t\t\t\t\t _beanManager.getPersistenceUtil().getUnenhancedClass(mergeMessage.getClass()));\r\n \t\t\r\n \t\t//\tKeywords merging verification\r\n \t\tassertEquals(0, mergeMessage.countKeywords());\r\n \t\t\r\n \t//\tSave message\r\n \t//\r\n \t\tmessageDAO.saveMessage(mergeMessage);\r\n \t\tIMessage loadedMessage = messageDAO.loadDetailedMessage(mergeMessage.getId());\r\n \t\tassertNotNull(loadedMessage);\r\n \t\tassertEquals(mergeMessage.countKeywords(), loadedMessage.countKeywords());\r\n \t}", "public static void ensureEquivalent(Message m1, JBossMessage m2) throws JMSException\n {\n assertTrue(m1 != m2);\n \n //Can't compare message id since not set until send\n \n assertEquals(m1.getJMSTimestamp(), m2.getJMSTimestamp());\n \n byte[] corrIDBytes = null;\n String corrIDString = null;\n \n try\n {\n corrIDBytes = m1.getJMSCorrelationIDAsBytes();\n }\n catch(JMSException e)\n {\n // correlation ID specified as String\n corrIDString = m1.getJMSCorrelationID();\n }\n \n if (corrIDBytes != null)\n {\n assertTrue(Arrays.equals(corrIDBytes, m2.getJMSCorrelationIDAsBytes()));\n }\n else if (corrIDString != null)\n {\n assertEquals(corrIDString, m2.getJMSCorrelationID());\n }\n else\n {\n // no correlation id\n \n try\n {\n byte[] corrID2 = m2.getJMSCorrelationIDAsBytes();\n assertNull(corrID2);\n }\n catch(JMSException e)\n {\n // correlatin ID specified as String\n String corrID2 = m2.getJMSCorrelationID();\n assertNull(corrID2);\n }\n }\n assertEquals(m1.getJMSReplyTo(), m2.getJMSReplyTo());\n assertEquals(m1.getJMSDestination(), m2.getJMSDestination());\n assertEquals(m1.getJMSDeliveryMode(), m2.getJMSDeliveryMode());\n //We don't check redelivered since this is always dealt with on the proxy\n assertEquals(m1.getJMSType(), m2.getJMSType());\n assertEquals(m1.getJMSExpiration(), m2.getJMSExpiration());\n assertEquals(m1.getJMSPriority(), m2.getJMSPriority());\n \n int m1PropertyCount = 0, m2PropertyCount = 0;\n for(Enumeration p = m1.getPropertyNames(); p.hasMoreElements(); m1PropertyCount++)\n {\n p.nextElement();\n }\n for(Enumeration p = m2.getPropertyNames(); p.hasMoreElements(); m2PropertyCount++)\n {\n p.nextElement();\n }\n \n assertEquals(m1PropertyCount, m2PropertyCount);\n \n for(Enumeration props = m1.getPropertyNames(); props.hasMoreElements(); )\n {\n boolean found = false;\n \n String name = (String)props.nextElement();\n \n boolean booleanProperty = false;\n try\n {\n booleanProperty = m1.getBooleanProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a boolean\n }\n \n if (found)\n {\n assertEquals(booleanProperty, m2.getBooleanProperty(name));\n continue;\n }\n \n byte byteProperty = 0;\n try\n {\n byteProperty = m1.getByteProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a byte\n }\n \n if (found)\n {\n assertEquals(byteProperty, m2.getByteProperty(name));\n continue;\n }\n \n short shortProperty = 0;\n try\n {\n shortProperty = m1.getShortProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a short\n }\n \n if (found)\n {\n assertEquals(shortProperty, m2.getShortProperty(name));\n continue;\n }\n \n \n int intProperty = 0;\n try\n {\n intProperty = m1.getIntProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a int\n }\n \n if (found)\n {\n assertEquals(intProperty, m2.getIntProperty(name));\n continue;\n }\n \n \n long longProperty = 0;\n try\n {\n longProperty = m1.getLongProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a long\n }\n \n if (found)\n {\n assertEquals(longProperty, m2.getLongProperty(name));\n continue;\n }\n \n \n float floatProperty = 0;\n try\n {\n floatProperty = m1.getFloatProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a float\n }\n \n if (found)\n {\n assertTrue(floatProperty == m2.getFloatProperty(name));\n continue;\n }\n \n double doubleProperty = 0;\n try\n {\n doubleProperty = m1.getDoubleProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a double\n }\n \n if (found)\n {\n assertTrue(doubleProperty == m2.getDoubleProperty(name));\n continue;\n }\n \n String stringProperty = null;\n try\n {\n stringProperty = m1.getStringProperty(name);\n found = true;\n }\n catch(JMSException e)\n {\n // not a String\n }\n \n if (found)\n {\n assertEquals(stringProperty, m2.getStringProperty(name));\n continue;\n }\n \n \n fail(\"Cannot identify property \" + name);\n }\n }", "@Test public void testContainsKeyMatchingPattern_mixedList_simpleNoMatch() {\n \tMessageMap testMap = new MessageMap();\n testMap.putError(\"xxx\", \"error.inactive\", \"Chart Code\");\n testMap.putError(\"yyy\", \"error.inactive\", \"Chart Code\");\n assertEquals(false, testMap.containsKeyMatchingPattern(MIXED_LIST_PATTERN));\n }", "public void testCloneAndMergeOnPersistentMap()\r\n \t{\r\n \t//\tGet UserDAO\r\n \t//\r\n \t\tIMessageDAO messageDAO = DAOFactory.getMessageDAO();\r\n \t\tassertNotNull(messageDAO);\r\n \t\t\r\n \t//\tLoad test message\r\n \t//\r\n \t\tIMessage message = messageDAO.loadDetailedMessage(TestHelper.getExistingMessageId());\r\n \t\tassertNotNull(message);\r\n \t\tif (message.countKeywords() == 0)\r\n \t\t{\r\n \t\t\tTestHelper.computeKeywords(message);\r\n \t\t\tmessageDAO.saveMessage(message);\r\n \t\t}\r\n \t\tassertTrue(message.countKeywords() > 0);\r\n \t\t\r\n \t//\tClone message\r\n \t//\r\n \t\tIMessage cloneMessage = (IMessage) _beanManager.clone(message);\r\n \t\t\r\n \t//\tTest cloned user\r\n \t//\r\n \t\tassertNotNull(cloneMessage);\r\n \t\tassertEquals(_cloneMessageClass, cloneMessage.getClass());\r\n \t\t\t\t\r\n \t\t//\tKeywords cloning verification\r\n \t\tassertEquals(message.countKeywords(), cloneMessage.countKeywords());\r\n \t\t\r\n \t\t// Add keyword\r\n \t\tcloneMessage.addKeyword(\"testKeyword\", 12);\r\n \t\t\r\n \t//\tMerge message\r\n \t//\r\n \t\tIMessage mergeMessage = (IMessage) _beanManager.merge(cloneMessage);\r\n \t\t\r\n \t//\tTest merged message\r\n \t//\r\n \t\tassertNotNull(mergeMessage);\r\n \t\tassertEquals(_domainMessageClass, \r\n \t\t\t\t\t _beanManager.getPersistenceUtil().getUnenhancedClass(mergeMessage.getClass()));\r\n \t\t\r\n \t\t//\tKeywords merging verification\r\n \t\tassertEquals(message.countKeywords() +1, mergeMessage.countKeywords());\r\n \t\t\r\n \t//\tSave message\r\n \t//\r\n \t\tmessageDAO.saveMessage(mergeMessage);\r\n \t\tIMessage loadedMessage = messageDAO.loadDetailedMessage(mergeMessage.getId());\r\n \t\tassertNotNull(loadedMessage);\r\n \t\tassertEquals(mergeMessage.countKeywords(), loadedMessage.countKeywords());\r\n \t}", "@Test\r\n public void whenAddTwoIdenticalUsersAreNotOverridingEqualsAndHashCodeThenToPrintBothNewValuesEqualsFalse() {\r\n\r\n mapForTest.put(firstUserTest, \"Bulygin\");\r\n mapForTest.put(secondUserTest, \"Uschenko\");\r\n\r\n message(\"A printout of the map with no overridden equals and hashCode: \");\r\n\r\n System.out.println(firstUserTest.equals(secondUserTest));\r\n System.out.println(String.format(\"First User hashCode : %s\", firstUserTest.hashCode()));\r\n System.out.println(String.format(\"First User hashCode : %s\", firstUserTest.hashCode()));\r\n System.out.println(mapForTest);\r\n }", "private static void assertMapsEquals(Map m1, Map m2) {\n\t \t\n\t \tif(m1 == null) {\n\t \t\tassertNull(m2);\n\t \t\treturn;\n\t }\n\t \tassertTrue(m1.getClass() == m2.getClass()); //stesso tipo\n\t assertEquals(m1.size(), m2.size()); //stessa grandezza\n\t assertEquals(m1, m2); // stesso contenuto\n\t }", "@Test\n public void shouldFindMapsWithMissingKeys() {\n Map<Integer, String> expected = new HashMap<Integer, String>();\n expected.put(ONE, NAME);\n expected.put(TWO, NAME);\n expected.put(THREE, NAME);\n \n Map<Integer, String> actual = new HashMap<Integer, String>();\n actual.put(ONE, NAME);\n actual.put(THREE, NAME);\n \n try {\n assertEqualsReflectively(MESSAGE, expected, actual);\n } catch (AssertionFailedError e) {\n assertEquals(MESSAGE_IS_INCORRECT, MESSAGE + \" (HashMap)keySet() expected: 2 in set: [1, 3]\", e.getMessage());\n }\n }", "@Test\r\n public void testEquals() {\r\n BiMap<Integer, String> biMap = new BiMap();\r\n biMap.put(1, \"One\");\r\n biMap.put(2, \"Two\");\r\n biMap.put(3, \"Three\");\r\n assertEquals(biMap, biMap);\r\n \r\n BiMap<Integer, String> secondMap = new BiMap();\r\n secondMap.put(1, \"One\");\r\n secondMap.put(2, \"Two\");\r\n secondMap.put(3, \"Three\");\r\n assertEquals(biMap, secondMap);\r\n secondMap.put(4, \"Four\");\r\n assertNotEquals(biMap, secondMap);\r\n \r\n HashMap<Integer, String> thirdMap = new HashMap();\r\n thirdMap.put(1, \"One\");\r\n thirdMap.put(2, \"Two\");\r\n thirdMap.put(3, \"Three\");\r\n assertEquals(biMap, thirdMap);\r\n biMap.put(4, \"Four\");\r\n assertNotEquals(biMap, thirdMap);\r\n }", "@Test\n public void shouldFindMapsWithExtraKeys() {\n Map<Integer, String> expected = new HashMap<Integer, String>();\n expected.put(ONE, NAME);\n expected.put(THREE, NAME);\n \n Map<Integer, String> actual = new HashMap<Integer, String>();\n actual.put(ONE, NAME);\n actual.put(TWO, NAME);\n actual.put(THREE, NAME);\n \n try {\n assertEqualsReflectively(MESSAGE, expected, actual);\n } catch (AssertionFailedError e) {\n assertEquals(MESSAGE_IS_INCORRECT, MESSAGE + \" (HashMap)keySet() found unexpected: 2, was expecting: [1, 3]\", e.getMessage());\n }\n }", "@Test public void testReplace_matchingProperty_matchingKey_withParams() {\n final MessageMap constantMap = buildReplaceErrorMap();\n MessageMap replaceMap = buildReplaceErrorMap();\n\n assertTrue(replaceMap.equals(constantMap));\n assertTrue(replaceMap.containsMessageKey(RiceKeyConstants.ERROR_INACTIVE));\n assertFalse(replaceMap.containsMessageKey(RiceKeyConstants.ERROR_NOT_AMONG));\n\n List preMessages = replaceMap.getMessages(\"accountNbr\");\n assertEquals(2, preMessages.size());\n\n boolean replaced = replaceMap.replaceError(\"accountNbr\", RiceKeyConstants.ERROR_INACTIVE, RiceKeyConstants.ERROR_NOT_AMONG, \"zero\", \"one\");\n assertTrue(replaced);\n\n assertFalse(replaceMap.equals(constantMap));\n assertFalse(replaceMap.containsMessageKey(RiceKeyConstants.ERROR_INACTIVE));\n assertTrue(replaceMap.containsMessageKey(RiceKeyConstants.ERROR_NOT_AMONG));\n\n List postMessages = replaceMap.getMessages(\"accountNbr\");\n assertEquals(2, postMessages.size());\n\n int replacedCount = 0;\n for (Iterator i = postMessages.iterator(); i.hasNext();) {\n ErrorMessage em = (ErrorMessage) i.next();\n if (em.getErrorKey().equals(RiceKeyConstants.ERROR_NOT_AMONG)) {\n String[] params = em.getMessageParameters();\n assertEquals(2, params.length);\n assertEquals(\"zero\", params[0]);\n assertEquals(\"one\", params[1]);\n\n ++replacedCount;\n }\n }\n assertEquals(1, replacedCount);\n }", "@Test public void testMessageParameters() {\n \tMessageMap testMap = new MessageMap();\n\n testMap.putError(\"accountNbr\", RiceKeyConstants.ERROR_INACTIVE, \"Account Number\");\n testMap.putError(\"accountNbr\", RiceKeyConstants.ERROR_REQUIRED, \"Account Number\");\n // check duplicate message doesn't get added\n testMap.putError(\"accountNbr\", RiceKeyConstants.ERROR_INACTIVE, \"Account Number\");\n testMap.putError(\"chartCode\", RiceKeyConstants.ERROR_REQUIRED, \"Chart Code\");\n\n assertEquals(3, testMap.getErrorCount());\n\n List errorMessages = testMap.getMessages(\"accountNbr\");\n assertEquals(2, errorMessages.size());\n checkMessageParemeters(errorMessages, 0, RiceKeyConstants.ERROR_INACTIVE, new String[] { \"Account Number\" });\n checkMessageParemeters(errorMessages, 1, RiceKeyConstants.ERROR_REQUIRED, new String[] { \"Account Number\" });\n\n errorMessages = testMap.getMessages(\"chartCode\");\n assertEquals(1, errorMessages.size());\n checkMessageParemeters(errorMessages, 0, RiceKeyConstants.ERROR_REQUIRED, new String[] { \"Chart Code\" });\n }", "@Test\r\n public void whenAddTwoIdenticalUsersAreOverridingEqualsThenToPrintBothNewValuesEqualsTrue() {\r\n\r\n mapForTest.put(firstUserTest, \"Collection\");\r\n mapForTest.put(secondUserTest, \"Map\");\r\n\r\n message(\"A printout of the map with overridden equals: \");\r\n\r\n System.out.println(firstUserTest.equals(secondUserTest));\r\n System.out.println(String.format(\"First User hashCode : %s\", firstUserTest.hashCode()));\r\n System.out.println(String.format(\"First User hashCode : %s\", firstUserTest.hashCode()));\r\n System.out.println(mapForTest);\r\n }", "protected void assertTimestampAndIdHeadersNotEqual(final Message<?> inFirstMessage,\n final Message<?> inSecondMessage) {\n Assertions.assertNotEquals(\n inFirstMessage\n .getHeaders()\n .getId(),\n inSecondMessage\n .getHeaders()\n .getId(),\n \"The two messages should have different message ids\");\n Assertions.assertNotEquals(\n inFirstMessage\n .getHeaders()\n .getTimestamp(),\n inSecondMessage\n .getHeaders()\n .getTimestamp(),\n \"The timestamp should not be the same in the messages\");\n }", "protected void assertMessagesEqualDisregardIdAndTimestampHeaders(\n final Message<String> inFirstMessage,\n final Message<String> inSecondMessage) {\n Assertions.assertEquals(\"Message payloads should be equal\",\n inFirstMessage.getPayload(), inSecondMessage.getPayload());\n\n /* The number of message headers in the two messages should be the same. */\n Assertions.assertEquals(\n inFirstMessage\n .getHeaders()\n .size(),\n inSecondMessage\n .getHeaders()\n .size(),\n \"Number of message headers in the messages should be equal\");\n\n /* Compare message header values. */\n for (final Map.Entry<String, Object> theFirstMsgHdrEntry :\n inFirstMessage\n .getHeaders()\n .entrySet()) {\n final String theFirstMsgHdrKey = theFirstMsgHdrEntry.getKey();\n\n Assertions.assertTrue(\n inSecondMessage\n .getHeaders()\n .containsKey(theFirstMsgHdrKey),\n \"Both messages should contain the header \" + theFirstMsgHdrKey);\n\n /* Only compare values of other headers, not of timestamp and id headers. */\n if (!MessageHeaders.ID.equals(theFirstMsgHdrKey)\n && !MessageHeaders.TIMESTAMP.equals(theFirstMsgHdrKey)) {\n /* Compare the values of the message headers. */\n final Object theFirstMsgHdrValue = theFirstMsgHdrEntry.getValue();\n final Object theSecondMsgHdrValue =\n inSecondMessage\n .getHeaders()\n .get(theFirstMsgHdrKey);\n Assertions.assertEquals(\n theFirstMsgHdrValue,\n theSecondMsgHdrValue,\n \"Value of message header \" + theFirstMsgHdrKey + \" should be same in both messages\");\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the sensorConfigurations
public final void setListSensorConfigurations( List< SensorConfigurationEntry > sensorConfigurations ) { this.sensorConfigurations = sensorConfigurations; }
[ "private void configurateSensor()\n\t{\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"CONFIGURING\", \"state1\");\n\t\tcheckFirmwareVersion();\n\t\t// Write configuration file to sensor\n\t\tsetAndWriteFiles();\n\n\t\t// push comment to RestApi\n\t\ttry\n\t\t{\n\t\t\trestApiUpdate(ConnectionManager.getInstance().currentSensor(0).getSerialNumber(), \"comment\");\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"SENSOR_OUTBOX\", \"state2\");\n\n\t\t// print address\n\t\tint index2 = customerList.getSelectionIndex();\n\t\tfor (Measurement element : mCollect.getList())\n\t\t{\n\t\t\tif (mCollect.getList().get(index2).getLinkId() == element.getLinkId())\n\t\t\t{\n\t\t\t\taData = new AddressData(element.getId());\n\t\t\t\tprintLabel(aData.getCustomerData(), element.getLinkId());\n\t\t\t}\n\n\t\t}\n\n\t\t// set configuration success message\n\t\tstatusBar.setText(\"Sensor is configurated.Please connect another sensor.\");\n\n\t\t// writing date to sensor for synchronization\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).synchronize();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// resetData();\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).disconnect();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t}", "public final List< SensorConfigurationEntry > getListSensorConfigurations()\r\n {\r\n return sensorConfigurations;\r\n }", "public void setConfigurations(String[] configurations) {\n this.configurations = configurations;\n updateJavaFXDependencies();\n }", "public void setDeviceConfig(DeviceConfig deviceConfig) {\n this.deviceConfig = deviceConfig;\n }", "public void setConfiguration(Configuration config)\n {\n this.config = config;\n }", "protected void onApplicationConfigurations()\n\t{\n\t\t// set global settings for both development and deployment mode...\n\t\tnewGlobalSettings(this, newHttpPort(), newHttpsPort());\n\t\t// set configuration for development...\n\t\tif (RuntimeConfigurationType.DEVELOPMENT.equals(this.getConfigurationType()))\n\t\t{\n\t\t\tnewDevelopmentModeSettings();\n\t\t}\n\t\t// set configuration for deployment...\n\t\tif (RuntimeConfigurationType.DEPLOYMENT.equals(this.getConfigurationType()))\n\t\t{\n\t\t\tnewDeploymentModeSettings();\n\t\t}\n\t}", "void overwriteConfiguration(Map<String, Object> config);", "private void initialiseSensors() {\r\n sensors.put(CONNECTED_SENSORS.BRAKE, new Sensor(brakeSenseMin, brakeSenseMax));\r\n sensors.put(CONNECTED_SENSORS.FUEL, new Sensor(fuelSenseMin, fuelSenseMax));\r\n sensors.put(CONNECTED_SENSORS.HIGH_BEAM, new Sensor(highBeamSenseMin, highBeamSenseMax));\r\n sensors.put(CONNECTED_SENSORS.LEFT_INDICATOR, new Sensor(indicatorSenseMin, MAX_FADE_CURRENT));\r\n sensors.put(CONNECTED_SENSORS.ODOMETER, new Sensor(odometerSenseMin, odometerSenseMax));\r\n sensors.put(CONNECTED_SENSORS.RIGHT_INDICATOR, new Sensor(indicatorSenseMin, MAX_FADE_CURRENT));\r\n sensors.put(CONNECTED_SENSORS.TEMPERATURE, new Sensor(tempSenseMin, tempSenseMax, tempSenseWarn));\r\n sensors.put(CONNECTED_SENSORS.TRIP, new Sensor(tripSenseMin, tripSenseMax));\r\n }", "void setDatasourceConfigurations(List<IPSDatasourceConfig> configs);", "private void initConfigurations()\n {\n // Get the current/default configuration\n int curr = HDScreen.nGetDeviceConfig(nDevice);\n\n // Initialize the configurations\n int config[] = HDScreen.nGetDeviceConfigs(nDevice);\n configurations = new HDGraphicsConfiguration[config.length];\n for (int i = 0; i < configurations.length; ++i)\n {\n configurations[i] = new HDGraphicsConfiguration(this, config[i]);\n if (config[i] == curr) // TODO_DS: not using UniqueConfigId to\n // minimize impact\n {\n // Save current/default configuration\n defaultConfiguration = currentConfiguration = configurations[i];\n }\n }\n\n // Shouldn't occur... but could\n if (defaultConfiguration == null || currentConfiguration == null)\n {\n throw new NullPointerException();\n }\n }", "@Override\n public void setConfiguration(Configuration config) {\n EvalTools.notNull(config, Factory.class);\n configureMe(config);\n }", "protected void configure() {\n\t\ttry {\n\t\t\t/* set update interval */\n\t\t\tinterval = (Integer) spinnerUpdate.getValue();\n\t\t\tif (interval < 1) {\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"Update interval must be greater than 1\");\n\t\t\t}\n\n\t\t\tMonitor.setInterval(interval);\n\n\t\t\t/* get the Monitor parameters */\n\t\t\tfinal List<Monitor> monitors = Monitor.getMonitorList();\n\t\t\tfor (int i = 0; i < monitors.size(); i++) {\n\t\t\t\tfinal JPanel MonitorPanel = (JPanel) pMonitors.getComponent(i);\n\t\t\t\tfinal JTextField textThreshold = (JTextField) MonitorPanel\n\t\t\t\t\t\t.getComponent(MonitorControl.THRESHOLD_INDEX);\n\t\t\t\tfinal JTextField textMaximum = (JTextField) MonitorPanel\n\t\t\t\t\t\t.getComponent(MonitorControl.MAX_VALUE_INDEX);\n\t\t\t\tfinal JCheckBox checkAlarm = (JCheckBox) MonitorPanel\n\t\t\t\t\t\t.getComponent(MonitorControl.CHECKBOX_INDEX);\n\t\t\t\tfinal double threshold = Double.parseDouble(textThreshold\n\t\t\t\t\t\t.getText().trim());\n\t\t\t\tfinal Monitor monitor = monitors.get(i);\n\t\t\t\tmonitor.setThreshold(threshold);\n\t\t\t\tfinal double maximum = Double.parseDouble(textMaximum.getText()\n\t\t\t\t\t\t.trim());\n\t\t\t\tmonitor.setMaximum(maximum);\n\t\t\t\tmonitor.setAlarm(checkAlarm.isSelected());\n\t\t\t}\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tLOGGER.log(Level.SEVERE, \"Invalid number input.\", nfe);\n\t\t}\n\n\t\tconfigured = true;\n\t}", "public void setPowerConfiguration(RedstoneClock.PowerConfiguration value)\n\t{\n\t\tthis.powerConfiguration = value;\n\n\t\t// Make sure to mark this as dirty so it's saved.\n\t\tthis.markDirty();\n\t}", "public void setConfiguration(OversamplingMultiplier humidityOversampling,\n\t\t\tOversamplingMultiplier temperatureOversampling, OversamplingMultiplier pressureOversampling,\n\t\t\tIirFilterCoefficient filter, StandbyDuration standbyDuration) {\n\t\tOperatingMode current_op_mode = getOperatingMode();\n\n\t\tif (current_op_mode != OperatingMode.SLEEP) {\n\t\t\t// Configure only in the sleep mode\n\t\t\tsetOperatingMode(OperatingMode.SLEEP);\n\t\t}\n\n\t\t// Register data starting from REG_CTRL_GAS_1(0x71) up to REG_CONFIG(0x75)\n\t\tfinal int LEN_CONFIG = 5;\n\t\tbyte[] data_array = new byte[LEN_CONFIG];\n\t\tdevice.readI2CBlockData(REG_CTRL_GAS_1, data_array);\n\t\tdata_array[1] = BitManipulation.updateWithMaskedData(data_array[1], (byte) OVERSAMPLING_HUMIDITY_MASK,\n\t\t\t\thumidityOversampling.getValue(), OVERSAMPLING_HUMIDITY_POSITION);\n\t\tdata_array[3] = BitManipulation.updateWithMaskedData(data_array[3], (byte) OVERSAMPLING_PRESSURE_MASK,\n\t\t\t\tpressureOversampling.getValue(), OVERSAMPLING_PRESSURE_POSITION);\n\t\tdata_array[3] = BitManipulation.updateWithMaskedData(data_array[3], (byte) OVERSAMPLING_TEMPERATURE_MASK,\n\t\t\t\ttemperatureOversampling.getValue(), OVERSAMPLING_TEMPERATURE_POSITION);\n\t\tdata_array[4] = BitManipulation.updateWithMaskedData(data_array[4], (byte) FILTER_MASK, filter.getValue(),\n\t\t\t\tFILTER_POSITION);\n\n\t\tbyte odr20 = 0;\n\t\tbyte odr3 = 1;\n\t\tif (standbyDuration != StandbyDuration.NONE) {\n\t\t\todr20 = standbyDuration.getValue();\n\t\t\todr3 = 0;\n\t\t}\n\t\tdata_array[4] = BitManipulation.updateWithMaskedData(data_array[4], (byte) ODR20_MASK, odr20, ODR20_POSITION);\n\t\tdata_array[0] = BitManipulation.updateWithMaskedData(data_array[0], (byte) ODR3_MASK, odr3, ODR3_POSITION);\n\n\t\twriteDataWithIncrementingRegisterAddress(REG_CTRL_GAS_1, data_array);\n\n\t\t// Restore the previous operating mode\n\t\tif (current_op_mode != OperatingMode.SLEEP) {\n\t\t\tsetOperatingMode(current_op_mode);\n\t\t}\n\t}", "public void setConfigLocations(String... locations) {\n\t\tif (locations != null) {\n\t\t\tAssert.noNullElements(locations, \"Config locations must not be null\");\n\t\t\tthis.configLocations = new String[locations.length];\n\t\t\tfor (int i = 0; i < locations.length; i++) {\n\t\t\t\tthis.configLocations[i] = resolvePath(locations[i]).trim();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.configLocations = null;\n\t\t}\n\t}", "@Override\n public Map<String, Object> getComponentConfiguration() {\n // This is called long before prepare(), so do some of the same stuff as prepare() does,\n // to get the valid WriterConfiguration. But don't store any non-serializable objects,\n // else Storm will throw a runtime error.\n Function<WriterConfiguration, WriterConfiguration> configurationXform;\n WriterHandler writer = sensorToWriterMap.entrySet().iterator().next().getValue();\n if (writer.isWriterToBulkWriter()) {\n configurationXform = WriterToBulkWriter.TRANSFORMATION;\n } else {\n configurationXform = x -> x;\n }\n WriterConfiguration writerconf = configurationXform\n .apply(getConfigurationStrategy()\n .createWriterConfig(writer.getBulkMessageWriter(), getConfigurations()));\n\n BatchTimeoutHelper timeoutHelper = new BatchTimeoutHelper(writerconf::getAllConfiguredTimeouts, batchTimeoutDivisor);\n this.requestedTickFreqSecs = timeoutHelper.getRecommendedTickInterval();\n //And while we've got BatchTimeoutHelper handy, capture the maxBatchTimeout for writerComponent.\n this.maxBatchTimeout = timeoutHelper.getMaxBatchTimeout();\n\n Map<String, Object> conf = super.getComponentConfiguration();\n if (conf == null) {\n conf = new HashMap<>();\n }\n conf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, requestedTickFreqSecs);\n LOG.info(\"Requesting \" + Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS + \" set to \" + Integer.toString(requestedTickFreqSecs));\n return conf;\n }", "public void setConfig(){\n\t\t//instance & read file -> get settings\n\t\tif(config==null) config = Config.getInstance();\n\t\tconfig.init();\n\t\trefreshUserConfig();\n\t\t//read & set values from powershell\n\t\tconfig.setIp(powerShell.command(\"system\", \"ip\", false));\n\t\tconfig.setHost(powerShell.command(\"system\", \"host\", false));\n\t\tgenerateSettings();\n\t}", "public void updateApplicationConfigurationsMap(Map val) throws MBeanException;", "public static void initConfigValues() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /ocConfigurations/:id > delete the "id" ocConfiguration.
@RequestMapping(value = "/ocConfigurations/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public void delete(@PathVariable Long id) { log.debug("REST request to delete OcConfiguration : {}", id); ocConfigurationRepository.delete(id); }
[ "@RequestMapping(\"/remove/{id}\")\n public String removeConfiguration(@PathVariable(\"id\") int id) {\n\n this.configurationService.removeConfiguration(id);\n return \"redirect:/configurations\";\n }", "public void removeConfiguration(String id);", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete KeyConfig : {}\", id);\n keyConfigRepository.deleteById(id);\n }", "public void delete(Long id) {\n log.debug(\"Request to delete ConfigSystem : {}\", id);\n configSystemRepository.deleteById(id);\n }", "@DeleteMapping(\"/config-parameters/{id}\")\n @Timed\n public ResponseEntity<Void> deleteConfigParameter(@PathVariable Long id) {\n log.debug(\"REST request to delete ConfigParameter : {}\", id);\n configParameterRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public RetrieveUpdateDeleteApi<Configuration> configuration(String idOrName);", "@DeleteMapping(\"/sistema-configuracions/{id}\")\n @Timed\n public ResponseEntity<Void> deleteSistemaConfiguracion(@PathVariable Long id) {\n log.debug(\"REST request to delete SistemaConfiguracion : {}\", id);\n sistemaConfiguracionService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@DELETE\n @Path(\"/{configId}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response delete(@PathParam(\"projectId\") Long projectId, @PathParam(\"configId\") Long configId)\n throws NotFoundException, UnauthorizedException {\n final User user = ((UserPrincipal) securityContext.getUserPrincipal()).getUser();\n LOGGER.traceEntry(\"delete({}) for user {}.\", projectId, user);\n\n testExecutionConfigDAO.delete(user, projectId, configId);\n\n LOGGER.traceExit(\"Config with id \" + configId + \" deleted.\");\n return Response.noContent().build();\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete NodeConfig : {}\", id);\n nodeConfigRepository.delete(id);\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ConfigData : {}\", id);\n configDataRepository.delete(id);\n configDataSearchRepository.delete(id);\n }", "void rs2_delete_config(Realsense2Library.rs2_config config);", "FlexibleConfig removeConfig(SimpleUri configId);", "public com.google.longrunning.Operation deleteApiConfig(com.google.cloud.apigateway.v1.DeleteApiConfigRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteApiConfigMethod(), getCallOptions(), request);\n }", "@DeleteMapping(\"/application-config-histories/{id}\")\n @Timed\n public ResponseEntity<Void> deleteApplicationConfigHistory(@PathVariable Long id) {\n log.debug(\"REST request to delete ApplicationConfigHistory : {}\", id);\n applicationConfigHistoryService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "void deleteConfig(String pid, String connection) throws Exception;", "@DELETE\n @Path(\"{config}\")\n public void removeModel(@PathParam(\"config\") final String config) {\n\tConfigurationModel configurationModel = findConfigurationModelByName(config, true);\n\tif (em != null) {\n\t // remove orphan properties\n\t for (ConfigurationProperty cp : configurationModel.getProperties()) {\n\t\tif (cp.getConfigurations().size() == 1) {\n\t\t em.remove(cp);\n\t\t}\n\t }\n\t // clean current configuration properties\n\t configurationModel.getProperties().clear();\n\t // remove configuration and flush all changes\n\t em.remove(configurationModel);\n\t em.flush();\n\t}\n }", "public void deleteApiConfig(com.google.cloud.apigateway.v1.DeleteApiConfigRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteApiConfigMethod(), getCallOptions()), request, responseObserver);\n }", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.Status> deleteCollectionNamespacedConfiguration(\n @Path(\"namespace\") String namespace);", "@DeleteMapping(\"/ap-constants/{id}\")\n @Timed\n public ResponseEntity<Void> deleteApConstants(@PathVariable Long id) {\n log.debug(\"REST request to delete ApConstants : {}\", id);\n apConstantsRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table t_terms
Terms selectByPrimaryKey(Integer id);
[ "public List<Term> getAllTerms() {\n\t\tsession.beginTransaction();\n\t\tList<Term> lis = session.createQuery(\"from Term\").list();\n\n\t\tfor (Term tm : lis) {\n\t\t\tSystem.out.println(tm.getId() + \" \" + tm.getTermName());\n\t\t}\n\t\treturn lis;\n\t}", "@Override\n public Set<IndexTerm> getTerms() {\n Set<IndexTerm> terms = new HashSet<IndexTerm>();\n //only JavaTypeIndexTerm is required.\n terms.add( new JavaTypeIndexTerm() );\n /*\n terms.add( new JavaTypeParentIndexTerm() );\n terms.add( new JavaTypeInterfaceIndexTerm() );\n terms.add( new FieldNameIndexTerm() );\n terms.add( new FieldTypeIndexTerm() );\n terms.add( new TypeIndexTerm() );\n */\n return terms;\n }", "public List<Term> getTerms() {\r\n\t\treturn dbManager.getAllTerms();\r\n\t}", "ArrayList<Term> getTerms() {\n ArrayList<Term> terms = new ArrayList<>();\n String[] columns = {\"id\", \"name\", \"start_date\", \"end_date\"};\n Cursor cursor = db.query(\"term\", columns, null, null, null, null, null);\n while (cursor.moveToNext()) {\n Term term = new Term();\n term.setId(cursor.getInt(0));\n term.setName(cursor.getString(1));\n term.setStartDate(cursor.getString(2));\n term.setEndDate(cursor.getString(3));\n terms.add(term);\n }\n return terms;\n }", "public void setTerms(Term[] terms) { this.terms = terms; }", "public TermSchema(List<Value> terms) {\n this.attributes = terms;\n }", "@Override\n\tpublic java.util.List<com.liferay.cm.model.Term> getTerms(\n\t\tint start, int end) {\n\n\t\treturn _termLocalService.getTerms(start, end);\n\t}", "public VocabularyTerms() {}", "public Terms() {}", "private String getSQLOfCreateTermCategoryTable(String dataset) {\n\t\treturn \"create table if not exists \"\n\t\t\t\t+ dataset\n\t\t\t\t+ \"_term_category (term varchar(100), \"\n\t\t\t\t+ \"category varchar(100), hasSyn TINYINT(1) default 0, sourceDataset text, \"\n\t\t\t\t+ \"termID varchar(100))\";\n\t}", "public int getTermIndex() {return termIndex;}", "public void setQueryTable(List<String> queryTerms) {\n\n\t\tStatement mystat = null;\n\t\tResultSet myrs = null;\n\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tconn = DriverManager.getConnection(\"jdbc:oracle:thin:@//\" + dbHostName + \"/\" + database, dbUser,\n\t\t\t\t\tdbPassword);\n\t\t\tmystat = conn.createStatement();\n\t\t\tfor (String q : queryTerms) {\n\t\t\t\tString insert = \"INSERT INTO QUERYTABLE(WORD) VALUES ('\" + q + \"')\";\n\t\t\t\tmyrs = mystat.executeQuery(insert);\n\t\t\t}\n\n\t\t\t\tmyrs.close();\n\t\t\t\tconn.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void setTerms(List<Activated> terms) {\n this.terms = terms;\n }", "List<DocTerm> getDocTermsFor(String term);", "public abstract Set<String> getTerms(Document doc);", "public TermsList getTermsList() {\n\t\treturn termsList;\n\t}", "Set<String> getTerms();", "public String getTermsId()\n\t{\n\t\treturn getTermsId( getSession().getSessionContext() );\n\t}", "public Long getTerm_id() {\n return term_id;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates an object of Page type from the database, but only update the property json.
public final int updateJson(final Page page) throws DAOException { String query = "UPDATE pages SET json=? WHERE id=?"; int result = 0; Connection con = null; PreparedStatement pstmt = null; try { con = JDBCDAOFactory.getConnection(); con.setAutoCommit(false); pstmt = con.prepareStatement(query); pstmt.setString(1, page.getJson()); pstmt.setInt(2, page.getId()); result = pstmt.executeUpdate(); con.commit(); } catch (SQLException ex) { throw new DAOException(ex); } finally { DBUtils.closeStatement(pstmt); DBUtils.closeConnection(con); } return result; }
[ "public void updatePage() {\n\t\tFileOutputStream fos = null;\n\t\tObjectOutputStream out = null;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(new File(\"./Data/\" + pageName + \".ser\"));\n\t\t\tout = new ObjectOutputStream(fos);\n\t\t\tout.writeObject(this);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void updateProperty(String property, NodeType type) ;", "private void putObjectFromPages(JSONArray pageArray) {\n\n for (int i = 0; i < pageArray.length(); i++) {\n JSONObject page = pageArray.optJSONObject(i);\n String pName = page.optString(\"name\");\n JSONArray pageElementArray = page.optJSONArray(\"uiObjects\");\n\n Map<String, PageElement> pageElements = new HashMap<String, PageElement>();\n pageElementsMap.put(pName, pageElements);\n // Searching for the target element in the current page\n for (int j = 0; j < pageElementArray.length(); j++) {\n JSONObject pageElement = pageElementArray.optJSONObject(j);\n String name = pageElement.optString(\"name\");\n\n PageElement element = new PageElement();\n element.setName(name);\n element.setType(pageElement.optString(\"type\"));\n element.setLocatorType(pageElement.optString(\"locatorType\"));\n element.setLocatorValue(pageElement.optString(\"locatorValue\"));\n pageElements.put(name, element);\n }\n\n }\n }", "public void setPageType(PageType pageType) {\r\n this.pageType = pageType;\r\n }", "Builder addMainEntityOfPage(String value);", "public final int save(final Page page) throws DAOException {\n String query = \"INSERT INTO pages (name, description, json) VALUES (?, ?,?)\";\n\n \n System.out.println(\"guardando mashup\");\n int result = 0;\n Connection con = null;\n PreparedStatement pstmt = null;\n\n try {\n con = JDBCDAOFactory.getConnection();\n con.setAutoCommit(false);\n pstmt = con.prepareStatement(query);\n if (page.getName() != null) {\n pstmt.setString(1, page.getName());\n } else {\n pstmt.setNull(1, Types.VARCHAR);\n }\n if (page.getDescription() != null) {\n pstmt.setString(2, page.getDescription());\n } else {\n pstmt.setNull(2, Types.VARCHAR);\n }\n if (page.getDescription() != null) {\n pstmt.setString(3, page.getJson());\n } else {\n pstmt.setNull(3, Types.VARCHAR);\n }\n result = pstmt.executeUpdate();\n con.commit();\n } catch (SQLException ex) {\n throw new DAOException(ex);\n } finally {\n DBUtils.closeStatement(pstmt);\n DBUtils.closeConnection(con);\n }\n return result;\n }", "public void saveUpdateProperties(AuditType auditType);", "@Override\n\tpublic Type update(Integer id, Type type) {\n\t\treturn typeRepository.save(type);\n\t}", "public void putPage(String path, PageInstance page) throws Exception {\r\n // NYI\r\n }", "public interface PerPageManager {\n\n /** @return Per Page instance if page was found under the given path otherwise null **/\n public PerPage getPage(String pagePath);\n\n /**\n * Touches the given page and updating their modification / replication properties\n * @param page Page to be updated\n * @param shallow If only the given page is updated\n * @param now Date of the change\n * @param clearReplication If true the replication properties are removed\n */\n public void touch(PerPage page, boolean shallow, Calendar now, boolean clearReplication);\n}", "@Override\n public void update() throws AcmeException {\n updateCount++;\n setJSON(JSON_DATA);\n }", "Builder addMainEntityOfPage(URL value);", "public void setPropertyItem(entity.PropertyItem value);", "void updateObject(String path, Object object);", "@Override\n public void modifyCurrentPage(int id, int page) {\n Connection connection = connect();\n try {\n PreparedStatement p = connection.prepareStatement(\"UPDATE Book \"\n + \"SET currentpage = (?) WHERE id = (?)\");\n p.setInt(first, page);\n p.setInt(second, id);\n p.executeUpdate();\n } catch (SQLException e) {\n //System.err.println(e.getMessage());\n } finally {\n closeConnection(connection);\n }\n }", "void setPageList( List< IPage< ? > > pageList );", "public void updateWikiPage(WikiPage wikipage);", "boolean put(PageId pageId, byte[] page);", "Mono<EntityWithServiceImplAndPagination> partialUpdate(EntityWithServiceImplAndPagination entityWithServiceImplAndPagination);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Opens a filter agent customizer.
void keywordsMenuItem_actionPerformed(ActionEvent e) { Class<?> customizerClass = filterAgent.getCustomizerClass(); if (customizerClass == null) { trace("Error can't find FilterAgent customizer class"); return; } // found a customizer, now open it Customizer customizer = null; try { customizer = (Customizer) customizerClass.newInstance(); } catch (Exception exc) { System.out.println("Error opening customizer - " + exc.toString()); return; // bail out } Point pos = this.getLocation(); JDialog dlg = (JDialog) customizer; dlg.setLocation(pos.x + 20, pos.y + 20); customizer.setObject(filterAgent); dlg.show(); }
[ "public void openFilter() {\n\t\tJFileChooser fileChooser = getFilterChooser();\n\t\tif(fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile[] files = fileChooser.getSelectedFiles(); \n\t\t\tint index = 0;\n\t\t\ttry {\n\t\t\t\tfor(; index < files.length; index++)\n\t\t\t\t\tController.getFilterManager().loadFilter(files[index]);\n\t\t\t} catch(IOException e) {\n\t\t\t\tController.getCommunicationManager().error(\"Could not open file:\\n%s\\n\\n> %s\", files[index].getAbsolutePath(), e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "void downloadURLMenuItem_actionPerformed(ActionEvent e) {\n Class<?> customizerClass = uRLReaderAgent.getCustomizerClass();\n\n if (customizerClass == null) {\n trace(\"Error can't find URLReaderAgent customizer class\");\n return;\n }\n\n // found a customizer, now open it\n Customizer customizer = null;\n\n try {\n customizer = (Customizer) customizerClass.newInstance();\n } catch (Exception exc) {\n trace(\"Error opening URLReaderAgent customizer - \" + exc.toString());\n return; // bail out\n }\n Point pos = this.getLocation();\n JDialog dlg = (JDialog) customizer;\n\n dlg.setLocation(pos.x + 20, pos.y + 20);\n customizer.setObject(uRLReaderAgent);\n dlg.show();\n }", "void downloadNewsGroupMenuItem_actionPerformed(ActionEvent e) {\n Class<?> customizerClass = newsReaderAgent.getCustomizerClass();\n\n if (customizerClass == null) {\n trace(\"Error can't find NewsReaderAgent customizer class\");\n return;\n }\n\n // found a customizer, now open it\n Customizer customizer = null;\n\n try {\n customizer = (Customizer) customizerClass.newInstance();\n } catch (Exception exc) {\n System.out.println(\"Error opening customizer - \" + exc.toString());\n return; // bail out\n }\n Point pos = this.getLocation();\n JDialog dlg = (JDialog) customizer;\n\n dlg.setLocation(pos.x + 20, pos.y + 20);\n customizer.setObject(newsReaderAgent);\n dlg.show();\n }", "public void addFilterToCreator(ViewerFilter filter);", "private FiltersManager createFilters() {\n FiltersDescription desc = new FiltersDescription();\n \n desc.addFilter(ATTRIBUTES_FILTER,\n NbBundle.getMessage(NavigatorContent.class, \"LBL_ShowAttributes\"), //NOI18N\n NbBundle.getMessage(NavigatorContent.class, \"LBL_ShowAttributesTip\"), //NOI18N\n showAttributes, ImageUtilities.loadImageIcon(\"org/netbeans/modules/xml/text/navigator/resources/a.png\", false), //NOI18N\n null\n );\n desc.addFilter(CONTENT_FILTER,\n NbBundle.getMessage(NavigatorContent.class, \"LBL_ShowContent\"), //NOI18N\n NbBundle.getMessage(NavigatorContent.class, \"LBL_ShowContentTip\"), //NOI18N\n showContent, ImageUtilities.loadImageIcon(\"org/netbeans/modules/xml/text/navigator/resources/content.png\", false), //NOI18N\n null\n );\n \n return FiltersDescription.createManager(desc);\n }", "public void addFilterToCombo(ViewerFilter filter);", "public void addFilterToToChannel(ViewerFilter filter);", "void init(IWindowCustomizer customizer, GUIBarManager manager);", "public void addFilterToComboRO(ViewerFilter filter);", "public CreateFilterDialog(FilterEditorManager filterManager) {\n\t\tthis.filterManager = filterManager;\n\t\tinitializeDialog();\n\t}", "public void addFilterToFromChannels(ViewerFilter filter);", "void setFilter(Filter aFilter);", "public void addFilterToReader(ViewerFilter filter);", "private JMenu createFilterMenu() {\r\n\t\tJMenu filterMenu = new JMenu(\"Filter\");\r\n\t\t\r\n\t\tfilterMenu.add(new JLabel(\"<html><b>Image filters</b></html>\"));\r\n\t\tJMenuItem blurItem = createMenuItem(0, BLUR_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(blurItem);\r\n\t\tJMenuItem sharpenItem = createMenuItem(0, SHARPEN_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(sharpenItem);\r\n\t\tJMenuItem embossItem = createMenuItem(0, EMBOSS_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(embossItem);\r\n\t\tfilterMenu.add(new JLabel(\"<html><b>Edge detection filters</b></html>\"));\r\n\t\tJMenuItem sobelItem = createMenuItem(0, SOBEL_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(sobelItem);\r\n\t\tJMenuItem laplaceItem = createMenuItem(0, LAPLACE_ACTION, null, 0, null);\r\n\t\tfilterMenu.add(laplaceItem);\r\n\t\t\r\n\t\treturn filterMenu;\r\n\t}", "public CapabilitiesFilterChangeEvent(Object source, Capabilities filter) {\n super(source);\n m_Filter = filter;\n }", "private void actionShowFilters() {\n filterDialog.resetUnfilteredList(Client.reportMap.values());\n filterDialog.show();\n }", "protected void enableActionSetFilterMode()\n {\n Action action = new Action(\"SetFilterMode\"); List<String> allowedValues = new LinkedList<String>();\n action.addInputParameter(new ParameterString(\"FilterMode\", allowedValues));\n iDelegateSetFilterMode = new DoSetFilterMode();\n enableAction(action, iDelegateSetFilterMode);\n }", "public void CreateInputFilter() {\r\n\t\tif (m_InputFilter != null) {\r\n\t\t\tm_InputFilter.Deactivate();\r\n\t\t\tm_InputFilter.Unref();\r\n\t\t\tm_InputFilter = null;\r\n\t\t}\r\n\r\n\t\tm_InputFilter = (CInputFilter) GetModuleByName(GetStringParameter(Esp_parameters.SP_INPUT_FILTER));\r\n\r\n\t\tif (m_InputFilter != null) {\r\n\t\t\tm_InputFilter.Ref();\r\n\t\t\tm_InputFilter.Activate();\r\n\t\t}\r\n\t}", "@UIEffect public ObjectViewer() {\n\n initComponents();\n fc = new JFileChooser();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for property delFlg.
public String getDelFlg() { return delFlg; }
[ "public String getDelFlg() {\n\t\treturn delFlg;\n\t}", "public String getDeleteFlg() {\n\t\treturn deleteFlg;\n\t}", "public void setDelFlg(String delFlg) {\n this.delFlg = delFlg;\n }", "@Transient\n\tpublic String getToDeleteFlg() {\n\t\treturn toDeleteFlg;\n\t}", "public void setDelFlg(String delFlg) {\n\t\tthis.delFlg = delFlg;\n\t}", "public DeletedFlag getDeletedFlg() {\n return deletedFlg;\n }", "public void setDeleteFlg(String deleteFlg) {\n\t\tthis.deleteFlg = deleteFlg;\n\t}", "public String getDelfg() {\n return delfg;\n }", "public String getDelFlag() {\n return delFlag;\n }", "public Boolean getDelflag() {\r\n return delflag;\r\n }", "public Integer getDel() {\n\t\treturn del;\n\t}", "public Integer getDel_flag() {\n return del_flag;\n }", "public Integer getDel() {\r\n return del;\r\n }", "public String getIsDel() {\n return isDel;\n }", "public void setToDeleteFlg(String toDeleteFlg) {\n\t\tthis.toDeleteFlg = toDeleteFlg;\n\t}", "public int getIsDel() {\n return isDel_;\n }", "public Integer getIsDel() {\n return isDel;\n }", "public Integer getIsDel() {\r\n return isDel;\r\n }", "public int getIsDel() {\n return isDel_;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method reads the Exon annotation file, collapses the overlapping Exon regions into one and save it into collapsedExonFileName file. Later it will use the collapsed Exons to replace non Exon regions with N.
public void run(String exonAnnotationFileName, String chr1FileName, String maskedChr1FileName, String collapsedExonFileName) throws IOException { // Reading the Exon annotation file List<RefSeq> refSeqs = readRefSeqs(exonAnnotationFileName); // Collapsing the Exons System.out.println("Collapsing Exons..."); List<RefSeq> collapsedExons = collapseExons(refSeqs); // Save collapsed Exons into a file System.out.println("Saving collapsed Exons into output file..."); saveCollapsedExons(collapsedExonFileName, collapsedExons); // Creating masked Chr1 file System.out.println("Masking non-Exon regions and saving it into output file..."); maskNonExons(collapsedExons, chr1FileName, maskedChr1FileName); System.out.println("Done!"); }
[ "private void saveCollapsedExons(String collapsedExonFileName, List<RefSeq> collapsedExons) throws IOException {\n\t\t// Deleting the output file if it already exists\n\t\tFileUtils.getInstance().deleteIfExists(collapsedExonFileName);\n\t\tPrintWriter out = FileUtils.getInstance().getPrinterWriter(collapsedExonFileName);\n\t\tfor (RefSeq refSeq : collapsedExons) {\n\t\t\tout.println(format(refSeq));\n\t\t}\n\t\tout.close();\n\t}", "public void collapse(int exonFudgeFactor) {\r\n\t\tIterator<String> chrIt = getChromosomeIterator();\r\n\t\tcollapseUTRs();\r\n\t\tSystem.err.println(\"Collapsed UTRs\");\r\n\t\twhile(chrIt.hasNext()) {\r\n\t\t\tString chr = chrIt.next();\r\n\t\t\tIterator<RefSeqGeneWithIsoforms> chrGeneIt = getChrTree(chr).valueIterator();\r\n\t\t\twhile(chrGeneIt.hasNext()) {\r\n\t\t\t\tRefSeqGeneWithIsoforms gene = chrGeneIt.next();\r\n\t\t\t\tgene.colapse(exonFudgeFactor);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.err.println(\"Collapsed transcript with same start and end\");\r\n\t\t\r\n\t\tfilterSingleExons();\r\n\t\t\r\n\t\t\r\n\t\t//BEDFileParser tmpReader = new BEDFileParser();\r\n\t\tList<RefSeqGeneWithIsoforms> toRemove = new ArrayList<RefSeqGeneWithIsoforms>();\r\n\t\tchrIt = getChromosomeIterator();\r\n\t\twhile(chrIt.hasNext()) {\r\n\t\t\tString chr = chrIt.next();\r\n\t\t\tIterator<RefSeqGeneWithIsoforms> chrGeneIt = getChrTree(chr).valueIterator();\r\n\t\t\twhile(chrGeneIt.hasNext()) {\r\n\t\t\t\tRefSeqGeneWithIsoforms gene = chrGeneIt.next();\r\n\t\t\t\tif(toRemove.contains(gene)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString orientation = gene.getOrientation();\r\n\t\t\t\tgene.setOrientation(\"*\");\r\n\t\t\t\tIterator<RefSeqGeneWithIsoforms> overlapIt = getOverlappers(gene).valueIterator();\r\n\t\t\t\tgene.setOrientation(orientation);\r\n\t\t\t\twhile(overlapIt.hasNext()) {\r\n\t\t\t\t\tRefSeqGeneWithIsoforms overlapper = overlapIt.next();\r\n\t\t\t\t\tif(!overlapper.equals(gene) && (overlapper.almostEqual(gene, exonFudgeFactor) || gene.almostContainsStructure(overlapper, exonFudgeFactor))) {\r\n\t\t\t\t\t\ttoRemove.add(overlapper);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.err.println(\"Removed shorter transcript with that have an exon structure already covered; going to remove \" + toRemove.size() + \" transcripts\");\r\n\t\tfor(RefSeqGeneWithIsoforms g : toRemove) {\r\n\t\t\tremove(g);\r\n\t\t}\r\n\t\t\r\n\t}", "public void maskNonExons(List<RefSeq> collapsedExons, String chr1FileName, String maskedChr1FileName) throws IOException {\n\t\t// Deleting the output file if it already exists\n\t\tFileUtils.getInstance().deleteIfExists(maskedChr1FileName);\n\t\tint chr1Index = -1; // Chr1 file index.\n\t\tList<String> chr1Lines = FileUtils.getInstance().readFile(chr1FileName);\n\t\tPrintWriter out = FileUtils.getInstance().getPrinterWriter(maskedChr1FileName);\n\t\tout.println(chr1Lines.get(0));\n\t\tStringBuffer resultLine = null;\n\t\tint collapsedExonsIndex = 0;\n\t\tint startIndex = collapsedExons.get(collapsedExonsIndex).getStartIndex();\n\t\tint endIndex = collapsedExons.get(collapsedExonsIndex).getEndIndex();\n\t\tfor (int i = 1; i < chr1Lines.size(); i++) {\n\t\t\tresultLine = new StringBuffer();\n\t\t\tchar[] chr1LineChars = chr1Lines.get(i).toCharArray();\n\t\t\tfor (char ch : chr1LineChars) {\n\t\t\t\tchr1Index++;\n\t\t\t\t// If we are within the Exon start and end indexes, copy the same character, otherwise print N.\n\t\t\t\tif (startIndex <= chr1Index && chr1Index < endIndex) {\n\t\t\t\t\tresultLine.append(ch);\n\t\t\t\t} else {\n\t\t\t\t\tresultLine.append(CHAR_N);\n\t\t\t\t}\n\t\t\t\t// If we have reached the current collapsedExons end Index, then we get the next one in the list.\n\t\t\t\tif (collapsedExonsIndex < collapsedExons.size() - 1 && chr1Index >= endIndex) {\n\t\t\t\t\tcollapsedExonsIndex++;\n\t\t\t\t\tstartIndex = collapsedExons.get(collapsedExonsIndex).getStartIndex();\n\t\t\t\t\tendIndex = collapsedExons.get(collapsedExonsIndex).getEndIndex();\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(resultLine.toString());\n\t\t}\n\t\tout.close();\n\t}", "public static void readDnaseAllFileAugmentWrite( String outputFolder, MultipleTestingType multipleTestingParameter,\r\n\t\t\tFloat FDR, Float bonfCorrectionSignificanceLevel, String inputFileName, String outputFileName) {\r\n\r\n\t\tString strLine1;\r\n\t\tString strLine2;\r\n\r\n\t\tint indexofFirstTab;\r\n\t\tint indexofSecondTab;\r\n\t\tint indexofThirdTab;\r\n\t\tint indexofFourthTab;\r\n\t\tint indexofFifthTab;\r\n\t\tint indexofSixthTab;\r\n\t\tint indexofSeventhTab;\r\n\t\tint indexofEigthTab;\r\n\t\tint indexofNinethTab;\r\n\r\n\t\tString dnaseElementName;\r\n\r\n\t\tFloat bonfCorrectedPValue;\r\n\t\tFloat bhFDRAdjustedPValue;\r\n\r\n\t\tBufferedReader bufferedReader = null;\r\n\t\tBufferedWriter bufferedWriter = null;\r\n\r\n\t\tFileReader dnaseOriginalOverlapFileReader = null;\r\n\t\tBufferedReader dnaseOriginalOverlapBufferedReader = null;\r\n\r\n\t\tList<String> enrichedDnaseElements = new ArrayList<String>();\r\n\r\n\t\tString givenIntervalChrName;\r\n\t\tint givenIntervalZeroBasedStart;\r\n\t\tint givenIntervalZeroBasedEnd;\r\n\t\tString overlapChrName;\r\n\t\tint overlapZeroBasedStart;\r\n\t\tint overlapZeroBasedEnd;\r\n\t\tString rest;\r\n\r\n\t\tint givenIntervalOneBasedStart;\r\n\t\tint givenIntervalOneBasedEnd;\r\n\r\n\t\tint overlapOneBasedStart;\r\n\t\tint overlapOneBasedEnd;\r\n\r\n\t\ttry{\r\n\r\n\t\t\tbufferedReader = new BufferedReader( new FileReader( outputFolder + inputFileName));\r\n\t\t\tbufferedWriter = new BufferedWriter( FileOperations.createFileWriter( outputFolder + outputFileName));\r\n\r\n\t\t\t// skip headerLine\r\n\t\t\t// Element OriginalNumberofOverlaps\r\n\t\t\t// NumberofPermutationsHavingNumberofOverlapsGreaterThanorEqualTo in\r\n\t\t\t// 10 Permutations Number of Permutations Number of comparisons\r\n\t\t\t// empiricalPValue BonfCorrPVlaue: numberOfComparisons 82 BH FDR\r\n\t\t\t// Adjusted P Value Reject Null Hypothesis for an FDR of 0.05\r\n\t\t\tstrLine1 = bufferedReader.readLine();\r\n\r\n\t\t\twhile( ( strLine1 = bufferedReader.readLine()) != null){\r\n\t\t\t\t// old example lines\r\n\t\t\t\t// Element OriginalNumberofOverlaps\r\n\t\t\t\t// NumberofPermutationsHavingNumberofOverlapsGreaterThanorEqualTo\r\n\t\t\t\t// in 8 Permutations Number of Permutations Number of\r\n\t\t\t\t// comparisons empiricalPValue BonfCorrPValue for 82 comparisons\r\n\t\t\t\t// BH FDR Adjusted P Value Reject Null Hypothesis for an FDR of\r\n\t\t\t\t// 0.05\r\n\t\t\t\t// NHDF_NEO 51 0 8 82 0.00E+00 0.00E+00 0.00E+00 TRUE\r\n\r\n\t\t\t\t// new example lines\r\n\t\t\t\t// Element Number Element Name OriginalNumberofOverlaps\r\n\t\t\t\t// NumberofPermutationsHavingNumberofOverlapsGreaterThanorEqualTo\r\n\t\t\t\t// in 5000 Permutations Number of Permutations Number of\r\n\t\t\t\t// comparisons empiricalPValue BonfCorrPValue for 82 comparisons\r\n\t\t\t\t// BH FDR Adjusted P Value Reject Null Hypothesis for an FDR of\r\n\t\t\t\t// 0.05\r\n\t\t\t\t// 560000 HRCE 45 402 5000 82 8.04E-02 1.00E+00 4.71E-01 FALSE\r\n\r\n\t\t\t\tindexofFirstTab = strLine1.indexOf( '\\t');\r\n\t\t\t\tindexofSecondTab = strLine1.indexOf( '\\t', indexofFirstTab + 1);\r\n\t\t\t\tindexofThirdTab = strLine1.indexOf( '\\t', indexofSecondTab + 1);\r\n\t\t\t\tindexofFourthTab = strLine1.indexOf( '\\t', indexofThirdTab + 1);\r\n\t\t\t\tindexofFifthTab = strLine1.indexOf( '\\t', indexofFourthTab + 1);\r\n\t\t\t\tindexofSixthTab = strLine1.indexOf( '\\t', indexofFifthTab + 1);\r\n\t\t\t\tindexofSeventhTab = strLine1.indexOf( '\\t', indexofSixthTab + 1);\r\n\t\t\t\tindexofEigthTab = strLine1.indexOf( '\\t', indexofSeventhTab + 1);\r\n\t\t\t\tindexofNinethTab = strLine1.indexOf( '\\t', indexofEigthTab + 1);\r\n\r\n\t\t\t\tdnaseElementName = strLine1.substring( indexofFirstTab + 1, indexofSecondTab);\r\n\r\n\t\t\t\t// Pay attention to the order\r\n\t\t\t\tbonfCorrectedPValue = Float.parseFloat( strLine1.substring( indexofSeventhTab + 1, indexofEigthTab));\r\n\t\t\t\tbhFDRAdjustedPValue = Float.parseFloat( strLine1.substring( indexofEigthTab + 1, indexofNinethTab));\r\n\r\n\t\t\t\tif( multipleTestingParameter.isBenjaminiHochbergFDR()){\r\n\r\n\t\t\t\t\tif( bhFDRAdjustedPValue <= FDR){\r\n\t\t\t\t\t\tenrichedDnaseElements.add( dnaseElementName);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else if( multipleTestingParameter.isBonferroniCorrection()){\r\n\r\n\t\t\t\t\tif( bonfCorrectedPValue <= bonfCorrectionSignificanceLevel){\r\n\t\t\t\t\t\tenrichedDnaseElements.add( dnaseElementName);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}// end of while : reading enriched dnase elements file line by\r\n\t\t\t\t// line.\r\n\r\n\t\t\t// starts\r\n\t\t\tfor( String dnaseName : enrichedDnaseElements){\r\n\r\n\t\t\t\tbufferedWriter.write( \"**************\" + \"\\t\" + dnaseName + \"\\t\" + \"**************\" + System.getProperty( \"line.separator\"));\r\n\r\n\t\t\t\tdnaseOriginalOverlapFileReader = FileOperations.createFileReader( outputFolder + Commons.DNASE_ANNOTATION_DIRECTORY + dnaseName + \".txt\");\r\n\t\t\t\tdnaseOriginalOverlapBufferedReader = new BufferedReader( dnaseOriginalOverlapFileReader);\r\n\r\n\t\t\t\t// Get all the lines of the original data annotation for the\r\n\t\t\t\t// enriched Dnase\r\n\t\t\t\t// Write them to the file\r\n\t\t\t\twhile( ( strLine2 = dnaseOriginalOverlapBufferedReader.readLine()) != null){\r\n\r\n\t\t\t\t\t// process strLine2\r\n\t\t\t\t\tif( strLine2.contains( \"Search\")){\r\n\t\t\t\t\t\tbufferedWriter.write( dnaseName + \"\\t\" + strLine2 + System.getProperty( \"line.separator\"));\r\n\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\t// Searched for chr given interval low given interval\r\n\t\t\t\t\t\t// high dnase overlap chrom name node low node high node\r\n\t\t\t\t\t\t// CellLineName node FileName\r\n\t\t\t\t\t\t// chr10 104846177 104846177 CHROMOSOME10 104846080\r\n\t\t\t\t\t\t// 104846229 AG04449\r\n\t\t\t\t\t\t// AG04449-DS12319.peaks.fdr0.01.hg19.bed\r\n\t\t\t\t\t\t// chr10 104846177 104846177 CHROMOSOME10 104846100\r\n\t\t\t\t\t\t// 104846249 AG04449\r\n\t\t\t\t\t\t// AG04449-DS12329.peaks.fdr0.01.hg19.bed\r\n\r\n\t\t\t\t\t\tindexofFirstTab = strLine2.indexOf( '\\t');\r\n\t\t\t\t\t\tindexofSecondTab = strLine2.indexOf( '\\t', indexofFirstTab + 1);\r\n\t\t\t\t\t\tindexofThirdTab = strLine2.indexOf( '\\t', indexofSecondTab + 1);\r\n\t\t\t\t\t\tindexofFourthTab = strLine2.indexOf( '\\t', indexofThirdTab + 1);\r\n\t\t\t\t\t\tindexofFifthTab = strLine2.indexOf( '\\t', indexofFourthTab + 1);\r\n\t\t\t\t\t\tindexofSixthTab = strLine2.indexOf( '\\t', indexofFifthTab + 1);\r\n\r\n\t\t\t\t\t\tgivenIntervalChrName = strLine2.substring( 0, indexofFirstTab);\r\n\t\t\t\t\t\tgivenIntervalZeroBasedStart = Integer.parseInt( strLine2.substring( indexofFirstTab + 1,\r\n\t\t\t\t\t\t\t\tindexofSecondTab));\r\n\t\t\t\t\t\tgivenIntervalZeroBasedEnd = Integer.parseInt( strLine2.substring( indexofSecondTab + 1,\r\n\t\t\t\t\t\t\t\tindexofThirdTab));\r\n\r\n\t\t\t\t\t\toverlapChrName = strLine2.substring( indexofThirdTab + 1, indexofFourthTab);\r\n\t\t\t\t\t\toverlapZeroBasedStart = Integer.parseInt( strLine2.substring( indexofFourthTab + 1,\r\n\t\t\t\t\t\t\t\tindexofFifthTab));\r\n\t\t\t\t\t\toverlapZeroBasedEnd = Integer.parseInt( strLine2.substring( indexofFifthTab + 1,\r\n\t\t\t\t\t\t\t\tindexofSixthTab));\r\n\r\n\t\t\t\t\t\trest = strLine2.substring( indexofSixthTab + 1);\r\n\r\n\t\t\t\t\t\tgivenIntervalOneBasedStart = givenIntervalZeroBasedStart + 1;\r\n\t\t\t\t\t\tgivenIntervalOneBasedEnd = givenIntervalZeroBasedEnd + 1;\r\n\r\n\t\t\t\t\t\toverlapOneBasedStart = overlapZeroBasedStart + 1;\r\n\t\t\t\t\t\toverlapOneBasedEnd = overlapZeroBasedEnd + 1;\r\n\r\n\t\t\t\t\t\tbufferedWriter.write( dnaseName + \"\\t\" + givenIntervalChrName + \"\\t\" + givenIntervalOneBasedStart + \"\\t\" + givenIntervalOneBasedEnd + \"\\t\" + overlapChrName + \"\\t\" + overlapOneBasedStart + \"\\t\" + overlapOneBasedEnd + \"\\t\" + rest + System.getProperty( \"line.separator\"));\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}// End of while\r\n\r\n\t\t\t}// End of for\r\n\t\t\t\t// ends\r\n\r\n\t\t\t// Close\r\n\t\t\tbufferedWriter.close();\r\n\t\t\tbufferedReader.close();\r\n\r\n\t\t\tif( dnaseOriginalOverlapBufferedReader != null){\r\n\t\t\t\tdnaseOriginalOverlapBufferedReader.close();\r\n\t\t\t}\r\n\r\n\t\t}catch( FileNotFoundException e){\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}catch( IOException e){\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private void _parseExon() {\n\t\ttry {\n\t\t\t// assemble the Exon\n\t\t\tint exon_start = Integer.parseInt(_line[ _exonStartField ]);\n\t\t\tint exon_end = Integer.parseInt(_line[ _exonEndField ]);\n\t\t\tString exon_name = _line[ _exonIdField ];\n\t\t\tboolean constitutive = intToBool( Integer.parseInt(_line[ _isConstitutiveField ]) );\t\t\t \n\t\t\tExon exon = \n\t\t\t\tnew Exon(new SimpleSequence(_location,exon_start,exon_end), exon_name, constitutive );\n\t\t\t// add the Exon\n\t\t\t_exons.add(exon);\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEnvironment.errorMessage(\"Error parsing Exon !\");\n\t\t}\n\t}", "public List<RefSeq> readRefSeqs(String exonAnnotationFileName) throws IOException {\n\t\tSystem.out.println(\"Reading the Exon annotation file...\");\n\t\tList<String> exonAnnotLines = FileUtils.getInstance().readFile(exonAnnotationFileName);\n\t\t// Converting the file lines into RefSeq\n\t\tSystem.out.println(\"Converting Exon annotations...\");\n\t\treturn toRefSeq(exonAnnotLines);\n\t}", "private void Fix()\n\t{\n\t\tfor (int i = 0; i < annotationPaths.size(); i++)\n\t\t{\n\t\t\tString xmlPath = annotationPaths.get(i).toString();\n\t\t\t//if (!xmlPath.endsWith(\"PMC3173667_kcj-41-464-g006_data.xml\")) continue;\n\t\t\t\n\t\t\tFile annotationFile = new File(xmlPath);\n\t\t\t//Load annotation\n\t\t\ttry {\n\t\t\t\tfixPanelSegGt(annotationFile);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void collapseUTRs() {\r\n\t\tBEDFileParser tmpReader = new BEDFileParser();\r\n\t\tint numMergedGenes=0;\r\n\t\t Iterator<String> chrIt = getChromosomeIterator();\r\n\t\t while(chrIt.hasNext()) {\r\n\t\t\t String chr = chrIt.next();\r\n\t\t\t Iterator<RefSeqGeneWithIsoforms> chrGeneIt = getChrTree(chr).valueIterator();\r\n\t\t\t while(chrGeneIt.hasNext()) {\r\n\t\t\t\t RefSeqGeneWithIsoforms gene = chrGeneIt.next();\r\n\t\t\t\t gene.standardizeOreintation();\r\n\t\t\t\t if(gene.getNumExons() == 1 || gene.isUnoriented()) {\r\n\t\t\t\t\t tmpReader.addRefSeq(gene);\r\n\t\t\t\t\t continue;\r\n\t\t\t\t }\r\n\t\t\t\t Iterator<RefSeqGeneWithIsoforms> overlapIt = tmpReader.getOverlappers(gene).valueIterator();\r\n\t\t\t\t if(!overlapIt.hasNext()) {\r\n\t\t\t\t\t tmpReader.addRefSeq(gene);\r\n\t\t\t\t } else {\r\n\t\t\t\t\t boolean mergedToAnotherGene = false;\r\n\t\t\t\t\t while(overlapIt.hasNext() && !mergedToAnotherGene) {\r\n\t\t\t\t\t\t RefSeqGeneWithIsoforms overlapper = overlapIt.next();\r\n\t\t\t\t\t\t if(overlapper.getNumExons() == 1 || !overlapper.getOrientation().equals(gene.getOrientation()) ) {\r\n\t\t\t\t\t\t\t continue;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t //temporaryOrientTranscriptPair(gene, overlapper);\r\n\t\t\t\t\t\t //System.err.println(\"Gene orientation \" + gene.getOrientation() + \" overlapper oreintation \" + overlapper.getOrientation());\r\n\t\t\t\t\t\t if(overlapper.get3PrimeExon().overlaps(gene.get3PrimeExon()) && overlapper.get5PrimeExon().overlaps(gene.get5PrimeExon())) {\r\n\t\t\t\t\t\t\t mergedToAnotherGene = true;\r\n\t\t\t\t\t\t\t //System.err.println(\"GENE before updating: \\n\" + gene.allIsoformsToBED());\r\n\t\t\t\t\t\t\t //System.err.println(\"OVERLPR before updating: \\n\" + overlapper.allIsoformsToBED());\r\n\t\t\t\t\t\t\t numMergedGenes++;\r\n\t\t\t\t\t\t\t tmpReader.remove(overlapper);\r\n\t\t\t\t\t\t\t //System.err.println(\"Merging\\n\\t\" + gene.toBED() + \"\\n\\t with\\n\\t \" + overlapper.toBED());\r\n\t\t\t\t\t\t\t //System.err.println(\"\\tgene's 5' and 3' exons: \" + gene.get5PrimeExon().toUCSC() + \" --- \" + gene.get3PrimeExon().toUCSC());\r\n\t\t\t\t\t\t\t //System.err.println(\"\\toverlapper's 5' and 3' exons: \" + overlapper.get5PrimeExon().toUCSC() + \" --- \" + overlapper.get3PrimeExon().toUCSC());\r\n\t\t\t\t\t\t\t if(\"+\".equals(gene.getOrientation())) {\r\n\t\t\t\t\t\t\t\t if(gene.getEnd() > overlapper.getEnd()) {\r\n\t\t\t\t\t\t\t\t\t overlapper.set3PrimeEnd(gene.getEnd());\r\n\t\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t\t gene.set3PrimeEnd(overlapper.getEnd());\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t if(gene.getStart() < overlapper.getStart()) {\r\n\t\t\t\t\t\t\t\t\t overlapper.set5PrimeEnd(gene.getStart());\r\n\t\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t\t gene.set5PrimeEnd(overlapper.getStart());\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t } else if (\"-\".equals(gene.getOrientation())) {\r\n\t\t\t\t\t\t\t\t if(gene.getEnd() > overlapper.getEnd()) {\r\n\t\t\t\t\t\t\t\t\t overlapper.set5PrimeEnd(gene.getEnd());\r\n\t\t\t\t\t\t\t\t }else {\r\n\t\t\t\t\t\t\t\t\t gene.set5PrimeEnd(overlapper.getEnd());\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t if(gene.getStart() < overlapper.getStart()) {\r\n\t\t\t\t\t\t\t\t\t overlapper.set3PrimeEnd(gene.getStart());\r\n\t\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t\t gene.set3PrimeEnd(overlapper.getStart());\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t //System.err.println(\"GENE after updating: \\n\" + gene.allIsoformsToBED());\r\n\t\t\t\t\t\t\t //System.err.println(\"OVERLPR after updating: \\n\" + overlapper.allIsoformsToBED());\r\n\t\t\t\t\t\t\t //System.err.println(\"\\n\\n\");\r\n\t\t\t\t\t\t\t boolean result = overlapper.AddAllIsoNotIncludedforms(gene);\r\n\t\r\n\t\t\t\t\t\t\t if(!result){\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t System.err.println(\"WARN: Could not add \"+gene.toUCSC() + \" to \" + overlapper.toUCSC() );\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\t tmpReader.addRefSeq(overlapper);\r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t }\r\n\t\t\t\t\t if(!mergedToAnotherGene) {\r\n\t\t\t\t\t\t tmpReader.addRefSeq(gene);\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t\t this.annotationSetMap = tmpReader.annotationSetMap;\r\n\t\t this.nameAnnotationMap = tmpReader.nameAnnotationMap;\r\n\t\t System.err.println(\"3' UTR merged \"+ numMergedGenes + \" genes\");\r\n\t}", "public static void readHistoneAllFileAugmentWrite( String outputFolder,\r\n\t\t\tMultipleTestingType multipleTestingParameter, Float FDR, Float bonfCorrectionSignificanceLevel,\r\n\t\t\tString inputFileName, String outputFileName) {\r\n\r\n\t\tString strLine1;\r\n\t\tString strLine2;\r\n\r\n\t\tint indexofFirstTab;\r\n\t\tint indexofSecondTab;\r\n\t\tint indexofThirdTab;\r\n\t\tint indexofFourthTab;\r\n\t\tint indexofFifthTab;\r\n\t\tint indexofSixthTab;\r\n\t\tint indexofSeventhTab;\r\n\t\tint indexofEigthTab;\r\n\t\tint indexofNinethTab;\r\n\r\n\t\tString histoneNameCellLineName;\r\n\r\n\t\tFloat bonfCorrectedPValue;\r\n\t\tFloat bhFDRAdjustedPValue;\r\n\r\n\t\tBufferedReader bufferedReader = null;\r\n\t\tBufferedWriter bufferedWriter = null;\r\n\t\tBufferedReader histoneOriginalOverlapsBufferedReader = null;\r\n\r\n\t\tList<String> enrichedHistoneElements = new ArrayList<String>();\r\n\r\n\t\tString givenIntervalChrName;\r\n\t\tint givenIntervalZeroBasedStart;\r\n\t\tint givenIntervalZeroBasedEnd;\r\n\t\tString overlapChrName;\r\n\t\tint overlapZeroBasedStart;\r\n\t\tint overlapZeroBasedEnd;\r\n\t\tString rest;\r\n\r\n\t\tint givenIntervalOneBasedStart;\r\n\t\tint givenIntervalOneBasedEnd;\r\n\r\n\t\tint overlapOneBasedStart;\r\n\t\tint overlapOneBasedEnd;\r\n\r\n\t\ttry{\r\n\r\n\t\t\tbufferedReader = new BufferedReader( new FileReader( outputFolder + inputFileName));\r\n\r\n\t\t\tbufferedWriter = new BufferedWriter( FileOperations.createFileWriter( outputFolder + outputFileName));\r\n\r\n\t\t\t// skip headerLine\r\n\t\t\t// Element OriginalNumberofOverlaps\r\n\t\t\t// NumberofPermutationsHavingNumberofOverlapsGreaterThanorEqualTo in\r\n\t\t\t// 10 Permutations Number of Permutations Number of comparisons\r\n\t\t\t// empiricalPValue BonfCorrPVlaue: numberOfComparisons 82 BH FDR\r\n\t\t\t// Adjusted P Value Reject Null Hypothesis for an FDR of 0.05\r\n\t\t\tstrLine1 = bufferedReader.readLine();\r\n\r\n\t\t\twhile( ( strLine1 = bufferedReader.readLine()) != null){\r\n\r\n\t\t\t\t// old example line\r\n\t\t\t\t// H2AZ_K562 129 0 10 162 0.00E+00 0.00E+00 0.00E+00 TRUE\r\n\r\n\t\t\t\t// new example lines\r\n\t\t\t\t// Element Number Element Name OriginalNumberofOverlaps\r\n\t\t\t\t// NumberofPermutationsHavingNumberofOverlapsGreaterThanorEqualTo\r\n\t\t\t\t// in 5000 Permutations Number of Permutations Number of\r\n\t\t\t\t// comparisons empiricalPValue BonfCorrPValue for 162\r\n\t\t\t\t// comparisons BH FDR Adjusted P Value Reject Null Hypothesis\r\n\t\t\t\t// for an FDR of 0.05\r\n\t\t\t\t// 300630000 H3K27ME3_K562 360 0 5000 162 0.00E+00 0.00E+00\r\n\t\t\t\t// 0.00E+00 TRUE\r\n\r\n\t\t\t\tindexofFirstTab = strLine1.indexOf( '\\t');\r\n\t\t\t\tindexofSecondTab = strLine1.indexOf( '\\t', indexofFirstTab + 1);\r\n\t\t\t\tindexofThirdTab = strLine1.indexOf( '\\t', indexofSecondTab + 1);\r\n\t\t\t\tindexofFourthTab = strLine1.indexOf( '\\t', indexofThirdTab + 1);\r\n\t\t\t\tindexofFifthTab = strLine1.indexOf( '\\t', indexofFourthTab + 1);\r\n\t\t\t\tindexofSixthTab = strLine1.indexOf( '\\t', indexofFifthTab + 1);\r\n\t\t\t\tindexofSeventhTab = strLine1.indexOf( '\\t', indexofSixthTab + 1);\r\n\t\t\t\tindexofEigthTab = strLine1.indexOf( '\\t', indexofSeventhTab + 1);\r\n\t\t\t\tindexofNinethTab = strLine1.indexOf( '\\t', indexofEigthTab + 1);\r\n\r\n\t\t\t\thistoneNameCellLineName = strLine1.substring( indexofFirstTab + 1, indexofSecondTab);\r\n\r\n\t\t\t\t// Pay attention to the order\r\n\t\t\t\tbonfCorrectedPValue = Float.parseFloat( strLine1.substring( indexofSeventhTab + 1, indexofEigthTab));\r\n\t\t\t\tbhFDRAdjustedPValue = Float.parseFloat( strLine1.substring( indexofEigthTab + 1, indexofNinethTab));\r\n\r\n\t\t\t\tif( multipleTestingParameter.isBenjaminiHochbergFDR()){\r\n\t\t\t\t\tif( bhFDRAdjustedPValue <= FDR){\r\n\t\t\t\t\t\tenrichedHistoneElements.add( histoneNameCellLineName);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if( multipleTestingParameter.isBonferroniCorrection()){\r\n\t\t\t\t\tif( bonfCorrectedPValue <= bonfCorrectionSignificanceLevel){\r\n\t\t\t\t\t\tenrichedHistoneElements.add( histoneNameCellLineName);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}// end of while : reading enriched dnase elements file line by\r\n\t\t\t\t// line.\r\n\r\n\t\t\t// starts\r\n\t\t\tfor( String histoneElementName : enrichedHistoneElements){\r\n\r\n\t\t\t\tbufferedWriter.write( \"**************\" + \"\\t\" + histoneElementName + \"\\t\" + \"**************\" + System.getProperty( \"line.separator\"));\r\n\r\n\t\t\t\thistoneOriginalOverlapsBufferedReader = new BufferedReader( new FileReader(\r\n\t\t\t\t\t\toutputFolder + Commons.HISTONE_ANNOTATION_DIRECTORY + histoneElementName + \".txt\"));\r\n\r\n\t\t\t\t// Get all the lines of the original data annotation for the\r\n\t\t\t\t// enriched Histone elements\r\n\t\t\t\t// Write them to the file\r\n\t\t\t\twhile( ( strLine2 = histoneOriginalOverlapsBufferedReader.readLine()) != null){\r\n\r\n\t\t\t\t\t// process strLine2\r\n\t\t\t\t\tif( strLine2.contains( \"Search\")){\r\n\t\t\t\t\t\tbufferedWriter.write( histoneElementName + \"\\t\" + strLine2 + System.getProperty( \"line.separator\"));\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// Searched for chr interval low interval high histone\r\n\t\t\t\t\t\t// node chrom name node Low node high node HistoneName\r\n\t\t\t\t\t\t// node CellLineName node FileName\r\n\t\t\t\t\t\t// chr1 11862777 11862777 CHROMOSOME1 11862018 11864248\r\n\t\t\t\t\t\t// H2AZ GM12878\r\n\t\t\t\t\t\t// wgEncodeBroadHistoneGm12878H2azStdAln.narrowPeak\r\n\t\t\t\t\t\t// Searched for chr interval low interval high histone\r\n\t\t\t\t\t\t// node chrom name node Low node high node HistoneName\r\n\t\t\t\t\t\t// node CellLineName node FileName\r\n\t\t\t\t\t\t// chr17 47440465 47440465 CHROMOSOME17 47437087\r\n\t\t\t\t\t\t// 47440781 H2AZ GM12878\r\n\t\t\t\t\t\t// wgEncodeBroadHistoneGm12878H2azStdAln.narrowPeak\r\n\r\n\t\t\t\t\t\tindexofFirstTab = strLine2.indexOf( '\\t');\r\n\t\t\t\t\t\tindexofSecondTab = strLine2.indexOf( '\\t', indexofFirstTab + 1);\r\n\t\t\t\t\t\tindexofThirdTab = strLine2.indexOf( '\\t', indexofSecondTab + 1);\r\n\t\t\t\t\t\tindexofFourthTab = strLine2.indexOf( '\\t', indexofThirdTab + 1);\r\n\t\t\t\t\t\tindexofFifthTab = strLine2.indexOf( '\\t', indexofFourthTab + 1);\r\n\t\t\t\t\t\tindexofSixthTab = strLine2.indexOf( '\\t', indexofFifthTab + 1);\r\n\r\n\t\t\t\t\t\tgivenIntervalChrName = strLine2.substring( 0, indexofFirstTab);\r\n\t\t\t\t\t\tgivenIntervalZeroBasedStart = Integer.parseInt( strLine2.substring( indexofFirstTab + 1,\r\n\t\t\t\t\t\t\t\tindexofSecondTab));\r\n\t\t\t\t\t\tgivenIntervalZeroBasedEnd = Integer.parseInt( strLine2.substring( indexofSecondTab + 1,\r\n\t\t\t\t\t\t\t\tindexofThirdTab));\r\n\r\n\t\t\t\t\t\toverlapChrName = strLine2.substring( indexofThirdTab + 1, indexofFourthTab);\r\n\t\t\t\t\t\toverlapZeroBasedStart = Integer.parseInt( strLine2.substring( indexofFourthTab + 1,\r\n\t\t\t\t\t\t\t\tindexofFifthTab));\r\n\t\t\t\t\t\toverlapZeroBasedEnd = Integer.parseInt( strLine2.substring( indexofFifthTab + 1,\r\n\t\t\t\t\t\t\t\tindexofSixthTab));\r\n\r\n\t\t\t\t\t\trest = strLine2.substring( indexofSixthTab + 1);\r\n\r\n\t\t\t\t\t\tgivenIntervalOneBasedStart = givenIntervalZeroBasedStart + 1;\r\n\t\t\t\t\t\tgivenIntervalOneBasedEnd = givenIntervalZeroBasedEnd + 1;\r\n\r\n\t\t\t\t\t\toverlapOneBasedStart = overlapZeroBasedStart + 1;\r\n\t\t\t\t\t\toverlapOneBasedEnd = overlapZeroBasedEnd + 1;\r\n\r\n\t\t\t\t\t\tbufferedWriter.write( histoneElementName + \"\\t\" + givenIntervalChrName + \"\\t\" + givenIntervalOneBasedStart + \"\\t\" + givenIntervalOneBasedEnd + \"\\t\" + overlapChrName + \"\\t\" + overlapOneBasedStart + \"\\t\" + overlapOneBasedEnd + \"\\t\" + rest + System.getProperty( \"line.separator\"));\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}// End of while\r\n\r\n\t\t\t}// End of for\r\n\t\t\t\t// ends\r\n\r\n\t\t\t// Close\r\n\t\t\tbufferedWriter.close();\r\n\t\t\tbufferedReader.close();\r\n\r\n\t\t\tif( histoneOriginalOverlapsBufferedReader != null){\r\n\t\t\t\thistoneOriginalOverlapsBufferedReader.close();\r\n\t\t\t}\r\n\r\n\t\t}catch( FileNotFoundException e){\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}catch( IOException e){\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private void outputGeneExpInfo(Exp3pAnnotationMap annomap, Exp3pExpressionMap expmap) throws FileNotFoundException, IOException {\n\n if (outputgene == null && annomap.genenames.size() > 0) {\n return;\n }\n\n StringBuilder sb;\n\n // create output stream\n OutputStream os = OutputStreamMaker.makeOutputStream(outputgene);\n\n // output the header\n sb = new StringBuilder();\n sb.append(getOutputHeader());\n sb.append(\"Region.id\\tStrand\");\n int numsamples = bamfiles.size();\n for (int i = 0; i < numsamples; i++) {\n String nowlabel = labels.get(i); \n sb.append(\"\\t\").append(nowlabel).append(\".count\").\n append(\"\\t\").append(nowlabel).append(\".EPM\").\n append(\"\\t\").append(nowlabel).append(\".EPM.low\").\n append(\"\\t\").append(nowlabel).append(\".EPM.high\");\n }\n sb.append(\"\\n\");\n os.write(sb.toString().getBytes());\n\n // output information on all the transcripts\n DecimalFormat scoreformat1 = new DecimalFormat(\"0.0\");\n DecimalFormat scoreformat2 = new DecimalFormat(\"0.###E0\");\n sb = new StringBuilder();\n for (int i = 0; i < annomap.genenames.size(); i++) {\n String nowgene = annomap.genenames.get(i);\n String[] alltxs = annomap.getTxFromGene(nowgene);\n\n // write the first few columns in output\n sb.append(nowgene).\n append(\"\\t\").append(getConsensusStrand(alltxs));\n \n // write a row of information about each sample, each category of information\n for (int j = 0; j < numsamples; j++) {\n double reads = 0.0;\n double totmapped = mappedreadsM.get(j);\n\n double[] eest = new double[alltxs.length];\n double[] eestLo = new double[alltxs.length];\n double[] eestHi = new double[alltxs.length];\n\n double totSqDevLo = 0.0;\n double totSqDevHi = 0.0;\n double totEPM = 0.0;\n double totCount = 0.0;\n \n // collect readcounts on all transcripts\n for (int z = 0; z < alltxs.length; z++) {\n String nowname = alltxs[z];\n ExpressionInfo ei = expmap.get(nowname);\n // get the length of the transcript region measured\n // this will be used to normalize the expression value by the length of transcript\n int nowlen = annomap.getTxLength(nowname);\n double nowlendbl = (double) nowlen;\n // but in tfill normalization, always renormalize by a fixed length, e.g. length of read\n if (tfillnorm > 0) {\n nowlendbl = tfillnorm;\n }\n // adjust the read counts \n reads = ei.getInfoAt(j, 3);\n totmapped = totmapped * nowlendbl / 1000.0;\n eest[z] = reads / totmapped;\n eestLo[z] = Math.max(0, reads - (rescaleIntervalFactor * Math.sqrt(reads + 0.5))) / totmapped;\n eestHi[z] = (reads + (rescaleIntervalFactor * Math.sqrt(reads + 0.5))) / totmapped;\n\n // keep track of totals\n totEPM += eest[z];\n totSqDevLo += Math.pow(eestLo[z] - eest[z], 2);\n totSqDevHi += Math.pow(eestHi[z] - eest[z], 2);\n totCount += reads;\n }\n\n sb.append(\"\\t\").append(scoreformat1.format(totCount)).\n append(\"\\t\").append(scoreformat2.format(totEPM)).\n append(\"\\t\").append(scoreformat2.format(Math.max(0, totEPM - Math.sqrt(totSqDevLo)))).\n append(\"\\t\").append(scoreformat2.format(totEPM + Math.sqrt(totSqDevHi)));\n }\n sb.append(\"\\n\");\n\n if (sb.length() > 100000) {\n os.write(sb.toString().getBytes());\n sb = new StringBuilder();\n }\n\n }\n // write leftover information\n if (sb.length() > 0) {\n os.write(sb.toString().getBytes());\n }\n\n // always clean up the streams at the end.\n if (os != System.out) {\n os.close();\n }\n }", "public void readRegions( String filename ) {\r\n\t\ttry {\r\n\t\t\ts.readRegions(filename, ignoreY);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected void createDuplicatesAnnotations()\r\n {\r\n String source = \"duplicates\"; \r\n addAnnotation\r\n (ocularListOfSurgeriesSectionEClass, \r\n source, \r\n new String[] {\r\n }); \r\n addAnnotation\r\n (ocularCodedListOfSurgeriesSectionEClass, \r\n source, \r\n new String[] {\r\n }); \r\n addAnnotation\r\n (ocularHistorySectionEClass, \r\n source, \r\n new String[] {\r\n }); \r\n addAnnotation\r\n (ophthalmicMedicationsSectionEClass, \r\n source, \r\n new String[] {\r\n }); \r\n addAnnotation\r\n (routineEyeExamSectionEClass, \r\n source, \r\n new String[] {\r\n }); \r\n addAnnotation\r\n (ocularPhysicalExamSectionEClass, \r\n source, \r\n new String[] {\r\n }); \r\n }", "private void parse() {\n Map<TermId, Collection<AnnotationLine>> annotationCollector = new HashMap<>();\n String line;\n try (BufferedReader br = new BufferedReader(new FileReader(this.genePhenoPath))){\n while ((line = br.readLine()) != null) {\n //System.out.println(line);\n String[] A = line.split(\"\\t\");\n /* Expected number of fields of the MGI_GenePheno.rpt file (note -- there\n appears to be a stray tab between the penultimate and last column) */\n int EXPECTED_NUMBER_OF_FIELDS = 8;\n if (A.length < EXPECTED_NUMBER_OF_FIELDS) {\n if (verbose) {\n //throw new PhenolException(\"Unexpected number of fields (\" + A.length + \") in line \" + line);\n System.err.println(\"[Phenol-ERROR] Unexpected number of fields in MGI_GenePheno.rpt (\" + A.length + \") in line \" + line);\n }\n continue;\n }\n try {\n AnnotationLine annot = new AnnotationLine(A);\n TermId modelId = annot.getGenotypeAccessionId();\n annotationCollector.computeIfAbsent(modelId, key -> new HashSet<>()).add(annot);\n } catch (PhenolException e) {\n String err = String.format(\"[PARSE ERROR] %s (%s)\", e.getMessage(), line);\n this.parseErrors.add(err);\n }\n }\n } catch (IOException ioe) {\n throw new PhenolRuntimeException(\"Could not parse MGI_GenePheno.rpt: \" + ioe.getMessage());\n }\n // When we get here, we have parsed all of the MGI_GenePheno.rpt file.\n // Annotation lines are groups according to genotype accession id in the multimap\n // our goal in the following is to parse everything into corresponding MpSimpleModel objects\n Map<TermId, MpSimpleModel> builder = new HashMap<>();\n for (TermId genoId : annotationCollector.keySet()) {\n Collection<AnnotationLine> annotationLines = annotationCollector.get(genoId);\n List<MpAnnotation> annotbuilder = new ArrayList<>();\n Iterator<AnnotationLine> it = annotationLines.iterator();\n MpStrain background = null;\n MpAllelicComposition allelicComp = null;\n TermId alleleId = null;\n String alleleSymbol = null;\n TermId markerId = null;\n // get the sexSpecific-specific annotations for this genotypeId, if any\n Map<TermId, MpAnnotation> sexSpecific = Map.of(); // default, empty set\n if (this.geno2ssannotMap.containsKey(genoId)) {\n Map<TermId, MpAnnotation> imapbuilder = new HashMap<>();\n Map<TermId, MpAnnotation> annots = this.geno2ssannotMap.get(genoId);\n for (MpAnnotation mpann : annots.values()) {\n imapbuilder.put(mpann.getTermId(), mpann);\n }\n try {\n sexSpecific = Map.copyOf(imapbuilder);\n } catch (Exception e) {\n System.err.println(\"Error building map of sexSpecific-specific annotations for \" + genoId.getValue() + \": \" + e.getMessage());\n }\n }\n while (it.hasNext()) {\n AnnotationLine aline = it.next();\n MpAnnotation annot = aline.toMpAnnotation();\n TermId mpoId = aline.getMpId();\n background = aline.geneticBackground;\n allelicComp = aline.getAllelicComp();\n alleleId = aline.getAlleleId();\n alleleSymbol = aline.getAlleleSymbol();\n markerId = aline.getMarkerAccessionId();\n // TODO we could check that these are identical for any given genotype id\n // check if we have a sexSpecific-specific annotation matching the current annotation\n // the following adds mpoId if it is present in sexSpexifix, otherwise it adds the default annot\n annotbuilder.add(sexSpecific.getOrDefault(mpoId, annot));\n\n // Note that we do not check for sexSpecific-specific annotations that are not present in the \"main\" file\n // in practice, these are only sexSpecific-specific normal -- i.e., a phenotype was ruled out in one sexSpecific\n // even though \"somebody\" thought the phenotype might be present.\n // this type of normality (absence of a phenotype) is not useful for downstream analysis at the\n // present time and so we skip it to avoid unnecessarily complicating the implementation.\n }\n MpSimpleModel mod = new MpSimpleModel(genoId, background, allelicComp, alleleId, alleleSymbol, markerId, List.copyOf(annotbuilder));\n builder.put(genoId, mod);\n }\n genotypeAccessionToMpSimpleModelMap = Map.copyOf(builder);\n }", "private void processGeneFile(String inputFilename, String taxonID) throws IOException {\n BufferedReader reader = createInputFileReader(inputFilename);\n String line;\n String[] columns;\n \n \t// Skip the first line\n line = reader.readLine();\n while (reader.ready()) {\n line = reader.readLine();\n \t\t//writeToDebugFile(line);\n \t\tif (line.substring(0,1).equals(\"#\")) {\n \t\twriteToErrorFile(line, \"Comment\");\n \t\t\tcontinue;\n \t\t}\n columns = line.split(INPUT_COLUMN_DELIM);\n \n String rgdID = columns[0].trim();\n \n // If line contains column names (usually first line), skip it\n if (rgdID.equals(\"GENE_RGD_ID\")) continue;\n \n String geneSymbol = columns[1].trim();\n String chromosome = columns[6].trim(); \n \n \t\t// columns[14] == start base pair\n \t\t// columns[15] == end base pair\n \t\t// columns[16] == strand (- or +)\n \n String mapLocation = getMapLocation(columns[14], columns[15], columns[16].trim());\n \n // The following columns may contain multiple items\n String[] entrezGeneIDs = splitListColumn(columns[20]);\n String[] swissProtIDs = splitListColumn(columns[21]);\n String[] genBankRNAIDs = splitListColumn(columns[23]);\n String[] genBankProteinIDs = splitListColumn(columns[25]);\n String[] unigeneIDs = splitListColumn(columns[26]);\n String[] ensemblIDs;\n \n // if columns.length < 38, the last column (Ensembl ID) is missing\n // from the input file\n if (columns.length < 38) {\n // since there are no EnsemblIDs, set the variable to an empty array,\n // which is what splitListColumn() would do\n ensemblIDs = EMPTY_STRING_ARRAY;\n } else {\n //ensemblIDs = columns[37].split(INPUT_LIST_DELIM);\n ensemblIDs = splitListColumn(columns[37]);\n }\n \n // Write RGD Info\n writeToInfoFile(taxonID, RGD_ID_TYPE, rgdID, chromosome, mapLocation);\n \n // Write Gene Symbol and Ensembl ID Info and Links\n if (!geneSymbol.equals(\"\")) {\n writeToInfoFile(taxonID, \"Gene Symbol\", geneSymbol, chromosome, mapLocation);\n writeToLinksFile(RGD_ID_TYPE,rgdID,\"Gene Symbol\",geneSymbol);\n }\n for (int i = 0; i < ensemblIDs.length; i++) {\n writeToInfoFile(taxonID, \"Ensembl ID\", ensemblIDs[i], chromosome, mapLocation);\n writeToLinksFile(RGD_ID_TYPE,rgdID,\"Ensembl ID\",ensemblIDs[i]);\n }\n \n // Handle NCBI RefSeq and non-RefSeq IDs (both RNA and Protein)\n for (int i = 0; i < genBankRNAIDs.length; i++) {\n String genBankRNAID = genBankRNAIDs[i];\n if (isRefSeq(genBankRNAID)) {\n writeToLinksFile(RGD_ID_TYPE,rgdID,\"RefSeq RNA ID\",genBankRNAIDs[i]);\n } else {\n writeToLinksFile(RGD_ID_TYPE,rgdID,\"NCBI RNA ID\",genBankRNAIDs[i]);\n }\n }\n for (int i = 0; i < genBankProteinIDs.length; i++) {\n String genBankProteinID = genBankProteinIDs[i];\n if (isRefSeq(genBankProteinID)) {\n writeToLinksFile(RGD_ID_TYPE,rgdID,\"RefSeq Protein ID\",genBankProteinIDs[i]);\n } else {\n writeToLinksFile(RGD_ID_TYPE,rgdID,\"NCBI Protein ID\",genBankProteinIDs[i]);\n }\n } \n \n // create Links entries for the rest\n writeCollectionToLinksFile(RGD_ID_TYPE,rgdID,\"Entrez Gene ID\",Arrays.asList(entrezGeneIDs));\n writeCollectionToLinksFile(RGD_ID_TYPE,rgdID,\"SwissProt ID\",Arrays.asList(swissProtIDs));\n writeCollectionToLinksFile(RGD_ID_TYPE,rgdID,\"UniGene ID\",Arrays.asList(unigeneIDs));\n } \n reader.close();\n }", "public void doAnonymisation() throws Exception {\r\n\t\tDocumentReader csvReader = DocumentReaderFactory.getDocumentReader(\"CSV\",this.in);\r\n\t\tWriter csvWriter = WriterFactory.getDocumentWriter(\"CSV\", out);\r\n\t\tCfgReader descReader = CfgReaderFactory.getCfgReader(\"JSON\",descFilePath);\r\n\t\tCfgReader anonRuleReader = CfgReaderFactory.getCfgReader(\"JSON\",anonFilePath);\r\n\r\n\r\n\t\tLineMetaData lineInit=descReader.initMetaData();\r\n\r\n\t\tLineMetaData lineRef=anonRuleReader.initAnonymisationMetaData(lineInit);\r\n\r\n\t\twhile(csvReader.checkContainingData()==true){\r\n\t\t\tArrayList<String[]> tempLine = csvReader.readMultipleLine(MainPg.blockSize);\r\n\r\n\t\t\tList<String[]> beforWrite = tempLine.stream()\r\n\t\t\t\t.filter((e)->{\r\n\t\t\t\treturn DescTypeMapper.verificationMatchWithDesc(lineRef,e);})\r\n\t\t\t\t.map((e)-> {\r\n\t\t\t\treturn AnonymisationRuleMapper.lineAnonymisation(lineRef,e);})\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\t\t\r\n\t\t\t//beforWrite.stream().map((e)-> {\r\n\t\t\t//\treturn AnonymisationRuleMapper.lineAnonymisation(lineRef,e);\r\n\t\t\t//}).collect(Collectors.toList());\r\n\t\t\t\r\n\t\t\t/*old version */\r\n\t\t\t//for(int i=0;i<beforWrite.size();i++) {\r\n\t\t\t//\tbeforWrite.set(i, AnonymisationRuleMapper.lineAnonymisation(lineRef,beforWrite.get(i)));\r\n\t\t\t//}\r\n\t\t\tcsvWriter.writeFileFromList(beforWrite);\r\n\t\t}\r\n\r\n\t}", "private void _parseExonIntronBoundaries() {\n\t\ttry {\n\t\t\t// assemble the Exon-Intron Boundaries\n\t\t\tString name = _line[ _exonIdField ];\n\t\t\tint exon_start = Integer.parseInt( _line[ _exonStartField ] );\n\t\t\tint exon_end = Integer.parseInt( _line[ _exonEndField ] );\n\t\t\tExonIntronBoundary start_boundary = \n\t\t\t\tnew ExonIntronBoundary(\n\t\t\t\t\t\tnew SimpleSequence(_location,exon_start), \n\t\t\t\t\t\tname, ExonIntronBoundary.START_BOUNDARY_KIND );\n\t\t\tExonIntronBoundary end_boundary = \n\t\t\t\tnew ExonIntronBoundary(\n\t\t\t\t\t\tnew SimpleSequence(_location,exon_end), \n\t\t\t\t\t\tname, ExonIntronBoundary.END_BOUNDARY_KIND );\n\t\t\t// add the Boundaries\n\t\t\t_exonIntronBoundaries.add(start_boundary);\n\t\t\t_exonIntronBoundaries.add(end_boundary);\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEnvironment.errorMessage(\"Error parsing Exon-Intron Boundary !\");\n\t\t}\n\t}", "protected void createDuplicatesAnnotations() {\r\n String source = \"duplicates\";\t\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisPublicHealthCaseReportEClass, \r\n source, \r\n new String[] \r\n {\r\n });\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisPHCRClinicalInformationSectionEClass, \r\n source, \r\n new String[] \r\n {\r\n });\t\t\t\t\t\t\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisCaseObservationEClass, \r\n source, \r\n new String[] \r\n {\r\n });\t\t\t\t\t\t\t\t\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisPHCRRelevantDxTestsSectionEClass, \r\n source, \r\n new String[] \r\n {\r\n });\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisResultObservationEClass, \r\n source, \r\n new String[] \r\n {\r\n });\t\t\t\t\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisResultOrganizerEClass, \r\n source, \r\n new String[] \r\n {\r\n });\t\t\t\t\t\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisPHCRTreatmentInformationSectionEClass, \r\n source, \r\n new String[] \r\n {\r\n });\t\t\t\t\t\t\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisTherapeuticRegimenActEClass, \r\n source, \r\n new String[] \r\n {\r\n });\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisTreatmentGivenSubstanceAdministrationEClass, \r\n source, \r\n new String[] \r\n {\r\n });\t\t\t\r\n addAnnotation\r\n (chlamydiatrachomatisTreatmentNotGivenSubstanceAdministrationEClass, \r\n source, \r\n new String[] \r\n {\r\n });\r\n }", "public void mapASE(String filename, int n) throws IOException{\n\n\t\t//choose random SNP for simulation\n\t\tRandom rand = new Random(17);\n\t\tint randInt = rand.nextInt(snps.size());\n\t\tSNP s = snps.get(randInt);\n\t\t\n\t\t//minor allele frequency of SNP s\n\t\tdouble f = calculateMAF(s);\n\t\t\n\t\tList<GenoSample> allGenotypes = s.getGenosamples();\n\t\t\n\t\t//Put random sample of size n in subset\n\t\tList<Integer> indices = getSubset(s.getGenosamples().size(), n);\n\t\tList<GenoSample> subset = new ArrayList<GenoSample>();\n\t\tfor(int i:indices){\n\t\t\tsubset.add(allGenotypes.get(i));\n\t\t}\n\t\t//ASE calls for subset of individuals\n\t\tList<ExpSample> ase = aseCall(subset);\n\t\tif(ase.size()!=subset.size()){\n\t\t\tSystem.out.println(\"Subset function malfunction\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Number of individuals: \"+ase.size());\n\t\t\n\t\tBufferedWriter outfile = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outdir+File.separator+filename)));\n\n\t\t//number of ones in ase samples\n\t\tint m=0;\n\t\t//number of ones in genotype samples\n\t\tint k=0;\n\t\t//number of mismatches between ASE status and genotype\n\t\tint incorrect=0;\n\t\tfor (int i=0; i<subset.size();i++) {\n\t\t\tGenoSample g = subset.get(i);\n\t\t\tint hasASE = ase.get(i).getASE();\n\t\t\t\n\t\t\tif(hasASE==1){\n\t\t\t\tm=m+1;\n\t\t\t}\n\t\t\tint isHetero = g.getHetero();\n\t\t\tif(isHetero==1){\n\t\t\t\tk=k+1;\n\t\t\t}\n\n\t\t\tif(isHetero != hasASE){\n\t\t\t\tincorrect++;\n\t\t\t}\t\n\n\t\t}\n\n\t\t//set state for ComputeSig state\n\t\tComputeSig sig = new ComputeSig(subset.size(), m, k, incorrect);\n\t\t//p-values for all possible numbers of errors\n\t\tdouble[] poss = sig.significance();\n\t\tfor(int j=0 ; j< poss.length ; j ++){\n\t\t\t//number of mismatches\n\t\t\tint inc = 2*j + Math.abs(m-k);\n\t\t\t//p-value for inc mismatches\n\t\t\tdouble p = poss[j];\n\t\t\tString line = gene.toString()+\"\\t\"+s.getId()+\"\\t\"+f+\"\\t\"+m+\"\\t\"+k+\"\\t\"+ase.size()+\"\\t\"+inc+\"\\t\"+p;\n\t\t\toutfile.write(line+\"\\n\");\n\t\t}\n\t\toutfile.close();\n\n\t}", "protected void exonsFromCds() {\n\t\tif (verbose) Log.info(\"Create exons from CDS (if needed): \");\n\n\t\tint count = 0;\n\t\tfor (Gene gene : genome.getGenes()) {\n\t\t\tfor (Transcript tr : gene) {\n\t\t\t\t// CDS length\n\t\t\t\tint lenCds = 0;\n\t\t\t\tfor (Cds cds : tr.getCds())\n\t\t\t\t\tlenCds += cds.size();\n\n\t\t\t\t// Exon length\n\t\t\t\tint lenExons = 0;\n\t\t\t\tfor (Exon ex : tr)\n\t\t\t\t\tlenExons += ex.size();\n\n\t\t\t\t// Cds length larger than exons? => something is missing\n\t\t\t\tif (lenCds > lenExons) {\n\t\t\t\t\texonsFromCds(tr);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verbose) Log.info(\"Exons created for \" + count + \" transcripts.\");\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Value of the mail.smtp.sendpartial property
@ZAttr(id=249) public void setSmtpSendPartial(boolean zimbraSmtpSendPartial) throws com.zimbra.common.service.ServiceException { HashMap<String,Object> attrs = new HashMap<String,Object>(); attrs.put(Provisioning.A_zimbraSmtpSendPartial, zimbraSmtpSendPartial ? Provisioning.TRUE : Provisioning.FALSE); getProvisioning().modifyAttrs(this, attrs); }
[ "@ZAttr(id=249)\n public boolean isSmtpSendPartial() {\n return getBooleanAttr(Provisioning.A_zimbraSmtpSendPartial, false);\n }", "public String getSendPartial()\n { // [2.6.5-B16]\n boolean delegate = true; // delegate ok\n return StringTools.trim(this._getString(KEY_SEND_PARTIAL,delegate));\n }", "public void setSendPartial(String V)\n { // [2.6.5-B16]\n this.smtpProps.removeProperties(KEY_SEND_PARTIAL);\n V = StringTools.trim(V).toLowerCase();\n if (ListTools.contains(SENDPARTIAL_OPTIONS,V)) {\n this.smtpProps.setString(KEY_SEND_PARTIAL[0], V);\n }\n }", "@ZAttr(id=249)\n public Map<String,Object> setSmtpSendPartial(boolean zimbraSmtpSendPartial, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraSmtpSendPartial, zimbraSmtpSendPartial ? Provisioning.TRUE : Provisioning.FALSE);\n return attrs;\n }", "public void setSendPartial(boolean V)\n {\n this.setSendPartial(V?\"true\":\"false\");\n }", "public Integer getSendEmail() {\n return sendEmail;\n }", "public String getSmtpMessage() {\n return smtpMessage;\n }", "public int getEmailBind() {\n\t\t\treturn emailBind;\n\t\t}", "public String getSendTaskPartPkid() {\n return sendTaskPartPkid;\n }", "public int getNbMailTotal() {\n return this.to.length;\n }", "public String getSmtpSubject() {\n return smtpSubject;\n }", "public void setSendEmail(boolean theSendEmail) {\r\n if (theSendEmail) {\r\n this.sendEmailString = \"true\";\r\n } else {\r\n this.sendEmailString = null;\r\n }\r\n\r\n }", "public java.lang.Boolean getSendFixedAmountFlag() {\r\n return sendFixedAmountFlag;\r\n }", "java.lang.String getMailDeliverable();", "public String getMlSsendmail() {\n return mlSsendmail;\n }", "public String getNoticeSendto() {\n return noticeSendto;\n }", "public String getSendStatus() {\n return sendStatus;\n }", "public String getMailStop() {\r\n return mailStop;\r\n }", "private String getSendMailPasswordContent(UserForm userForm) {\n return \"\";\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lists integrators in the configuration
public String[] getIntegrators() { return integrators.toArray(new String[0]); }
[ "@GetMapping(\"/integrations\")\n public List<IntegrationDTO> getAllIntegrations() {\n log.debug(\"REST request to get all Integrations\");\n return integrationService.findAll();\n }", "public static void viewListOfRegistrants() {\n\t\tArrayList<Registrant> list_reg = getRegControl().listOfRegistrants();\r\n\t\tif (list_reg.size() == 0) {\r\n\t\t\tSystem.out.println(\"No Registrants loaded yet\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"List of registrants:\\n\");\r\n\t\t\tfor (Registrant registrant : list_reg) {\r\n\t\t\t\tSystem.out.println(registrant.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<ATNConfig> elements() { return configs; }", "List<ContextBuilderConfigurator> getConfigurators() {\n return configurators;\n }", "List<IInboundAdapter> getInboundAdapterList();", "public List<String> getConfigurationNameList()\n {\n List<String> list = new ArrayList<String>(configurations.size());\n for (ConfigData cd : configurations)\n {\n list.add(cd.getName());\n }\n return list;\n }", "public void addIntegrator() { \n if (isBusy()) return; \n addIntegrator(0, 0, 0, true, new IntegratorFilter());\n }", "public List<ConfigElement> getConfigElements();", "public ProxyConfig[] getProxyConfigList();", "java.util.List<com.google.cloud.compute.v1.AcceleratorConfig> getAcceleratorsList();", "List<IntegrationVO> getAllIntegrationsByCriteria(IntegrationVO integrationVO) throws EEAException;", "private final List<IConfigurationElement> getElements() {\n\t\tIExtensionRegistry reg = RegistryFactory.getRegistry();\n\t\tif (reg == null) {\n\t\t\tthrow new RuntimeException(XmlSerializationMessages.XmlSerializerRegistry_UnableToGetDefaultExtensionRegistry);\n\t\t}\n\t\t\n\t\tIConfigurationElement[] elements = reg.getConfigurationElementsFor(XmlSerializer.POINT_ID);\n\t\treturn Arrays.asList(elements);\n\t}", "java.util.List<java.lang.String> getServiceAccountIdTokensList();", "public void addIntegrator(String integrator) {\n integrators.add(integrator);\n }", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList getServiceConfigurationList();", "public List<IntegrationConnectorHandler> initialize()\n {\n List<IntegrationConnectorConfig> connectorConfigurationList = serviceConfig.getIntegrationConnectorConfigs();\n\n if (connectorConfigurationList != null)\n {\n for (IntegrationConnectorConfig connectorConfig : connectorConfigurationList)\n {\n if (connectorConfig != null)\n {\n if (connectorConfig.getPermittedSynchronization() == null)\n {\n connectorConfig.setPermittedSynchronization(serviceConfig.getDefaultPermittedSynchronization());\n }\n\n String userId = localServerUserId;\n\n if (connectorConfig.getConnectorUserId() != null)\n {\n userId = connectorConfig.getConnectorUserId();\n }\n IntegrationConnectorHandler connectorHandler = new IntegrationConnectorHandler(connectorConfig.getConnectorId(),\n null,\n connectorConfig.getConnectorName(),\n userId,\n null,\n null,\n connectorConfig.getRefreshTimeInterval(),\n connectorConfig.getMetadataSourceQualifiedName(),\n connectorConfig.getConnection(),\n connectorConfig.getUsesBlockingCalls(),\n connectorConfig.getPermittedSynchronization(),\n connectorConfig.getGenerateIntegrationReports(),\n serviceConfig.getIntegrationServiceFullName(),\n localServerName,\n contextManager,\n auditLog);\n\n connectorHandlers.add(connectorHandler);\n }\n }\n }\n\n if (connectorHandlers.isEmpty())\n {\n final String actionDescription = \"Initialize integration service\";\n\n auditLog.logMessage(actionDescription,\n IntegrationDaemonServicesAuditCode.NO_INTEGRATION_CONNECTORS.\n getMessageDefinition(serviceConfig.getIntegrationServiceFullName()));\n }\n\n return connectorHandlers;\n }", "@Override\n public Iterable<String> configKeys() {\n Set<String> result = new HashSet<>();\n result.add(CONFIG_NAME);\n\n result.addAll(upgradeProviders.stream()\n .flatMap(it -> it.configKeys().stream())\n .collect(Collectors.toSet()));\n\n return result;\n }", "LinphoneProxyConfig[] getProxyConfigList();", "@Override\n public List<ConsumerMember> listClients() {\n return this.soapClient.listClients(this.getTargetUrl());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetches uptodate weather data from the server. Runs completionCallback if the request succeeds.
public void fetchWeather(Consumer<WeatherData> completionCallback) { requestQueue.submit(() -> { try { WeatherData result = new WeatherData( fetch("current conditions", openWeather::currentWeatherByCityName, openWeather::currentWeatherByCoordinates), fetch("hourly forecast", openWeather::hourlyForecastByCityName, openWeather::hourlyForecastByCoordinates)); System.out.println("Got weather data: " + result); SwingUtilities.invokeLater(() -> completionCallback.accept(result)); } catch (WeatherException e) { System.out.println("Unable to fetch weather: " + e); } }); }
[ "private void requestWeatherData(int status) {\n if (!isNetworkAvailable()) {\n //app is offline\n\n getPresenter().requetofflineWeatherData();\n } else {\n //app is online\n switch (status) {\n case LOCATION_PERMISSION_DENINED:\n getPresenter().requetWeatherData(\"London\", 0, 0);\n break;\n case LOCATION_PERMISSION_GRANTED:\n getPresenter().requetWeatherData(\"\", mLastLocation.getLatitude(), mLastLocation.getLongitude());\n }\n\n\n }\n // pbHeaderProgress.setVisibility(View.VISIBLE);\n }", "private void getWeatherForCurrentLocation() {\n Log.d(LOGCAT_TAG, \"Getting weather for current location\");\n mLocationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n\n mLocationListener = new LocationListener() {\n @Override\n public void onLocationChanged(Location location) {\n Log.d(LOGCAT_TAG, \"onLocationChanged() callback received\");\n\n String latitude = String.valueOf(location.getLatitude());\n String longitude = String.valueOf(location.getLongitude());\n\n Log.d(LOGCAT_TAG, \"longitude is: \" + longitude);\n Log.d(LOGCAT_TAG, \"latitude is: \" + latitude);\n\n// RequestParams params = new RequestParams();\n// params.put(\"lat\", latitude);\n// params.put(\"log\", longitude);\n// params.put(\"appid\", APP_ID);\n// getResponse(params);\n\n // Get current city name and send request\n try {\n Geocoder geocoder = new Geocoder(WeatherController.this, Locale.ENGLISH);\n List<Address> addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String curCity = addresses.get(0).getLocality();\n Log.d(LOGCAT_TAG, \"Current CityName: \" + curCity);\n\n RequestParams params = new RequestParams();\n params.put(\"q\", curCity);\n params.put(\"appid\", APP_ID);\n\n getResponse(params);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onStatusChanged(String provider, int status, Bundle extras) {\n // Log statements to help you debug your app.\n Log.d(LOGCAT_TAG, \"onStatusChanged() callback received. Status: \" + status);\n Log.d(LOGCAT_TAG, \"2 means AVAILABLE, 1: TEMPORARILY_UNAVAILABLE, 0: OUT_OF_SERVICE\");\n }\n\n @Override\n public void onProviderEnabled(String provider) {\n Log.d(LOGCAT_TAG, \"onProviderEnabled() callback received. Provider: \" + provider);\n }\n\n @Override\n public void onProviderDisabled(String provider) {\n Log.d(LOGCAT_TAG, \"onProviderDisabled() callback received. Provider: \" + provider);\n }\n };\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_CODE);\n return;\n }\n\n // Some additional log statements to help you debug\n Log.d(LOGCAT_TAG, \"Location Provider used: \"\n + mLocationManager.getProvider(LocationManager.GPS_PROVIDER).getName());\n Log.d(LOGCAT_TAG, \"Location Provider is enabled: \"\n + mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER));\n Log.d(LOGCAT_TAG, \"Last known location (if any): \"\n + mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n Log.d(LOGCAT_TAG, \"Requesting location updates\");\n\n mLocationManager.requestLocationUpdates(LOCATION_PROVIDER, MIN_TIME, MIN_DISTANCE, mLocationListener);\n }", "private void initializeDownLoadOfWeatherData() {\n if (checkIfConnectedToInternet () == true) {\n weatherDataProvider = new WeatherDataProvider();\n weatherDataProvider.setOnWeatherDataReceivedListener(this);\n weatherDataProvider.execute(WEB_ADDRESS_TO_RETRIEVE_WEATHER_DATA);\n } else {\n fetchLatestUpdateFromLatestUpdateDataProvider();\n }\n }", "public void getWeather() {\n // using the API to search for the user inputted city, getting the data in the metric measurement system\n String url = \"http://api.openweathermap.org/data/2.5/weather?appid=922d7ef7ac2604da77d2f8655e3f90d4&q=\";\n String urlWithCity = url.concat(TextUtils.isEmpty(cityName) ? \"Halifax,CA\" : cityName);\n urlWithCity += \"&units=metric\";\n\n // build the request\n JsonObjectRequest request = new JsonObjectRequest(\n Request.Method.GET, urlWithCity, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n Toast.makeText(getApplicationContext(), cityName+\"'s weather data has been loaded\", Toast.LENGTH_SHORT).show();\n\n try {\n // getting JSON objects\n JSONObject main = response.getJSONObject(\"main\");\n JSONObject weather = response.getJSONArray(\"weather\").getJSONObject(0);\n JSONObject clouds = response.getJSONObject(\"clouds\");\n\n // setting values in the UI based on the values from the JSON\n city.setText(String.valueOf(response.getString(\"name\")));\n temperature.setText(String.valueOf(main.getInt(\"temp\"))+\"°\");\n highLowTemp.setText(String.valueOf(main.getInt(\"temp_max\"))+\"° / \"+String.valueOf(main.getInt(\"temp_min\"))+\"°\");\n mainWeather.setText(String.valueOf(weather.getString(\"main\")));\n changeIcon(String.valueOf(weather.getString(\"icon\")));\n description.setText(String.valueOf(weather.getString(\"description\")));\n humidityPercent.setText(String.valueOf(main.getInt(\"humidity\"))+\"%\");\n cloudinessPercent.setText(String.valueOf(clouds.getInt(\"all\"))+\"%\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError e) {\n e.printStackTrace();\n\n // provide different toasts depending on the error\n if (e.toString().equals(\"com.android.volley.ClientError\"))\n Toast.makeText(getApplicationContext(), \"Error finding city\", Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(getApplicationContext(), \"Error retrieving weather data\", Toast.LENGTH_SHORT).show();\n }\n });\n RequestQueue queue = Volley.newRequestQueue(getApplicationContext());\n queue.add(request);\n }", "private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }", "@Override\n public void requestWeatherSuccess(Weather weather, Location requestLocation) {\n try {\n if (request != null) {\n List<WeatherInfo.DayForecast> forecastList = new ArrayList<>();\n for (int i = 0; i < weather.dailyList.size(); i++) {\n forecastList.add(\n new WeatherInfo.DayForecast.Builder(\n WeatherConditionConvertHelper.getConditionCode(\n weather.dailyList.get(i).weatherKinds[0],\n true))\n .setHigh(weather.dailyList.get(i).temps[0])\n .setLow(weather.dailyList.get(i).temps[1])\n .build());\n }\n WeatherInfo.Builder builder = new WeatherInfo.Builder(\n weather.base.city,\n weather.realTime.temp,\n WeatherContract.WeatherColumns.TempUnit.CELSIUS)\n .setWeatherCondition(\n WeatherConditionConvertHelper.getConditionCode(\n weather.realTime.weatherKind,\n TimeManager.getInstance(this)\n .getDayTime(this, weather, false)\n .isDayTime()))\n .setTodaysHigh(weather.dailyList.get(0).temps[0])\n .setTodaysLow(weather.dailyList.get(0).temps[1])\n .setTimestamp(weather.base.timeStamp)\n .setHumidity(\n Double.parseDouble(\n weather.index.humidities[1]\n .split(\" : \")[1]\n .split(\"%\")[0]))\n .setWind(\n Double.parseDouble(weather.realTime.windSpeed.split(\"km/h\")[0]),\n weather.realTime.windDegree,\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH)\n .setForecast(forecastList);\n\n request.complete(new ServiceRequestResult.Builder(builder.build()).build());\n }\n } catch (Exception ignore) {\n requestWeatherFailed(requestLocation);\n }\n }", "synchronized public static void syncWeather(Context context) {\n // Within syncWeather, fetch new weather data\n try {\n /*\n * The getUrl method will return the URL that we need to get the forecast JSON for the\n * weather. It will decide whether to create a URL based off of the latitude and\n * longitude or off of a simple location as a String.\n */\n URL weatherRequestUrl = NetworkUtils.getUrl(context);\n\n String jsonWeatherResponse = NetworkUtils.getResponseFromHttpUrl(weatherRequestUrl);\n /* Parse the JSON into a list of weather values */\n ContentValues[] weatherValues = OpenWeatherJsonUtils.getWeatherContentValuesFromJson(context, jsonWeatherResponse);\n // If we have valid results, delete the old data and insert the new\n /*\n * In cases where our JSON contained an error code, getWeatherContentValuesFromJson\n * would have returned null. We need to check for those cases here to prevent any\n * NullPointerExceptions being thrown. We also have no reason to insert fresh data if\n * there isn't any to insert.\n */\n if(weatherValues != null && weatherValues.length > 0) {\n /* Get a handle on the ContentResolver to delete and insert data */\n ContentResolver sunshineContentResolver = context.getContentResolver();\n\n /* Delete old weather data because we don't need to keep multiple days' data */\n sunshineContentResolver.delete(WeatherContract.WeatherEntry.CONTENT_URI, null, null);\n\n /* Insert our new weather data into Sunshine's ContentProvider */\n sunshineContentResolver.bulkInsert(WeatherContract.WeatherEntry.CONTENT_URI, weatherValues);\n }\n // Check if notifications are enabled\n boolean notificationsEnabled = SunshinePreferences.areNotificationsEnabled(context);\n\n\n// Check if a day has passed since the last notification\n long timeSinceLastNotification = SunshinePreferences\n .getEllapsedTimeSinceLastNotification(context);\n\n boolean oneDayPassedSinceLastNotification = false;\n\n if (timeSinceLastNotification >= DateUtils.DAY_IN_MILLIS) {\n oneDayPassedSinceLastNotification = true;\n }\n\n// If more than a day have passed and notifications are enabled, notify the user\n if (notificationsEnabled && oneDayPassedSinceLastNotification) {\n NotificationUtils.notifyUserOfNewWeather(context);\n }\n\n } catch (IOException | JSONException ex) {\n ex.printStackTrace();\n }\n\n }", "void fetch() throws WeatherForecastException;", "@Override\n public void downloadWeatherData(String zipCode){\n\n //make request to get the data\n final OkHttpClient okHttpClient;\n final Request request;\n HttpUrl url = new HttpUrl.Builder()\n .scheme(\"https\")\n .host(WEATHER_URL)\n .addPathSegment(\"api\")\n .addPathSegment(KEY)\n .addPathSegment(\"conditions\")\n .addPathSegment(\"q\")\n .addPathSegment(zipCode + \".json\")\n .build();\n\n okHttpClient = new OkHttpClient();\n request = new Request.Builder()\n .url(url)\n .build();\n\n okHttpClient.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(@NonNull Call call, @NonNull IOException e) {\n Toast.makeText(context, \"Failed to make connection\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {\n Gson gson = new Gson();\n weatherInfo = gson.fromJson(response.body().string(), WeatherInfo.class);\n view.weatherDownloadedUpdateUI(weatherInfo);\n }\n });\n\n }", "public void downloadCurrentWeatherData(String url, final NetworkFailure failureHandler) {\n Request request = new Request.Builder()\n .url(url)\n .build();\n mClient.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Request request, IOException e) {\n }\n\n @Override\n public void onResponse(Response response) throws IOException {\n if (!response.isSuccessful()) {\n failureHandler.handleNetworkFailure();\n } else {\n String responseAsString = response.body().string();\n EventBus.getDefault().post(new CurrentWeatherResponseEvent(responseAsString));\n }\n }\n });\n }", "public void loadForecastData(Callback<Forecast> callback)\n\t{\n RestAdapter restAdapter = new RestAdapter.Builder().setEndpoint(API_URL).build();\n \n WeatherService service = restAdapter.create(WeatherService.class);\n service.getForecastAsync(\"929d214ed2dfd3705ff1ee66c1d5c3be\",\"37.8267\",\"-122.423\", callback);\n \n\t}", "private void updateWeather() {\n\t\tFetchWeatherTask weatherTask = new FetchWeatherTask(getActivity()); \n\t\tString location = Utility.getPreferredLocation(getActivity());\n\t\tweatherTask.execute(location); \n\t}", "public void getCityResult() {\n String cityNameStr = TextUtils.isEmpty(cityName) ? \"Halifax\" : cityName;\n final String url = \"http://api.openweathermap.org/data/2.5/weather?q=\" + cityNameStr + \"&appid=\" + API_KEY + \"&units=\" + CELSIUS_UNITS;\n //build the request\n JsonObjectRequest request = new JsonObjectRequest(\n Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray weather = response.getJSONArray(\"weather\");\n JSONObject main = response.getJSONObject(\"main\");\n JSONObject cloudsJSON = response.getJSONObject(\"clouds\");\n\n //Set values on layout\n setCityNameOnLayout(response);\n setWeather(weather);\n setTemperature(main);\n setMinMaxTemperature(main);\n setHumidity(main);\n setClouds(cloudsJSON);\n setWeatherIcon((weather.getJSONObject(0)).get(\"icon\").toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n\n Toast.makeText(getApplicationContext(), \"Please, introduce an existing city\", Toast.LENGTH_SHORT).show();\n }\n }\n );\n RequestQueueSingleton.getInstance(getApplicationContext()).addToRequestQueue(request);\n }", "private void getForecast() {\n String apiKey = \"6bdeb587cb42fa93bc6d74b77c56cb21\";\n double latitude = 8.983333;//37.8267;\n double longitude = -79.516670;//-122.423;\n String forecastUrl = \"https://api.forecast.io/forecast/\" + apiKey + \"/\" + latitude +\n \",\" + longitude;\n\n //Se hace una condicion para ver si la red esta disponible\n if (ifNetworkAvailable()) {\n\n toggleRefresh(); //Da a la vista el progressbar y esconder la imagen de actualizar\n\n //Inicia la comunicacion\n OkHttpClient client = new OkHttpClient();//Inicia el cliente\n Request request = new Request.Builder().url(forecastUrl).build();//construye el pedido\n\n Call call = client.newCall(request);//La llamada\n //Comienza a buscar la informacion en un thread diferent(no el principal)\n call.enqueue(new Callback() {\n\n //Si falla la llamdda\n @Override\n public void onFailure(Request request, IOException e) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n toggleRefresh();\n }\n });\n alertUserAboutError();\n }\n\n //La la respuesta se da\n @Override\n public void onResponse(Response response) throws IOException {\n\n /*Si la respuesta es correcta se llama al thread principal para que haga un\n * cambio en la interface(solamente se puede modificar la interface en el thread\n * principal de la aplicacion) RUNONUITHREAD*/\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n toggleRefresh();\n }\n });\n\n try {\n\n /*La respuesta que manda la pagina*/\n String jsonData = response.body().string();\n Log.v(TAG, jsonData);\n if (response.isSuccessful()) {\n mForecast = parseForecast(jsonData);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n updateDisplay();\n }\n });\n\n } else {\n alertUserAboutError();\n }\n } catch (IOException e) {\n Log.e(TAG, \"Exception caught\", e);\n } catch (JSONException e) {\n Log.e(TAG, \"Exception caught\", e);\n }\n }\n });\n } else {\n\n //Este codigo corre si no hay red\n NoNetWrokMessage();\n }\n }", "private void loadForecastDataFromApi() {\n if (NetworkManager.isOnline(mContext)) {\n if (mLocation != null) {\n if (mIsCurrentLocation) {\n new ForecastWeatherRequest(mContext, mLocation, mIsCurrentLocation, \"\", this).loadForecast();\n } else {\n new ForecastWeatherRequest(mContext, mLocation, mIsCurrentLocation, mLocationModelFromDb.getLocationName(), this).loadForecast();\n }\n }\n } else {\n Logcat.d(TAG, \"No internet\");\n }\n }", "@Override\n public void requestTemperatures() {\n mainView.showLoading(R.string.message_downloading_temperatures);\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(TEMPERATURE_URL)\n .addConverterFactory(ScalarsConverterFactory.create())\n .build();\n\n BathService service = retrofit.create(BathService.class);\n Call<ResponseBody> bathCall = service.loadTemperatures();\n\n bathCall.enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n try {\n\n String bathTemperatureResponse = response.body().string();\n\n Log.i(\"RESPONSE\", bathTemperatureResponse);\n\n JSONObject json = new JSONObject(bathTemperatureResponse);\n\n int hotTemp = json.getInt(\"hot_water\");\n int coldTemp = json.getInt(\"cold_water\");\n\n bathTub.setTemperatures(coldTemp, hotTemp);\n\n } catch (IOException e) {\n onFailure(call, e);\n } catch (JSONException e) {\n onFailure(call, e);\n }\n mainView.hideLoading();\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n t.printStackTrace();\n\n mainView.showErrorMessage(R.string.error_network, t.getMessage());\n mainView.hideLoading();\n }\n });\n\n }", "public WeatherResponse loadWeatherInitialData() {\n\n WeatherResponse response = weatherData.getCurrentWeather(cityConfigRepository.findAll());\n List<CityWeather> cityWeatherList =\n response\n .getWeather()\n .stream()\n .map(weather -> createCityWeather(weather))\n .collect(Collectors.toList());\n cityWeatherRepository.saveAll(cityWeatherList);\n log.info(\"Successfully saved weather data:{}\",response);\n return response;\n }", "void collectData() {\n\n String urlAdress = \"https://api.openweathermap.org/data/2.5/weather?\";\n for (int i = 0; i < cityArray.length; i++) {\n\n String url = urlAdress + \"q=\" + cityArray[i] + \"&appid=\" + APIKey;\n DownloadTask downloadTask = new DownloadTask();\n\n try {\n dataArray[i] = downloadTask.execute(url).get();\n Log.i(\"Result\", String.valueOf(dataArray[i]));\n } catch (Exception e) {\n Log.i(\"Info.\", \"Not done.\");\n e.printStackTrace();\n }\n }\n createTimer();\n }", "public void getWeather(String url, int experimentNumber, Context context) throws IOException {\n DatabaseHandler databaseHandler = new DatabaseHandler(context);\n OkHttpClient client = new OkHttpClient();\n\n Request request = new Request.Builder()\n .url(url)\n .build();\n\n client.newCall(request).execute();\n\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(@NotNull okhttp3.Call call, @NotNull IOException e) {\n\n }\n\n @Override\n public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {\n if (!response.isSuccessful()) {\n throw new IOException(\"Unexpected code \" + response);\n } else {\n String res = response.body().string();\n System.out.println(res);\n try {\n JSONObject jObject = new JSONObject(res);\n databaseHandler.setValueInExpInfo(jObject.getJSONObject(\"current\").getString(\"temp\"), \"temperature_values\", experimentNumber);\n databaseHandler.setValueInExpInfo(jObject.getJSONObject(\"current\").getString(\"humidity\"), \"humidity_values\", experimentNumber);\n databaseHandler.setValueInExpInfo(jObject.getJSONObject(\"current\").getString(\"pressure\"), \"pressure_values\", experimentNumber);\n databaseHandler.setValueInExpInfo(jObject.getJSONObject(\"current\")\n .getJSONArray(\"weather\").getJSONObject(0).getString(\"description\"), \"weather_descriptions\", experimentNumber);\n\n databaseHandler.makeExpInfoText(experimentNumber);\n\n new FirebaseHandler(context).uploadData(\"/storage/emulated/0/Android/data/com.example.loravisual/files/experiment\" + experimentNumber + \"/experiment_info\" + experimentNumber + \".txt\",\n \"/experiment\" + experimentNumber + \"/experiment_info\" + experimentNumber + \".txt\", \"experiment information\");\n new FirebaseHandler(context).uploadData(\"/storage/emulated/0/Android/data/com.example.loravisual/files/experiment\" + experimentNumber + \"/experiment_data\" + experimentNumber + \".csv\",\n \"/experiment\" + experimentNumber + \"/experiment_data\" + experimentNumber + \".csv\", \"experiment data\");\n response.body().close();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Scans through the whole image and for each pixel which is "safe" it compares the safe value to the unsafe value.
@Test public void isInFastBounds() { T img = createImage(width, height); GImageMiscOps.fillUniform(img, rand, 0, 100); InterpolatePixelS<T> interp = wrap(img, 0, 100); for( int y = 0; y < height; y++ ) { for( int x = 0; x < width; x++ ) { if( interp.isInFastBounds(x, y)) { float a = interp.get(x,y); float b = interp.get_fast(x, y); assertEquals(a,b,1e-4); } } } }
[ "private void processImage () {\n\t\tfor (int row = 0; row < pixelValues.length; row++) {\n\t\t\tfor (int col = 0; col < pixelValues[0].length; col++) {\n\t\t\t\tif ((row + 2) < pixelValues.length \n\t\t\t\t&& (col + 2) < pixelValues[0].length) {\n\t\t\t\t\tpixelValues [row] [col] -= pixelValues [row + 2] [col + 2];\n\t\t\t\t}\n\t\t\t\tif (pixelValues [row] [col] < BLACK) {\n\t\t\t\t\tpixelValues [row] [col] = BLACK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void analyzePixels() {\n IntStream.range(0, height).forEach(i -> {\n IntStream.range(0, width).forEach(j -> {\n resultImage.setRGB(j, i, secondArray[i][j]);\n double firstPercentage = calculateDifferenceInPercentage(firstArray[i][j]);\n double secondPercentage = calculateDifferenceInPercentage(secondArray[i][j]);\n if (Math.abs(firstPercentage - secondPercentage) > DIFFERENCE_RATE) {\n pointsWithDifferenсes.add(new Point(j, i));\n }\n });\n });\n }", "public void repairPicture(){ \n \tArrayList<RGBColor> Fixed = new ArrayList<RGBColor>();\n \tfor (int w=0; w<this.width; w++) {\n \t\tfor (int h=0; h<this.height; h++) {\n \t\t\tif (this.imageMatrix[w][h].isWhite()) {\n \t\t\t\tFixed.add(this.imageMatrix[w][h]);\n \t\t\t\t// running through little matrix of 8 neighbor elements\n \t\t \tint x = 0;\n \t\t \tint y = 0;\n \t\t \tint z = 0;\n \t\t \tint i = 0; \n \t\t\t\tfor (int w1=w-1; w1<=w+1; w1++) {\n \t\t\t\t\tfor (int h1=h-1; h1<=h+1; h1++) {\n \t\t\t\t\t\t//i don`t need to check, if w1!=w or h1!=h is, because this.imageMatrix[w][h] is white\n \t\t\t\t\t\tif (checkPixelBounds(w1, h1)){\n \t\t\t\t\t\t\tif (Fixed.contains(this.imageMatrix[w1][h1])==false && this.imageMatrix[w1][h1].isWhite()==false) {\n \t\t\t\t\t\t\tx = x+this.imageMatrix[w1][h1].getRed();\n \t\t\t\t\t\t\ty = y+this.imageMatrix[w1][h1].getGreen();\n \t\t\t\t\t\t\tz = z+this.imageMatrix[w1][h1].getBlue();\n \t\t\t\t\t\t\ti++; //how many pixels are in count to calculate a new value of x,y,z\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\n \t\t\t\t}\n \t\t\t\tx = x/i;\n \t\t\t\ty = y/i;\n \t\t\t\tz = z/i;\n \t\t\t\t// set my new color to x, y, z i got comparing 8 nearest pixels\n \t\t\t\tthis.imageMatrix[w][h] = new RGBColor(x, y, z);\n \t\t\t}\n \t\t}\n \t}\n\n }", "public static boolean[][] mapSeethroughPixels(BufferedImage img){\n ColorModel imgColorModel = img.getColorModel();\n Raster raster = img.getRaster();\n boolean[][] solidPixels = new boolean[img.getHeight()][img.getWidth()];\n for ( int x = 0; x < img.getWidth(); x++ ) {\n for ( int y = 0; y < img.getHeight(); y++ ) {\n Object pix = raster.getDataElements( x, y, null );\n if(imgColorModel.getAlpha(pix) == 0){\n solidPixels[y][x] = false;\n }else {\n solidPixels[y][x] = true;\n }\n\n }\n }\n\n return solidPixels;\n }", "public void processImage() {\n\t\tint i = 0;\n\t\tint currArray = 0;\n\t\tfor (int j = 0; j < pixelValues.length; j++) {\n\t\t\tfor (int value : pixelValues[j]) {\n\t\t\t\t//System.out.println((currArray + 2) + \" < \" + pixelValues.length);\n\t\t\t\tif (currArray + 2 < pixelValues.length) {\n\t\t\t\t\tif (i + 2 < pixelValues[currArray + 2].length) {\n\t\t\t\t\t\tpixelValues[currArray][i] = pixelValues[currArray][i] - pixelValues[currArray + 2][i + 2];\n\t\t\t\t\t\tif (pixelValues[currArray][i] < BLACK) {\n\t\t\t\t\t\t\tpixelValues[currArray][i] = BLACK;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(pixelValues[currArray][i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println((currArray + 2) + \" < \" + pixelValues.length + \" (\" + pixelValues[currArray][i] + \")\");\n\t\t\t\ti++;\n\t\t\t\tif(i == 5)\n\t\t\t\t{\n\t\t\t\t\ti = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrArray++;\n\t\t}\n\t\tfor (int j = 0; j < pixelValues.length; j++) {\n\t\t\tfor (int value : pixelValues[j]) {\n\t\t\t\tSystem.out.println(value);\n\t\t\t}\n\t\t}\n\t}", "public static void isSafe() {\n\t\tfor (int i = 0; i < m_numOfBanks; i++) {\n\t\t\tdouble amount = getAmount(i);\n\t\t\tif (amount < m_limit) {\n\t\t\t\tint unsafeIndx = i;\n\t\t\t\tfor (int k = 0; k < m_numOfBanks; k++) {\n\t\t\t\t\tfor (Entry<Integer, Double> j : obj.get(k).entrySet()) {\n\t\t\t\t\t\tif (j.getKey() == unsafeIndx) {\n\t\t\t\t\t\t\tj.setValue(0.0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\n\t\tfor (int i = 0; i < m_numOfBanks; i++) {\n\t\t\tdouble amount = getAmount(i);\n\t\t\tif (amount < m_limit) {\n\t\t\t\tSystem.out.println(\"Bank \" + i + \" is unsafe\");\n\n\t\t\t}\n\t\t}\n\t\t\n\n\t}", "@Test\n\tpublic void checkPixelValueBoundsHonored() {\n\t\tT img = createImage(20, 30);\n\t\tGImageMiscOps.fillUniform(img, rand, 0, 100);\n\t\tInterpolatePixelS<T> interp = wrap(img, 0, 100);\n\n\t\tfor( int off = 0; off < 5; off++ ) {\n\t\t\tfloat frac = off/5.0f;\n\n\t\t\tfor( int y = 0; y < img.height-1; y++ ) {\n\t\t\t\tfor( int x = 0; x < img.width-1; x++ ) {\n\t\t\t\t\tfloat v = interp.get(x+frac,y+frac);\n\t\t\t\t\tassertTrue( v >= 0 && v <= 100 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean isSafe(int index) {\n boolean safe = isLowRiskSquare(index);\n if (!safe) {\n int count = 0;\n int totalRisk = 0;\n for (int i = index; i < index + SEG_SIZE && i < path.size(); ++i) {\n ++count;\n Tile tile = path.get(i);\n totalRisk += riskBasedCost[tile.x][tile.y];\n }\n safe = isLowRisk(totalRisk/count);\n }\n return safe;\n }", "private boolean isSafe(int y, int x){\n try{\n return knowledgeBase[y][x][2]; //True if safe but we are nearing a wumpus or pit\n }catch(IndexOutOfBoundsException e){ // catch out of bounds exception for edge of world\n return false;\n }\n }", "public static void autoThreshold_usingRedValueOfPixels(MyImage img){\n\n /**\n * thresholdValue will hold the final threshold value for the image.\n * Initially thresholdValue = 127 [i.e. 255/2 = 127 (integer part)]\n *\n * iThreshold will hold the intermediate threshold value during computation\n * of final threshold value.\n */\n int thresholdValue = 127, iThreshold;\n\n /**\n * sum1 holds the sum of red values less than thresholdValue.\n * sum2 holds the sum of red values greater than or equal to the thresholdValue.\n * count1 holds the number of pixels whose red value is less than thresholdValue.\n * count2 holds the number of pixels whose red value is greater than or equal to thresholdValue.\n */\n int sum1, sum2, count1, count2;\n\n /**\n * mean1 is equal to sum1/count1.\n * mean2 is equal to sum2/count2.\n */\n int mean1, mean2;\n\n /** calculate thresholdValue using only the R value of the pixel */\n while(true){\n sum1 = sum2 = count1 = count2 = 0;\n for(int y = 0; y < img.getImageHeight(); y++){\n for(int x = 0; x < img.getImageWidth(); x++){\n int r = img.getRed(x,y);\n if(r < thresholdValue){\n sum1 += r;\n count1++;\n }else{\n sum2 += r;\n count2++;\n }\n }\n }\n /** calculating mean */\n mean1 = (count1 > 0)?(int)(sum1/count1):0;\n mean2 = (count2 > 0)?(int)(sum2/count2):0;\n\n /** calculating intermediate threshold */\n iThreshold = (mean1 + mean2)/2;\n\n if(thresholdValue != iThreshold){\n thresholdValue = iThreshold;\n }else{\n break;\n }\n }\n\n /** performing thresholding on the image pixels */\n for(int y = 0; y < img.getImageHeight(); y++){\n for(int x = 0; x < img.getImageWidth(); x++){\n int r = img.getRed(x,y);\n if(r >= thresholdValue){\n img.setPixel(x,y,255,255,255,255); //set WHITE\n }else{\n img.setPixel(x,y,255,0,0,0); //set BLACK\n }\n }\n }\n }", "boolean isLegal()\n\t{\n\t\t// Check all rows.\n\t\tfor (int j=0; j<9; j++)\n\t\t{\n\t\t\tint[] ints = new int[9];\n\t\t\tfor (int i=0; i<9; i++)\n\t\t\t\tints[i] = values[j][i];\n\t\t\tif (containsRepeated1Thru9(ints))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Check all cols.\n\t\tfor (int j=0; j<9; j++)\n\t\t{\n\t\t\tint[] ints = new int[9];\n\t\t\tfor (int i=0; i<9; i++)\n\t\t\t\tints[i] = values[i][j];\n\t\t\tif (containsRepeated1Thru9(ints))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Check all blocks. The two outer loops generate j = { 0, 3, 6 } and i = { 0, 3, 6 }.\n\t\t// These i,j pairs are the upper-left corners of each zone. The two inner loops compute\n\t\t// all 9 index pairs for the cells in the zone defined by i,j.\n\t\tfor (int j=0; j<9; j+=3)\n\t\t{\n\t\t\tfor (int i=0; i<9; i+=3)\n\t\t\t{\n\t\t\t\tint[] ints = new int[9];\n\t\t\t\tint n = 0;\n\t\t\t\tfor (int jj=j; jj<j+3; jj++)\n\t\t\t\t{\n\t\t\t\t\tfor (int ii=i; ii<i+3; ii++)\n\t\t\t\t\t{\n\t\t\t\t\t\tints[n++] = values[jj][ii];\n\t\t\t\t\t\tif (containsRepeated1Thru9(ints))\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public void isSafe() {\n\t\tsafetyLog = new boolean[proc];\r\n\r\n\t\tfor (int i = 0; i < proc; i++) {\r\n\t\t\tsafetyLog[i] = true;\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < proc; i++) {\r\n\t\t\tfor (int j = 0; j < res; j++) {\r\n\t\t\t\tif (need[i][j] > available[0][j]) {\r\n\t\t\t\t\tsafetyLog[i] = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*System.out\r\n\t\t\t\t.println(\"Following processes are safe and unsafe to start with\");\r\n\r\n\t\tfor (int i = 0; i < proc; i++) {\r\n\t\t\tif (safetyLog[i]) {\r\n\t\t\t\tSystem.out.println(\"P\" + i + \": Safe\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"P\" + i + \": Un-Safe\");\r\n\t\t\t}\r\n\t\t}*/\r\n\r\n\t}", "@Test\n public void correctPixelIsTransparent() {\n final int width = 90;\n final int height = 30;\n\n for (int ySet = 0; ySet < height; ySet++) {\n for (int xSet = 0; xSet < width; xSet++) {\n final Dimension dimension = new Dimension(width, height);\n final CollisionRaster collisionRaster = new CollisionRaster(dimension);\n\n collisionRaster.setPixelIsNotTransparent(xSet, ySet);\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n if (x == xSet && y == ySet) {\n assertFalse(collisionRaster.isTransparent(x, y));\n } else {\n assertTrue(collisionRaster.isTransparent(x, y));\n }\n }\n }\n }\n }\n }", "public < T extends RealType< T > > void removeRedundantPixels( final Image< T > img, final int frame )\n\t{\n\t\tremoveSpecialCase( img );\n\n\t\tfinal LocalizableCursor< T > cursor = img.createLocalizableCursor();\n\t\tfinal LocalizableByDimCursor< T > localCursor = img.createLocalizableByDimCursor( new OutOfBoundsStrategyValueFactory< T >() );\n\t\tfinal LocalNeighborhoodCursor< T > neighborhoodCursor = localCursor.createLocalNeighborhoodCursor();\n\n\t\tint countRemoved = 0;\n\t\t\n\t\twhile( cursor.hasNext() )\n\t\t{\n\t\t\tcursor.fwd();\n\t\t\t\n\t\t\t// is intensity > 0?\n\t\t\tif ( cursor.getType().getRealFloat() > 0 )\n\t\t\t{\n\t\t\t\tlocalCursor.setPosition( cursor );\n\t\t\t\tneighborhoodCursor.update();\n\n\t\t\t\tfinal ArrayList<int[]> neighbors = new ArrayList<int[]>();\n\t\t\t\t\n\t\t\t\t// how many 8-connected neighboring pixels are >0?\n\t\t\t\twhile ( neighborhoodCursor.hasNext() )\n\t\t\t\t{\n\t\t\t\t\tneighborhoodCursor.fwd();\n\t\t\t\t\t\n\t\t\t\t\tif ( neighborhoodCursor.getType().getRealFloat() > 0 )\n\t\t\t\t\t\tneighbors.add( localCursor.getPosition() );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// only if it has at least two neighboring pixels we can test if they are\n\t\t\t\t// still 8-connected if we remove the current one\n\t\t\t\tif ( neighbors.size() >= 2 )\n\t\t\t\t{\n\t\t\t\t\t// the remaining pixels must still be conntected through 8-neighborhood\n\t\t\t\t\t// if we can iteratively add all pixels to the connected list,\n\t\t\t\t\t// they are all directly or indirectly connected once the central pixel\n\t\t\t\t\t// is removed\n\t\t\t\t\tfinal ArrayList<int[]> connected = new ArrayList<int[]>();\n\t\t\t\t\t\n\t\t\t\t\t// add the first one\n\t\t\t\t\tconnected.add( neighbors.get( 0 ) );\n\t\t\t\t\tneighbors.remove( 0 );\n\n\t\t\t\t\tboolean added = false;\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\tadded = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// is any of the pixels\nA:\t\t\t\t\t\tfor ( final int[] p1 : neighbors )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// 8-connected to any of the pixels in the connected list?\n\t\t\t\t\t\t\tfor ( final int[] p2 : connected )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( is8connected( p1, p2 ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tconnected.add( p1 );\n\t\t\t\t\t\t\t\t\tneighbors.remove( p1 );\n\t\t\t\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\t\t\t\tbreak A;\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} while ( added );\n\t\t\t\t\t\n\t\t\t\t\t// if we managed to put all pixels into the connected list\n\t\t\t\t\t// we can remove the current pixel from the image\n\t\t\t\t\t\n\t\t\t\t\tif ( neighbors.size() == 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\tcursor.getType().setZero();\n\t\t\t\t\t\t++countRemoved;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tif ( countRemoved > 0 )\n\t\t\tIJ.log( \"Removed \" + countRemoved + \" redundant pixels in frame \" + frame );\n\t}", "@Test\n\tpublic void isInFastBounds_outOfBounds() {\n\t\tT img = createImage(width, height);\n\t\tInterpolatePixelS<T> interp = wrap(img, 0, 100);\n\n\t\tassertFalse(interp.isInFastBounds(-0.1f,0));\n\t\tassertFalse(interp.isInFastBounds(0, -0.1f));\n\t\tassertFalse(interp.isInFastBounds(width-0.99f,0));\n\t\tassertFalse(interp.isInFastBounds(0,height-0.99f));\n\t}", "public static void autoThreshold_usingGreenValueOfPixels(MyImage img){\n\n /**\n * thresholdValue will hold the final threshold value for the image.\n * Initially thresholdValue = 127 [i.e. 255/2 = 127 (integer part)]\n *\n * iThreshold will hold the intermediate threshold value during computation\n * of final threshold value.\n */\n int thresholdValue = 127, iThreshold;\n\n /**\n * sum1 holds the sum of green values less than thresholdValue.\n * sum2 holds the sum of green values greater than or equal to the thresholdValue.\n * count1 holds the number of pixels whose green value is less than thresholdValue.\n * count2 holds the number of pixels whose green value is greater than or equal to thresholdValue.\n */\n int sum1, sum2, count1, count2;\n\n /**\n * mean1 is equal to sum1/count1.\n * mean2 is equal to sum2/count2.\n */\n int mean1, mean2;\n\n /** calculate thresholdValue using only the G value of the pixel */\n while(true){\n sum1 = sum2 = count1 = count2 = 0;\n for(int y = 0; y < img.getImageHeight(); y++){\n for(int x = 0; x < img.getImageWidth(); x++){\n int g = img.getGreen(x,y);\n if(g < thresholdValue){\n sum1 += g;\n count1++;\n }else{\n sum2 += g;\n count2++;\n }\n }\n }\n /** calculating mean */\n mean1 = (count1 > 0)?(int)(sum1/count1):0;\n mean2 = (count2 > 0)?(int)(sum2/count2):0;\n\n /** calculating intermediate threshold */\n iThreshold = (mean1 + mean2)/2;\n\n if(thresholdValue != iThreshold){\n thresholdValue = iThreshold;\n }else{\n break;\n }\n }\n\n /** performing thresholding on the image pixels */\n for(int y = 0; y < img.getImageHeight(); y++){\n for(int x = 0; x < img.getImageWidth(); x++){\n int g = img.getGreen(x,y);\n if(g >= thresholdValue){\n img.setPixel(x,y,255,255,255,255); //set WHITE\n }else{\n img.setPixel(x,y,255,0,0,0); //set BLACK\n }\n }\n }\n }", "boolean updateValue() {\n boolean ret;\n\n if (Math.abs(curUtilityValue - nextUtilityValue) < Math.abs(curUtilityValue) * MAX_ERR_PERCENT / 100)\n ret = true;\n else {\n ret = false;\n // System.out.println(\" no match cell: x: \"+x+\" y: \"+y);\n }\n curUtilityValue = nextUtilityValue;\n return ret;\n\n }", "public Boolean checkBinary(Bitmap bitmap){\r\n int[] pixels = new int[bitmap.getHeight()*bitmap.getWidth()];\r\n int a=pixels.length;\r\n print(String.valueOf(a));\r\n bitmap.getPixels(pixels, 0, bitmap.getWidth(), 0,0,bitmap.getWidth(), bitmap.getHeight());\r\n for(int i=0; i < (bitmap.getWidth()*bitmap.getHeight()); i++){\r\n if(!((pixels[i] == -16777216) ||(pixels[i] == -1))){\r\n print(\"value at i: \"+i);\r\n return false;\r\n }\r\n }return true;\r\n }", "private boolean isGoodState() {\n\t resetMask();\n\t checkHorizontal();\n\t checkVertical();\n\n\t for(int i = 0; i < maskArray.length; i++){\n\t for (int j = 0; j < maskArray[i].length; j++){\n\n\t if (maskArray[i][j] == 1){\n\t return false;\n\t }\n\n\t }\n\t }\n\n\t return true;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XThrowExpression__Group__0__Impl" $ANTLR start "rule__XThrowExpression__Group__1" InternalDroneScript.g:14243:1: rule__XThrowExpression__Group__1 : rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 ;
public final void rule__XThrowExpression__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDroneScript.g:14247:1: ( rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 ) // InternalDroneScript.g:14248:2: rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 { pushFollow(FOLLOW_20); rule__XThrowExpression__Group__1__Impl(); state._fsp--; if (state.failed) return ; pushFollow(FOLLOW_2); rule__XThrowExpression__Group__2(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__XThrowExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14355:1: ( rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14356:2: rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1__Impl_in_rule__XThrowExpression__Group__128999);\n rule__XThrowExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2_in_rule__XThrowExpression__Group__129002);\n rule__XThrowExpression__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12749:1: ( rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12750:2: rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1__Impl_in_rule__XThrowExpression__Group__125745);\n rule__XThrowExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2_in_rule__XThrowExpression__Group__125748);\n rule__XThrowExpression__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25474:1: ( rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25475:2: rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2\r\n {\r\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1__Impl_in_rule__XThrowExpression__Group__151185);\r\n rule__XThrowExpression__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2_in_rule__XThrowExpression__Group__151188);\r\n rule__XThrowExpression__Group__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XThrowExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13458:1: ( rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13459:2: rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1__Impl_in_rule__XThrowExpression__Group__127186);\n rule__XThrowExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2_in_rule__XThrowExpression__Group__127189);\n rule__XThrowExpression__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10351:1: ( rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10352:2: rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1__Impl_in_rule__XThrowExpression__Group__120806);\n rule__XThrowExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2_in_rule__XThrowExpression__Group__120809);\n rule__XThrowExpression__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14324:1: ( rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14325:2: rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__0__Impl_in_rule__XThrowExpression__Group__028938);\n rule__XThrowExpression__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1_in_rule__XThrowExpression__Group__028941);\n rule__XThrowExpression__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12718:1: ( rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12719:2: rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__0__Impl_in_rule__XThrowExpression__Group__025684);\n rule__XThrowExpression__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1_in_rule__XThrowExpression__Group__025687);\n rule__XThrowExpression__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25443:1: ( rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25444:2: rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__XThrowExpression__Group__0__Impl_in_rule__XThrowExpression__Group__051124);\r\n rule__XThrowExpression__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1_in_rule__XThrowExpression__Group__051127);\r\n rule__XThrowExpression__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XThrowExpression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13427:1: ( rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13428:2: rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__0__Impl_in_rule__XThrowExpression__Group__027125);\n rule__XThrowExpression__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1_in_rule__XThrowExpression__Group__027128);\n rule__XThrowExpression__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:14827:1: ( rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:14828:2: rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2\r\n {\r\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1__Impl_in_rule__XThrowExpression__Group__130011);\r\n rule__XThrowExpression__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2_in_rule__XThrowExpression__Group__130014);\r\n rule__XThrowExpression__Group__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XThrowExpression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10320:1: ( rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10321:2: rule__XThrowExpression__Group__0__Impl rule__XThrowExpression__Group__1\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__0__Impl_in_rule__XThrowExpression__Group__020745);\n rule__XThrowExpression__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XThrowExpression__Group__1_in_rule__XThrowExpression__Group__020748);\n rule__XThrowExpression__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12780:1: ( rule__XThrowExpression__Group__2__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12781:2: rule__XThrowExpression__Group__2__Impl\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2__Impl_in_rule__XThrowExpression__Group__225807);\n rule__XThrowExpression__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14367:1: ( ( 'throw' ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14368:1: ( 'throw' )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14368:1: ( 'throw' )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14369:1: 'throw'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXThrowExpressionAccess().getThrowKeyword_1()); \n }\n match(input,76,FOLLOW_76_in_rule__XThrowExpression__Group__1__Impl29030); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXThrowExpressionAccess().getThrowKeyword_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25486:1: ( ( 'throw' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25487:1: ( 'throw' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25487:1: ( 'throw' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:25488:1: 'throw'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXThrowExpressionAccess().getThrowKeyword_1()); \r\n }\r\n match(input,151,FOLLOW_151_in_rule__XThrowExpression__Group__1__Impl51216); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXThrowExpressionAccess().getThrowKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XThrowExpression__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:14274:1: ( rule__XThrowExpression__Group__2__Impl )\r\n // InternalDroneScript.g:14275:2: rule__XThrowExpression__Group__2__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XThrowExpression__Group__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XThrowExpression__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14386:1: ( rule__XThrowExpression__Group__2__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14387:2: rule__XThrowExpression__Group__2__Impl\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2__Impl_in_rule__XThrowExpression__Group__229061);\n rule__XThrowExpression__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:15789:1: ( rule__XThrowExpression__Group__2__Impl )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:15790:2: rule__XThrowExpression__Group__2__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2__Impl_in_rule__XThrowExpression__Group__231791);\r\n rule__XThrowExpression__Group__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XThrowExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14336:1: ( ( () ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14337:1: ( () )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14337:1: ( () )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14338:1: ()\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXThrowExpressionAccess().getXThrowExpressionAction_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14339:1: ()\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:14341:1: \n {\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXThrowExpressionAccess().getXThrowExpressionAction_0()); \n }\n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XThrowExpression__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13489:1: ( rule__XThrowExpression__Group__2__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:13490:2: rule__XThrowExpression__Group__2__Impl\n {\n pushFollow(FOLLOW_rule__XThrowExpression__Group__2__Impl_in_rule__XThrowExpression__Group__227248);\n rule__XThrowExpression__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test whether element E meets certain conditions.
public boolean test(E element);
[ "boolean check(E element);", "public boolean hasElt(int e) {\n return this.data == e || this.left.hasElt(e) || this.right.hasElt(e) ;\n }", "protected abstract boolean hasElementsToCheck();", "boolean compatible(int e) {\n return !has_evidence() || e == get_evidence();\n }", "public abstract boolean matches(ContextElement ce);", "public boolean checkIndependenceAgainst(Event e) {\n return (probability * e.getProbability()) / e.getProbability() == e.getProbability() || (e.getProbability() * probability) / probability == probability;\n }", "@Override\r\n\tpublic boolean results(Element element)\r\n\t{\r\n\t\t// checks whether the x coordinate of the given element lies between the x coordinates of the two positions of this inPartOfBoard-condition\r\n\t\tif(((element.getPosition().getCoordX() >= this.getPosition1().getCoordX()) && (element.getPosition().getCoordX() <= this.getPosition2().getCoordX()))\r\n\t\t\t\t|| ((element.getPosition().getCoordX() <= this.getPosition1().getCoordX()) && (element.getPosition().getCoordX() >= this.getPosition2().getCoordX())))\r\n\t\t{\r\n\t\t\t// checks whether the y coordinate of the given element lies between the y coordinates of the two positions of this inPartOfBoard-condition\r\n\t\t\tif(((element.getPosition().getCoordY() >= this.getPosition1().getCoordY()) && (element.getPosition().getCoordY() <= this.getPosition2().getCoordY()))\r\n\t\t\t\t\t|| ((element.getPosition().getCoordY() <= this.getPosition1().getCoordY()) && (element.getPosition().getCoordY() >= this.getPosition2().getCoordY())))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean contains(ExpressionNode e) {\n if (e instanceof ConstantNode) {\n return this.containsConstant((ConstantNode)e);\n } else if (e instanceof VariableNode) {\n return this.containsVariable((VariableNode)e);\n } else if (e instanceof UnaryNode) {\n return this.containsUnary((UnaryNode)e);\n } else {\n return this.containsBinary((BinaryNode)e);\n }\n }", "public boolean isElementValid() {\n return ((this.element == Element.AIR) || (this.element == Element.WATER) || (this.element == Element.FIRE) || (this.element == Element.EARTH) || (this.element == Element.ENERGY));\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public boolean results(Element element) throws IllegalArgumentException\r\n\t{\r\n\t\treturn !condition.results(element);\r\n\t}", "public boolean stringE(String str) {\n int count = 0;\n \n for (int i=0; i < str.length(); i++) {\n if (str.charAt(i) == 'e') count++;\n }\n \n return (count >= 1 && count <=3);\n}", "protected abstract boolean hasElementsToCheckWithType();", "boolean isEstConditionne();", "public boolean doesEqual(Equation e) {\r\n\t\tif(e.segmentedEq.size() != segmentedEq.size()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfor(int i = 0; i < segmentedEq.size(); i++) {\r\n\t\t\tif(!e.segmentedEq.get(i).equals(segmentedEq.get(i))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean conteEstabliment(List<Establiment> l, Establiment et){\r\n for(Establiment e:l){\r\n if(comparaEstabliments(et,e)){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public void testIsIndivisibleElement() throws Exception {\n assertTrue(cfg.isIndivisibleElement(\"test\"));\n assertTrue(cfg.isIndivisibleElement(\"d1\"));\n assertTrue(cfg.isIndivisibleElement(\"ind1\"));\n assertTrue(cfg.isIndivisibleElement(\"ind2\"));\n\n cfg.associateStylisticAndAntiElements(\"anti-test\", \"test\",\n permittedChildren);\n cfg.addDivisibleElementsThatPermitStyles(new String[] {\"d1\"});\n cfg.addIndivisibleElementsThatPermitStyles(new String[] {\"ind1\", \"ind2\"});\n\n assertTrue(cfg.isIndivisibleElement(\"ind1\"));\n assertTrue(cfg.isIndivisibleElement(\"ind2\"));\n assertTrue(cfg.isIndivisibleElement(\"not-in-any-set\"));\n assertTrue(cfg.isIndivisibleElement(\"child\"));\n assertTrue(cfg.isIndivisibleElement(\"TEST\"));\n assertTrue(cfg.isIndivisibleElement(\"D1\"));\n\n assertFalse(cfg.isIndivisibleElement(\"test\"));\n assertFalse(cfg.isIndivisibleElement(\"d1\"));\n assertFalse(cfg.isIndivisibleElement(\"anti-test\"));\n }", "private boolean isFundedByECheck(List<FundsInComponentVO> fundingComponents) {\n if (fundingComponents != null) {\n for (FundsInComponentVO fundsInComponent : fundingComponents) {\n if (fundsInComponent.getFundingMethodAsEnum() == FundingMethodType.ECHECK) {\n return true;\n }\n }\n }\n return false;\n }", "private boolean conteEmpleat(List<Empleat> l, Empleat em){\r\n for(Empleat e:l){\r\n if(comparaEmpleats(em,e)){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end rule__Link__Group__2__Impl $ANTLR start rule__Link__Group__3 ../org.eclipse.ese.android.dsl.ui/srcgen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:837:1: rule__Link__Group__3 : rule__Link__Group__3__Impl ;
public final void rule__Link__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:841:1: ( rule__Link__Group__3__Impl ) // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:842:2: rule__Link__Group__3__Impl { pushFollow(FollowSets000.FOLLOW_rule__Link__Group__3__Impl_in_rule__Link__Group__31658); rule__Link__Group__3__Impl(); _fsp--; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__Link__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16211:1: ( rule__Link__Group__3__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16212:2: rule__Link__Group__3__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Link__Group__3__Impl_in_rule__Link__Group__332979);\r\n rule__Link__Group__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Link__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:810:1: ( rule__Link__Group__2__Impl rule__Link__Group__3 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:811:2: rule__Link__Group__2__Impl rule__Link__Group__3\n {\n pushFollow(FollowSets000.FOLLOW_rule__Link__Group__2__Impl_in_rule__Link__Group__21596);\n rule__Link__Group__2__Impl();\n _fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Link__Group__3_in_rule__Link__Group__21599);\n rule__Link__Group__3();\n _fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Link__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:1541:1: ( rule__Link__Group__3__Impl )\n // InternalBrowser.g:1542:2: rule__Link__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Link__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Link__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16180:1: ( rule__Link__Group__2__Impl rule__Link__Group__3 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16181:2: rule__Link__Group__2__Impl rule__Link__Group__3\r\n {\r\n pushFollow(FOLLOW_rule__Link__Group__2__Impl_in_rule__Link__Group__232917);\r\n rule__Link__Group__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Link__Group__3_in_rule__Link__Group__232920);\r\n rule__Link__Group__3();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Link__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:781:1: ( rule__Link__Group__1__Impl rule__Link__Group__2 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:782:2: rule__Link__Group__1__Impl rule__Link__Group__2\n {\n pushFollow(FollowSets000.FOLLOW_rule__Link__Group__1__Impl_in_rule__Link__Group__11536);\n rule__Link__Group__1__Impl();\n _fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Link__Group__2_in_rule__Link__Group__11539);\n rule__Link__Group__2();\n _fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleLink() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:242:2: ( ( ( rule__Link__Group__0 ) ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:243:1: ( ( rule__Link__Group__0 ) )\n {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:243:1: ( ( rule__Link__Group__0 ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:244:1: ( rule__Link__Group__0 )\n {\n before(grammarAccess.getLinkAccess().getGroup()); \n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:245:1: ( rule__Link__Group__0 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:245:2: rule__Link__Group__0\n {\n pushFollow(FollowSets000.FOLLOW_rule__Link__Group__0_in_ruleLink454);\n rule__Link__Group__0();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getLinkAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Link__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:822:1: ( ( '->' ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:823:1: ( '->' )\n {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:823:1: ( '->' )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:824:1: '->'\n {\n before(grammarAccess.getLinkAccess().getHyphenMinusGreaterThanSignKeyword_2()); \n match(input,18,FollowSets000.FOLLOW_18_in_rule__Link__Group__2__Impl1627); \n after(grammarAccess.getLinkAccess().getHyphenMinusGreaterThanSignKeyword_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Link__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:750:1: ( rule__Link__Group__0__Impl rule__Link__Group__1 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:751:2: rule__Link__Group__0__Impl rule__Link__Group__1\n {\n pushFollow(FollowSets000.FOLLOW_rule__Link__Group__0__Impl_in_rule__Link__Group__01474);\n rule__Link__Group__0__Impl();\n _fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Link__Group__1_in_rule__Link__Group__01477);\n rule__Link__Group__1();\n _fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Link__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:1514:1: ( rule__Link__Group__2__Impl rule__Link__Group__3 )\n // InternalBrowser.g:1515:2: rule__Link__Group__2__Impl rule__Link__Group__3\n {\n pushFollow(FOLLOW_9);\n rule__Link__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Link__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Links__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalLPDSL.g:1696:1: ( rule__Links__Group__3__Impl rule__Links__Group__4 )\r\n // InternalLPDSL.g:1697:2: rule__Links__Group__3__Impl rule__Links__Group__4\r\n {\r\n pushFollow(FOLLOW_8);\r\n rule__Links__Group__3__Impl();\r\n\r\n state._fsp--;\r\n\r\n pushFollow(FOLLOW_2);\r\n rule__Links__Group__4();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void ruleLink() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1698:2: ( ( ( rule__Link__Group__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1699:1: ( ( rule__Link__Group__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1699:1: ( ( rule__Link__Group__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1700:1: ( rule__Link__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getLinkAccess().getGroup()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1701:1: ( rule__Link__Group__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:1701:2: rule__Link__Group__0\r\n {\r\n pushFollow(FOLLOW_rule__Link__Group__0_in_ruleLink3581);\r\n rule__Link__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getLinkAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Link__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:852:1: ( ( ( rule__Link__ActivityAssignment_3 ) ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:853:1: ( ( rule__Link__ActivityAssignment_3 ) )\n {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:853:1: ( ( rule__Link__ActivityAssignment_3 ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:854:1: ( rule__Link__ActivityAssignment_3 )\n {\n before(grammarAccess.getLinkAccess().getActivityAssignment_3()); \n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:855:1: ( rule__Link__ActivityAssignment_3 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:855:2: rule__Link__ActivityAssignment_3\n {\n pushFollow(FollowSets000.FOLLOW_rule__Link__ActivityAssignment_3_in_rule__Link__Group__3__Impl1685);\n rule__Link__ActivityAssignment_3();\n _fsp--;\n\n\n }\n\n after(grammarAccess.getLinkAccess().getActivityAssignment_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Link__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:762:1: ( ( 'Link' ) )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:763:1: ( 'Link' )\n {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:763:1: ( 'Link' )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:764:1: 'Link'\n {\n before(grammarAccess.getLinkAccess().getLinkKeyword_0()); \n match(input,17,FollowSets000.FOLLOW_17_in_rule__Link__Group__0__Impl1505); \n after(grammarAccess.getLinkAccess().getLinkKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__LinkItem__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalLPDSL.g:1075:1: ( rule__LinkItem__Group__3__Impl rule__LinkItem__Group__4 )\r\n // InternalLPDSL.g:1076:2: rule__LinkItem__Group__3__Impl rule__LinkItem__Group__4\r\n {\r\n pushFollow(FOLLOW_4);\r\n rule__LinkItem__Group__3__Impl();\r\n\r\n state._fsp--;\r\n\r\n pushFollow(FOLLOW_2);\r\n rule__LinkItem__Group__4();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Rules__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:8592:1: ( rule__Rules__Group__3__Impl rule__Rules__Group__4 )\n // InternalDsl.g:8593:2: rule__Rules__Group__3__Impl rule__Rules__Group__4\n {\n pushFollow(FOLLOW_16);\n rule__Rules__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Rules__Group__4();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Link__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16151:1: ( rule__Link__Group__1__Impl rule__Link__Group__2 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16152:2: rule__Link__Group__1__Impl rule__Link__Group__2\r\n {\r\n pushFollow(FOLLOW_rule__Link__Group__1__Impl_in_rule__Link__Group__132857);\r\n rule__Link__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Link__Group__2_in_rule__Link__Group__132860);\r\n rule__Link__Group__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Activity__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:555:1: ( rule__Activity__Group__3__Impl rule__Activity__Group__4 )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:556:2: rule__Activity__Group__3__Impl rule__Activity__Group__4\n {\n pushFollow(FollowSets000.FOLLOW_rule__Activity__Group__3__Impl_in_rule__Activity__Group__31098);\n rule__Activity__Group__3__Impl();\n _fsp--;\n\n pushFollow(FollowSets000.FOLLOW_rule__Activity__Group__4_in_rule__Activity__Group__31101);\n rule__Activity__Group__4();\n _fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Links__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalLPDSL.g:1669:1: ( rule__Links__Group__2__Impl rule__Links__Group__3 )\r\n // InternalLPDSL.g:1670:2: rule__Links__Group__2__Impl rule__Links__Group__3\r\n {\r\n pushFollow(FOLLOW_8);\r\n rule__Links__Group__2__Impl();\r\n\r\n state._fsp--;\r\n\r\n pushFollow(FOLLOW_2);\r\n rule__Links__Group__3();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Activity__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:3085:1: ( rule__Activity__Group__3__Impl rule__Activity__Group__4 )\n // InternalComponentDefinition.g:3086:2: rule__Activity__Group__3__Impl rule__Activity__Group__4\n {\n pushFollow(FOLLOW_17);\n rule__Activity__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Activity__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the scale of the datasets on this graph, to linear, log10 or loge
public void setScale(int scale) { DatasetXtoY d; int oldValue = this.scale; switch (scale) { case Dataset.LINEAR: case Dataset.LOG_10: case Dataset.LOG_E: this.scale = scale; for (int i = 0; i < dataset.size(); i++) { d = (DatasetXtoY) dataset.get(i); d.setScaleAndDoNotFirePropertyChange(scale); } break; } firePropertyChange(GraphDataset.SCALE_PROPERTY, oldValue, this.scale); }
[ "public void setScale(int scale) {\r\n if (dataset == null) return;\r\n\r\n int oldValue = this.scale;\r\n\r\n switch (scale) {\r\n case Dataset.LINEAR:\r\n case Dataset.LOG_10:\r\n case Dataset.LOG_E:\r\n this.scale = scale;\r\n dataset.setScale(scale);\r\n break;\r\n }\r\n\r\n firePropertyChange(GraphDataset.SCALE_PROPERTY, oldValue, this.scale);\r\n }", "public static void setScale() {\n setXscale();\n setYscale();\n }", "void setScale(double scale);", "public void setScale(float scale);", "private synchronized void setLinearScale(double value) {\n\t\t\tlinearScale = value;\n\t\t}", "public void setScale(int value) {\n this.scale = value;\n }", "public void setScale(double value) {\n this.scale = value;\n }", "public void setScale(float scale) {\n this.scale = scale;\n }", "public void setScale(Integer scale) {\n this.scale = scale;\n }", "public void setScale() { \r\n final double x = max(this.data, 0);\r\n final double y = max(this.data, 1); \r\n this.scaleX = (graphics.getRenderGridHeight() - 10.0) / x;\r\n this.scaleY = (graphics.getRenderGridHeight() - 10.0) / y; \r\n System.out.println(\"INFO : ScaleX : \" + this.scaleX); \r\n }", "public final void setScale(float scale) {\n\t\n \tthis.svd(this);\n \tthis.mul(scale);\n }", "public void setScale(int value) {\r\n this.scale = value;\r\n }", "void setMaxScale(int value);", "public void setLogScale(LogScale logScale) {\n this.logScale = logScale;\n }", "private void toggleLogScale() {\r\n if (chart != null) {\r\n IAxis[] axes = chart.getAxisSet().getXAxes();\r\n if (axes != null && axes.length > 0 && axes[0] != null) {\r\n this.enableLogScale(!axes[0].isLogScaleEnabled());\r\n }\r\n }\r\n }", "public void setScale(float scale) {\n scaleX = scaleY = scale; // Set Uniform Scale\n }", "public void setScaleXY(double sx, double sy) { setScaleX(sx); setScaleY(sy); }", "public abstract void setScale(float x, float y);", "private void setPeriodogramScale() {\n\t\tdouble sum = 0;\n\n\t\tfor (int i = 0; i < segLength; i++)\n\t\t\tsum += Math.pow(this.window[i], 2);\n\n\t\tthis.scale = 1.0 / sum;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of all assigned user names for the given domain which have the role 'admin'
@RolesAllowed({"admin"}) public List<String> getAssignedUsersWithAdminRole(int domainId) { List<DomainUser> users = em.createNamedQuery("DomainUser.findByDomainIdAndUserRole", DomainUser.class).setParameter("domainId", domainId).setParameter("userRole", "admin").getResultList(); List<String> result = new ArrayList<String>(users.size()); for (DomainUser u : users) result.add(u.getUserName()); return result; }
[ "@RolesAllowed({\"admin\"})\n public List<String> getAssignedUsers(int domainId) {\n List<DomainUser> users = em.createNamedQuery(\"DomainUser.findByDomainId\", DomainUser.class).setParameter(\"domainId\", domainId).getResultList();\n List<String> result = new ArrayList<String>(users.size());\n for (DomainUser u : users) result.add(u.getUserName());\n return result;\n }", "public String getAdminUsernames() {\n return StringUtils.join(adminUsernames.iterator(), \", \");\n }", "List<AdminDomain> getDomains();", "public List<String> getAvailableAssignees()\n {\n // TODO stefan an Rollen knüpfen\n final Matcher<String> m = new BooleanListRulesFactory<String>().createMatcher(\"admin/user/*\");\n final List<GWikiElementInfo> userInfos = wikiContext.getElementFinder()\n .getPageInfos(new GWikiPageIdMatcher(wikiContext, m));\n\n List<String> users = new ArrayList<String>();\n for (final GWikiElementInfo user : userInfos) {\n users.add(GWikiContext.getNamePartFromPageId(user.getId()));\n }\n return users;\n }", "public String[] getUserIdsOfDomain(int domainId)\n throws AdminPersistenceException {\n return (String[]) getIds(SELECT_ALL_USER_IDS_IN_DOMAIN, domainId).toArray(\n new String[0]);\n }", "public static List<User> queryAdministrators() {\n\t\treturn Database.query(User.class, User::isAdministrator);\n\t}", "@RolesAllowed({\"superuser\",\"admin\",\"user\"})\n public List<Domain> getDomains() {\n if (ctx.isCallerInRole(\"superuser\"))\n return em.createNamedQuery(\"Domain.findAll\", Domain.class).getResultList();\n else {\n List<DomainUser> domains = em.createNamedQuery(\"DomainUser.findByUserName\", DomainUser.class).setParameter(\"userName\", ctx.getCallerPrincipal().getName()).getResultList();\n List<Domain> result = new ArrayList<Domain>(domains.size());\n for (DomainUser d : domains) result.add(em.find(Domain.class, d.getDomainId()));\n return result;\n }\n }", "private List<AdminUser> getEnabledAdmins() {\n\t\treturn getAdministrators().stream().filter(admin -> admin.getEnabled()).collect(Collectors.toList());\n\t}", "protected List<String> getUserNames() {\n try {\n final Properties properties = usersFileLoader.getProperties();\n return toList(properties);\n } catch (Exception e) {\n LOG.error(\"Error obtaining JBoss users from properties file.\",\n e);\n throw new SecurityManagementException(e);\n }\n }", "public List<String> getUsernames(){\n return users.stream().map(User::getUsername).collect(Collectors.toList());\n }", "public static String[] getAllUsersNames(){\n\t\tConnection con = dbConn();\n\t\tString query = \"SELECT FirstName, LastName, Email FROM User\";\n\t\ttry {\n\t\t\tPreparedStatement ps = con.prepareStatement(query);\n\t\t\tResultSet result = ps.executeQuery();\n\t\t\tList<String> users = new ArrayList<String>();\n\t\t\tusers.add(\"None\");\n\t\t\twhile(result.next()){\n\t\t\t\tString first = result.getString(1);\n\t\t\t\tString last = result.getString(2);\n\t\t\t\tString email = result.getString(3);\n\t\t\t\tif (!(first + \" \" + last).equals(\"admin admin\")){\n\t\t\t\t\tusers.add(first + \" \" + last + \": \" + email);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString[] fullNames = new String[users.size()];\n\t\t\tfullNames = users.toArray(fullNames);\n\t\t\treturn fullNames;\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public List<User> getUsersByRole(String role);", "public List<String> getAllUserNameByCentre(String localCentreGroupName) throws UserManagementException;", "List<String> loadAllUserNames();", "private List<String> getRoleName(String userName, TenantRegistrationConfig tenantConfig) {\n if (tenantConfig != null) {\n List<String> roleNamesArr = new ArrayList<String>();\n Map<String, Boolean> roles = tenantConfig.getRoles();\n for (Map.Entry<String, Boolean> entry : roles.entrySet()) {\n String roleName;\n if (entry.getValue()) {\n // external role\n roleName = tenantConfig.getSignUpDomain().toUpperCase() + UserCoreConstants.DOMAIN_SEPARATOR +\n entry.getKey();\n } else {\n // internal role\n roleName = UserCoreConstants.INTERNAL_DOMAIN + UserCoreConstants.DOMAIN_SEPARATOR + entry.getKey();\n }\n roleNamesArr.add(roleName);\n }\n // return, don't need to worry about roles specified in identity.xml\n return roleNamesArr;\n }\n\n String roleName = IdentityUtil.getProperty(SelfRegistrationConstants.ROLE_NAME_PROPERTY);\n boolean externalRole = Boolean.parseBoolean(IdentityUtil.getProperty(\n SelfRegistrationConstants.ROLE_EXTERNAL_PROPERTY));\n\n String domainName = UserCoreConstants.INTERNAL_DOMAIN;\n if (externalRole) {\n domainName = IdentityUtil.extractDomainFromName(userName);\n }\n\n if (roleName == null || roleName.trim().length() == 0) {\n roleName = IdentityConstants.IDENTITY_DEFAULT_ROLE;\n }\n\n if (domainName != null && domainName.trim().length() > 0) {\n roleName = domainName.toUpperCase() + UserCoreConstants.DOMAIN_SEPARATOR + roleName;\n }\n return new ArrayList<String>(Arrays.asList(roleName));\n }", "public List listAliases(String domain, String user) throws EmailException {\n try {\n return ServerConfig.getInstance().getAlias().listAliases(\n domain,user);\n } catch (Exception ex) {\n log.error(\"Failed to list the alias : \" \n + ex.getMessage(),ex);\n throw new EmailException(\n \"Failed to list the alias : \" \n + ex.getMessage(),ex);\n }\n }", "public List<String> getAllUserNames()\n\t{\n\t\treturn userDao.findUserNames();\n\t}", "@Query(\"select a from Account a where a.role = 'Admin'\")\n List<Account> getAllAdmins();", "@RequestMapping(value = \"\", method = RequestMethod.GET, headers = \"Accept=application/json\")\n\tpublic @ResponseBody String getAllUsersForDomain(HttpServletRequest httpRequest,@PathVariable(\"domain\") String domainStr)\tthrows IOException, ValidationException {\n\t\tlogger.log(Level.FINER,\t\"UserController: received request to refresh User Table\");\n\t\tthis.validateAuthorization(httpRequest, domainStr, RoleType.ADMINISTRATOR);\n\t\tthis.instrumentAPI(\"edu.ncsu.las.rest.collector.UserController.getAllUsersForDomain\", new JSONObject(),System.currentTimeMillis(),null, httpRequest,domainStr);\n\n\t\tJSONObject result = new JSONObject();\n\t\tJSONArray users = new JSONArray();\n\t\t\t\n\t\tfor (User u: User.getUsers(domainStr)) {\n\t\t\tusers.put(u.toJSON());\t\t\n\t\t}\n\t\tresult.put(\"users\", users);\n\t\treturn result.toString();\t\t\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get method for struct member '_pad0'.
public CArrayFacade<Byte> get_pad0() throws IOException { Class<?>[] __dna__targetTypes = new Class[]{Byte.class}; int[] __dna__dimensions = new int[]{ 6 }; if ((__io__pointersize == 8)) { return new CArrayFacade<Byte>(__io__address + 34, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable); } else { return new CArrayFacade<Byte>(__io__address + 18, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable); } }
[ "public CArrayFacade<Byte> get_pad0() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t4\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 276, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 232, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}", "public CArrayFacade<Byte> get_pad0() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t1\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 511, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 495, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}", "public CArrayFacade<Byte> get_pad0() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t4\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 36, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 36, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}", "java.lang.String getField1624();", "java.lang.String getField1604();", "public CArrayFacade<Byte> get_pad1() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t2\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 546, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 522, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}", "public CArrayFacade<Byte> get_pad1() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t4\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 204, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 196, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}", "public CArrayFacade<Byte> get_pad1() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t4\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 52, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 32, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}", "java.lang.String getField1608();", "public CArrayFacade<Byte> get_pad1() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t4\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 76, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 76, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}", "public CArrayFacade<Byte> get_pad1() throws IOException\n\t{\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Byte.class};\n\t\tint[] __dna__dimensions = new int[]{\n\t\t\t4\n\t\t};\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 60, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new CArrayFacade<Byte>(__io__address + 60, __dna__targetTypes, __dna__dimensions, __io__block, __io__blockTable);\n\t\t}\n\t}", "java.lang.String getField1601();", "java.lang.String getField1648();", "java.lang.String getField1110();", "java.lang.String getField1620();", "java.lang.String getField1320();", "java.lang.String getField1656();", "java.lang.String getField1644();", "java.lang.String getField1640();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a set of ports (endpoints) to the service.
@Override public void addPorts(final HashSet<FPort> ports) { this.ports.addAll(ports); }
[ "public void addPorts(){\n\t\t\n\t}", "private void addPorts(JsonObject serviceJson, Collection<? > ports)\r\n {\r\n JsonObject portsJson = new JsonObject();\r\n\r\n serviceJson.add(\"ports\", portsJson);\r\n\r\n for (Object port : ports)\r\n {\r\n String name = port instanceof Port\r\n ? ((Port) port).getName()\r\n : ((Binding) port).getQName().getLocalPart();\r\n Binding binding = port instanceof Port\r\n ? ((Port) port).getBinding()\r\n : (Binding) port;\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n Collection<BindingOperation> operations = binding.getBindingOperations();\r\n\r\n JsonObject portJson = new JsonObject();\r\n portJson.addProperty(\"name\", name);\r\n portJson.addProperty(WSConstants.WS_PORT_NAME_ATT, name);\r\n portJson.addProperty(\"style\", JaxWSResource.getBindingStyle(binding));\r\n addOperations(portJson, operations);\r\n portsJson.add(name, portJson);\r\n }\r\n }", "private void addEndpoints() {\n \tfor (InetAddress addr : EndpointManager.getEndpointManager().getNetworkInterfaces()) {\n \t\t// only binds to IPv4 addresses and localhost\n\t\t\tif (addr instanceof Inet4Address || addr.isLoopbackAddress()) {\n\t\t\t\tInetSocketAddress bindToAddress = new InetSocketAddress(addr, COAP_PORT);\n\t\t\t\taddEndpoint(new CoapEndpoint(bindToAddress));\n\t\t\t}\n\t\t}\n }", "protected void retrofitPorts(List<EndPoint> eps)\r\n {\r\n for ( EndPoint ep : eps )\r\n {\r\n ep.setPort(storagePort_);\r\n }\r\n }", "@Override\n public void setPorts(final HashSet<FPort> ports)\n {\n this.ports = ports;\n }", "public void addHost(String host, int port);", "public void addPort(int port) {\n\t\tthis.ports.add(port + \"\");\n\t}", "public void addPort(Port port) {\n this.portList.add(port);\n }", "private static boolean addPorts(UPnPManager myManager, List<Port> toAdd) {\n for (Port p : myUI.getPortsToForward()) {\n if (!myManager.addPort(p)) {\n return false;\n }\n }\n return true;\n }", "public void setPorts(ArrayList<Port> portList) {\n this.portList = portList;\n }", "public void addExposedPort(Port port) {\n if (exposedPorts == null) {\n exposedPorts = new HashSet<>();\n }\n exposedPorts.add(port);\n }", "public com.google.cloud.run.v2.ContainerPort.Builder addPortsBuilder() {\n return getPortsFieldBuilder()\n .addBuilder(com.google.cloud.run.v2.ContainerPort.getDefaultInstance());\n }", "private static List<Port> parsePorts(String[] args) {\n List<Port> portsToOpen = new ArrayList<>();\n int startIndex = getArgIndex(args, PORT_FLAG);\n if (startIndex != -1) {\n int offset = 1;\n while (startIndex + offset + 1 < args.length && !args[startIndex + offset].startsWith(\"-\")) {\n try {\n int iPort = Integer.parseInt(args[startIndex + offset]);\n int ePort = Integer.parseInt(args[startIndex + offset + 1]);\n portsToOpen.add(new Port(iPort, ePort, true, true));\n System.out.println(\"Added port \" + iPort + \":\" + ePort);\n } catch (NumberFormatException nfe) {\n System.err.println(\"Invalid port: \" + args[startIndex + offset]);\n System.err.println(\"Invalid port: \" + args[startIndex + offset + 1]);\n } catch (IllegalArgumentException iae) {\n System.err.println(iae.getLocalizedMessage());\n }\n offset += 2;\n }\n }\n return portsToOpen;\n }", "public void addPort(Port port)\n {\n ports.put(port.getName(), port);\n }", "public void update(Set<TransportManager.Port> ports) {\n if (_log.shouldLog(Log.DEBUG))\n _log.debug(\"UPnP Update with \" + ports.size() + \" ports\");\n\n //synchronized(this) {\n // TODO\n // called too often and may block for too long\n // may not have started if net was disconnected previously\n //if (!_isRunning && !ports.isEmpty())\n // start();\n if (!_isRunning)\n return;\n //}\n\n Set<ForwardPort> forwards = new HashSet<ForwardPort>(ports.size());\n for (TransportManager.Port entry : ports) {\n String style = entry.style;\n int port = entry.port;\n int protocol;\n String name;\n if (\"SSU\".equals(style)) {\n protocol = ForwardPort.PROTOCOL_UDP_IPV4;\n name = UDP_PORT_NAME;\n } else if (\"NTCP\".equals(style)) {\n protocol = ForwardPort.PROTOCOL_TCP_IPV4;\n name = TCP_PORT_NAME;\n } else {\n continue;\n }\n if (_log.shouldLog(Log.DEBUG))\n _log.debug(\"Adding: \" + style + \" \" + port);\n ForwardPort fp = new ForwardPort(name, false, protocol, port);\n forwards.add(fp);\n }\n // non-blocking\n _upnp.onChangePublicPorts(forwards, _upnpCallback);\n }", "public MicroservicesRunner(int... ports) {\n configureTransport(ports);\n }", "public void setEndpoints(List<Endpoint<?>> endpoints) {\n\t\tthis.endpoints = endpoints;\n\t}", "public Builder setExposedPorts(@Nullable Set<Port> exposedPorts) {\n if (exposedPorts == null) {\n this.exposedPorts = null;\n } else {\n Preconditions.checkArgument(\n !exposedPorts.contains(null), \"ports list contains null elements\");\n this.exposedPorts = new HashSet<>(exposedPorts);\n }\n return this;\n }", "public com.microsoft.schemas.xrm._2014.contracts.EndpointCollection addNewEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2014.contracts.EndpointCollection target = null;\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().add_element_user(ENDPOINTS$0);\r\n return target;\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the project's workflow scheme is only used by one project and if this scheme has a draft, then the draft is copied to a separate scheme and deleted.
AssignableWorkflowScheme cleanUpSchemeDraft(Project project, User user);
[ "private void ifItWasInDraftFolderDeleteThatCopy() {\r\n\t\tif (parentFolder.getPath().equals(\r\n\t\t\t\tCECConfigurator.getReference().get(\"Drafts\"))) {\r\n\t\t\temailDao.delete(parentFolder.getPath(), id);\r\n\t\t}\r\n\t}", "boolean deleteWorkflowScheme(@Nonnull WorkflowScheme scheme);", "boolean hasDraft(@Nonnull AssignableWorkflowScheme workflowScheme);", "DraftWorkflowScheme updateDraftWorkflowScheme(ApplicationUser user, @Nonnull DraftWorkflowScheme scheme);", "DraftWorkflowScheme getDraftForParent(@Nonnull AssignableWorkflowScheme workflowScheme);", "AssignableWorkflowScheme getParentForDraft(long draftSchemeId);", "@Nonnull\n AssignableWorkflowScheme getWorkflowSchemeObj(@Nonnull Project project);", "DraftWorkflowScheme getDraft(long id);", "@Nonnull\n DraftWorkflowScheme createDraftOf(ApplicationUser creator, @Nonnull AssignableWorkflowScheme workflowScheme);", "AssignableWorkflowScheme updateWorkflowScheme(@Nonnull AssignableWorkflowScheme scheme);", "Iterable<WorkflowScheme> getSchemesForWorkflowIncludingDrafts(JiraWorkflow workflow);", "public AssignableWorkflowScheme getParentScheme();", "public void removeDraft(String draftName) throws Exception;", "@Nullable\n AssignableWorkflowScheme getWorkflowSchemeObj(String name);", "@Override\n\tpublic void unpublish()\n\t{\n\t\tLOGGER.debug(\"Action unpublish() called on \" + this);\n\n\t\tif (this.getLifecycle() == Lifecycle.DRAFT) {\n\t\t\treturn; // TODO explode ?\n\t\t}\n\t\t\n\t\ttry {\n\n\t\t\tauthenticate();\n\t\t \n\t\t\t// getting DCResource (especially version) :\n\t\t\tDCResource ldResource = ldc.getData(\"dcmp:Project_0\", this.name);\n\t\t\t\n\t\t\t// updating attributes :\n\t\t\tldResource.set(\"dcmp:frozenModelNames\", new ArrayList<String>(2));\n\t\t\t\n\t\t\t// saving OCCI resource as DCResource :\n\t\t\tldResource = ldc.putDataInType(ldResource); // NOT POST else list values are merged, rather replace\n\t\t\t\n\t\t\tthis.setLifecycle(Lifecycle.DRAFT);\n\t\t\t\n\t\t} catch (NotFoundException e) {\n\t\t\tLOGGER.error(\"NotFoundException\", e);\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tLOGGER.error(\"IllegalArgumentException\", e);\n\t\t\te.printStackTrace();\n\t\t} catch (WebApplicationException e) {\n\t\t\tSystem.out.println(readBodyAsString(e));\n\t\t\tLOGGER.error(\"WebApplicationException\", e);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void unsetDrafts();", "@Nullable\n AssignableWorkflowScheme getWorkflowSchemeObj(long id);", "@Test\n public void testCreateDraftWithParent()\n {\n if (projects.size() > 0)\n {\n Project project = projects.get(0);\n Assert.assertNotNull(project);\n\n Set<Resource> all = resourcesManager.getDraftResources(project\n .getId());\n Assert.assertNotNull(all);\n\n if (all.isEmpty())\n {\n resourcesManager.createResource(project.getId(), -1,\n builder.buildResource(ResourceKind.FOLDER));\n all = resourcesManager.getResources(project.getId());\n }\n\n Resource parent = all.iterator().next();\n Assert.assertNotNull(parent);\n\n if (parent.getKind().equals(ResourceKind.FOLDER))\n {\n Set<Resource> childs = parent.getChilds();\n Assert.assertNotNull(childs);\n\n Resource newResource = builder.buildResource(ResourceKind.FILE);\n Assert.assertNotNull(newResource);\n\n Resource created = resourcesManager.createResource(\n project.getId(), parent.getId(), newResource);\n\n Assert.assertNotNull(created);\n Assert.assertNotNull(created.getId());\n Assert.assertNotNull(created.getUrl());\n\n Set<Resource> allNow = resourcesManager\n .getDraftResources(project.getId());\n\n Assert.assertNotNull(allNow);\n Assert.assertEquals(all.size(), allNow.size());\n\n parent = created.getParent();\n Assert.assertNotNull(parent);\n\n Assert.assertEquals(childs.size() + 1, parent.getChilds()\n .size());\n\n log.info(\"Check subversion url :\" + created.getUrl());\n }\n }\n else\n {\n fail(\"There is not projects.\");\n }\n\n }", "void discardBackupWorkspace(String projectId, String workspaceId, WorkspaceType workspaceType);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getTextFromSingleNode Receives a xPath string expression that refers to a unique node element from DOM document, and return the string from text child element. If a remote call exists, this node will be materialized.
public String getTextFromSingleNode(String xPathString) throws AxmlDocException { AxmlNode axmlNode; Node node; XPathExpression xPathExpression; try { xPathExpression = xPath.compile(xPathString); node = (Node) xPathExpression.evaluate(this.decoratedDocument, XPathConstants.NODE); axmlNode = new AxmlNode((Element) node); } catch (XPathExpressionException xpe) { throw new AxmlDocException( "xPath error. Check if your expression is ok and if refer to a only one node element."); } String retorno; // Checking handle strategy switch (this.handleStrategy) { case LAZY_PERSIST: retorno = axmlNode.getTextContent(this.returnType); this.persist(); break; case LAZY_PERSIST_WITH_EXCLUSION: this.revertMaterializedData(); retorno = axmlNode.getTextContent(this.returnType); this.persist(); break; default: retorno = axmlNode.getTextContent(this.returnType); } return retorno; }
[ "protected String getNodeText(String xpath) {\n\t\tNode node = getNode(xpath);\n\t\ttry {\n\t\t\treturn node.getText();\n\t\t} catch (Throwable t) {\n\n\t\t\t// prtln (\"getNodeText() failed with \" + xpath + \"\\n\" + t.getMessage());\n\t\t\t// Dom4jUtils.prettyPrint (docMap.getDocument());\n\t\t}\n\t\treturn \"\";\n\t}", "public String getTextValue (Node node);", "private String getNodeTextValue(Node node) {\r\n if (node.getChildNodes().getLength() != 1)\r\n return null;\r\n Node textNode = (Node) node.getFirstChild();\r\n if (textNode.getNodeType() != Node.TEXT_NODE)\r\n return null;\r\n\r\n return textNode.getNodeValue();\r\n }", "public String getNodeValue(Node node) throws Exception;", "private static String getTextNode( WebElement e ) {\n String text = e.getText().trim();\n List<WebElement> children = e.findElements( By.xpath( \"./*\" ) );\n for ( WebElement child : children ) {\n text = text.replaceFirst( child.getText(), \"\" ).trim();\n }\n return text;\n }", "public String GetText(LocatorObject locator)\n{\n String value = null;\n\n value= FindElement(locator).getText();\n \n return value;\n}", "public String getTextNodeValue(final Node node) {\n final NodeList children = node.getChildNodes();\n for (int j=0; j<children.getLength(); j++) {\n final Node tmpNode = children.item(j);\n if (tmpNode.getNodeType() == Node.TEXT_NODE) return tmpNode.getNodeValue();\n }\n return null;\n }", "java.lang.String getNode();", "private String getTextFromNode(Node data) {\r\n Node child = data.getFirstChild();\r\n StringBuilder text = new StringBuilder();\r\n\r\n while (child != null) {\r\n\r\n if (child.getNodeType() == Node.TEXT_NODE) {\r\n text.append(child.getNodeValue());\r\n }\r\n\r\n child = child.getNextSibling();\r\n }\r\n\r\n return text.toString();\r\n }", "public String getText(Node node) {\n\t StringBuffer result = new StringBuffer();\n\t if (! node.hasChildNodes()) return \"\";\n\n\t NodeList list = node.getChildNodes();\n\t for (int i=0; i < list.getLength(); i++) {\n\t Node subnode = list.item(i);\n\t if (subnode.getNodeType() == Node.TEXT_NODE) {\n\t result.append(subnode.getNodeValue());\n\t }\n\t else if (subnode.getNodeType() == Node.CDATA_SECTION_NODE) {\n\t result.append(subnode.getNodeValue());\n\t }\n\t else if (subnode.getNodeType() == Node.ENTITY_REFERENCE_NODE) {\n\t // Recurse into the subtree for text\n\t // (and ignore comments)\n\t result.append(getText(subnode));\n\t }\n\t }\n\n\t return result.toString();\n\t}", "private Text findTextNode() {\n final Set<Node> nodes = lookupAll(\".text\");\n for (Node node : nodes) {\n if (node.getParent() instanceof Group) {\n return (Text) node;\n }\n }\n return null;\n }", "public static String getTextValue(Element node)\n {\n NodeList nodes = node.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++)\n {\n Node n = nodes.item(i);\n if (n.getNodeType() == n.TEXT_NODE)\n return n.getNodeValue();\n }\n return null;\n }", "public String getTextContent(String xpath) {\n\t\t\n\t\tString result = \"\";\n\t\t\n\t\t//-- Process\n\t\ttry {\n\t\t\tresult = (String) this.xpath.evaluate(xpath, this.document, XPathConstants.STRING);\n\t\t} catch (XPathExpressionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//e.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\treturn result==null?\"\":result;\n\t\t\n\t}", "public String getValue(Node node) {\n return (node == null) ? null : node.getTextContent();\n }", "String getInnerText();", "public static String getChildText(Node node){\n\t\tString childText = \"\";\n\t\tNode childNode;\n\t\t\n\t\tchildNode = node.getChildNodes().item(0);\n\t\t\n\t\tif (childNode != null)\n\t\t\tif (childNode.getNodeType() == Node.TEXT_NODE)\n\t\t\t\tchildText = childNode.getNodeValue();\n\t\t\telse \n\t\t\t\tchildText = \"\";\n\t\t\n\t\treturn childText ;\n\t}", "private String getFirstTextOccurence(Node node){\n\t\tif(node != null)\n\t\t{\n\t\t\tif(node.getNodeValue() != null)\n\t\t\t{\n\t\t\t\treturn node.getNodeValue();\n\t\t\t}\n\t\t\tNodeList nodeList = node.getChildNodes();\n\t\t\tfor (int i=0; i< nodeList.getLength(); i++)\n\t\t\t{\n\t\t\t\tString firstOccurence = getFirstTextOccurence(nodeList.item(i));\n\t\t\t\tif(firstOccurence != null)\n\t\t\t\t{\n\t\t\t\t\treturn firstOccurence;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String getNodeValue(Node node) {\r\n\t\tif (node==null)\r\n\t\t\treturn \"\";\r\n\t\tNode subnode = node.getFirstChild();\r\n\t\tif (subnode == null)\r\n\t\t\treturn \"\";\r\n\t\tString string = subnode.getNodeValue();\r\n\t\tif (string == null)\r\n\t\t\treturn \"\";\r\n\t\treturn string;\r\n\t}", "public synchronized Node getSingleNode(String path)\n throws ProcessingException {\n Node result = null;\n\n path = this.createPath(path);\n\n try {\n result = DOMUtil.getSingleNode(data, path, this.xpathProcessor);\n if (result != null) result = result.cloneNode(true);\n } catch (javax.xml.transform.TransformerException localException) {\n throw new ProcessingException(\"TransformerException: \" + localException, localException);\n }\n\n return result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
I2C_MST_CTRL register Get multimaster enabled value. Multimaster capability allows multiple I2C masters to operate on the same bus. In circuits where multimaster capability is required, set MULT_MST_EN to 1. This will increase current drawn by approximately 30uA. In circuits where multimaster capability is required, the state of the I2C bus must always be monitored by each separate I2C Master. Before an I2C Master can assume arbitration of the bus, it must first confirm that no other I2C Master has arbitration of the bus. When MULT_MST_EN is set to 1, the MPU60X0's bus arbitration detection logic is turned on, enabling it to detect when the bus is available.
public boolean getMultiMasterEnabled() { buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_I2C_MST_CTRL, MPU6050_Registers.MPU6050_MULT_MST_EN_BIT); return buffer[0] == 1; }
[ "public boolean getI2CMasterModeEnabled() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_USER_CTRL, MPU6050_Registers.MPU6050_USERCTRL_I2C_MST_EN_BIT);\n return buffer[0] == 1;\n }", "public boolean getIntI2CMasterEnabled() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_INT_ENABLE, MPU6050_Registers.MPU6050_INTERRUPT_I2C_MST_INT_BIT);\n return buffer[0] == 1;\n }", "public boolean getIntI2CMasterStatus() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_INT_STATUS, MPU6050_Registers.MPU6050_INTERRUPT_I2C_MST_INT_BIT);\n return buffer[0] == 1;\n }", "public byte getMasterClockSpeed() {\n buffer[0] = (byte) I2Cdev.readBits(MPU6050_Registers.MPU6050_RA_I2C_MST_CTRL, MPU6050_Registers.MPU6050_I2C_MST_CLK_BIT, MPU6050_Registers.MPU6050_I2C_MST_CLK_LENGTH);\n return buffer[0];\n }", "public void resetI2CMaster() {\n I2Cdev.writeBit(MPU6050_Registers.MPU6050_RA_USER_CTRL, MPU6050_Registers.MPU6050_USERCTRL_I2C_MST_RESET_BIT, (byte) 1);\n }", "public void setI2CMasterModeEnabled(boolean enabled) {\n if (enabled) {\n I2Cdev.writeBit(MPU6050_Registers.MPU6050_RA_USER_CTRL, MPU6050_Registers.MPU6050_USERCTRL_I2C_MST_EN_BIT, (byte) 1);\n } else {\n I2Cdev.writeBit(MPU6050_Registers.MPU6050_RA_USER_CTRL, MPU6050_Registers.MPU6050_USERCTRL_I2C_MST_EN_BIT, (byte) 0);\n }\n }", "public void setMultiMasterEnabled(boolean enabled) {\n if (enabled) {\n I2Cdev.writeBit(MPU6050_Registers.MPU6050_RA_I2C_MST_CTRL, MPU6050_Registers.MPU6050_MULT_MST_EN_BIT, (byte) 1);\n } else {\n I2Cdev.writeBit(MPU6050_Registers.MPU6050_RA_I2C_MST_CTRL, MPU6050_Registers.MPU6050_MULT_MST_EN_BIT, (byte) 0);\n }\n }", "public boolean getSlaveReadWriteTransitionEnabled() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_I2C_MST_CTRL, MPU6050_Registers.MPU6050_I2C_MST_P_NSR_BIT);\n return buffer[0] == 1;\n }", "public void setIntI2CMasterEnabled(boolean enabled) {\n if (enabled) {\n I2Cdev.writeBit(MPU6050_Registers.MPU6050_RA_INT_ENABLE, MPU6050_Registers.MPU6050_INTERRUPT_I2C_MST_INT_BIT, (byte) 1);\n } else {\n I2Cdev.writeBit(MPU6050_Registers.MPU6050_RA_INT_ENABLE, MPU6050_Registers.MPU6050_INTERRUPT_I2C_MST_INT_BIT, (byte) 0);\n }\n }", "public boolean getSlave2Nack() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_I2C_MST_STATUS, MPU6050_Registers.MPU6050_MST_I2C_SLV2_NACK_BIT);\n return buffer[0] == 1;\n }", "public SmbMultichannel getMultichannel() {\n return this.multichannel;\n }", "public SmsActuator() {\n this.setType(LogicalDevice.Type_SmsActuator);\n }", "int getActiveMaximumTransmissionUnit();", "public boolean getSlaveEnabled(byte num) {\n if (num > 3) {\n return false;\n }\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_I2C_SLV0_CTRL + num * 3, MPU6050_Registers.MPU6050_I2C_SLV_EN_BIT);\n return buffer[0] == 1;\n }", "public boolean getSlave0Nack() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_I2C_MST_STATUS, MPU6050_Registers.MPU6050_MST_I2C_SLV0_NACK_BIT);\n return buffer[0] == 1;\n }", "public boolean getStandbyXAccelEnabled() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_PWR_MGMT_2, MPU6050_Registers.MPU6050_PWR2_STBY_XA_BIT);\n return buffer[0] == 1;\n }", "public void getTwsSlaveBattery() {\n sendOrEnqueue(AirohaMMICmd.GET_RIGHT_BATTERY);\n }", "public java.lang.Integer getMS() {\n\t\t return MS;\n\t }", "public static boolean getNetCoreSMSAPISwitch() {\n return Config.getBoolean(\"netcore.sms.switch.on\", true);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize the playlist and controls.
public void initPlaylist(List<JcAudio> playlist) { // Don't sort if the playlist have position number. // We need to do this because there is a possibility that the user reload previous playlist // from persistence storage like sharedPreference or SQLite. if (!isAlreadySorted(playlist)) { sortPlaylist(playlist); } jcAudioPlayer = new JcAudioPlayer(getContext(), playlist, jcPlayerViewServiceListener); jcAudioPlayer.registerInvalidPathListener(onInvalidPathListener); //jcAudioPlayer.registerStatusListener(jcPlayerViewStatusListener); this.txtCurrentMusicMini.setText(playlist.get(0).getTitle()); isInitialized = true; }
[ "public void initAnonPlaylist(List<JcAudio> playlist) {\n sortPlaylist(playlist);\n generateTitleAudio(playlist, getContext().getString(R.string.track_number));\n jcAudioPlayer = new JcAudioPlayer(getContext(), playlist, jcPlayerViewServiceListener);\n jcAudioPlayer.registerInvalidPathListener(onInvalidPathListener);\n //jcAudioPlayer.registerStatusListener(jcPlayerViewStatusListener);\n isInitialized = true;\n }", "public GUI_mp3player() {\n initComponents();\n secondInitComponents();\n createListeners();\n }", "private void initPlayMode() {\n initPlayModeView();\n initPlayModeController();\n }", "public void initWithTitlePlaylist(List<JcAudio> playlist, String title) {\n sortPlaylist(playlist);\n generateTitleAudio(playlist, title);\n jcAudioPlayer = new JcAudioPlayer(getContext(), playlist, jcPlayerViewServiceListener);\n jcAudioPlayer.registerInvalidPathListener(onInvalidPathListener);\n //jcAudioPlayer.registerStatusListener(jcPlayerViewStatusListener);\n isInitialized = true;\n }", "public MP3Player(){\n\t\tplayList = new DefaultListModel<Track>();\n\t\tstatus = Status.NULL;\n\t}", "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 MediaPlayerPanel() {\r\n validator = new Validator();\r\n player = new EmbeddedMediaPlayerComponent();\r\n iniMediaPlayer();\r\n createButtons();\r\n }", "public void init()\n {\n vlc = new VLCControl();\n try {\n vlc.connect();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void init() {\n\t\tmusicInfos = new ArrayList<MusicSong>();\n\t\tsetPlayState(STOP_STATE);\n\t\tLocale lo = Locale.getDefault();\n\t\tlanguage = lo.getLanguage();\n\t\tshuffle_flag = false;\n\t\trepeat_state = 0;\n\t\tapiVersion = android.os.Build.VERSION.SDK_INT;\n\t}", "public Playlist() {\r\n\t\tthis(\"Default Playlist\");\r\n\t}", "public void initialize()\r\n\t{\r\n\t\tif (ctcOffice != null)\r\n\t\t{\r\n\t\t\t// Get list of all tracks\r\n\t\t\tfor (TrackLayout track : ctcOffice.tracks.values())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Adding track \" + track);\r\n\t\t\t\tString trackName = track.toString();\r\n\t\t\t\ttrackListBox.getItems().add(trackName);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void init() {\n clickSound = new Media(new File(\"./src/spacetrader/Click Silencer 2.wav\")\n .toURI().toString());\n denySound = new Media(new File(\"./src/spacetrader/Glitch Smashvox 2.wav\")\n .toURI().toString());\n swoopSound = new Media(new File(\"./src/spacetrader/Sweep Droga.wav\")\n .toURI().toString());\n introSong = new Media(new File(\"./src/spacetrader/OpenTrack.mp3\")\n .toURI().toString());\n one44 = new Media(new File(\"./src/spacetrader/144.mp3\")\n .toURI().toString()); \n one26 = new Media(new File(\"./src/spacetrader/126.mp3\")\n .toURI().toString()); \n one40 = new Media(new File(\"./src/spacetrader/wobbler.mp3\")\n .toURI().toString()); \n universe = new Media(new File(\"./src/spacetrader/universe.mp3\")\n .toURI().toString()); \n //mediaPlayer = new MediaPlayer(click);\n }", "private PlaylistManager() {\n String playlistName = ApplicationProtocol.serverName;\n playlist = new EphemeralPlaylist(playlistName);\n savedPlaylists = retrievePlaylists();\n favoritesPlaylist = retrieveFavoritesPlaylist();\n }", "private void initializeComponents() {\n createLabel();\n createList();\n createComposite();\n initAcarsSounding();\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 }", "private void initialize() {\r\n player.addObserver(this);\r\n setLayout(new BorderLayout());\r\n \r\n JPanel northPanel = makeNorthPanel();\r\n add(northPanel, BorderLayout.NORTH);\r\n \r\n JPanel centerPanel = makeCenterPanel();\r\n add(centerPanel, BorderLayout.CENTER);\r\n \r\n JPanel southPanel = makeSouthPanel();\r\n add(southPanel, BorderLayout.SOUTH);\r\n\r\n displayInfo();\r\n }", "public PlayList() {\n\t\tthis.name = \"Untitled\";\n\t\tsongList = new ArrayList<Song>();\n\t}", "public static void init() {\r\n musicManager = new MusicManager();\r\n initInstrumentNames();\r\n }", "public void initializeMixer() {\n\t\tinitializeSlidersAndTextFields();\n\t\tinitializeTooltips();\n\t\tinitializeRecorderListener();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the Rabin hash value of the contents of a file, specified by URL.
public long hash(final URL url) throws IOException { final InputStream is = url.openStream(); try { return hash(is); } finally { is.close(); } }
[ "static int computeHash(Path file) throws IOException {\n int h = 0;\n\n try (InputStream in = newInputStream(file)) {\n byte[] buf = new byte[1024];\n int n;\n do {\n n = in.read(buf);\n for (int i=0; i<n; i++) {\n h = 31*h + (buf[i] & 0xff);\n }\n } while (n > 0);\n }\n return h;\n }", "private int computeHash(URI location) {\n \t\treturn location.hashCode();\n \t}", "private int calculateHash(int id, String uri) {\n\t\treturn uri.hashCode() * Constants.HASH_PRIMES[0]\n\t\t\t\t+ Integer.toString(id).hashCode() * Constants.HASH_PRIMES[1];\n\t}", "String computeHash( JarAnalyzer jarAnalyzer );", "public void calculateHash() throws FileNotFoundException,\n\t\t\tIOException {\n\t\tFileInputStream fs = new FileInputStream(file);\n\t\thash = new Hash();\n\t\t\n\t\tlong updatedLength = 0;\n\t\tlong fileLength = file.length();\n\t\tint readCount = 0;\n\t\tbyte[] buffer = new byte[FILE_BUFFER_LENGTH];\n\t\twhile (true) {\n\t\t\tif (cancellationChecker != null && cancellationChecker.isCancelled()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\treadCount = fs.read(buffer);\n\t\t\tif (readCount != -1) {\n\t\t\t\thash.update(buffer, 0 ,readCount);\n\t\t\t\tupdatedLength = updatedLength + readCount;\n\t\t\t\tfireProgressChanged(new HashProgressChangedEvent(\n\t\t\t\t\t\tthis, updatedLength, fileLength));\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfs.close();\n\t}", "public static String calculateMD5hashOfFile(File file) {\n\n byte[] input = readFileIntoByteArray(file);\n MessageDigest md = null;\n try {\n md = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n byte[] digest = md.digest(input);\n BigInteger bigInt = new BigInteger(1, digest);\n String hash = bigInt.toString(16);\n return hash;\n }", "long getHash();", "int getHash();", "public long hash(final InputStream is) throws IOException {\n\n final byte[] buffer = new byte[READ_BUFFER_SIZE];\n\n long w = 0;\n\n int bytesRead;\n while ((bytesRead = is.read(buffer)) > 0) {\n w = hash(buffer, 0, bytesRead, w);\n }\n\n return w;\n }", "public static int crc32Hash(File file) throws IOException {\n InputStream input = new FileInputStream(file);\n try { return crc32Hash(input); }\n finally { input.close(); }\n }", "public String getHashsum(String file_name) {\n\t\t//\n\t\t// query database\n\t\t//\n\t\tCursor cursor = m_db.query(FILE_TABLE_NAME,\n\t\t\t\tnew String[] { FILE_FIELD_HASH_SUM }, FILE_FIELD_PATH + \"=?\",\n\t\t\t\tnew String[] { file_name }, null, null, null);\n\n\t\t//\n\t\t// get first entry of result set\n\t\t//\n\t\tString result = getFirstEntryOfResultSet(cursor);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn result;\n\n\t}", "public ValidationResponse validFileHash(ACHFile file) {\n\t\tint numBatches = file.getBatchDetail().size();\n\t\tint calcHash = 0;\n\t\tString realHash = \"\";\n\t\tString fileHash = file.getFileControl().getEntryHash();\n\t\t\n\t\tfor(int i = 0; i < numBatches; i++) {\n\t\t\tcalcHash += Integer.valueOf(file.getBatchDetail().get(i).getCompanyBatchControl().getEntryHash());\n\t\t}\n\t\t\n\t\tif(String.valueOf(calcHash).length() < 10) {\n\t\t\tint zeros = 10 - String.valueOf(calcHash).length();\n\t\t\t\n\t\t\twhile (zeros > 0) {\n\t\t\t\trealHash += \"0\";\n\t\t\t\tzeros--;\n\t\t\t}\n\t\t\trealHash += \"\" + calcHash;\n\t\t\t\n\t\t} else if (String.valueOf(calcHash).length() > 10) {\n\t\t\tint start = String.valueOf(calcHash).length() - 10;\n\t\t\t\n\t\t\tfor (int i = start; i < 11; i++)\n\t\t\t\trealHash += String.valueOf(calcHash).charAt(i);\n\t\t}\n\t\tif(fileHash.compareTo(realHash) != 0) {\n\t\t\tValidationResponse error = new ValidationResponse(\"HashCodeError\", 9, lineNum(9, 0, 0, file), 22, 10, \"The Hash Code is incorrect, double check the Batch Hash(es)\");\n\t\t\treturn error;\n\t\t}\n\t\treturn null;\n\t}", "public static String getHashFromUrl(String url) {\n int pos = url.indexOf('#');\n if (pos > 0) {\n return url.substring(pos + 1);\n } else {\n return \"\";\n }\n }", "public int getHash(String value);", "public static int determineBucketForURL(URL url, int numberOfBuckets){\n\t\tString host = url.getHost();\n\t\tint hashCode = Math.abs(host.hashCode());\n\t\treturn hashCode % numberOfBuckets;\n\t}", "java.lang.String getHash();", "public static String computeFileHashString(File f) {\n \tString result = \"Error\";\n\n \ttry {\n\t String filePath = f.getPath();\n\t MessageDigest md = MessageDigest.getInstance(\"MD5\");\n\t FileInputStream stream = new FileInputStream(filePath);\n\t byte[] buffer = new byte[1024];\n\t int offset = 0;\n\t int len = stream.read(buffer);\n\t // Compute hash\n\t while (len != -1) {\n\t \tmd.update(buffer, offset, len); \n\t \tlen = stream.read(buffer);\n\t }\n\t // Finalize it \n\t byte[] rawResultArray = md.digest();\n\t // Convert raw byte result into a hex string\n\t StringBuffer stringSoFar = new StringBuffer();\n\t for (byte b : rawResultArray) {\n\t stringSoFar.append(String.format(\"%02X\", b));\n\t }\n\t result = stringSoFar.toString();\n \t}\n \tcatch(IOException e) {}\n \tcatch(NoSuchAlgorithmException e) {}\n \n return result;\n }", "public int hashCode() {\n return file.getPath().hashCode();\n }", "byte[] getFile(String sha) throws Exception;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allocates a card channel iff one is required. If a channel has been provided by setCardChannel, none has to be allocated. releaseCardChannel will take care of this and release the channel only if it actually has been allocated here. After calling this method, a card channel will be available and can be obtained via getCardChannel.
protected void allocateCardChannel() throws InvalidCardChannelException { assertSchedulerStillAlive(); if (!is_provided) { itracer.debug("allocateCardChannel", "allocating"); try { card_channel = cs_scheduler.allocateCardChannel(this, is_blocking); if (card_channel==null) { throw new InvalidCardChannelException("channel in use"); } } catch (CardTerminalException ctx) { throw new InvalidCardChannelException(ctx.toString()); } } }
[ "protected void releaseCardChannel()\n throws InvalidCardChannelException\n {\n assertSchedulerStillAlive();\n\n if (!is_provided)\n {\n itracer.debug(\"releaseCardChannel\", \"releasing\");\n cs_scheduler.releaseCardChannel(card_channel);\n }\n }", "public void setCardChannel(CardChannel channel)\n {\n card_channel = channel;\n is_provided = (channel != null);\n }", "public Board.Cards buyCard(Board.Cards card) {\n \t\tif (!affordCard())\n \t\t\treturn null;\n \n \t\t// out of cards\n \t\tif (card == null)\n \t\t\treturn null;\n \n \t\t// deduct resources\n \t\tuseResources(Type.WOOL, 1);\n \t\tuseResources(Type.GRAIN, 1);\n \t\tuseResources(Type.ORE, 1);\n \n \t\tif (card == Cards.VICTORY)\n \t\t\tvictory += 1;\n \t\telse\n \t\t\tnewCards.add(card);\n \n \t\tappendAction(R.string.player_bought_card);\n \n \t\treturn card;\n \t}", "public void allocateCardToPlayer(Player player) {\n//\t\tHashMap<String, String> allCards = countryObj.getCountryCardsList();\n\t\tString cardToBeAdded = card.totalCardType().get(new Random().nextInt(card.totalCardType().size()));\n\t\tint count = addCardCount(cardToBeAdded, player);\n\t\tplayer.getPlayersCardList().put(cardToBeAdded, count);\n\n\t}", "public void buyCard() {\n\t\tif (canDo.canBuyDevCard(getPlayerIndex())) clientCommunicator.buyDevCard(this.modelToJSON.getBuyDevCardCommand(getPlayerIndex()), this.getFullCookie());\n//\t\telse \n\t}", "final public CardChannel getCardChannel()\n {\n return card_channel;\n }", "public void createCard() {\n system.getCardManager().createCard();\n Card createdCard = system.getCardManager().getLastCard();\n CardHolder loggedInUser =(CardHolder)system.getAccountManager().getLoggedInUser();\n loggedInUser.linkCard(createdCard);\n cardNumber.setText(\"Card Number: \" + createdCard.getCardNumber());\n }", "public void initChannelConsumer(){\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tif(conn != null && !conn.isOpen()) {\r\n\t\t\t\tkeepConsuming = false;\r\n\t\t\t\thandleDeadTopic();\r\n\t\t\t\tchannelFailed = true;\r\n\t\t\t\t// need to bail out...\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tchannel = null;\r\n\t\t\tchannel = conn.createChannel();\r\n\t\r\n\t\t\tif (exchange == null || exchange.isEmpty()) {\r\n\t\t\t\texchange = \"amq.topic\";\r\n\t\t\t} else {\r\n\t\t\t\tif(!exchange.equalsIgnoreCase(\"amq.topic\")){\r\n\t\t\t\t\tchannel.exchangeDeclare(exchange, \"topic\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (queue == null || queue.isEmpty()) {\r\n\t\t\t\tqueue = channel.queueDeclare().getQueue();\r\n\t\t\t} else {\r\n\t\t\t\tchannel.queueDeclare(queue, false, true, true, null);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tchannel.queueBind(queue, exchange, topicPattern);\r\n\t\t\t\r\n\t\t\tconsumer = null;\r\n\t\t\tconsumer = new QueueingConsumer(channel);\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tchannel.basicConsume(queue, consumer);\r\n\t\t\t\r\n\t\t\tlog.debug(\"Listening to exchange \" + exchange + \", pattern \" + topicPattern +\r\n\t\t\t\t\t\" from queue \" + queue);\r\n\t\t\t\r\n\t\t\tif(channelFailed){\r\n\t\t\t\tchannelFailed = false;\r\n\t\t\t\thandleDeadTopic();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(IOException ioe){\r\n\t\t\tlog.error(\"IOException while initializing the channel\", ioe);\r\n\t\t}catch(Exception e){\r\n\t\t\tlog.error(\"Unhandled error re-initializing channel\",e);\r\n\t\t}\r\n\t}", "protected void doCreateCard() {\r\n loadFavIconUrlIfNecessary(null);\r\n CardDetails cardDetails = new CardDetails(null, name, login, password, url, iconUrl, note);\r\n cardService.createCard(\r\n getContext().getUserInformation().getUserId(),\r\n cardDetails,\r\n getContext().getUserInformation().getEncryptionKey());\r\n getContext().getMessages().add(\r\n new ScopedLocalizableMessage(CreateCardActionBean.class,\r\n \"cardCreated\",\r\n cardDetails.getName()));\r\n }", "private Channel createChannel(){\n try {\n return connection.createChannel();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "public Channel openChannel(Connection connection, String exchangeName, String queueName, String routingKey) {\n try {\n Channel channel = connection.createChannel();\n exchangeDeclare(channel, exchangeName);\n\n if (queueName == null) {\n queueName = channel.queueDeclare().getQueue();\n } else {\n queueDeclare(channel, queueName);\n }\n\n channel.queueBind(queueName, exchangeName, routingKey);\n return channel;\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public boolean canBuyCard() {\n\t\treturn canDo.canBuyDevCard(this.getPlayerIndex());\n\t}", "public AbstractCard getNextCard() {\n currentCardPos++;\n if (currentCardPos >= deck.size()) {\n return null;\n }\n return getCurrentCard();\n }", "private void createCard() {\n String[] content = askForCardContent(purposeOfAsking.NEWCARD, null);\n try {\n register.createCard(content);\n System.out.println(\"Kortti lisätty onnistuneesti.\");\n } catch (Exception ex) {\n System.out.println(\"Kortin sisältö epäkelpo. Korttia ei lisätty.\");\n }\n }", "public void addCard(PunchCard card){\n String name = card.getName();\n String category = card.getCategoryName();\n if(category == \"\"){\n category = \"default\";\n }\n PunchCard adding = card;\n// adding.setCategoryName(category);\n\n Boolean firstInCategory = false;\n // If the category doesn't exist, make the category\n if(model.findDeck(category) == null){\n if(adding.color == -1) {\n adding.color = randColor();\n }\n firstInCategory = true;\n CardDeck new_deck = new CardDeck();\n new_deck.setNewDeck(category);\n new_deck.addCard(adding);\n new_deck.setColor(adding.color);\n model.addDeck(new_deck);\n }\n // Now that we definitely have the deck, check to see if card exists already\n if(!firstInCategory){\n adding.color = model.findDeck(category).getColor();\n }\n if(model.findDeck(category).findCard(name) == null){\n model.findDeck(category).addCard(adding);\n current.setCurrentCard(adding, model);\n }\n else{\n current.setCurrentCard(adding, model);\n // If it did exist, Set it as current card\n // CurrentCard.setCurrentCard(model.findDeck(category).findCard(name));\n }\n\n }", "public Card dealCard(Player player) {\n\t\tCard card = null;\n\t\tif (dealtCards.get() < DECK_SIZE) { // Check if deck still has cards available. \n\t\t\tcard = cards.get(dealtCards.getAndIncrement());\n\t\t\tif (card != null) { // If card has been found.\n\t\t\t\tplayer.addCard(card);\n\t\t\t\tAtomicInteger cardsBySuit = dealtCardsBySuit.get(card.getSuit());\n\t\t\t\tcardsBySuit.getAndIncrement(); // Update cards by suit counters.\n\t\t\t}\n\t\t}\n\t\treturn card;\n\t}", "protected Channel createChannel() throws IOException, TimeoutException, NoSuchAlgorithmException {\n LOGGER.debug(\"Creating channel\");\n Channel channel = connectionProducer.getConnection(config).createChannel();\n LOGGER.debug(\"Created channel\");\n return channel;\n }", "public void releaseChannel( TunerChannelSource tunerChannelSource )\n\t{\n\t\tif( tunerChannelSource != null )\n\t\t{\n\t\t\tmTunedChannels.remove( tunerChannelSource.getTunerChannel() );\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the LineCondition field.
@gw.internal.gosu.parser.ExtendedProperty public entity.GL7LineCond getLineCondition();
[ "public void setLineCondition(entity.GL7LineCond value);", "public String getCondition() {\n return condition;\n }", "public String getRuleCondition() {\n return ruleCondition;\n }", "String getCondition();", "public ConditionData getCondition()\r\n \t{\r\n \t\tif (this.condition == null) this.condition = new ConditionData();\r\n \t\treturn this.condition;\r\n \t}", "public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.condition.ordinal();\r\n\t}", "public Long getConditionid() {\r\n return conditionid;\r\n }", "public int getConditionCode() {\n\t\t\treturn conditionCode;\n\t\t}", "public ExpressionNode getCondition();", "public java.lang.String getChronicCondition() {\n return chronicCondition;\n }", "public int getCond() {\n return cond;\n }", "public String getFixedCondition() {\n return _fixedCondition;\n }", "public Conditionable getCondition();", "public String getConditionCd()\n {\n return conditionCd;\n }", "public WeatherCondition getCondition() {\n return condition;\n }", "public java.util.List<IdDt> getCondition() { \n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\treturn myCondition;\n\t}", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public String getQueryCondition()\n {\n /* Codes_SRS_JOBRESULT_21_006: [The getQueryCondition shall return the stored queryCondition.] */\n return this.queryCondition;\n }", "IfcBoundaryCondition getAppliedCondition();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates a handler that receives method calls with serialized parameters deserializes them and calls the original handler
public static Object handler(final Object originalHandler) { try { logger.debug("creating serialization handler for " + originalHandler); String name = "dynamicallyGeneratedSerialization.class" + classCounter.incrementAndGet() + "." + originalHandler.getClass().getCanonicalName(); logger.debug("interface name " + name); ClassPool cp = ClassPool.getDefault(); CtClass interf = cp.makeInterface(name); List<Method> objectMethods = Arrays.asList(Object.class.getMethods()); final Map<Pair<String,Class[]>, Triad<Method,Boolean,boolean[]>> methodMap = new HashMap<Pair<String,Class[]>, Triad<Method,Boolean,boolean[]>>(); for (Method method : originalHandler.getClass().getMethods()) { if (objectMethods.contains(method)) { logger.debug("skipping method from object: " + method); continue; } logger.debug("processing method " + method.getName()); Class retType = method.getReturnType(); CtClass newRetType = getCorrespondingClass(retType); boolean serializeReturn = !isSupportedClass(retType); logger.debug(retType + " -> " + newRetType); Class[] paramTypes = method.getParameterTypes(); Class[] newParamTypes = new Class[paramTypes.length]; CtClass[] newParamTypesCT = new CtClass[paramTypes.length]; boolean[] serialize = new boolean[paramTypes.length]; for (int i = 0; i < paramTypes.length; i++) { if (isSupportedClass(paramTypes[i])) { serialize[i] = false; newParamTypes[i] = paramTypes[i]; } else { serialize[i] = true; newParamTypes[i] = byte[].class; } newParamTypesCT[i] = getCorrespondingClass(paramTypes[i]); logger.debug(paramTypes[i] + " -> " + newParamTypesCT[i]); } methodMap.put( new Pair<String,Class[]>(method.getName(), newParamTypes), new Triad<Method,Boolean,boolean[]>(method, serializeReturn, serialize)); interf.addMethod(new CtMethod(newRetType, method.getName(),newParamTypesCT, interf)); } Class handlerInterface = interf.toClass(); InvocationHandler handler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { if (args == null) args = new Object[0]; Triad<Method,Boolean,boolean[]> originalMethodInfo = getMethod(methodMap, method.getName(), args); if (originalMethodInfo == null) { throw new RuntimeException("original method should not be null"); } logger.debug("executing " + method); Object[] newArgs = new Object[args.length]; for (int i = 0; i < newArgs.length; i++) { if (originalMethodInfo.third()[i]) { newArgs[i] = IOUtil.deserialize((byte[])args[i], false); } else { newArgs[i] = args[i]; } } logger.debug("with method " + originalMethodInfo.first()); Object ret = originalMethodInfo.first().invoke(originalHandler, newArgs); if (originalMethodInfo.second()) { logger.debug("serializing return: " + ret); ret = IOUtil.serialize(ret, false); } return ret; } catch (InvocationTargetException e) { logger.error(e.getCause()); throw e.getCause(); } } }; return Proxy.newProxyInstance(handlerInterface.getClassLoader(), new Class[]{handlerInterface}, handler); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } }
[ "public abstract Object invoke(ConfigHandler handler, Object[] args);", "ISerializer invoke(String responseReceiverId);", "public abstract MethodHandle readObjectForSerialization(Class<?> cl) throws NoSuchMethodException, IllegalAccessException;", "public abstract MethodHandle readResolveForSerialization(Class<?> cl);", "public HandlerDefinitionObject invoke() \r\n \t\tthrows InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException, RepositoryConfigurationException { \r\n \t\r\n String handlerClassName = handlerConfigElement.getAttribute(\"class\");\r\n String methodsValue = handlerConfigElement.getAttribute(\"methods\");\r\n String tenantIdString = handlerConfigElement.getAttribute(\"tenant\");\r\n \t\r\n tenantId = MultitenantConstants.INVALID_TENANT_ID;\r\n int tempTenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();\r\n \r\n // if the tenant id was found from the carbon context, it will be greater than -1. If not, it will be equal\r\n // to -1. Therefore, we need to check whether the carbon context had a tenant id and use it if it did.\r\n if (tempTenantId != MultitenantConstants.INVALID_TENANT_ID) {\r\n tenantId = tempTenantId;\r\n } else if (tenantIdString != null && !tenantIdString.isEmpty()) {\r\n try {\r\n tenantId = Integer.parseInt(tenantIdString);\r\n } catch (NumberFormatException ignore) {\r\n \tString msg = \"The tenant id in handler configuration is not an integer.\" ;\r\n \tlog.error(msg);\r\n \t\r\n \tthrow new RepositoryConfigurationException(msg);\r\n }\r\n }\r\n\r\n if (methodsValue != null && !methodsValue.isEmpty()) {\r\n String[] methods = methodsValue.split(\",\");\r\n Method[] handlerMethods = new Method[methods.length];\r\n for (int i = 0; i < methods.length; i++) {\r\n handlerMethods[i] = Method.valueOf(methods[i].trim().toUpperCase());\r\n }\r\n this.methods = Arrays.asList(handlerMethods);\r\n }\r\n\r\n Class<?> handlerClass;\r\n \r\n try {\r\n \thandlerClass = Class.forName(handlerClassName); \r\n } catch (ClassNotFoundException e) {\r\n String msg = \"Could not find the handler class \" + handlerClassName +\r\n \". This handler will not be registered. All handler and filter classes should be in the class path of the Registry.\";\r\n log.warn(msg);\r\n \r\n return this;\r\n }\r\n \r\n handler = (Handler) handlerClass.newInstance();\r\n\r\n // set configured properties of the handler object\r\n \r\n NodeList handlerProps = handlerConfigElement.getElementsByTagName(\"property\");\r\n \r\n for( int index = 0 ; index < handlerProps.getLength() ; index++ ) {\r\n \tNode handlerPropNode = handlerProps.item(index);\r\n \t\r\n \tif(handlerPropNode.getParentNode().getNodeName() == \"handler\") {\r\n\t \tif(handlerPropNode != null && handlerPropNode.getNodeType() == Node.ELEMENT_NODE) {\r\n\t \t\tElement propElement = (Element) handlerPropNode ;\r\n\t \t\t\r\n\t String propName = propElement.getAttribute(\"name\");\r\n\t String propType = propElement.getAttribute(\"type\");\r\n\t \r\n\t try {\r\n\t\t if (propType != null && \"xml\".equals(propType)) {\r\n\t\t String setterName = getSetterName(propName);\r\n\t\t java.lang.reflect.Method setter = handlerClass.getMethod(setterName, Element.class);\r\n\t\t setter.invoke(handler, propElement);\r\n\t\t } else {\r\n\t\t String setterName = getSetterName(propName);\r\n\t\t java.lang.reflect.Method setter = handlerClass.getMethod(setterName, String.class);\r\n\t\t String propValue = propElement.getTextContent();\r\n\t\t setter.invoke(handler, propValue);\r\n\t\t }\r\n\t } catch(NoSuchMethodException ex) {\r\n\t \tcontinue ;\r\n\t }\r\n\t \t}\r\n \t}\r\n }\r\n\r\n NodeList filterElements = handlerConfigElement.getElementsByTagName(\"filter\");\r\n\r\n if(filterElements != null && filterElements.getLength() > 0) {\r\n for (int i=0; i<filterElements.getLength(); i++) {\r\n Node filterNode = filterElements.item(i);\r\n if(filterNode != null && filterNode.getNodeType() == Node.ELEMENT_NODE) {\r\n Element filterElement = (Element) filterNode;\r\n String filterClassName = filterElement.getAttribute(\"class\");\r\n\r\n Class<?> filterClass;\r\n\r\n try {\r\n filterClass = Class.forName(filterClassName);\r\n } catch (ClassNotFoundException e) {\r\n String msg = \"Could not find the filter class \" +\r\n filterClassName + \". \" + handlerClassName +\r\n \" will not be registered. All configured handler, filter and \" +\r\n \"edit processor classes should be in the class \" +\r\n \"path of the Registry.\";\r\n log.warn(msg);\r\n return this;\r\n }\r\n\r\n filter = (Filter) filterClass.newInstance();\r\n\r\n NodeList filterProps = filterElement.getElementsByTagName(\"property\");\r\n\r\n for( int index = 0 ; index < filterProps.getLength() ; index++ ) {\r\n Node filterPropNode = filterProps.item(index);\r\n\r\n if(filterPropNode.getParentNode().getNodeName() == \"filter\") {\r\n if(filterPropNode != null && filterPropNode.getNodeType() == Node.ELEMENT_NODE) {\r\n Element propElement = (Element) filterPropNode ;\r\n\r\n String propName = propElement.getAttribute(\"name\");\r\n String propValue = propElement.getTextContent();\r\n\r\n String setterName = getSetterName(propName);\r\n\r\n try {\r\n java.lang.reflect.Method setter = filterClass.getMethod(setterName, String.class);\r\n setter.invoke(filter, propValue);\r\n } catch(NoSuchMethodException ex) {\r\n continue ;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (customEditManager != null) {\r\n \tNodeList editElements = handlerConfigElement.getElementsByTagName(\"edit\");\r\n \t\r\n \tif(editElements != null && editElements.getLength() > 0) {\r\n \t\tNode editNode = editElements.item(0);\r\n \t\tif(editNode != null && editNode.getNodeType() == Node.ELEMENT_NODE) {\r\n \t\t\tElement editElement = (Element) editNode ;\r\n \t\t\t\r\n String processorKey = editElement.getAttribute(\"processor\");\r\n String processorClassName = editElement.getTextContent();\r\n\r\n Class<?> editProcessorClass;\r\n \r\n try {\r\n \teditProcessorClass = Class.forName(processorClassName); \r\n } catch (ClassNotFoundException e) {\r\n String msg = \"Could not find the edit processor class \" +\r\n processorClassName + \". \" + handlerClassName +\r\n \" will not be registered. All configured handler, filter and \" +\r\n \"edit processor classes should be in the class \" +\r\n \"path of the Registry.\";\r\n log.warn(msg);\r\n return this;\r\n }\r\n EditProcessor editProcessor = (EditProcessor) editProcessorClass.newInstance();\r\n\r\n customEditManager.addProcessor(processorKey, editProcessor);\r\n \t\t}\r\n \t}\r\n }\r\n return this;\r\n }", "private <T extends JsonEvent> void callHandler(EventHandler<T> handler, JsonEvent event) {\n\t\tdebug(\"Handling \" + event.getType());\n\t\thandler.handle(event.<T>cast());\n\t}", "private void handleInvocationCommand() throws IOException, ClassNotFoundException {\r\n final Object context = m_in.readObject();\r\n final String handle = (String) m_in.readObject();\r\n final String methodName = (String) m_in.readObject();\r\n final Class[] paramTypes = (Class[]) m_in.readObject();\r\n final Object[] args = (Object[]) m_in.readObject();\r\n Object result = null;\r\n try {\r\n result = m_invoker.invoke(handle, methodName, paramTypes, args, context);\r\n } catch (Exception e) {\r\n result = e;\r\n }\r\n m_out.writeObject(result);\r\n m_out.flush();\r\n }", "H getHandler(Method gmethod, Method smethod, Object o, Tunable tg, Tunable ts);", "Handler createHandler();", "Object handle(Object request);", "@Override\n @SuppressWarnings(\"unchecked\")\n public void handle(Class<? extends JsonHandler> handlerClass, HttpServletRequest request,\n HttpServletResponse response, Map<String, String> urlParams) throws Exception {\n response.setContentType(\"application/json\");\n // obtain handler instance, may be singleton, from DI etc\n JsonHandler ha = bf.getBean(handlerClass);\n // parse input object from request body\n Class<?> clazz = ha.inputClass();\n final Object in = Void.class == clazz ? null : gson.fromJson(request.getReader(), clazz);\n // fire handler\n Object res = ha.handle(in);\n // write not null results to client\n if(null != res) gson.toJson(res, response.getWriter());\n }", "public abstract MethodHandle writeReplaceForSerialization(Class<?> cl);", "Handler apply(Handler handler);", "public interface GetSerializerCallback\r\n{\r\n /**\r\n * Returns the serializer which shall be used for the specified response receiver id.\r\n * @param responseReceiverId response receiver id for which the implementation shall return the serializer.\r\n * @return\r\n */\r\n ISerializer invoke(String responseReceiverId);\r\n}", "public abstract MethodHandle writeObjectForSerialization(Class<?> cl) throws NoSuchMethodException, IllegalAccessException;", "protected void onBeforeRequestDeserialized(String serializedRequest) {\r\n\t}", "@Test\r\n\tpublic void testInstantiateClass() throws InvalidHandlerDefinitionException, HandlerInstantiationException, HandlerExecutionException {\r\n\t\tSimpleHandler<TestController> simpleHandler = new SimpleHandler<>(TestController.class.getCanonicalName(), \"stringArgumentMethod\");\r\n\t\tsimpleHandler.handleRequest(new TestInvocation());\r\n\t}", "H getHandler(Method m, Object o, Tunable t);", "byte[] handleCommand(byte[] cmdPayload) throws LEAPSerializationException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method initializes jPanel6
private JPanel getJPanel6() { if (jPanel6 == null) { jPanel6 = new JPanel(); BoxLayout bl = new BoxLayout(jPanel6, BoxLayout.X_AXIS); jPanel6.setLayout(bl); lblMemo = new JLabel("Memo "); txtMemo = new JTextArea(""); txtMemo.setMinimumSize(new Dimension(420, 80)); txtMemo.setPreferredSize(new Dimension(420, 80)); txtMemo.setMaximumSize(new Dimension(600, 80)); txtMemo.setBorder(DEFAULT_TEXT_BORDER); jPanel6.add(Box.createHorizontalStrut(60), null); jPanel6.add(lblMemo); jPanel6.add(Box.createHorizontalStrut(20), null); jPanel6.add(txtMemo); jPanel6.add(Box.createHorizontalStrut(60), null); } return jPanel6; }
[ "private JPanel getJPanel6() {\n\t\tif (jPanel6 == null) {\n\t\t\tjPanel6 = new JPanel();\n\t\t\tjPanel6.setPreferredSize(new java.awt.Dimension(154,154));\n\t\t}\n\t\treturn jPanel6;\n\t}", "private void init(){\n panel_principal = new JPanel();\r\n panel_principal.setLayout(new BorderLayout());\r\n //EN EL NORTE IRA LA CAJA DE TEXTO\r\n caja = new JTextField();\r\n panel_principal.add(\"North\",caja);\r\n //EN EL CENTRO IRA EL PANEL DE BOTONES\r\n panel_botones = new JPanel();\r\n //El GRIDLAYOUT RECIBE COMO PARAMETROS:\r\n //FILAS,COLUMNAS ESPACIADO ENTRE FILAS,\r\n //ESPACIADO ENTRE COLUMNAS\r\n panel_botones.setLayout(new GridLayout(5,4,8,8));\r\n agregarBotones();\r\n panel_principal.add(\"Center\",panel_botones);\r\n //AGREGAMOS TODO EL CONTENIDO QUE ACABAMOS DE HACER EN\r\n //PANEL_PRINCIPAL A EL PANEL DEL FORMULARIO\r\n getContentPane().add(panel_principal);\r\n\r\n }", "public MojPanel2() {\n initComponents();\n }", "private void initializePanel() \n\t{\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder( new EmptyBorder(5, 5, 5, 5) );\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\tinitializeTextFields(contentPane);\n\t\tcreateLabels(contentPane);\n\t\tinitializeButtons(contentPane);\n\t\t\n\t}", "private void setUpLayout() {\n\n this.setLayout(new GridLayout(7, 1, 40, 37));\n this.setBackground(new Color(72, 0, 0));\n this.setBorder(BorderFactory.createEmptyBorder(8, 150, 8, 150));\n }", "public NewJPanel() {\n initComponents();\n }", "public SetJPanel() {\n initComponents();\n// initStr();\n// initComponents3();\n }", "public GUINumericalIntegrationJPanel() {\n initComponents();\n }", "public void initializePanel ()\n\t{\n\t\t// contentPane - Instance of Jpanel\n\t\tcontentPane = new JPanel (); \n\t\tcontentPane.setBorder(new EmptyBorder ( 5, 5, 5, 5) );\n\t\tsetContentPane ( contentPane );\n\t\tcontentPane.setLayout ( null );\n\t}", "public ThemSachJPanel() {\n initComponents();\n init();\n }", "private JPanel getJPanel5() {\n\t\tif (jPanel5 == null) {\n\t\t\tjLabel41 = new JLabel();\n\t\t\tjLabel41.setBounds(new Rectangle(22, 299, 150, 15));\n\t\t\tjLabel41.setFont(new Font(\"Dialog\", Font.PLAIN, 10));\n\t\t\tjLabel41.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel41.setText(\"Descuento en Factura\");\n\t\t\tjLabel37 = new JLabel();\n\t\t\tjLabel37.setBounds(new Rectangle(304, 30, 53, 17));\n\t\t\tjLabel37.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel37.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel37.setText(\"alicuota\");\n\t\t\tjLabel36 = new JLabel();\n\t\t\tjLabel36.setBounds(new Rectangle(304, 11, 53, 16));\n\t\t\tjLabel36.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel36.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel36.setText(\"alicuota\");\n\t\t\tjLabel35 = new JLabel();\n\t\t\tjLabel35.setBounds(new Rectangle(305, 187, 54, 16));\n\t\t\tjLabel35.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel35.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel35.setText(\"alicuota\");\n\t\t\tjLabel34 = new JLabel();\n\t\t\tjLabel34.setBounds(new Rectangle(7, 186, 164, 17));\n\t\t\tjLabel34.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel34.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel34.setText(\"Requiere Impuestos Internos\");\n\t\t\tjLabel33 = new JLabel();\n\t\t\tjLabel33.setBounds(new Rectangle(-17, 277, 190, 17));\n\t\t\tjLabel33.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel33.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel33.setText(\"Carga Con Remitos de Compra\");\n\t\t\tjLabel32 = new JLabel();\n\t\t\tjLabel32.setBounds(new Rectangle(-17, 256, 190, 16));\n\t\t\tjLabel32.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel32.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel32.setText(\"Actualiza Precios\");\n\t\t\tjLabel31 = new JLabel();\n\t\t\tjLabel31.setBounds(new Rectangle(-20, 233, 192, 18));\n\t\t\tjLabel31.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel31.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel31.setText(\"Imprime Etiquetas\");\n\t\t\tjLabel30 = new JLabel();\n\t\t\tjLabel30.setBounds(new Rectangle(-16, 212, 189, 14));\n\t\t\tjLabel30.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel30.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel30.setText(\"Permite Carga de Articulos\");\n\t\t\tjLabel29 = new JLabel();\n\t\t\tjLabel29.setBounds(new Rectangle(33, 164, 137, 18));\n\t\t\tjLabel29.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel29.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel29.setText(\"Requiere RG 3337\");\n\t\t\tjLabel28 = new JLabel();\n\t\t\tjLabel28.setBounds(new Rectangle(12, 142, 158, 18));\n\t\t\tjLabel28.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel28.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel28.setText(\"Requiere iva 27%\");\n\t\t\tjLabel27 = new JLabel();\n\t\t\tjLabel27.setBounds(new Rectangle(30, 119, 141, 19));\n\t\t\tjLabel27.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel27.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel27.setText(\"Requiere iva 10.5%\");\n\t\t\tjLabel26 = new JLabel();\n\t\t\tjLabel26.setBounds(new Rectangle(31, 99, 140, 17));\n\t\t\tjLabel26.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel26.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel26.setText(\"Requiere iva 21%\");\n\t\t\tjLabel25 = new JLabel();\n\t\t\tjLabel25.setBounds(new Rectangle(4, 76, 164, 20));\n\t\t\tjLabel25.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel25.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel25.setText(\"Requiere Neto No Grabado\");\n\t\t\tjLabel24 = new JLabel();\n\t\t\tjLabel24.setBounds(new Rectangle(3, 54, 169, 18));\n\t\t\tjLabel24.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel24.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel24.setText(\"Requiere Percepcion Ganancias\");\n\t\t\tjLabel23 = new JLabel();\n\t\t\tjLabel23.setBounds(new Rectangle(4, 32, 168, 16));\n\t\t\tjLabel23.setText(\"Requiere Percepcion de IVA\");\n\t\t\tjLabel23.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel23.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjLabel16 = new JLabel();\n\t\t\tjLabel16.setBounds(new Rectangle(2, 8, 169, 18));\n\t\t\tjLabel16.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tjLabel16.setText(\"Requiere Ingresos Brutos\");\n\t\t\tjLabel16.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n\t\t\tjPanel5 = new JPanel();\n\t\t\tjPanel5.setLayout(null);\n\t\t\tjPanel5.setBounds(new Rectangle(9, 10, 425, 322));\n\t\t\tjPanel5.setBackground(new Color(204, 204, 255));\n\t\t\tjPanel5.add(jLabel16, null);\n\t\t\tjPanel5.add(get_requiere_ingresos_brutos(), null);\n\t\t\tjPanel5.add(jLabel23, null);\n\t\t\tjPanel5.add(get_requiere_percepcion_iva(), null);\n\t\t\tjPanel5.add(jLabel24, null);\n\t\t\tjPanel5.add(jLabel25, null);\n\t\t\tjPanel5.add(get_requiere_percepcion_ganancias(), null);\n\t\t\tjPanel5.add(get_requiere_neto_no_gravado(), null);\n\t\t\tjPanel5.add(jLabel26, null);\n\t\t\tjPanel5.add(jLabel27, null);\n\t\t\tjPanel5.add(jLabel28, null);\n\t\t\tjPanel5.add(jLabel29, null);\n\t\t\tjPanel5.add(get_requiere_iva21(), null);\n\t\t\tjPanel5.add(get_requiere_iva10(), null);\n\t\t\tjPanel5.add(get_requiere_iva27(), null);\n\t\t\tjPanel5.add(get_requiere_rg3337(), null);\n\t\t\tjPanel5.add(jLabel30, null);\n\t\t\tjPanel5.add(jLabel31, null);\n\t\t\tjPanel5.add(jLabel32, null);\n\t\t\tjPanel5.add(get_permite_articulos(), null);\n\t\t\tjPanel5.add(get_imprime_etiquetas(), null);\n\t\t\tjPanel5.add(get_actualiza_precios(), null);\n\t\t\tjPanel5.add(jLabel33, null);\n\t\t\tjPanel5.add(get_requiere_remitos(), null);\n\t\t\tjPanel5.add(jLabel34, null);\n\t\t\tjPanel5.add(get_requiere_impuestos_internos(), null);\n\t\t\tjPanel5.add(get_txt_alicuota_impuesto_interno(), null);\n\t\t\tjPanel5.add(jLabel35, null);\n\t\t\tjPanel5.add(jLabel36, null);\n\t\t\tjPanel5.add(get_txt_alicuota_ingresos_brutos(), null);\n\t\t\tjPanel5.add(get_txt_alicuota_percepcion_iva(), null);\n\t\t\tjPanel5.add(jLabel37, null);\n\t\t\tjPanel5.add(jLabel41, null);\n\t\t\tjPanel5.add(get_txt_Descuento(), null);\n\t\t}\n\t\treturn jPanel5;\n\t}", "private void initChessPanel() {\n\t\t//Add a chess board panel to the overall window\n\t\tchessBoard = new JPanel();\n\t\tthis.add(chessBoard, BorderLayout.CENTER);\n\t\t\n\t\t// Setup the dimension of the chess board\n\t\tDimension boardSize = new Dimension(BOARD_WIDTH, BOARD_HEIGHT);\n\t\tchessBoard.setLayout(new GridLayout(gridRows, gridCols));\n\t\tchessBoard.setPreferredSize(boardSize);\n\t\tchessBoard.setBounds(0, 0, boardSize.width, boardSize.height);\n\t\t\n\t\t// Add each square to the board\n\t\tfor (int i = 0; i < 64; i++) {\n\t\t\t// Calculate the row and column of the current square\n\t\t\tint row = i / gridRows;\n\t\t\tint col = i % gridCols;\n\t\t\t\n\t\t\t// Setup the new square to add to board\n\t\t\tJPanel square = new SquarePanel(i, row, col, new BorderLayout());\n\t\t\tchessBoard.add(square);\n\n\t\t\t// Assign colors to squares\n\t\t\t// Check if the row index is odd or even\n\t\t\tif (row % 2 == 0) {\n\t\t\t\t// Check if the column index is odd or even\n\t\t\t\tif (col % 2 == 0) {\n\t\t\t\t\tsquare.setBackground(Color.WHITE);\n\t\t\t\t} else {\n\t\t\t\t\tsquare.setBackground(Color.GRAY);\n\t\t\t\t} \n\t\t\t} else {\n\t\t\t\t// Check if the column index is odd or even\n\t\t\t\tif (col % 2 == 0) {\n\t\t\t\t\tsquare.setBackground(Color.GRAY);\n\t\t\t\t} else {\n\t\t\t\t\tsquare.setBackground(Color.WHITE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void initializePanels()\r\n\t{\r\n\t\tthis.subscribersPanel = new SubscribersPanel(DIMENSIONS);\r\n\t\tthis.consolePanel = new ConsolePanel(DIMENSIONS);\r\n\r\n\t\tthis.parametersPanel = new ParametersPanel(DIMENSIONS);\r\n\t\tthis.parametersPanel.setSize(DIMENSIONS);\r\n\r\n\t\tthis.mainPanel = new MainPanel(parametersPanel, this);\r\n\t\tthis.mainPanel.setSize(DIMENSIONS);\r\n\r\n\t\tshowParametersPanel();\r\n\t}", "private void initLayoutComponents()\n {\n viewPaneWrapper = new JPanel(new CardLayout());\n viewPane = new JTabbedPane();\n crawlPane = new JPanel(new BorderLayout());\n transitionPane = new JPanel();\n searchPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n resultsPane = new BGRenderer(Color.WHITE, WINDOW_WIDTH, WINDOW_HEIGHT);\n }", "private JPanel getJPanelMilieu() {\r\n\t\tif (jPanelMilieu == null) {\r\n\t\t\tjLabel8 = new JLabel();\r\n\t\t\tjLabel8.setText(\" ] : revenir à la dernière position stockée\");\r\n\t\t\tjLabel8.setBackground(new Color(204, 204, 204));\r\n\t\t\tjLabel7 = new JLabel();\r\n\t\t\tjLabel7.setText(\" [ : stocker la position sur le plan\");\r\n\t\t\tjLabel7.setBackground(new Color(204, 204, 204));\r\n\t\t\tjLabel6 = new JLabel();\r\n\t\t\tjLabel6.setText(\" Y : rien\");\r\n\t\t\tjLabel6.setBackground(new Color(204, 204, 204));\r\n\t\t\tjLabel5 = new JLabel();\r\n\t\t\tjLabel5.setText(\" X : rien\");\r\n\t\t\tjLabel5.setBackground(new Color(204, 204, 204));\r\n\t\t\tjLabel4 = new JLabel();\r\n\t\t\tjLabel4.setText(\" - : tourner à gauche d'un angle a\");\r\n\t\t\tjLabel4.setBackground(new Color(204, 204, 204));\r\n\t\t\tjLabel3 = new JLabel();\r\n\t\t\tjLabel3.setText(\" F : avancer (en dessinant un trait)\");\r\n\t\t\tjLabel3.setBackground(new Color(204, 204, 204));\r\n\t\t\tjLabel3.setFont(new Font(\"Dialog\", Font.BOLD, 12));\r\n\t\t\tjLabel2 = new JLabel();\r\n\t\t\tjLabel2.setText(\" + : tourner à droite d'un angle a\");\r\n\t\t\tjLabel2.setBackground(new Color(204, 204, 204));\r\n\t\t\tjLabel1 = new JLabel();\r\n\t\t\tjLabel1.setText(\" G : avancer (en dessinant un trait)\");\r\n\t\t\tjLabel1.setBackground(new Color(204, 204, 204));\r\n\t\t\tGridLayout gridLayout = new GridLayout();\r\n\t\t\tgridLayout.setRows(10);\r\n\t\t\tjPanelMilieu = new JPanel();\r\n\t\t\tjPanelMilieu.setBackground(new Color(204, 204, 204));\r\n\t\t\tjPanelMilieu.setLayout(gridLayout);\r\n\t\t\tjPanelMilieu.add(getJPanel(), null);\r\n\t\t\tjPanelMilieu.add(jLabel3, null);\r\n\t\t\tjPanelMilieu.add(jLabel1, null);\r\n\t\t\tjPanelMilieu.add(jLabel2, null);\r\n\t\t\tjPanelMilieu.add(jLabel4, null);\r\n\t\t\tjPanelMilieu.add(jLabel5, null);\r\n\t\t\tjPanelMilieu.add(jLabel6, null);\r\n\t\t\tjPanelMilieu.add(jLabel7, null);\r\n\t\t\tjPanelMilieu.add(jLabel8, null);\r\n\t\t}\r\n\t\treturn jPanelMilieu;\r\n\t}", "public PreisumrechnerPanel() {\n initComponents();\n }", "public FreimapVisualPanel2() {\n initComponents();\n }", "private void initializeMainPanels() {\n logo = new Logo(this);\n weightClassPanel = new WeightClassPanel(this);\n initializeMenuLog();\n initializeMainMenuPanels();\n }", "public vistaPanelPelicula() {\r\n initComponents();\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'convolution' field
public edu.pa.Rat.Builder setConvolution(float value) { validate(fields()[2], value); this.convolution = value; fieldSetFlags()[2] = true; return this; }
[ "public void setConvolution(java.lang.Float value) {\n this.convolution = value;\n }", "public java.lang.Float getConvolution() {\n return convolution;\n }", "public java.lang.Float getConvolution() {\n return convolution;\n }", "public void addConvolution() { \n if (isBusy()) return; \n addConvolution(0, 0, 0, true, new ConvolutionFilter());\n }", "public edu.pa.Rat.Builder clearConvolution() {\n fieldSetFlags()[2] = false;\n return this;\n }", "public void applyConvolution( double conv[][] )\n {\n if( image != null )\n {\n //Applies the convolution array\n image.applyConvolution( conv, ImageViewerGUI.CONVOLUTION_DIMENSION );\n repaint( );\n }\n }", "public boolean hasConvolution() {\n return fieldSetFlags()[2];\n }", "public ConvolveFilter(final Kernel kernel) {\r\n\t\tthis.kernel = kernel;\r\n\t}", "public void setBlur(float blur);", "public void setConvolutionalBiases(double[][] biases) {\n this.convolutionalBiases = biases;\n }", "public void setConc(double c) {\t\t\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) quantity[i][j][k] = c*boxVolume;\r\n\t}", "public Builder setConv(tensorflow.Autotuning.AutotuneResult.ConvKey value) {\n if (convBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n key_ = value;\n onChanged();\n } else {\n convBuilder_.setMessage(value);\n }\n keyCase_ = 5;\n return this;\n }", "public void setConvolutionalWeights(double[][][][][] weights) {\n this.convolutionalWeights = weights;\n }", "public int[][] getConvolutionalParameters() {\n return this.convolutionalParams;\n }", "public void setBw(Float bw) {\r\n this.bw = bw;\r\n }", "void setConvex( boolean convex );", "@Generated\n @Selector(\"initWithDevice:cnnConvolutionDescriptor:\")\n public native MPSCNNConvolutionWeightsAndBiasesState initWithDeviceCnnConvolutionDescriptor(\n @NotNull @Mapped(ObjCObjectMapper.class) MTLDevice device, @NotNull MPSCNNConvolutionDescriptor descriptor);", "public void setConcentration(Double concentration);", "public Builder setConvolveThenUpsampleMasks(boolean value) {\n bitField0_ |= 0x00002000;\n convolveThenUpsampleMasks_ = value;\n onChanged();\n return this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'User Defined Type'.
UserDefinedType createUserDefinedType();
[ "Type createType();", "DataType createDataType();", "BasicType createBasicType();", "TypeDef createTypeDef();", "Datatype createDatatype();", "DatatypeType createDatatypeType();", "TypeDefinition createTypeDefinition();", "UdtType createUdtType();", "public Types createTypes();", "NamedType createNamedType();", "FieldType createFieldType();", "Typedef createTypedef();", "SimpleType createSimpleType();", "ClassType createClassType();", "ScalarTypeDefinition createScalarTypeDefinition();", "StructureType createStructureType();", "DatatypesType createDatatypesType();", "ObjectTypeDefinition createObjectTypeDefinition();", "public CustomType() {\n\t\t\tsuper();\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resolves all references of given type returning a map of names and type instances.
<T> Map<String, T> resolveAll(Class<T> type);
[ "void resolveTypes() {\n // would need to lookup the base type in the symbol table\n }", "<T> Set<T> lookupAll(Class<T> type);", "<T> void lookupAll(Class<T> type, Collection<T> out);", "private void buildTypeAliases() throws AnalysisException {\n TimeCounterHandle timeCounter = PerformanceStatistics.resolve.start();\n try {\n List<TypeAliasInfo> typeAliases = new ArrayList<TypeAliasInfo>();\n for (ResolvableLibrary library : librariesInCycle) {\n for (ResolvableCompilationUnit unit : library.getResolvableCompilationUnits()) {\n for (CompilationUnitMember member : unit.getCompilationUnit().getDeclarations()) {\n if (member instanceof FunctionTypeAlias) {\n typeAliases.add(new TypeAliasInfo(\n library,\n unit.getSource(),\n (FunctionTypeAlias) member));\n }\n }\n }\n }\n // TODO(brianwilkerson) We need to sort the type aliases such that all aliases referenced by\n // an alias T are resolved before we resolve T.\n for (TypeAliasInfo info : typeAliases) {\n TypeResolverVisitor visitor = new TypeResolverVisitor(\n info.library,\n info.source,\n typeProvider);\n info.typeAlias.accept(visitor);\n }\n } finally {\n timeCounter.stop();\n }\n }", "public Map<Type, List<Counter>> getAllCountersByType()\r\n {\r\n Map<Type, List<Counter>> enumMap = new EnumMap<>(Type.class);\r\n types.forEach(type -> enumMap.put(type, getCounters(type)));\r\n return enumMap;\r\n }", "default <T> List<T> resolve(String[] names, Class<T> type) {\n List<T> resolved = new ArrayList<>();\n for (String name : names) {\n resolved.add(resolve(name, type));\n }\n return resolved;\n }", "private void resolveReferencesAndTypes() throws AnalysisException {\n for (ResolvableLibrary library : librariesInCycle) {\n resolveReferencesAndTypesInLibrary(library);\n }\n }", "private Set getReferencers(Collection references, EReference reference, EClass type) {\n \t\tSet set = new HashSet();\n \t\tif (!references.isEmpty()) {\n \t\t\tfor (Iterator iter = references.iterator(); iter.hasNext(); ) {\n \t\t\t\tSetting setting = (Setting) iter.next();\n \t\t\t\tif (reference == null || reference == setting.getEStructuralFeature()) {\n \t\t\t\t\tEObject referencer = setting.getEObject();\n \t\t\t\t\tif (referencer != null && (type == null || type.isInstance(referencer))) {\n \t\t\t\t\t\tset.add(referencer);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn set;\n \t}", "protected abstract void collectProperties(Class<?> type, Type<?> referenceType, Map<String, Property> properties);", "public List<String> getReferenceTypes() {\n return new ArrayList<String>(types.keySet());\n }", "void resolveRefs(SymbolTable symbolTable)\n {\n \tEnumeration e = defs.elements();\n\twhile (e.hasMoreElements())\n\t{\n\t Definition d=(Definition) e.nextElement();\n d.resolveRefs(symbolTable); \n\t}\n }", "public ObjectName[] listResourceRefsByType(String type)\n\t\tthrows InstanceException\n\t{\n /*\n Convert hyphenated type to camel case. \n eg:- jdbc-resource -> JdbcResource\n */\n type = AttributeListUtils.dash2CamelCase(type);\n\t\tfinal ArrayList refsByType = new ArrayList();\n\t\ttry {\n\t\t\tfinal ObjectName[] refs = (ObjectName[])invoke(\n\t\t\t\t\"getResourceRef\", null, null);\n\t\t\tif (refs != null) {\n\t\t\t\tfor (int i = 0; i < refs.length; i++) {\n\t\t\t\t\tfinal String ref = (String)getMBeanServer().getAttribute(\n refs[i], \"ref\");\n\t\t\t\t\tassert ref != null;\n\t\t\t\t\tfinal String resType = ResourceHelper.getResourceType(\n\t\t\t\t\t\tgetConfigContext(), ref);\n\t\t\t\t\tif (resType.equals(type)) {\n\t\t\t\t\t\tif (!ResourceHelper.isSystemResource(getConfigContext(), \n\t\t\t\t\t\t\t\tref)) {\n\t\t\t\t\t\t\trefsByType.add(refs[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception ex) {\n throw getExceptionHandler().handleInstanceException(ex, \n getLogMessageId(), getName());\n\t\t}\n\t\treturn (ObjectName[])refsByType.toArray(new ObjectName[0]);\n\t}", "default <T> List<T> resolve(Class<T> type, String... names) {\n if (names.length > 0) {\n return resolve(names, type);\n }\n\n return new ArrayList<>(resolveAll(type).values());\n }", "public static Map<Byte, String> genTypeToNameMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<Byte,String> ret = new HashMap<Byte, String>();\n for(int i=0;i<types.length;i++){\n ret.put(types[i], names[i]);\n }\n return ret;\n }", "default <Y> RootStream<Y> mapToRef(Class<Y> type, RootRef<Y> ref) {\n return this.mapToRoot(type, selection -> ref.get());\n }", "static Map<String, TypeConverter> lookup() {\n if (converters.isEmpty()) {\n converters.putAll(new ResourcePathTypeResolver().resolveAll(RESOURCE_PATH));\n\n if (converters.size() == 0) {\n converters.put(DEFAULT, DefaultTypeConverter.INSTANCE);\n }\n\n if (LOG.isDebugEnabled()) {\n converters.forEach((k, v) -> LOG.debug(String.format(\"Found type converter '%s' as %s\", k, v.getClass())));\n }\n }\n\n return converters;\n }", "default <Y> ExprStream<Y, Expression<Y>> mapToRef(Class<Y> type, ExprRef<Y> ref) {\n return this.mapToExpr(type, selection -> ref.get());\n }", "@Transient\r\n\tpublic Map<String, Object> getLookups() {\r\n\t\tMap<String,Object> map = new HashMap<String,Object>();\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ID, getId());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_DOCUMENT, getRegistry().getDocument());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_NAME, getRegistry().getName());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_SURNAME, getRegistry().getSurname());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ALIAS, getRegistry().getAlias());\r\n return map;\r\n\t}", "public Map<String, Match> getReferenceMatches();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The purpose of this method is to retrieve all records from the TableNumber table and store them into an arraylist
@Override public ArrayList<TableNumber> getAllTableNumbers() { String query = "SELECT * FROM " + DBConst.TABLE_NUMBER_TABLE; tableNumbers = new ArrayList<TableNumber>(); try{ Statement getTableNumbers = db.getConnection().createStatement(); ResultSet data = getTableNumbers.executeQuery(query); while(data.next()){ tableNumbers.add( new TableNumber( data.getInt(DBConst.TABLE_NUMBER_COLUMN_ID), //id data.getInt(DBConst.TABLE_NUMBER_COLUMN_NUMBER))); //table number } }catch (SQLException e){ e.printStackTrace(); } return tableNumbers; }
[ "List< List<String> > fetchAllRows(String tableName) throws SQLException {\n\t\tResultSet rs = executeQuery(\"SELECT * FROM \" + tableName);\n\t\treturn parseResultData(rs);\n\t}", "public List<PrimeNr> getAllPrimeNrs(){\n Cursor cursor = database.query(PrimeNrBaseHelper.TABLE,null, null, null, null\n , null, PrimeNrBaseHelper.PRIME_NR);\n\n List<PrimeNr> primeNrList = new ArrayList<>();\n\n try {\n cursor.moveToFirst();\n while(!cursor.isAfterLast()){\n Long pnr = cursor.getLong(cursor.getColumnIndex(PrimeNrBaseHelper.PRIME_NR));\n String foundOn = cursor.getString(cursor.getColumnIndex(PrimeNrBaseHelper.FOUND_ON));\n primeNrList.add(new PrimeNr(pnr, foundOn));\n cursor.moveToNext();\n }\n } finally {\n cursor.close();\n }\n\n return primeNrList;\n }", "public TableList getTables(String tableNumber) {\n\t\tCriteriaBuilder builder = sessionFactory.getCurrentSession().getCriteriaBuilder();\n\t\tCriteriaQuery<TableList> criteriaQuery = builder.createQuery(TableList.class);\n\t\tRoot<TableList> root = criteriaQuery.from(TableList.class);\n\t\tcriteriaQuery.select(root);\n\t\tcriteriaQuery.where(builder.equal(root.get(TableList.TABLE_NUMBER), tableNumber));\n\t\tQuery<TableList> q = sessionFactory.getCurrentSession().createQuery(criteriaQuery);\n\t\tList<TableList> tableLists = q.getResultList();\n\t\treturn tableLists.size() > 0 ? tableLists.get(0) : null;\n\t}", "private void populateBusinessList()\n {\n String sql = \"SELECT * From Business\";\n try\n {\n this.businessList = new ArrayList<>();\n dbConnection dbCon = new dbConnection();\n Statement stmt = dbCon.getConnection().createStatement();\n ResultSet returnedTable = stmt.executeQuery(sql);\n while (returnedTable.next())\n {\n this.businessList.add(new Business(returnedTable.getInt(\"idNum\"), returnedTable.getString(\"name\")));\n // System.out.println(id+name);\n }\n dbCon.getConnection().close();\n }\n catch (SQLException exception) \n {\n System.out.println(\"An error occured: \" + exception); \n } \n }", "public static List<ClaimValCodeLog> tableToList(DataTable table) throws Exception {\n List<ClaimValCodeLog> retVal = new List<ClaimValCodeLog>();\n ClaimValCodeLog claimValCodeLog = new ClaimValCodeLog();\n for (int i = 0;i < table.Rows.Count;i++)\n {\n claimValCodeLog = new ClaimValCodeLog();\n claimValCodeLog.ClaimValCodeLogNum = PIn.Long(table.Rows[i][\"ClaimValCodeLogNum\"].ToString());\n claimValCodeLog.ClaimNum = PIn.Long(table.Rows[i][\"ClaimNum\"].ToString());\n claimValCodeLog.ClaimField = PIn.String(table.Rows[i][\"ClaimField\"].ToString());\n claimValCodeLog.ValCode = PIn.String(table.Rows[i][\"ValCode\"].ToString());\n claimValCodeLog.ValAmount = PIn.Double(table.Rows[i][\"ValAmount\"].ToString());\n claimValCodeLog.Ordinal = PIn.Int(table.Rows[i][\"Ordinal\"].ToString());\n retVal.Add(claimValCodeLog);\n }\n return retVal;\n }", "public static ArrayList<Object[]> llenar_tabla(){\n ArrayList<Object[]> datos = new ArrayList<Object[]>();\n String q = \"SELECT nombre_aplicacion FROM tbl_aplicacion\";\n try {\n resultado=sentencia.executeQuery(q);\n resultadometa= resultado.getMetaData();\n \n } catch (Exception e) {\n \n }\n try {\n while(resultado.next()){\n Object[] filas = new Object[resultadometa.getColumnCount()];\n for(int i = 0;i<resultadometa.getColumnCount();i++){\n filas[i]= resultado.getObject(i+1);\n }\n datos.add(filas);\n }\n } catch (Exception e) {\n }\n return datos;\n \n }", "public ArrayList<String> phone_list() {\n String sql = \"select distinct num from phone natural join register ;\";\n ArrayList<String> list = new ArrayList<>();\n try (Statement s = conn.createStatement(); ResultSet rs = s.executeQuery(sql)) {\n while (rs.next())\n list.add(rs.getString(1));\n\n\n } catch (SQLException throwables) {\n //throwables.printStackTrace();\n }\n return list;\n }", "public ArrayList<String> fetchAllNonContacts() {\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor c = db.rawQuery(\"SELECT number \" + \" FROM \" + TABLE_noncontacts\n + \";\",\n // + \" ORDER BY date;\",\n null);\n\n int numberColumn = c.getColumnIndex(\"number\");\n ArrayList<String> noncontactArray = new ArrayList<String>();\n\n if (c.moveToFirst()) {\n do {\n String noncontactNumber = c.getString(numberColumn);\n noncontactArray.add(noncontactNumber);\n } while (c.moveToNext());\n }\n c.close();\n return noncontactArray;\n }", "@Override\n public TableNumber getTableNumber(int tableId) {\n String query = \"SELECT * FROM \" + DBConst.TABLE_NUMBER_TABLE+\n \" WHERE \" + DBConst.TABLE_NUMBER_COLUMN_ID + \" = \" + tableId;\n try{\n Statement getTableNumbers =\n db.getConnection().createStatement();\n ResultSet data = getTableNumbers.executeQuery(query);\n if(data.next()){\n TableNumber tableNumber =\n new TableNumber(data.getInt(DBConst.TABLE_NUMBER_COLUMN_ID),\n data.getInt(DBConst.TABLE_NUMBER_COLUMN_NUMBER));\n return tableNumber;\n }\n }catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }", "public ArrayList<Integer> getAllTeamNums(){\n ArrayList<Integer> teamsNum = new ArrayList<>();\n\n SQLiteDatabase db = DatabaseManager.getInstance().openDatabase();\n //makes selection query to get all teams\n String selectQuery = \" SELECT \" + Teams.KEY_TeamNum\n + \" FROM \" + Teams.TABLE;\n\n Log.d(TAG, selectQuery);\n Cursor cursor = db.rawQuery(selectQuery, null);\n //moves to first row that matches selection query\n if (cursor.moveToFirst()){\n do {\n //adds the team # from the row\n teamsNum.add(cursor.getInt(cursor.getColumnIndex(Teams.KEY_TeamNum)));\n //adds the teams while there are rows that matches selection query\n }while(cursor.moveToNext());\n }\n cursor.close();\n DatabaseManager.getInstance().closeDatabase();\n //returns the arraylist of team #'s\n return teamsNum;\n }", "public List<Journal> getAllEntries() {\n \n open();\n \n List<Journal> entryList = new ArrayList<Journal>();\n \n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_DATA;\n Cursor cursor = database.rawQuery(selectQuery, null);\n \n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n entryList.add(cursorToJournal(cursor));\n } while (cursor.moveToNext());\n }\n \n close();\n \n return entryList;\n }", "public ArrayList<Counter> getCounterList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<Counter> list = new ArrayList<Counter>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblCounter.class,\"counter\");\n\t\t\tList<TblCounter> counters = cr.list();\n\t\t\tif (counters.size() > 0){\n\t\t\t\tfor (Iterator<TblCounter> iterator = counters.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblCounter tblcounter = iterator.next();\n\t\t\t\t\tCounter counter = new Counter();\n\t\t\t\t\tcounter.convertFromTable(tblcounter);\n\t\t\t\t\tlist.add(counter);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}", "List<LocalTableInfo> selectAll();", "public static List<DiseaseDefm> tableToList(DataTable table) throws Exception {\n List<DiseaseDefm> retVal = new List<DiseaseDefm>();\n DiseaseDefm diseaseDefm;\n for (int i = 0;i < table.Rows.Count;i++)\n {\n diseaseDefm = new DiseaseDefm();\n diseaseDefm.CustomerNum = PIn.Long(table.Rows[i][\"CustomerNum\"].ToString());\n diseaseDefm.DiseaseDefNum = PIn.Long(table.Rows[i][\"DiseaseDefNum\"].ToString());\n diseaseDefm.DiseaseName = PIn.String(table.Rows[i][\"DiseaseName\"].ToString());\n retVal.Add(diseaseDefm);\n }\n return retVal;\n }", "@Override\r\n public List<Map<String, Object>> findAllRecords(String tableName, int upperLimit) throws SQLException {\r\n List<Map<String, Object>> records = new ArrayList();\r\n String sqlQuery = (upperLimit > 0) ? \"SELECT * FROM \" + tableName + \" LIMIT \" + upperLimit : \"SELECT * FROM \" + tableName;\r\n if (connection != null) {\r\n\r\n Statement sqlStatement = connection.createStatement();\r\n ResultSet rs = sqlStatement.executeQuery(sqlQuery);\r\n ResultSetMetaData rsmd = rs.getMetaData();\r\n int columnCount = rsmd.getColumnCount();\r\n while (rs.next()) {\r\n Map<String, Object> record = new HashMap();\r\n for (int i = 1; i <= columnCount; i++) {\r\n record.put(rsmd.getColumnName(i), rs.getObject(i));\r\n }\r\n records.add(record);\r\n }\r\n } else {\r\n System.out.println(\"No connection could be established\");\r\n }\r\n return records;\r\n }", "void all_Data_retrieve() {\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\ttry{\n\t\t\t//Retrieve tuples by executing SQL command\n\t\t stm=con.createStatement();\n\t String sql=\"select * from \"+tableName+\" order by id desc\";\n\t\t rs=stm.executeQuery(sql);\n\t\t DataGUI.model.setRowCount(0);\n\t\t //Add rows to table model\n\t\t while (rs.next()) {\n Vector<Object> newRow = new Vector<Object>();\n //Add cells to each row\n for (int i = 1; i <=colNum; i++) \n newRow.addElement(rs.getObject(i));\n DataGUI.model.addRow(newRow);\n }//end of while\n\t\t //Catch SQL exception\n }catch (SQLException e ) {\n \te.printStackTrace();\n\t } finally {\n\t \ttry{\n\t if (stm != null) stm.close(); \n\t }\n\t \tcatch (SQLException e ) {\n\t \t\te.printStackTrace();\n\t\t }\n\t }\n\t}", "public String[] displayAllHRIDs(String tableName) {\n String[] hridArray; //Int array to store processed HRIDs from a result set\n int countHRID; //Int that is the count of all HRIDs\n dao.connect();\n dao.setAutoCommit(false);\n\n //Count how many HRIDs are in a table\n rs = dao.executeSQLQuery(\"SELECT COUNT(*) FROM \" + tableName);\n result = dao.processResultSet(rs);\n countHRID = Integer.parseInt(result);\n\n //Put all HRIDs into an int array\n rs = dao.executeSQLQuery(\"SELECT HRID FROM \" + tableName);\n hridArray = dao.processIntResultSet(rs, countHRID);\n dao.disconnect();\n return hridArray;\n }", "public List<TableRecord> getForwardingTableAsList(){\n return forwardingTable.getTableAsArrayList();\n }", "@Override\n\tpublic Collection<Table> getAll() throws SQLException {\n\t\tArrayList<Table> borrowings = new ArrayList<Table>();\n\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT * FROM Borrowing\");\n\t\tResultSet rs = ps.executeQuery();\n\t\twhile (rs.next()) {\n\t\t\tborrowings.add(new Borrowing(rs));\n\n\t\t} // end while(rs.next())\n\t\trs.close();\n\n\t\treturn borrowings;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true, if this class path entry is exported.
boolean isExported();
[ "public boolean isExportedEntriesOnly() {\n return fExportedEntriesOnly | Platform.getPreferencesService().getBoolean(LaunchingPlugin.ID_PLUGIN, JavaRuntime.PREF_ONLY_INCLUDE_EXPORTED_CLASSPATH_ENTRIES, false, null);\n }", "public Boolean isExportable() {\n return this.isExportable;\n }", "boolean hasExports() {\n return !exportedNamespacesToSymbols.isEmpty();\n }", "public boolean exportsToJava() {\n return javaExport != null && !javaExport.isEmpty();\n }", "boolean getExported();", "protected boolean isExportModules() {\r\n\t\treturn this.getExportOptions().isExportModules();\r\n\t}", "public boolean exportsToCpp() {\n return cppExport != null && !cppExport.isEmpty();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isExportLock();", "public boolean isOneToOneExported() {\r\n\t\treturn oneToOneExported;\r\n\t}", "public boolean canExport(Grid grid) {\n return true;\n }", "public static native boolean isExported(int pin) throws RuntimeException;", "public static boolean isExtractCopiesExports() { return cacheExtractCopiesExports.getBoolean(); }", "public boolean hasExports(ImmutableNodeInst originalNode) {\n int startIndex = searchExportByOriginalPort(originalNode.nodeId, 0);\n if (startIndex >= exportIndexByOriginalPort.length) return false;\n ImmutableExport e = exportIndexByOriginalPort[startIndex];\n return e.originalNodeId == originalNode.nodeId;\n }", "boolean isExported(Collection p_pageIds) throws PageException,\n RemoteException;", "public boolean currentUserHasExportPerm();", "public boolean isImported();", "public boolean isEntryPoint() {\n\t\treturn isEntryPoint;\n\t}", "public java.lang.Boolean getEnableExportImport()\n {\n return enableExportImport;\n }", "public static boolean isMoveNodeWithExport() { return cacheMoveNodeWithExport.getBoolean(); }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENFIRST:event_deviceField17FocusLost TODO add your handling code here: System.out.println("deviceField17FocusLost"); updateWaves();
private void deviceField17FocusLost(java.awt.event.FocusEvent evt) { }
[ "@Override\r\n public void onRobotFocusLost() {\n }", "protected void onFocusLost()\n {\n ; // do nothing. \n }", "private void t3FocusLost(java.awt.event.FocusEvent evt) {\n }", "@Override\r\n public void focusLost(FocusEvent e) {}", "protected void onFocusGained()\n {\n ; // do nothing. \n }", "public void focusLost(FocusEvent event)\n {\n }", "protected void do_wagesFTF_focusLost(FocusEvent e) {\n\t\tupdateIncomeTotal(Integer.parseInt(wagesFTF.getText()));\n\t\tupdateNetTotal();\n\t}", "public void onFocusUpdate() {\r\n\t\tforceUpdate();\r\n\t}", "public void onWindowFocusLost() {\n getSourceConsumer(TYPE_IME).onWindowFocusLost();\n }", "public void setSaveOnFocusLost(boolean bSave);", "public void lostFocus() {\r\n sound.stop(\"mainmenu\");\r\n }", "@Override\n public void focusLost(FocusEvent e) {\n if (!e.isTemporary()) {\n storeFieldAction.actionPerformed(new ActionEvent(e.getSource(), 0, \"\"));\n }\n }", "void OnBlurChangingEnd();", "void onWindowFocusChanged(boolean hasFocus);", "protected void do_rentFTF_focusLost(FocusEvent e) {\n\t\tupdateExpensesTotal(Integer.parseInt(rentFTF.getText()));\n\t\tupdateNetTotal();\n\t}", "public void firePluginFocusLost()\r\n\t{\r\n\t\tif (listenerSupport != null && listenerSupport.containsListeners(FocusListener.class))\r\n\t\t{\r\n\t\t\tlistenerSupport.fireFocusLost(new FocusEvent(getPluginComponent(), FocusEvent.FOCUS_LOST));\r\n\t\t}\r\n\t}", "protected void listenToBlur(){\r\n\t\tmf.setOnBlur(getLatexController());\r\n\t}", "private void formWindowGainedFocus(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowGainedFocus\r\n redraw();\r\n }", "private void filtroColabsFocusGained(java.awt.event.FocusEvent evt) {\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method for debugging purposes, returns the name of the token for a given integer code.
public String getNameFromCode(Integer code) { if(code.intValue() == EOF) { return "EOF"; }else if(operators.containsKey(code)) { return operators.get(code); }else if(code.intValue() == PREPROCESSOR) { return "PREPROCESSOR"; }else if(code.intValue() == IDENTIFIER){ return "IDENTIFIER"; }else if(code.intValue() == NUMBER) { return "NUMBER"; }else if(code.intValue() == STRING) { return "STRING"; }else if(code.intValue() == CHARACTER) { return "CHARACTER"; }else if(code.intValue() == COMMENT) { return "COMMENT"; }else if(keywords.contains(code)) { return "KEYWORD"; }else { return null; } }
[ "public static String getTokenName(int type) {\r\n return TokenType.getTokenName(type);\r\n }", "private String getTokenName(int token) {\n try {\n java.lang.reflect.Field [] class_fields = sym.class.getFields();\n for (int i = 0; i < class_fields.length; i++) {\n if (class_fields[i].getInt(null) == token) {\n return class_fields[i].getName();\n }\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n\n return \"UNKNOWN TOKEN\";\n }", "private String getTokenName(int token) {\n try {\n java.lang.reflect.Field [] classFields = sym.class.getFields();\n for (int i = 0; i < classFields.length; i++) {\n if (classFields[i].getInt(null) == token) {\n return classFields[i].getName();\n }\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n\n return \"UNKNOWN TOKEN\";\n }", "private String getTokenName(int token)\n\t{\n\t\ttry\n\t\t{\n\t\t\tjava.lang.reflect.Field[] classFields = sym.class.getFields();\n\t\t\tfor (int i = 0; i < classFields.length; i++)\n\t\t\t{\n\t\t\t\tif (classFields[i].getInt(null) == token)\n\t\t\t\t{\n\t\t\t\t\treturn classFields[i].getName();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace(System.err);\n\t\t}\n\n\t\treturn \"UNKNOWN TOKEN\";\n\t}", "private String getTokenName(int token) {\n try {\n java.lang.reflect.Field[] classFields = sym.class.getFields();\n for (int i = 0; i < classFields.length; i++) {\n if (classFields[i].getInt(null) == token) {\n return classFields[i].getName();\n }\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n\n return \"UNKNOWN TOKEN\";\n }", "public String getName(int code) {\n\t}", "String getTokenName();", "public static String getName(int token) {\n\t\treturn (String) token2Name.get(token);\n\t}", "java.lang.String getCodeNm();", "public static String nameField(int code) {\n if (nameCache.containsKey(code)) {\n return nameCache.get(code);\n }\n Field[] fields = CommandHandlingOutput.class.getDeclaredFields();\n for (final Field field : fields) {\n if (field.getGenericType() == Integer.TYPE) {\n try {\n if ((Integer) field.get(CommandHandlingOutput.class) == code) {\n nameCache.put(code, field.getName());\n return field.getName();\n }\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n }\n return \"null??\";\n }", "java_cup.runtime.Symbol TOKEN(int code) { return TOKEN(code, yytext()); }", "TokenTypes.TokenName getName();", "private char opcodeToToken(int opcode) {\n\t\tswitch (opcode) {\n\t\t\tcase OPCODE_ADD: return TOKEN_ADD;\n\t\t\tcase OPCODE_SUB: return TOKEN_SUB;\n\t\t\tcase OPCODE_MUL: return TOKEN_MUL;\n\t\t\tcase OPCODE_DIV: return TOKEN_DIV;\n\t\t\tdefault: return INVALID_TOKEN;\n\t\t}\n\t}", "public String codeName(int index) {\n\t\treturn code.get(index);\n\t}", "public String identifier(){\n\n if (currentTokenType == TYPE.IDENTIFIER){\n\n return currentToken;\n\n }else {\n throw new IllegalStateException(\"Current token is not an identifier! current type:\" + currentTokenType);\n }\n }", "java.lang.String getCode();", "private Token(int code)\n {\n myCode = code;\n }", "static String getNameFromOpcode(int opcode) {\n \t\treturn OPCODE_NAMES[opcode];\n \t}", "public int getToken() \n\t{\n \treturn this.tno;\n \t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The Product Bidding Category referenced in the query. .google.ads.googleads.v6.resources.ProductBiddingCategoryConstant product_bidding_category_constant = 109;
com.google.ads.googleads.v6.resources.ProductBiddingCategoryConstantOrBuilder getProductBiddingCategoryConstantOrBuilder();
[ "com.google.ads.googleads.v6.resources.ProductBiddingCategoryConstant getProductBiddingCategoryConstant();", "com.google.ads.googleads.v1.resources.ProductBiddingCategoryConstant getProductBiddingCategoryConstant();", "com.google.ads.googleads.v1.resources.ProductBiddingCategoryConstantOrBuilder getProductBiddingCategoryConstantOrBuilder();", "boolean hasProductBiddingCategoryConstant();", "com.google.ads.googleads.v6.resources.MobileAppCategoryConstant getMobileAppCategoryConstant();", "com.google.ads.googleads.v1.resources.MobileAppCategoryConstant getMobileAppCategoryConstant();", "public ReviewAuctionCategory getAuctionCategory() {\n return auctionCategory;\n }", "public String getBeneficiaryCategory() {\r\n return (String)getAttributeInternal(BENEFICIARYCATEGORY);\r\n }", "@java.lang.Override public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }", "@java.lang.Override\n public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }", "public BigDecimal getLEASE_ASSET_CATEGORY()\r\n {\r\n\treturn LEASE_ASSET_CATEGORY;\r\n }", "public String getbvCategoryCode() {\n return (String)ensureVariableManager().getVariableValue(\"bvCategoryCode\");\n }", "public proto.SocialMetricCategoryEnum getCategory() {\n proto.SocialMetricCategoryEnum result = proto.SocialMetricCategoryEnum.valueOf(category_);\n return result == null ? proto.SocialMetricCategoryEnum.UNRECOGNIZED : result;\n }", "com.google.ads.googleads.v1.resources.MobileAppCategoryConstantOrBuilder getMobileAppCategoryConstantOrBuilder();", "public proto.SocialMetricCategoryEnum getCategory() {\n proto.SocialMetricCategoryEnum result = proto.SocialMetricCategoryEnum.valueOf(category_);\n return result == null ? proto.SocialMetricCategoryEnum.UNRECOGNIZED : result;\n }", "public String getProductCategory() {\n return (String)getAttributeInternal(PRODUCTCATEGORY);\n }", "com.google.ads.googleads.v6.resources.MobileAppCategoryConstantOrBuilder getMobileAppCategoryConstantOrBuilder();", "@ApiModelProperty(value = \"id of category for payment order. More info about category can be retrieved using /openapi/banking/categories resource.\")\n public BigDecimal getCategoryId() {\n return categoryId;\n }", "public BigDecimal getDEAL_PROVISION_CATEGORY()\r\n {\r\n\treturn DEAL_PROVISION_CATEGORY;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fin question 3) Pour la question 4) relierCasesMin
public int relierCasesMin(int x, int y, int z, int t, String col) { boolean visite[][]; boolean tousVisite = false; Case predecesseur[][]; int poids[][]; int min; Case courante = new Case(0,0,0); String couleur = "blanc"; predecesseur = new Case[longueur_][longueur_]; poids = new int[longueur_][longueur_]; visite = new boolean[longueur_][longueur_]; for (int i = 0; i <= longueur_-1; ++i) { for(int j = 0; j <= longueur_-1; ++j) { poids[i][j] = Integer.MAX_VALUE; if (tableauPeres_[i][j].getCol() != col && tableauPeres_[i][j].getCol() != couleur) { visite[i][j] = true; poids[i][j] = -1; predecesseur[i][j] = tableauPeres_[i][j]; } else { visite[i][j] = false; predecesseur[i][j] = null; } } } predecesseur[x][y] = tableauPeres_[x][y]; poids[x][y] = 0; if(poids[z][t] > poids[x][y]) { poids[z][t] = poids[x][y]+1; predecesseur[z][t] = tableauPeres_[x][y]; } Case sommet = new Case(0,0,0); min = Integer.MAX_VALUE; for(int i = 0; i <= longueur_-1; ++i) { for(int j = 0; j <= longueur_-1; ++j) { if(!visite[i][j] && poids[i][j] < min) { min = poids[i][j]; sommet = tableauPeres_[i][j]; } } } int i = z; int j = t; int cpt = 0; courante = tableauPeres_[i][j]; while ((i !=x) || (j != y)) { if (courante.getCol() == col) { ++cpt; } courante = predecesseur[i][j]; i = courante.getX(); j = courante.getY(); } return poids[z][t] - cpt; }
[ "double getLowerThreshold();", "double getMinimum1();", "@Test\r\n\tpublic void calculLostPointsByOneRuleBelowMinTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(2f, 0.5f, 3f), new Integer(1)),\r\n\t\t\t\tnew Float(0));\r\n\t}", "private double getLowerFitness(Individual[] individuals){\n double lower = Double.MAX_VALUE;\n for (int i = 0; i < individuals.length; ++i ){\n \tlower = Math.min(lower, individuals[i].getFitness());\n }\n return lower;\n }", "float getMinRange();", "public void findMinimumChocolateLeft() {\n double k;\n int ceiled_k;\n int floored_k;\n int sumWith_ceiled_k = 0;\n int sumWith_floored_k = 0;\n int minChocolateWith_floored_k = 0;\n int minChocolateWith_ceiled_k = 0;\n \n //this equation finds the value of k which is the \n k = ((2 * this.noOfChocolate / this.noOfStudents) + 1 - this.noOfStudents) / 2.0;\n \n \n if (k < 1.0) //if k is less than 1 then it is not possible to distribute among all students\n {\n setMinimumChocolateLeft(this.noOfChocolate);\n }\n else \n {\n //get the ceiling value of k \n ceiled_k = (int) Math.ceil(k);\n //get the floor value of k \n floored_k = (int) Math.floor(k);\n\n //Get sum of consicutively distributed chocolate using both floor value and ceiling value of k\n for (int i = 0; i < 3; i++) \n {\n sumWith_ceiled_k = sumWith_ceiled_k + ceiled_k + i;\n sumWith_floored_k = sumWith_floored_k + floored_k + i;\n }\n\n //finding out minimum no. of chocolate left using both floor value and ceiling value of k \n minChocolateWith_ceiled_k = this.noOfChocolate - sumWith_ceiled_k;\n minChocolateWith_floored_k = this.noOfChocolate - sumWith_floored_k;\n\n /*\n if minimum number of chocolate left using floor or ceiling\n is negative then we will consider vise-a-versa.\n \n if given condition is wrong then we will find minimum\n value from minimum chocolate using floor value and\n minimum chocolate using ceil value\n \n */\n if (minChocolateWith_ceiled_k < 0) {\n setMinimumChocolateLeft(minChocolateWith_floored_k);\n } else if (minChocolateWith_floored_k < 0) {\n setMinimumChocolateLeft(minChocolateWith_ceiled_k);\n } else {\n setMinimumChocolateLeft(Math.min(minChocolateWith_ceiled_k, minChocolateWith_floored_k));\n }\n }\n\n //print the final minimum no. of chocolate\n System.out.println(minimumChocolateLeft);\n\n }", "public double standardizedMinimumOfItemMinima(){\n return standardizedItemMinimaMin;\n }", "private double getMinThreshold() {\n return minThreshold;\n }", "@Test\n\tpublic void testMinimumNumber() {\n\t\tdouble tmpRndVal = 0.0;\n\t\tdouble tmpRndVal2 = 0.0;\n\t\tdouble tmpResult = 0.0;\n\t\t\n\t\t//testing with negative numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomNegativeNumbers();\n\t\t\ttmpRndVal2 = doubleRandomNegativeNumbers();\n\t\t\ttmpResult = Math.min(tmpRndVal, tmpRndVal2);\n\t\t\tassertTrue( (tmpResult == ac.minimumNumber(tmpRndVal, tmpRndVal2))\n\t\t\t\t\t|| (0.0 == ac.minimumNumber(tmpRndVal, tmpRndVal2)) );\n\t\t}\n\t\t\n\t\t//testing with positive numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomPositiveNumbers();\n\t\t\ttmpRndVal2 = doubleRandomPositiveNumbers();\n\t\t\ttmpResult = Math.min(tmpRndVal, tmpRndVal2);\n\t\t\tassertTrue((tmpResult == ac.minimumNumber(tmpRndVal, tmpRndVal2))\n\t\t\t|| (0.0 == ac.minimumNumber(tmpRndVal, tmpRndVal2)) \n\t\t\t|| (-0.123456789 == ac.minimumNumber(tmpRndVal, tmpRndVal2)));\n\t\t}\n\t\t\n\t\t//testing with zero\n\t\tdouble zero = 0.0;\n\t\tdouble inpResult = 0.0;\n\t\t\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tinpResult = Math.min(zero, zero);\n\t\t\t//System.out.println(inpResult + \" ############\");\n\t\t\tassertTrue( (inpResult == ac.minimumNumber(zero, zero)) );\n\t\t}\n\t\t\n\t}", "public double standardizedMinimumOfItemRanges(){\n return standardizedItemRangesMin;\n }", "double getSoftLowerLimit();", "public static BufferedImage minError(BufferedImage bufferedImage) {\n\n int[] grayChannel = HistogramUtils.createHistogram(bufferedImage).getRedChannel();\n final int histogramLength = grayChannel.length;\n int estimatedThreshold = computeHistogramMean(grayChannel);\n int previousThreshold = -1;\n\n\n double mu, nu, p = 0.0, q, sigma2, tau2, w0, w1, w2, sqterm, temp;\n while (estimatedThreshold != previousThreshold) {\n //Calculate some statistics.\n mu = wageSum(grayChannel, (int) p) / simpleSum(grayChannel, (int)p);\n nu = (wageSum(grayChannel, 255) - wageSum(grayChannel,(int) p)) / (simpleSum(grayChannel, 255) - simpleSum(grayChannel, (int) p));\n p = simpleSum(grayChannel, (int)p) / simpleSum(grayChannel, 255);\n q = (simpleSum(grayChannel, 255) - simpleSum(grayChannel, (int)p)) / simpleSum(grayChannel, 255);\n sigma2 = wageSquareSum(grayChannel,(int) p) / simpleSum(grayChannel,(int) p) - (mu * mu);\n tau2 = (wageSquareSum(grayChannel, 255) - wageSquareSum(grayChannel,(int) p)) / (simpleSum(grayChannel, 255) - simpleSum(grayChannel, (int)p)) - (nu * nu);\n\n //The terms of the quadratic equation to be solved.\n w0 = 1.0 / sigma2 - 1.0 / tau2;\n w1 = mu / sigma2 - nu / tau2;\n w2 = (mu * mu) / sigma2 - (nu * nu) / tau2 + log10((sigma2 * (q * q)) / (tau2 * (p * p)));\n\n //If the next threshold would be imaginary, return with the current one.\n sqterm = (w1 * w1) - w0 * w2;\n if (sqterm < 0) {\n log.debug(\"MinError(I): not converging. Try \\'Ignore black/white\\' options\");\n break;\n }\n\n //The updated threshold is the integer part of the solution of the quadratic equation.\n previousThreshold = estimatedThreshold;\n temp = (w1 + Math.sqrt(sqterm)) / w0;\n\n if (Double.isNaN(temp)) {\n estimatedThreshold = previousThreshold;\n } else\n estimatedThreshold = (int) Math.floor(temp);\n }\n\n log.debug(\"Min error threshold: \" + estimatedThreshold);\n int lut[] = createManualBinaryThresholdLUT(estimatedThreshold);\n return createImage(bufferedImage, lut);\n }", "private void setMinThreshold() {\n minThreshold = value + value * postBoundChange / 100;\n }", "public void setMinConc(double value) {\n this.minConc = value;\n }", "private int findMin(int[][] sparse, int[][] ranges) {\n int min =Integer.MAX_VALUE;\n int i1 = ranges[0][0];\n int i2 = ranges[1][0];\n int diffRange1 = ranges[0][1] - i1 + 1;\n int j1 = (int) (Math.log(diffRange1)/Math.log(2));\n int diffRange2 = ranges[1][1] - i2 + 1;\n int j2 = (int)Math.log((diffRange2)/Math.log(2));\n return Math.min(sparse[i1][j1],sparse[i2][j2]);\n }", "@Test\n public void testMin() throws Exception {\n assertEquals(8.53, Min(Moyenne), 0.01);\n assertEquals(2. , Min(Numero),0.01);\n assertEquals(1.50, Min(Taille),0.01);\n }", "private int min(int[][] jeu ,int profondeur) throws Exception\r\n\t{\r\n\t if(gagne(jeu) != 0 || profondeur == 0)\r\n\t {\r\n\t return eval(jeu, profondeur);\r\n\t }\r\n\t int min = 1000000;\r\n\t int i,tmp;\r\n\t for(i=0;i<this.plateauJeu.nbColonnes;i++)\r\n\t {\r\n\t\t \t if(derniereCase(jeu,i) < this.plateauJeu.nbLignes){\r\n\t\t \t\t \t// simule notre coup\r\n\t\t \t\t \t jeu[derniereCase(jeu,i)][i] = 1;\r\n\t tmp = max(jeu,profondeur-1);\r\n\t // mémorise le minimum du jeu maximum adverse\r\n\t // Implémente la randomisation si il y a plusieurs minimum \r\n\t if(tmp < min || ( (tmp == min) && (Math.random() < 0.6) ) )\r\n\t {\r\n\t \t min = tmp;\r\n\t }\r\n\t // Annule le coup\r\n\t jeu[derniereCase(jeu,i)-1][i] = 0;\r\n\t\t }\r\n\t } \r\n\t return min;\r\n\t}", "@Test\n\tpublic void testMin() \n\t{\n\t\tdouble t = 30.7;\n\t\t\n\t\tassertEquals(12.0,c.min(t).getX(),0);\n\t\tassertEquals(30.7,c.min(t).getY(),0);\n\t}", "public int getMinimumScore ();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable the background mode.
private void disableMode() { ForegroundService.dicConnect(); stopService(); isDisabled = true; }
[ "void disableBackgroundDate();", "private void disableDisplayAlwaysOnMode() {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n }", "@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }", "public void disable();", "public synchronized void stopBackgroundAbruptly(){\r\n if(currentLoop0) backgroundMusicLoop0.stopClip();\r\n else backgroundMusicLoop1.stopClip();\r\n }", "private void disableFullscreenInvisibly() {\n if (!isFullscreen) {\n return;\n }\n\n switchingScreenState = true;\n\n // disable full-screen\n isFullscreen = false;\n toggleFullScreenWindow();\n\n // update display\n disposeWindow();\n\n // update res & background\n Point tempWindowResolution = windowResolution.copy();\n windowResolution = lastResolution.copy();\n lastResolution = tempWindowResolution;\n\n // prepare window\n outputDisplay.pack();\n revalidateWindow();\n\n switchingScreenState = false;\n }", "public void disable() {\n TalonHelper.configNeutralMode(Arrays.asList(armMotor, armMotorSlave), NeutralMode.Coast);\n }", "void disableFlipMode();", "public void disable() {\r\n m_enabled = false;\r\n useOutput(0, 0);\r\n }", "public void disableThread ()\n {\n synchronized( this )\n {\n active = false;\n this.notifyAll ();\n }\n }", "public static void disableBlend()\n\t{\n\t\tdisable(Blend.BLEND);\n\t}", "public void disable() {\n\t\tm_enabled = false;\n\t\tuseOutput(0);\n\t}", "public void setGodModeOff()\n {\n godModeOn = false;\n }", "void stopKeepingScreenOn() {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n }", "public synchronized void stopBackgroundSmoothly(){\r\n if(currentLoop0) backgroundMusicLoop0.fadeOut();\r\n else backgroundMusicLoop1.fadeOut();\r\n }", "private void turnOff()\r\n\t{\n\t\tdisplay.calcRunning = false;\r\n\t}", "public void disable(){\r\n\t\tisAutoPosistionEnabled = false;\r\n\t\tperiodTimer.stop();\r\n\t}", "public void stopBackground(){\n\t if(loopingSound != null){\n\t loopingSound.terminate();\n\t }\n\t\tloopingSound = null;\n\t\tactiveSounds--;\n\t}", "public void disableControl()\n\t{\n\t\tdriveSubsystem.disableControl();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }