query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Intent: Create and return a list of tasks.
private static Task[] createTaskList() { Task evalTask = new EvaluationTask(); Task tamperTask = new TamperTask(); Task newDocTask = new NewDocumentTask(); Task reportTask = new AssignmentReportTask(); Task[] taskList = {evalTask, tamperTask, newDocTask, reportTask}; return taskList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Task> listTasks(String extra);", "public List<TaskDescription> getActiveTasks();", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "protected abstract void createTasks();", "TaskList getList();", "List<Task> getAllTasks();", "ObservableList<Task> getTaskList();",...
[ "0.7104633", "0.67869097", "0.67356074", "0.67356074", "0.66979736", "0.66913044", "0.6664275", "0.6600442", "0.6492355", "0.6365487", "0.62855613", "0.6283901", "0.62629545", "0.62507886", "0.6230971", "0.6215127", "0.61985356", "0.6176883", "0.61395097", "0.6131559", "0.612...
0.6729114
4
Intent: Display descriptions of each task on the console. Postcondition1 (Display help): Each task's help description is displayed on the console.
private static void help() { Task[] taskList = createTaskList(); System.out.println("\n---------------------------------[ HELP ]--------" + "------------------------------\n"); // Post1 Display help (Polymorphism) for (Task task : taskList) { task.displayHelp(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String GiveTask(){\n return \"[\" + getStatusIcon() + \"] \" + this.description;\n }", "@Override\n public void showActionsInformation() {\n System.out.println(\"\");\n System.out.println(\"To add a new task, please follow the instructions and press ENTER:\");\n System.ou...
[ "0.6488325", "0.6317738", "0.62268144", "0.60450464", "0.59914255", "0.5937872", "0.5930223", "0.5889615", "0.5875026", "0.5869687", "0.57930547", "0.579286", "0.5788353", "0.5754686", "0.57466596", "0.57098556", "0.5704444", "0.570193", "0.5692962", "0.56867796", "0.56712615...
0.66149384
0
Intent: Display a message to the user and return user's answer.
public static String prompt(String message, Scanner keyboard) { System.out.println(message); String userInput = keyboard.nextLine(); return userInput; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayAnswer(){\r\n String message = \"That is the correct answer!\";\r\n\r\n Toast.makeText(QuizActivity.this,\r\n message, Toast.LENGTH_SHORT).show();\r\n }", "public void sendMessage(View view) {\n\n Intent intent = new Intent(this, DisplayMessageActivity.cl...
[ "0.67533654", "0.65624595", "0.6401159", "0.63605183", "0.63593805", "0.6346414", "0.6255396", "0.62159485", "0.62058526", "0.61767125", "0.61753273", "0.61380357", "0.61144793", "0.61118436", "0.6098787", "0.6098521", "0.6074145", "0.6056797", "0.605678", "0.6035308", "0.600...
0.0
-1
This part of code will test your execution (Don't touch this part of code) Test Case 1
public static void main(String[] args) { System.out.println("Input Testing: anargram and margana"); System.out.println("Expercted output: Anagrams"); if (isAnagram("anagram", "margana") ) System.out.println("Your output: Anagrams"); else System.out.println("Your output: Not Anagrams"); //Test Case 2 System.out.println("\nInput Testing: anagramm and marganaa"); System.out.println("Expercted output: Not Anagrams"); if (isAnagram("anagramm", "marganaa") ) System.out.println("Your output: Anagrams"); else System.out.println("Your output: Not Anagrams"); //Test Case 3 System.out.println("\nInput Testing: Hello and hello"); System.out.println("Expercted output: Anagrams"); if (isAnagram("Hello", "hello") ) System.out.println("Your output: Anagrams"); else System.out.println("Your output: Not Anagrams"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void test() {\n\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Test\n public void testDAM30103001() {\n // settings as done for testDAM30102001 are identical\n testDAM30102001();\n }", "private test5() {\r\n\t\r\n\t}", "public void test5() {\n\t\t\n\t}", "@Test\n...
[ "0.6948669", "0.6890145", "0.6671343", "0.66049683", "0.65946215", "0.6586196", "0.65083927", "0.64932585", "0.6491904", "0.645416", "0.63518685", "0.6343228", "0.6336298", "0.63289773", "0.63077563", "0.6295412", "0.62940377", "0.6280729", "0.625791", "0.62515575", "0.625091...
0.0
-1
Returns a KindGroupVo from a Kind entity.
public static KindGroupVo getInstance(KindGroup entity,boolean cascadable) throws Exception{ KindGroupVo vo = new KindGroupVo(); if(null == entity) throw new Exception("Unable to create KindGroupVo from null KindGroup entity."); vo.setId(entity.getId()); /* * Only populate fields outside of the entity Id if needed */ if(cascadable){ vo.setCode(entity.getCode()); vo.setDescription(entity.getDescription()); vo.setStandard(entity.isStandard()); } return vo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static KindGroup toEntity(KindGroup entity, KindGroupVo vo, boolean cascadable) throws Exception {\n if(null == entity)\n entity=new KindGroupImpl();\n\n entity.setId(vo.getId());\n\n if(cascadable){\n entity.setCode(vo.getCode());\n entity.setDescription(vo.getDescrip...
[ "0.61911637", "0.56124765", "0.5611369", "0.5297544", "0.51630193", "0.51164156", "0.5111537", "0.5111537", "0.5052122", "0.49622723", "0.49440637", "0.4932447", "0.49216992", "0.48467657", "0.4835887", "0.48047206", "0.4772799", "0.4772799", "0.4772799", "0.4772799", "0.4772...
0.64638156
0
Returns a collection of KindGroupVos from a collection of KindGroup entities.
public static Collection<KindGroupVo> getInstances(Collection<KindGroup> entities, boolean cascadable) throws Exception { Collection<KindGroupVo> vos = new ArrayList<KindGroupVo>(); for(KindGroup entity : entities){ vos.add(KindGroupVo.getInstance(entity, cascadable)); } return vos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Group_Entity> getAllGroups() {\n\t\tList<Group_Entity> list = new ArrayList<>();\n\t\tgroupRepo.findAll().forEach(list::add);\n\t\treturn list;\n\t}", "Set<Group> getGroups();", "public abstract Collection getGroups();", "List<Group> getGroups();", "private static List<Element> getXMLGroups(Mod...
[ "0.6054286", "0.603962", "0.6035228", "0.6007928", "0.590706", "0.57644117", "0.56079596", "0.55727583", "0.55468446", "0.54912305", "0.5490875", "0.5480524", "0.5472955", "0.5470478", "0.5453911", "0.5427658", "0.53353214", "0.5309238", "0.5286223", "0.5253949", "0.5247752",...
0.6051526
1
Returns a KindGroup entity from a vo.
public static KindGroup toEntity(KindGroup entity, KindGroupVo vo, boolean cascadable) throws Exception { if(null == entity) entity=new KindGroupImpl(); entity.setId(vo.getId()); if(cascadable){ entity.setCode(vo.getCode()); entity.setDescription(vo.getDescription()); entity.setStandard(vo.isStandard()); /* * Validate the entity */ validateEntity(entity); } return entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static KindGroupVo getInstance(KindGroup entity,boolean cascadable) throws Exception{\n\t KindGroupVo vo = new KindGroupVo();\n\t\n\t if(null == entity)\n\t\t throw new Exception(\"Unable to create KindGroupVo from null KindGroup entity.\");\n\t\n\t vo.setId(entity.getId());\n\n\t /*\n\t * Only...
[ "0.60104114", "0.51797473", "0.50190854", "0.5011235", "0.49321094", "0.49321094", "0.49164113", "0.48293087", "0.4822338", "0.47862178", "0.4754751", "0.4688032", "0.46631014", "0.46536577", "0.46328732", "0.45776337", "0.45653167", "0.45389423", "0.4525411", "0.4523485", "0...
0.66270703
0
Perform some validation on the kindGroup field values against the entity field definitions.
private static void validateEntity(KindGroup entity) throws ValidationException { Validator.validateStringField("code", entity.getCode(), 10, true); Validator.validateStringField("description", entity.getDescription(), 75,true); Validator.validateBooleanField("isStandard", entity.isStandard(), true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void validateEntity() {\n super.validateEntity();\n }", "protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validat...
[ "0.5884879", "0.5554366", "0.55240583", "0.5508215", "0.54472154", "0.54428285", "0.54054344", "0.5354657", "0.533316", "0.5330722", "0.53214103", "0.5316019", "0.5296165", "0.52785337", "0.52701485", "0.5269476", "0.5242819", "0.5208525", "0.5186335", "0.5186335", "0.5186335...
0.7383986
0
Returns whether or not this is a standard type.
@JsonIgnore public Boolean isStandard() { return this.standard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isType() {\n return type;\n }", "public abstract boolean isStandard();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();",...
[ "0.68819463", "0.6839066", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", "0.6820548", ...
0.6500304
46
Returns whether or not this is a standard type.
public Boolean getStandard() { return isStandard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isType() {\n return type;\n }", "public abstract boolean isStandard();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();",...
[ "0.68799645", "0.6841233", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415", "0.68191415",...
0.6384494
50
Sets whether or not this is a standard type.
public void setStandard(Boolean standard) { this.standard = standard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setType(boolean type) {\n this.type = type;\n }", "@JsonIgnore\n public Boolean isStandard() {\n return this.standard;\n }", "public boolean isSetType() {\n return this.type != null;\n }", "public boolean isSetType() {\n return this.type != null;\n }", "public boo...
[ "0.6385562", "0.6095356", "0.5831208", "0.5803895", "0.5803895", "0.5803895", "0.5795994", "0.5739199", "0.57262206", "0.5725251", "0.5699998", "0.56634885", "0.56386745", "0.5592824", "0.558218", "0.5573705", "0.5564902", "0.55498743", "0.55498743", "0.55498743", "0.55439425...
0.6727414
0
Salvar Generico para os tipos de Roles
public ResponseEntity salvar(ContaUsuario contaUsuario, ERole role, HttpServletRequest request, MultipartFile foto, Boolean trocarSenha) { Map<String, Object> data = new HashMap<>(); ContaUsuario contaUsuarioSalvar = new ContaUsuario(); /* Se a cona já estiver cadastrada busca as informaçoes dela */ if(contaUsuario.getId() == null){ contaUsuarioSalvar = contaUsuario; }else{ contaUsuarioSalvar = contaUsuarioRepository.findOne(contaUsuario.getId()); } if(trocarSenha){ String encodedPassword = contaUsuario.getEncodedPassword(contaUsuario.getPassword()); contaUsuarioSalvar.setSenha(encodedPassword); } if ((!foto.isEmpty()) && ((ERole.ROLE_ADMIN == role) || (ERole.ROLE_CANDIDATO == role) || (ERole.ROLE_EMPREGADOR == role))) { String caminho = prepararAnexo(request, contaUsuario.getId(), foto); contaUsuarioSalvar.setPathImagem(caminho); } contaUsuarioSalvar.addPermissao(getPermissao(role)); contaUsuarioRepository.save(contaUsuarioSalvar); data.put("msg", "Conta de usuário salva com sucesso!"); data.put("contaUsuario", contaUsuarioSalvar); return new ResponseEntity(data, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveSysRole(SysRole sysRole);", "@Override\r\n\tpublic void saveRole(Integer uid) {\n\t\tum.saveRole(uid);\r\n\t}", "void setRole(String roles);", "public void setRole(java.lang.String value) {\n this.role = value;\n }", "public void ajouterRole(RoleUtilisateur ru);", "public void saveRol...
[ "0.6846428", "0.6802274", "0.6639251", "0.658138", "0.6547069", "0.6450018", "0.6414835", "0.6380141", "0.6364228", "0.6342495", "0.6310102", "0.6310102", "0.6307425", "0.6297339", "0.6279527", "0.6278609", "0.6240738", "0.6239337", "0.6219739", "0.62116396", "0.62088966", ...
0.0
-1
Returns DBObject representing object with given id
private DBObject getById(MongoDbServer entity, String id) throws Exception { MongoClient mongoClient = new MongoClient(entity.getAttribute(SoftwareProcess.HOSTNAME)); try { DB db = mongoClient.getDB(TEST_DB); DBCollection testCollection = db.getCollection(TEST_COLLECTION); DBObject doc = testCollection.findOne(new BasicDBObject("_id", new ObjectId(id))); return doc; } finally { mongoClient.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T get(int objectId) throws SQLException;", "public T findById(int id)\n {\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n String query = createSelectQuery(\"id\");\n try\n {\n connection = Connect...
[ "0.73079675", "0.73051", "0.72756785", "0.7246969", "0.7206003", "0.7159739", "0.7137642", "0.71295846", "0.7114527", "0.70792395", "0.7074447", "0.69671977", "0.6941427", "0.6906083", "0.68538535", "0.6850247", "0.68210554", "0.6793891", "0.6789234", "0.6782411", "0.67593205...
0.6799209
17
Creates a new async stub that supports all call types for the service
public static GreeterStub newStub(io.grpc.Channel channel) { return new GreeterStub(channel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stub createStub();", "public interface GenerateResourceServiceAsync {\n /**\n * {@link GenerateResourceServiceImpl#generateTSDPattern(long,boolean)}\n */\n void generateTSDPattern(long settingFileId, boolean isCreateFile, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n...
[ "0.6892434", "0.6467239", "0.6211053", "0.60550624", "0.58448124", "0.5826248", "0.58191776", "0.5696866", "0.5648306", "0.55342954", "0.55286705", "0.5512426", "0.5510817", "0.5508667", "0.54999334", "0.54982334", "0.546741", "0.5460062", "0.5459664", "0.5436188", "0.5432517...
0.0
-1
Creates a new blockingstyle stub that supports unary and streaming output calls on the service
public static GreeterBlockingStub newBlockingStub( io.grpc.Channel channel) { return new GreeterBlockingStub(channel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stub createStub();", "public interface Stream<T> extends Lifecycle {\n\n PendingRequest<T> next(int requestId, T request);\n\n int getPendingRequestCount();\n\n ClientResponseObserver<T, RpcResult> newObserver();\n\n\n final class PendingRequest<T> {\n\n private final T request;\n\n pri...
[ "0.6456746", "0.5719615", "0.55060434", "0.543937", "0.5434734", "0.5416388", "0.5416388", "0.5416388", "0.5416388", "0.5416388", "0.5414057", "0.5406529", "0.5388769", "0.5360196", "0.5343114", "0.5308872", "0.5304495", "0.5304495", "0.52894986", "0.5266718", "0.52606463", ...
0.49542543
75
Creates a new ListenableFuturestyle stub that supports unary calls on the service
public static GreeterFutureStub newFutureStub( io.grpc.Channel channel) { return new GreeterFutureStub(channel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ExtractionServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceFutureStub>() {\n @Override\n public ExtractionServiceFutureSt...
[ "0.5984404", "0.59063864", "0.58674043", "0.58643967", "0.5863299", "0.5839038", "0.5769504", "0.5759156", "0.5710223", "0.5688851", "0.5686665", "0.56736964", "0.5664948", "0.56566566", "0.5654546", "0.56510144", "0.5623502", "0.562123", "0.55747163", "0.55485827", "0.553076...
0.51131207
51
TODO Autogenerated method stub
public void supprimerToutesLesLignes() { listeVente.clear(); fireTableDataChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Check for old syntax with ^ and ~
private String checkOldTitleSyntax ( String title ) { String ttlstr = title; int pos = ttlstr.indexOf('^'); if ( (ttlstr.charAt(0) == '~') && (pos > 0)) { String tmpStr = ttlstr.substring(1,ttlstr.length()); pos --; while ( pos > 0 ) { tmpStr = tmpStr.substring(0, pos-1) + "~" + tmpStr.substring(pos + 1, tmpStr.length()); pos = tmpStr.indexOf('^'); } ttlstr = tmpStr; } return ttlstr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test public void testCaretNegation() {\n String sql = \"select a from abc where ^a = 1\";\n String expected = \"SELECT `ABC`.`A`\\n\"\n + \"FROM `ABC` AS `ABC`\\n\"\n + \"WHERE ^`ABC`.`A` = 1\";\n getTester().checkRewrite(sql, expected);\n }", "@Test public void testCaretNegation() {\n ...
[ "0.64841926", "0.60382694", "0.60093683", "0.5829325", "0.5807756", "0.57865155", "0.5764802", "0.55802345", "0.5501088", "0.5455147", "0.5415805", "0.5411259", "0.5409096", "0.5381379", "0.5377286", "0.5367734", "0.5310781", "0.52973765", "0.5228878", "0.52232164", "0.521918...
0.58682704
3
Builds the users table if it does not exist.
public void buildUsers() { try (PreparedStatement prep = Database.getConnection().prepareStatement( "CREATE TABLE IF NOT EXISTS users (id TEXT, name TEXT," + " cell TEXT, password INT, stripe_id TEXT, url TEXT," + " PRIMARY KEY (id));")) { prep.executeUpdate(); } catch (final SQLException exc) { exc.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initializeUser() {\n try {\n Connection connection = connect();\n\n PreparedStatement createCategoryTable = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS user (\"\n + \"id INTEGER PRIMARY KEY, \"\n + \"username VARCHAR(100),\...
[ "0.6301742", "0.62563103", "0.6203894", "0.61975044", "0.61417097", "0.6112579", "0.5985176", "0.5931905", "0.5814829", "0.58092016", "0.5796984", "0.57743657", "0.5725235", "0.57219875", "0.56593597", "0.56271434", "0.56244063", "0.5612174", "0.5596157", "0.55704236", "0.555...
0.7870436
0
Builds the order table if it does not exist.
public void buildOrders() { try (PreparedStatement prep = Database.getConnection() .prepareStatement("CREATE TABLE IF NOT" + " EXISTS orders (id TEXT, orderer_id TEXT, deliverer_id TEXT," + " pickup_time REAL, dropoff_time REAL, pickup_location TEXT," + " dropoff_location TEXT, price REAL, pickup_phone TEXT," + " PRIMARY KEY (id)," + " FOREIGN KEY (orderer_id)" + " REFERENCES users(id), FOREIGN KEY (deliverer_id) REFERENCES" + " users(id), FOREIGN KEY (pickup_location) REFERENCES" + " locations(id)," + " FOREIGN KEY (dropoff_location) REFERENCES locations(id)" + " ON DELETE CASCADE ON UPDATE CASCADE);")) { prep.executeUpdate(); } catch (final SQLException exc) { exc.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildOrderStatus() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS order_status (order_id TEXT, status INT,\"\n + \" time REAL, \"\n + \" FOREIGN KEY (order_id) REFERENCES orders(id)\"\n + \" ON DELET...
[ "0.67574394", "0.5913732", "0.58966196", "0.58839446", "0.57333875", "0.5631754", "0.56245697", "0.5619362", "0.55788445", "0.55490756", "0.5510351", "0.5505167", "0.55047786", "0.5438971", "0.54359126", "0.54220134", "0.53589314", "0.53291786", "0.5326709", "0.53208876", "0....
0.722804
0
Builds the items table if it does not exist.
public void buildItems() { try (PreparedStatement prep = Database.getConnection() .prepareStatement("CREATE TABLE IF NOT" + " EXISTS items (order_id TEXT, item TEXT, FOREIGN KEY (order_id)" + " REFERENCES orders(id) ON DELETE CASCADE ON UPDATE CASCADE);")) { prep.executeUpdate(); } catch (final SQLException exc) { exc.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void createItemTable() {\n\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\t// Drop table if already exists and as per SQL query available in\n\t\t\t// Query.xml\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstant...
[ "0.6943321", "0.6943321", "0.660272", "0.6298501", "0.6147939", "0.60169315", "0.59776556", "0.59411955", "0.5870794", "0.57850075", "0.5776789", "0.5745601", "0.5699193", "0.5657798", "0.56496245", "0.5631491", "0.5619262", "0.557332", "0.5555393", "0.5554738", "0.54534006",...
0.75499845
0
Builds the locations table if it does not exist.
public void buildLocations() { try (PreparedStatement prep = Database.getConnection().prepareStatement( "CREATE TABLE IF NOT EXISTS locations (id TEXT, latitude" + " REAL, longitude REAL, name TEXT, PRIMARY KEY (id));")) { prep.executeUpdate(); } catch (final SQLException exc) { exc.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildLocation() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT EXISTS location (location_name\"\n + \" TEXT, lat REAL, lon REAL PRIMARY KEY (location_name));\")) {\n prep.executeUpdate();\n } catch (final SQLException e)...
[ "0.7374092", "0.5826476", "0.575583", "0.55133116", "0.55082613", "0.5503195", "0.5327318", "0.5286038", "0.52544093", "0.52526194", "0.52413946", "0.5206607", "0.5157264", "0.5139799", "0.5103431", "0.50760484", "0.50308764", "0.4995362", "0.4978105", "0.49676582", "0.494047...
0.794222
0
Builds the order status table if it does not exist.
public void buildOrderStatus() { try (PreparedStatement prep = Database.getConnection().prepareStatement( "CREATE TABLE IF NOT EXISTS order_status (order_id TEXT, status INT," + " time REAL, " + " FOREIGN KEY (order_id) REFERENCES orders(id)" + " ON DELETE CASCADE ON" + " UPDATE CASCADE);")) { prep.executeUpdate(); } catch (final SQLException exc) { exc.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildAccountStatus() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT EXISTS account_status (user_id\"\n + \" TEXT UNIQUE, status INT, FOREIGN KEY (user_id) REFERENCES users\"\n + \"(id)\" + \" ON DELETE CASCADE ON UPDA...
[ "0.6529784", "0.57448286", "0.553848", "0.5475271", "0.53376365", "0.5337095", "0.5321292", "0.5321292", "0.5243572", "0.52243966", "0.5176418", "0.5173089", "0.5138124", "0.51184046", "0.51112527", "0.5105578", "0.5048213", "0.50094396", "0.50018936", "0.50001794", "0.498160...
0.81504595
0
Builds the location table.
public void buildLocation() { try (PreparedStatement prep = Database.getConnection() .prepareStatement("CREATE TABLE IF NOT EXISTS location (location_name" + " TEXT, lat REAL, lon REAL PRIMARY KEY (location_name));")) { prep.executeUpdate(); } catch (final SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildLocations() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS locations (id TEXT, latitude\"\n + \" REAL, longitude REAL, name TEXT, PRIMARY KEY (id));\")) {\n prep.executeUpdate();\n } catch (final SQLException...
[ "0.76954526", "0.6246393", "0.611851", "0.59992576", "0.59126663", "0.58218336", "0.5785967", "0.57743084", "0.5614496", "0.5557171", "0.55413747", "0.55136055", "0.5513203", "0.5370552", "0.5345877", "0.53080076", "0.5284503", "0.525616", "0.52525496", "0.5233144", "0.521394...
0.7650908
1
Builds the account status table.
public void buildAccountStatus() { try (PreparedStatement prep = Database.getConnection() .prepareStatement("CREATE TABLE IF NOT EXISTS account_status (user_id" + " TEXT UNIQUE, status INT, FOREIGN KEY (user_id) REFERENCES users" + "(id)" + " ON DELETE CASCADE ON UPDATE CASCADE);")) { prep.executeUpdate(); } catch (final SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buildOrderStatus() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS order_status (order_id TEXT, status INT,\"\n + \" time REAL, \"\n + \" FOREIGN KEY (order_id) REFERENCES orders(id)\"\n + \" ON DELET...
[ "0.65251595", "0.59790444", "0.5933288", "0.5771401", "0.5644535", "0.5600903", "0.5581878", "0.5555756", "0.54937714", "0.5486855", "0.54779273", "0.53843284", "0.5360292", "0.53452384", "0.53452384", "0.52221036", "0.5221198", "0.52062863", "0.5140544", "0.5107635", "0.5106...
0.81768316
0
Builds the ratings table in the database.
public void buildRatingsTable() { try (PreparedStatement prep = Database.getConnection() .prepareStatement("CREATE TABLE IF NOT EXISTS user_ratings (user_id" + " TEXT, rating REAL, user_type TEXT, FOREIGN KEY (user_ID)" + " REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE);")) { prep.executeUpdate(); } catch (final SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void buildTable() {\r\n\t\t//This method keeps the user from editing the table\r\n\t\ttableModel = new DefaultTableModel() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\t@Override\r\n\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\t//All cells false\r\n\t\t\...
[ "0.6111969", "0.57140875", "0.5668633", "0.56293523", "0.5561091", "0.55082095", "0.5347084", "0.53434145", "0.5325924", "0.52488995", "0.5225492", "0.52151877", "0.51922476", "0.51785433", "0.5153986", "0.5133443", "0.5117364", "0.5113487", "0.50907856", "0.50708264", "0.504...
0.83988726
0
/ check if object is connected to DB
private boolean isConnected() { try { return (conn != null) && conn.isValid(0); } catch (SQLException ex) { Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDBConnected() {\n\t\ttry {\n\t\t\treturn !conn.isClosed();\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public final boolean isConnected() {\n\t\t// retornamos si existe una conexion\n\t\treturn this.getConnection() != null;\n\t}", "public boolean checkConnection() {\n\t...
[ "0.7340669", "0.7190519", "0.70565885", "0.70522153", "0.7038973", "0.69895643", "0.69437814", "0.69414896", "0.69217736", "0.6911002", "0.68536586", "0.6846688", "0.6837665", "0.6833687", "0.68016315", "0.6785641", "0.6774334", "0.67658246", "0.67520803", "0.674534", "0.6728...
0.7597009
0
/ check if DB exists
private boolean exists() { try { DatabaseMetaData md = conn.getMetaData(); ResultSet rs = md.getTables(null, null, "settings", null); return rs.next(); } catch (SQLException e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); System.exit(0); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean dbExists(String dbName);", "public boolean databaseExists(String dbName) throws Exception;", "public boolean checkIfDatabaseExists() {\r\n return database.exists();\r\n }", "private boolean databaseExists() {\n File dbFile = mContext.getDatabasePath(DBNAME);\n return dbFile.exists()...
[ "0.8307051", "0.82157475", "0.8187482", "0.81005746", "0.8084311", "0.8002102", "0.797824", "0.7877701", "0.77439916", "0.7682564", "0.76559097", "0.76530033", "0.75469524", "0.7384301", "0.7355435", "0.7355435", "0.7350721", "0.7268538", "0.7196314", "0.71765375", "0.7070814...
0.69223875
25
/ connect to DB
private void connect() { try { Class.forName("org.sqlite.JDBC"); this.conn = DriverManager.getConnection("jdbc:sqlite:settings.db"); } catch (ClassNotFoundException | SQLException e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); System.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void DBConnect() {\n \tdatabase = new DatabaseAccess();\n \tif (database != null) {\n \t\ttry {\n \t\t\tString config = getServletContext().getInitParameter(\"dbConfig\");\n \t\t\tdatabase.GetConnectionProperties(config);\n \t\t\tdatabase.DatabaseConnect();\n \t\t}\n \t\tcatch (Excep...
[ "0.8209896", "0.81606245", "0.8100042", "0.807169", "0.8016578", "0.7978907", "0.7973798", "0.79688007", "0.7923996", "0.78528273", "0.7817464", "0.7797241", "0.7787113", "0.77442974", "0.77312845", "0.77118546", "0.7691316", "0.7661164", "0.7649504", "0.7648614", "0.7647339"...
0.7410437
43
/ create new DB
private void createDB() { try { Statement stat = conn.createStatement(); stat.execute("CREATE TABLE settings (name TEXT, state);"); stat.execute("CREATE TABLE expressions (id INTEGER PRIMARY KEY ASC AUTOINCREMENT, expression TEXT);"); stat.execute("CREATE TABLE summaries (id INTEGER PRIMARY KEY ASC, expression_id INTEGER, title TEXT, abstract TEXT);"); stat.execute("CREATE TABLE history (id INTEGER PRIMARY KEY ASC AUTOINCREMENT, expression TEXT);"); } catch (SQLException e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); System.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createDb(String dbName);", "public void dbCreate() {\n Logger.write(\"INFO\", \"DB\", \"Creating database\");\n try {\n if (!Database.DBDirExists())\n Database.createDBDir();\n dbConnect(false);\n for (int i = 0; i < DBStrings.createDB.length; i+...
[ "0.8234426", "0.8021342", "0.7998421", "0.7980825", "0.77696633", "0.7663895", "0.7556869", "0.75464886", "0.75079364", "0.7350551", "0.7346708", "0.73236024", "0.72389126", "0.7226239", "0.7152324", "0.7140603", "0.7116182", "0.7109986", "0.70969915", "0.707062", "0.7044619"...
0.7402475
9
/ get all expressions from DB
public Vector<String> getExpressions(boolean history) { Vector<String> expressions = new Vector<>(); try { Statement stat = conn.createStatement(); ResultSet rs; if(history) rs = stat.executeQuery("SELECT * FROM history ORDER BY id DESC;"); else rs = stat.executeQuery("SELECT * FROM expressions ORDER BY id DESC;"); while (rs.next()) { expressions.add(rs.getString("expression")); } return expressions; } catch (SQLException e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); System.exit(0); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List getExpressions();", "@GetMapping(value= \"/expression/all\", produces= \"application/vnd.jcg.api.v1+json\")\n\tpublic List<String> getAll() {\n\t\tlog.info(\"Getting expressions from the database.\");\n\t\treturn service.getAllString();\n\t}", "ExpressionList getExpressionList();", "public List<Expr> ge...
[ "0.7716385", "0.7430069", "0.6792741", "0.6647048", "0.63065", "0.626884", "0.62612015", "0.62065667", "0.6141557", "0.6141557", "0.6141557", "0.6141557", "0.6074398", "0.60270774", "0.60270774", "0.60157883", "0.5998533", "0.5976332", "0.5949227", "0.58767354", "0.5803518", ...
0.67392373
3
/ add new expression to the DB
public boolean addExpression(String expression, boolean history) { if (!checkExpression(expression, history)) { try { Statement stat = conn.createStatement(); if(history) stat.executeUpdate("INSERT INTO history " + "(expression) VALUES ('" + expression + "');"); else stat.executeUpdate("INSERT INTO expressions " + "(expression) VALUES ('" + expression + "');"); return true; } catch (SQLException e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); System.exit(0); return false; } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long addExpression(Expression expression);", "private void jetNewExpr(){\n\t\tthis.isNewExpr = true;\n\t}", "Expression createExpression();", "public void setExpression(Object expression);", "public <V extends Number> FluentExp<V> plus (SQLExpression<V> expr)\n {\n return new Add<V>(this, expr);\...
[ "0.7229184", "0.6389215", "0.6355309", "0.62610006", "0.62280405", "0.616108", "0.615935", "0.6082754", "0.60174215", "0.5987858", "0.596168", "0.5953223", "0.5949911", "0.5844937", "0.58119965", "0.57646036", "0.568162", "0.56736475", "0.5659765", "0.56587213", "0.56429046",...
0.66504854
1
/ delete expression from the DB
public boolean deleteExpression(String expression, boolean history) { if (checkExpression(expression, history)) { try { Statement stat = conn.createStatement(); if(history) stat.executeUpdate("DELETE FROM history WHERE expression = '" + expression + "';"); else stat.executeUpdate("DELETE FROM expressions WHERE expression = '" + expression + "';"); return true; } catch (SQLException e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); System.exit(0); return false; } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteExpression(Expression expression);", "public void deleteExpression(){\n\n if(currentExp.equals(\"\")){\n calculationResult.onExpressionChange(\"Invalid Input\",false);\n }\n currentExp = \"\";\n calculationResult.onExpressionChange(currentExp,true);\n calc...
[ "0.81056607", "0.7649751", "0.6931315", "0.6570259", "0.6489162", "0.6485848", "0.6454976", "0.6417242", "0.6384178", "0.63299", "0.6303412", "0.6301123", "0.62675613", "0.626732", "0.62416583", "0.62416583", "0.6241173", "0.62022626", "0.6180957", "0.6176548", "0.61737704", ...
0.6600566
3
/ check if expression exists in DB
private boolean checkExpression(String expression, boolean history) { try { Statement stat = conn.createStatement(); ResultSet rs; if(history) rs = stat.executeQuery("SELECT * FROM history WHERE expression = '" + expression + "';"); else rs = stat.executeQuery("SELECT * FROM expressions WHERE expression = '" + expression + "';"); return rs.next(); } catch (SQLException e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); System.exit(0); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean verifyExists(String value, String column);", "public void testExists() {\n\n String\tsql\t= \"SELECT AD_Table.AD_Table_ID, AD_Table.TableName \" + \"FROM AD_Table \" + \"WHERE EXISTS (SELECT * FROM AD_Column c WHERE AD_Table.AD_Table_ID=c.AD_Table_ID)\";\n AccessSqlParser\tfixture\t=...
[ "0.64367425", "0.6425967", "0.6400631", "0.6380843", "0.5989397", "0.5986934", "0.598595", "0.59745395", "0.59500974", "0.59456307", "0.5910734", "0.5899595", "0.58287543", "0.58135635", "0.58056134", "0.57798004", "0.5771503", "0.57634646", "0.5755863", "0.5755863", "0.57320...
0.66544014
0
End of variables declaration
public JButton getJLabel4() { return jLabel4; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "protected void initVars() {}", "private void assignment() {\n\n\t\t\t}", "private void declareLocals() {\r\n\t\t/...
[ "0.6759361", "0.6568837", "0.62458223", "0.61133546", "0.60982347", "0.6087512", "0.60586846", "0.5882926", "0.5873854", "0.5771458", "0.5769804", "0.57594293", "0.57517105", "0.57495594", "0.5749265", "0.5725298", "0.57189494", "0.5666249", "0.5654246", "0.5628506", "0.56269...
0.0
-1
Creates an IntentService. Invoked by your subclass's constructor.
public FetchAddressIntentService() { super("FetchAddressIntentService"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyIntentService() {\n super(\"MyIntentServiceName\");\n }", "public MyIntentService() {\n super(\"MyIntentService\");\n }", "public MyIntentService() {\n super(\"\");\n }", "public MyIntentService() {\n super(MyIntentService.class.getName());\n }", "public MyI...
[ "0.82810783", "0.8213369", "0.80133486", "0.7955119", "0.78672177", "0.7617768", "0.7523137", "0.71582", "0.7155323", "0.69393814", "0.6778027", "0.6631029", "0.66181177", "0.65701383", "0.6558259", "0.6486216", "0.6445637", "0.64216906", "0.6402057", "0.63362867", "0.6326358...
0.6615682
13
Converts a geographic location to an address. Uses a Geocoder to fetch the address for the location and sends the results to the ResultReceiver. Returns the string containing the address on a successful reverse; otherwise the string contains the error message.
@Override protected void onHandleIntent(Intent intent) { Geocoder geocoder = new Geocoder(this, Locale.getDefault()); if (intent == null) { return; } String errorMessage = ""; // Get the location passed to this service through Location location = intent.getParcelableExtra( Constants.LOCATION_DATA_EXTRA); //Get the receiver passed to this service through extra receiver = intent.getParcelableExtra(Constants.RECEIVER); List<Address> addresses = null; try { //Returns one address corresponding to this geographical location addresses = geocoder.getFromLocation( location.getLatitude(), location.getLongitude(), 1); } catch (IOException ioException) { // Catch network or other I/O problems. errorMessage = getString(R.string.service_not_available); Log.e(TAG, errorMessage, ioException); } catch (IllegalArgumentException illegalArgumentException) { // Catch invalid latitude or longitude values. errorMessage = getString(R.string.invalid_lat_long_used); Log.e(TAG, errorMessage + ". " + "Latitude = " + location.getLatitude() + ", Longitude = " + location.getLongitude(), illegalArgumentException); } // Handle case where no address was found. if (addresses == null || addresses.size() == 0) { if (errorMessage.isEmpty()) { errorMessage = getString(R.string.no_address_found); Log.e(TAG, errorMessage); } deliverResultToReceiver(Constants.FAILURE_RESULT, errorMessage); } else { Address address = addresses.get(0); ArrayList<String> addressFragments = new ArrayList<String>(); // Fetch just the zipcode addressFragments.add(address.getPostalCode()); Log.i(TAG, getString(R.string.address_found)); //Sends results back to LocationActivity deliverResultToReceiver(Constants.SUCCESS_RESULT, TextUtils.join(System.getProperty("line.separator"), addressFragments)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tprotected String doInBackground(Location... params) {\n\t\t\t/*\n\t\t\t * Get a new geocoding service instance, set for localized addresses. This example uses\n\t\t\t * android.location.Geocoder, but other geocoders that conform to address standards\n\t\t\t * can also be used.\n\t\t\t */\n\t\t\tGeoc...
[ "0.6924318", "0.65744686", "0.6495963", "0.64067686", "0.6315067", "0.6292791", "0.6281381", "0.6085002", "0.6081878", "0.60080045", "0.59003586", "0.5881474", "0.5881474", "0.58210593", "0.5804764", "0.5755521", "0.57027316", "0.56749433", "0.5662698", "0.56304866", "0.56171...
0.5521196
25
Returns address to back to ResultReceiver in the activity that started the service
private void deliverResultToReceiver(int resultCode, String message){ //Construct msg bundle Bundle bundle = new Bundle(); //Concatenate constant and value in message bundle.putString(Constants.RESULT_DATA_KEY,message); receiver.send(resultCode,bundle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n // Display the address string or an error message sent from the intent service.\n //.getString(Constants.ADDRESS_RESULT_KEY);\n // Address current_location = getIntent().getExtras().getParcel...
[ "0.71445256", "0.66902256", "0.66192746", "0.6602749", "0.653534", "0.6405467", "0.6378824", "0.63519275", "0.63114387", "0.62797344", "0.626711", "0.6262625", "0.6262359", "0.62459785", "0.6237897", "0.61476064", "0.6115333", "0.6107721", "0.6086408", "0.60712016", "0.605491...
0.0
-1
first convert from the 2d image coords to spherical coordinates, then to XYZ
private float[] getCoords(double x, double y) { double angleXY = x * increment; double angleZ = y * increment; int zCoord = (int) (EYE_RADIUS * Math.cos(Math.toRadians(angleZ))); double ZRadiusScale = EYE_RADIUS * Math.sin(Math.toRadians(angleZ)); int xCoord = (int) (ZRadiusScale*Math.cos(Math.toRadians(angleXY))); int yCoord = (int) (ZRadiusScale*Math.sin(Math.toRadians(angleXY))); float addMe[] = {xCoord, yCoord, zCoord}; return addMe; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void worldToImageCoords(Point2D.Double p, boolean isDistance);", "public void imageToWorldCoords(Point2D.Double p, boolean isDistance);", "private SphericalMercatorPosition pixelToSphericalMercator(\r\n\t\t\tPixelPosition pixelPosition) {\n\t\tint px = pixelPosition.getX();\r\n\t\tint py = pixelPosition...
[ "0.63508946", "0.6194496", "0.59898573", "0.5946173", "0.591487", "0.58994776", "0.5710979", "0.55944926", "0.555619", "0.55493635", "0.54759026", "0.54374176", "0.5424067", "0.53887844", "0.5277932", "0.527651", "0.5268672", "0.5204614", "0.52037317", "0.51867706", "0.517150...
0.46673137
58
User registerUser(User user) throws Exception; User loginUser(User user, HttpSession httpSession) throws Exception;
User loginUser(User userLoginRequest, HttpSession httpSession) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void login(User user);", "String registerUser(User user);", "String registerUserWithGetCurrentSession(User user);", "User registration(User user);", "boolean userRegistration(UserDTO user) throws UserException,ConnectException;", "void registerUser(User newUser);", "Boolean registerNewUser(User ...
[ "0.77323055", "0.7691586", "0.7624767", "0.7472785", "0.74450547", "0.7410248", "0.73909533", "0.7380273", "0.738015", "0.73145014", "0.72650933", "0.7224864", "0.7163382", "0.7153582", "0.71403074", "0.71013004", "0.7060129", "0.7052931", "0.70160097", "0.70160055", "0.69805...
0.84399045
0
These properties can be moved into the SpringBootApplication annotation, but providing here as a way to demonstrate how we can provide ConfigurationProperties as a bean in the application itself This way, it is less errorprone from typos.
@Bean @Primary public FtpSupplierProperties ftpSupplierProperties() { final FtpSupplierProperties ftpSupplierProperties = new FtpSupplierProperties(); ftpSupplierProperties.setRemoteDir("ftpSource"); ftpSupplierProperties.setFilenamePattern("*"); return ftpSupplierProperties; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Bean\n public static PropertySourcesPlaceholderConfigurer properties(){\n PropertySourcesPlaceholderConfigurer pspc\n = new PropertySourcesPlaceholderConfigurer();\n Resource[] resources = new ClassPathResource[ ]\n { new ClassPathResource(\"app-attribute.properties\") };\n pspc.se...
[ "0.66203135", "0.5969732", "0.59583443", "0.5794361", "0.5792096", "0.57784957", "0.5680439", "0.56431764", "0.56337327", "0.56108916", "0.5584786", "0.55556303", "0.5464507", "0.5455385", "0.542351", "0.5397993", "0.5371019", "0.5357705", "0.53444934", "0.53399694", "0.53193...
0.0
-1
asemanator cu metoda save citim din path si returnam un obiect de tip Catalog
public static Catalog load(String path) throws InvalidCatalogException, IOException, ClassNotFoundException { InputStream fileIs = new FileInputStream(path); ObjectInputStream objIs = new ObjectInputStream(fileIs); Catalog emp = (Catalog) objIs.readObject(); return emp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveNewCatalog() {\n\n\t}", "public String saveCata(){\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tFacesMessage facesMessage = new FacesMessage(\"Catalogo guardado\");\n\t\tfacesContext.addMessage(null, facesMessage);\n\t\treturn \"catalogo\";\n\t}", "@Override\n\tpubl...
[ "0.6910852", "0.61118245", "0.6034411", "0.59495896", "0.5890094", "0.57893354", "0.57742566", "0.57666063", "0.5735103", "0.5724558", "0.57217884", "0.5701635", "0.5701308", "0.5638789", "0.5632473", "0.56284887", "0.56279963", "0.5600798", "0.55912775", "0.557325", "0.55711...
0.0
-1
am luat uri ul din document cu ajutorul functie get apoi am testat daca clasa e suportata de platforma curenta dupa care am afisat cu .browse
public static void view(Document doc) throws URISyntaxException, IOException { Desktop desktop = Desktop.getDesktop(); URI uri = new URI(doc.getLocation()); if (Desktop.isDesktopSupported()) { desktop = Desktop.getDesktop(); } if (desktop != null) { desktop.browse(uri); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Property String getDocumentURI();", "private boolean loadDocFromServer(int indice, boolean autoPrint)\n\t{\n\t\tDocumentoPrint docP = listadoDoc.get(indice);\n\t\t\n\t\t//La url de destino\n\t\tString urlDoc = new String();\n\t\turlDoc = this.commClass.getUrlSis() + this.commClass.getUrlVisorDoc();\n\t\t\n\t\t/...
[ "0.5925267", "0.5881178", "0.58229625", "0.5815766", "0.57974386", "0.5748917", "0.5748917", "0.5748917", "0.5681458", "0.5638203", "0.5621303", "0.5586257", "0.5584054", "0.55703664", "0.55439615", "0.55402005", "0.55332017", "0.5531799", "0.5519062", "0.54926556", "0.546808...
0.55096275
19
Creates new form GUI_IntroDatos
public GUI_IntroDatos() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Gui_lectura_consumo() {\n initComponents();\n centrarform();\n consumo_capturado.setEditable(false);\n limpiarCajas();\n \n \n }", "private void initialize() {\n setFrame(new JFrame());\n getFrame().setBounds(100, 100, 310, 270);\n getFrame().setDefaul...
[ "0.7383085", "0.70186967", "0.6991337", "0.69748735", "0.6926815", "0.69161016", "0.6914391", "0.6887595", "0.6849084", "0.6843309", "0.683569", "0.6822858", "0.6806179", "0.6772042", "0.6768501", "0.6758724", "0.67572093", "0.6740663", "0.6723479", "0.6713834", "0.6709703", ...
0.757549
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jTextFieldMatricula = new javax.swing.JTextField(); jTextFieldCapacidad = new javax.swing.JTextField(); jTextFieldVelocidadMax = new javax.swing.JTextField(); jTextFieldDepositoMax = new javax.swing.JTextField(); jButtonGuardar = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setText("Introduzca los datos del automovil"); jLabel2.setText("Matricula"); jLabel3.setText("Capacidad"); jLabel4.setText("Velocidad Max"); jLabel5.setText("Deposito Max"); jTextFieldMatricula.setText("0"); jTextFieldMatricula.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextFieldMatriculaActionPerformed(evt); } }); jTextFieldCapacidad.setText("0"); jTextFieldVelocidadMax.setText("0"); jTextFieldVelocidadMax.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextFieldVelocidadMaxActionPerformed(evt); } }); jTextFieldDepositoMax.setText("0"); jButtonGuardar.setText("Guardar"); jButtonGuardar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonGuardarActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(27, 27, 27) .addComponent(jLabel2) .addGap(12, 12, 12) .addComponent(jLabel1) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addGap(126, 126, 126) .addComponent(jButtonGuardar) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(jTextFieldMatricula, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jTextFieldCapacidad, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jTextFieldVelocidadMax)) .addComponent(jLabel4)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTextFieldDepositoMax)) .addGap(24, 24, 24)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(jLabel3) .addComponent(jLabel4) .addComponent(jLabel5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextFieldMatricula, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextFieldDepositoMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextFieldVelocidadMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextFieldCapacidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE) .addComponent(jButtonGuardar) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7321342", "0.7292121", "0.7292121", "0.7292121", "0.72863305", "0.7249828", "0.7213628", "0.7209084", "0.7197292", "0.71912086", "0.7185135", "0.7159969", "0.7148876", "0.70944786", "0.70817256", "0.7057678", "0.69884527", "0.69786763", "0.69555986", "0.69548863", "0.69453...
0.0
-1
Set up and run the server to receive connections & process connections
public void runDeal() { try { // allocate array for up to 10 server threads sockServer = new SockServer[100]; executor = Executors.newFixedThreadPool(100); // create thread pool server = new ServerSocket(23555, 100); // create ServerSocket while (true) { try { // create a new runnable object to serve the next client to // call in sockServer[counter] = new SockServer(counter); // make that new object wait for a connection on that new // server object sockServer[counter].waitForConnection(); // launch that server object into its own new thread executor.execute(sockServer[counter]); // then, continue to create another object and wait (loop) } // end try catch (EOFException eofException) { System.out.println("\nServer terminated connection"); } catch (Exception e) { e.printStackTrace(); } finally { ++counter; } // end finally } // end while } catch (IOException ioException) { System.out.println("\nServer terminated connection"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n ServerSocketChannelFactory acceptorFactory = new OioServerSocketChannelFactory();\n ServerBootstrap server = new ServerBootstrap(acceptorFactory);\n\n // The pipelines string together handlers, we set a factory to create\n // pipelines( handlers ) to handle events....
[ "0.7509684", "0.74625254", "0.7409326", "0.73367625", "0.731933", "0.72987336", "0.72704226", "0.72630906", "0.72411585", "0.72313905", "0.7229163", "0.7211427", "0.7202683", "0.71984386", "0.7192704", "0.71530545", "0.71402365", "0.71048176", "0.70958346", "0.70914143", "0.7...
0.0
-1
end try wait for connection to arrive, then display connection info
private void waitForConnection() throws IOException { System.out.println("Waiting for connection" + myConID + "\n"); connection = server.accept(); // allow server to accept connection System.out.println("Connection " + myConID + " received from: " + connection.getInetAddress().getHostName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void waitForConnection() throws IOException{\n\t\tshowMessage(\"\\n Waiting for a Punk Ass Bitch to connection... \\n \");\n\t\tConnection = server.accept();\n\t\tshowMessage(\"Now connected to \" + Connection.getInetAddress().getHostName() + \". Punk.\");\n\t\t//this is your own IP address, the machine ru...
[ "0.71897334", "0.6492554", "0.6434728", "0.64322066", "0.64018273", "0.63551396", "0.6331153", "0.62730235", "0.6258827", "0.61909795", "0.61669815", "0.6117226", "0.61011785", "0.6092433", "0.60790974", "0.60617054", "0.60557926", "0.6046645", "0.6039886", "0.59986544", "0.5...
0.71301776
1
end method getStreams Close streams and socket
private void closeConnection() { System.out.println("\nTerminating connection " + myConID + "\n"); try { output.close(); // close output stream input.close(); // close input stream connection.close(); // close socket } catch (IOException ioException) { System.out.println("Exception occured in closing connection" + ioException); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void closeStreams() {\n try {\n System.out.println(\"Closing streams and terminating thread.\");\n running = false;\n outputStream.close();\n inputStream.close();\n clientSocket.close();\n } catch (IOException e) {\n System.err...
[ "0.7416927", "0.7325703", "0.707059", "0.7055403", "0.69934183", "0.682775", "0.681617", "0.6762954", "0.67128295", "0.6707518", "0.66667026", "0.66160715", "0.65922487", "0.65212", "0.65075713", "0.64646214", "0.6410676", "0.6378822", "0.6369718", "0.63253987", "0.62947136",...
0.0
-1
end method closeConnection Send object to client
private void sendData(String message) { try { output.writeObject(message); output.flush(); // flush output to client } catch (IOException ioException) { System.out.println("\nError writing object"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void close() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Chiusura connessione\");\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CLOSE;\n\t\t\tsend(rp);\n\t\t\tClient.LoggedUser.anagrafica = null;\n\t\t\tois.close();\n\t\t\toos.close();\n\t\t\ts.close();\n\t\t} catch (Exce...
[ "0.714737", "0.7096696", "0.699916", "0.6986692", "0.69671553", "0.69580865", "0.69276786", "0.69128746", "0.69056773", "0.6899324", "0.6872831", "0.68579715", "0.6822175", "0.681663", "0.6810678", "0.67932874", "0.67069477", "0.6698523", "0.6697579", "0.66772205", "0.6672885...
0.0
-1
end method sendData Let the user play one game of Blackjack.
private void playBlackjack() throws IOException, ClassNotFoundException { List<Integer> dealerHand; // The dealer's hand. List<Integer> userHand; // The user's hand. // Create an unshuffled deck of cards. deck = new int[52]; int cardCt = 0; // How many cards have been created so far. for (int suit = 0; suit <= 3; suit++) { for (int value = 1; value <= 13; value++) { deck[cardCt] = value; cardCt++; } } currentPosition = 0; dealerHand = new ArrayList<Integer>(); userHand = new ArrayList<Integer>(); /* Shuffle the deck, then deal two cards to each player. */ shuffle(); dealerHand.add(dealCard()); dealerHand.add(dealCard()); userHand.add(dealCard()); userHand.add(dealCard()); /** * Check if one of the players has Blackjack (two cards totaling to * 21). The player with Blackjack wins the game. Dealer wins ties. */ if (value(dealerHand) == 21) { message = "Dealer has the " + showCard(getCard(dealerHand, 0)) + " and the " + showCard(getCard(dealerHand, 1)) + "."; sendData(message); message = ("User has the " + showCard(getCard(userHand, 0)) + " and the " + showCard(getCard(userHand, 1)) + "."); sendData(message); message = ("Dealer has Blackjack"); sendData(message); } if (value(userHand) == 21) { message = ("Dealer has the " + showCard(getCard(dealerHand, 0)) + " and the " + showCard(getCard(dealerHand, 1)) + "."); sendData(message); message = ("User has the " + showCard(getCard(userHand, 0)) + " and the " + showCard(getCard(userHand, 1)) + "."); sendData(message); message = ("You have Blackjack"); sendData(message); } /** * If neither player has Blackjack, play the game. The user gets a * chance to draw cards (i.e., to "Hit"). The while loop ends when * the user chooses to "Stand" or when the user goes over 21. */ boolean entryCheck = false; String startCheckval = ""; startCheckval = (String) input.readObject(); if (startCheckval.equalsIgnoreCase("StartGame")) { entryCheck = true; } sendData("Your cards are:"); for (int i = 0; i < userHand.size(); i++) { sendData(" " + showCard(getCard(userHand, i))); } sendData("Your total is " + value(userHand)); sendData("Dealer is showing the " + showCard(getCard(dealerHand, 0))); sendData("Hit (H) or Stand (S) or Double (D)? "); while (entryCheck) { if (!startCheckval.equals("StartGame")) { message = (String) input.readObject(); startCheckval = ""; /** * If the user Hits, the user gets a card. If the user * Stands, the dealer gets a chance to draw and the game * ends. */ if ("S".equalsIgnoreCase(message)) { entryCheck = false; sendData("User stands."); break; } if ("H".equalsIgnoreCase(message)) { int newCard = dealCard(); userHand.add(newCard); sendData("User hits. \n Your card are "); for (int i = 0; i < userHand.size(); i++) { sendData(" " + showCard(getCard(userHand, i))); } sendData(" \n Your total is now " + value(userHand)); entryCheck = true; if (value(userHand) > 21) { sendData("You busted by going over 21. You lose."); entryCheck = false; return; } } if ("D".equalsIgnoreCase(message)) { int newCard = dealCard(); userHand.add(newCard); sendData("User want Double \n Your card are"); for (int i = 0; i < userHand.size(); i++) { sendData(" " + showCard(getCard(userHand, i))); } sendData(" \n Your total is now " + value(userHand)); entryCheck = false; if (value(userHand) > 21) { sendData("You busted by going over 21. You lose."); entryCheck = false; return; } break; } sendData("Your cards are:"); for (int i = 0; i < userHand.size(); i++) { sendData(" " + showCard(getCard(userHand, i))); } sendData("Your total is " + value(userHand)); sendData("Dealer is showing the " + showCard(getCard(dealerHand, 0))); sendData("Hit (H) or Stand (S) or Double (D)? "); // } } startCheckval = ""; } // end while loop /** * If we get to this point, the user has Stood with 21 or less. Now, * it's the dealer's chance to draw. Dealer draws cards until the * dealer's total is > 16. */ sendData("Dealer's cards are"); sendData(" " + showCard(getCard(dealerHand, 0))); sendData(" " + showCard(getCard(dealerHand, 1))); while (value(dealerHand) <= 16) { int newCard = dealCard(); sendData("Dealer hits and gets the " + showCard(newCard)); dealerHand.add(newCard); } sendData("Dealer's total is " + value(dealerHand)); /** Now, the winner can be declared. */ if (value(dealerHand) > 21) { sendData("Dealer busted by going over 21. You win."); } else { if (value(dealerHand) == value(userHand)) { sendData("Dealer wins on a tie. You lose."); } else { if (value(dealerHand) > value(userHand)) { sendData("Dealer wins, " + value(dealerHand) + " points to " + value(userHand) + "."); } else { sendData("You win, " + value(userHand) + " points to " + value(dealerHand) + "."); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void playBlackjack() {\n\t\tString choice;\n\t\t\n\t\tSystem.out.println(\"Welcome to Blackjack! \\n\");\n\t\tSystem.out.println(\"Dealing hands \\n\");\n\t\tdeck.shuffle();\n\t\tplayer.setHand(deck.drawHand());\n\t\tdealer.setHand(deck.drawHand());\n\t\t\n\t\t\n\t\tif(checkForBlackjack(player) && checkForB...
[ "0.66217", "0.6359326", "0.63588476", "0.6301939", "0.62285537", "0.61993515", "0.614195", "0.6085965", "0.6051213", "0.6046904", "0.6042066", "0.60064256", "0.60043734", "0.596412", "0.5928026", "0.5922407", "0.5902118", "0.5883648", "0.5878696", "0.58644223", "0.5856229", ...
0.684971
0
end class SockServer Deals one card from the deck and returns it.
public int dealCard() { if (currentPosition == 52) { shuffle(); } currentPosition++; return deck[currentPosition - 1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SpoonsCard dealCard() {\r\n\t SpoonsCard card = deck.get(0);\r\n\t deck.remove(0);\r\n\t return card;\r\n }", "public Card giveCard()\n {\n return deck.pop();\n }", "Card dealOneCard();", "public Card dealCard() {\n if (deck.size() == 52) {\n shuffle();\n }\n...
[ "0.7119232", "0.698251", "0.69448596", "0.6848154", "0.68423826", "0.6825143", "0.6677616", "0.658795", "0.65148234", "0.6495517", "0.6479364", "0.64643884", "0.6445194", "0.6439814", "0.64226866", "0.6383234", "0.6351687", "0.63065517", "0.62936753", "0.6270413", "0.6260331"...
0.64511657
12
Put all the used cards back into the deck, and shuffle it into a random order.
public void shuffle() { for (int i = 51; i > 0; i--) { int rand = (int) (Math.random() * (i + 1)); int temp = deck[i]; deck[i] = deck[rand]; deck[rand] = temp; } currentPosition = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new Hash...
[ "0.8765586", "0.8492031", "0.84776497", "0.84619707", "0.8458469", "0.8384757", "0.8369812", "0.8341067", "0.83247006", "0.8301173", "0.8260168", "0.8241917", "0.8227269", "0.81834745", "0.81754583", "0.8136332", "0.81283534", "0.8106436", "0.8106436", "0.8100967", "0.8093403...
0.8113794
17
Get the card from the hand in given position, where positions are numbered starting from 0. If the specified position is not the position number of a card in the hand, then null is returned.
public int getCard(List<Integer> hand2, int position) { if (position >= 0 && position < hand2.size()) { return ((Integer) hand2.get(position)).intValue(); } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card getCardAtLocation(int index)\n {\n if (index < cards.size())\n return cards.get(index);\n \n return null;\n }", "public Card getCard(int index)\n {\n if( index <0 || index >=52)\n return null;\n\n return cardAry[index];\n }", "pub...
[ "0.682208", "0.6818561", "0.6783664", "0.67514026", "0.6601301", "0.65880096", "0.6558393", "0.64591", "0.63161224", "0.629008", "0.62587076", "0.62457883", "0.6225562", "0.6135522", "0.6092926", "0.6076122", "0.60471815", "0.6045378", "0.604025", "0.6018609", "0.6005648", ...
0.7051117
0
Returns the value of this hand for the game of Blackjack.
public int value(List<Integer> hand) { int val; // The value computed for the hand. boolean ace; // This will be set to true if the // hand contains an ace. int cards; // Number of cards in the hand. val = 0; ace = false; cards = hand.size(); for (int i = 0; i < cards; i++) { // Add the value of the i-th card in the hand. int card; // The i-th card; int cardVal; // The blackjack value of the i-th card. card = getCard(hand, i); cardVal = getCardValue(card); // The normal value, 1 to 13. if (cardVal > 10) { cardVal = 10; // For a Jack, Queen, or King. } if (cardVal == 1) { ace = true; // There is at least one ace. } val = val + cardVal; } // Now, val is the value of the hand, counting any ace as 1. // If there is an ace, and if changing its value from 1 to // 11 would leave the score less than or equal to 21, // then do so by adding the extra 10 points to val. if (ace == true && val + 10 <= 21) { val = val + 10; } return val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int highCardVal()\n\t{\n\t\tint value = 0;\n\t\t\n\t\tfor (int i=0; i<MAX_CARDS; i++)\n\t\t\tvalue += hand[i].getValue();\n\t\t\n\t\treturn value;\n\t}", "public int handValue() {\n\t\tint val = 0;\n\t\tfor(Card card: hand) {\n\t\t\tval += card.getValue();\n\t\t}\n\t\tif(val > 21) {\n\t\t\tif(checkOverflo...
[ "0.7406923", "0.7285226", "0.72847325", "0.7119175", "0.7093305", "0.70311224", "0.6973622", "0.672227", "0.6717718", "0.662266", "0.6611051", "0.6588085", "0.65198725", "0.65174246", "0.6465884", "0.6440049", "0.64120436", "0.640451", "0.63977766", "0.6385371", "0.6378481", ...
0.6134612
73
Get the value of a card
public int getCardValue(int card) { int result = card; switch (card) { case 11: case 12: case 13: result = 10; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCardValue()\n {\n return cardValue; \n }", "public String getCardValue() {\n return Cvalue;\n }", "public int getValue() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id % 13 != 0)\n\t\t\tretu...
[ "0.77668285", "0.7532196", "0.7404529", "0.705111", "0.7023302", "0.70146215", "0.68234473", "0.6719529", "0.66910493", "0.6660307", "0.660301", "0.6589639", "0.65474296", "0.65474296", "0.6542858", "0.6509622", "0.6453708", "0.64497876", "0.6442957", "0.6421852", "0.64202887...
0.7451727
2
Returns the Card name
public String showCard(int card) { switch (card) { case 1: return "Ace"; case 2: return "2"; case 3: return "3"; case 4: return "4"; case 5: return "5"; case 6: return "6"; case 7: return "7"; case 8: return "8"; case 9: return "9"; case 10: return "10"; case 11: return "Jack"; case 12: return "Queen"; case 13: return "King"; default: return "??"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }", "public String getCardName() {\n \t\treturn cardName;\n \t}", "public String getCardName() {\r\n\t\treturn cardName;\r\n\t}", "public String getCardName()\n {\n String returnString = \"\";\n if(...
[ "0.8495821", "0.849481", "0.8364448", "0.79909897", "0.7575285", "0.7448833", "0.720942", "0.71898234", "0.7152458", "0.7073368", "0.69161963", "0.685923", "0.67665327", "0.66953874", "0.6676114", "0.66625047", "0.66625047", "0.66625047", "0.66625047", "0.66625047", "0.666250...
0.0
-1
Returns a table stats. requested.
public VoltTable[] run(String selector, long interval) throws VoltAbortException { VoltTable[] results; final long now = System.currentTimeMillis(); if ((selector.toUpperCase().equals(SysProcSelector.MEMORY.name())) || (selector.toUpperCase().equals("NODEMEMORY"))) { results = getMemoryData(interval, now); assert(results.length == 1); } else if (selector.toUpperCase().startsWith(SysProcSelector.TRANSACTION.name())) { results = getTransactionData(interval, now); } else if (selector.toUpperCase().equals(SysProcSelector.TABLE.name())) { results = getTableData(interval, now); } else if (selector.toUpperCase().equals(SysProcSelector.PROCEDURE.name())) { results = getProcedureData(interval, now); } else if (selector.toUpperCase().equals(SysProcSelector.PARTITIONCOUNT.name())) { results = getPartitionCountData(); } else if (selector.toUpperCase().equals(SysProcSelector.IOSTATS.name())) { results = getIOStatsData(interval, now); } else if (selector.toUpperCase().equals(SysProcSelector.MANAGEMENT.name())) { VoltTable[] memoryResults = getMemoryData(interval, now); VoltTable[] txnResults = getTransactionData(interval, now); VoltTable[] tableResults = getTableData(interval, now); VoltTable[] procedureResults = getProcedureData(interval, now); VoltTable[] initiatorResults = getInitiatorData(interval, now); VoltTable[] ioResults = getIOStatsData(interval, now); VoltTable[] starvationResults = getIOStatsData(interval, now); results = new VoltTable[] { memoryResults[0], txnResults[0], initiatorResults[0], procedureResults[0], ioResults[0], tableResults[0], starvationResults[0] }; final long endTime = System.currentTimeMillis(); final long delta = endTime - now; HOST_LOG.debug("Statistics invocation of MANAGEMENT selector took " + delta + " milliseconds"); } else { throw new VoltAbortException(String.format("Invalid Statistics selector %s.", selector)); } return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<String, Object> getStats();", "public ResultSet getStats() throws SQLException {\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString statsRecords_sql = \"SELECT * FROM \" + stats_table;\n\t\tconnection = connector.getConnection();\n\t\tstatement = connection.prepareStatement(statsR...
[ "0.6968313", "0.6824486", "0.6757962", "0.647443", "0.6352671", "0.6193713", "0.6163721", "0.61190563", "0.6088499", "0.6031085", "0.6010773", "0.600865", "0.6007942", "0.599999", "0.59987533", "0.5992967", "0.59910375", "0.5990575", "0.5990575", "0.5990575", "0.59696263", ...
0.0
-1
create a work fragment to gather node memory data
private VoltTable[] getMemoryData(long interval, final long now) { ParameterSet parameters = new ParameterSet(); parameters.setParameters((byte)interval, now); return this.executeOncePerSite(SysProcFragmentId.PF_nodeMemory, SysProcFragmentId.PF_nodeMemoryAggregator, parameters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MemoryPartition createMemoryPartition();", "void allocateWorker(Work work);", "void createGraphForMassiveLoad();", "private void createBlockDataTransfer(Code32 code, int opCode, int cond, int Rn, int regList, int W) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | opCode | (Rn << 16) | regList | (W <...
[ "0.59487975", "0.59217346", "0.5802717", "0.56095773", "0.5512975", "0.54356664", "0.5327449", "0.517639", "0.51705706", "0.5167523", "0.5074507", "0.50639427", "0.501524", "0.49593115", "0.49427417", "0.4941593", "0.49375102", "0.4923734", "0.49235588", "0.48911256", "0.4885...
0.50880575
10
create a work fragment to gather transaction counter data
private VoltTable[] getTransactionData(long interval, final long now) { ParameterSet parameters = new ParameterSet(); parameters.setParameters((byte)interval, now); return this.executeOncePerSite(SysProcFragmentId.PF_txnData, SysProcFragmentId.PF_txnDataAggregator, parameters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TransID beginTransaction()\n {\n\t //TransID tid = new TransID();\n\t Transaction collect_trans = new Transaction(this);\n\t atranslist.put(collect_trans);\n\t return collect_trans.getTid();\n }", "public TransactionsFragment() {\n }", "public void createCounters() {\n // COUNTERS CREATI...
[ "0.5453466", "0.5365372", "0.52429193", "0.5132253", "0.50593704", "0.50483525", "0.5045637", "0.4943273", "0.49164706", "0.4861369", "0.4858193", "0.4834827", "0.48167217", "0.48105896", "0.4803071", "0.4789666", "0.47862622", "0.4754303", "0.47458807", "0.4740125", "0.47357...
0.4487501
77
Creates new form AddOrderFrame
public AddOrderFrame() throws Exception { initComponents(); this.orderService = new OrderService(); this.loadProducts(new ProductService()); this.getSelectedProducts(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String args[]) {\n \n\t\tJFrame myframe = new JFrame(\"Main Page\"); // main frame\n myframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n myframe.setSize(800, 800);\n\n JPanel pane2 = new JPanel(); // create buttons in main frame \n JButton C...
[ "0.64054626", "0.62904865", "0.613692", "0.6014156", "0.5983239", "0.59827185", "0.59255165", "0.59251267", "0.5905153", "0.5900331", "0.58917767", "0.58677185", "0.58628374", "0.58422536", "0.5806042", "0.5790262", "0.57859564", "0.57819104", "0.57570404", "0.575156", "0.570...
0.7120801
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { txtName = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); lstProducts = new javax.swing.JList<>(); jLabel2 = new javax.swing.JLabel(); btnSaveOrder = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setText("Name"); lstProducts.setModel(new javax.swing.AbstractListModel<String>() { String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; public int getSize() { return strings.length; } public String getElementAt(int i) { return strings[i]; } }); jScrollPane1.setViewportView(lstProducts); jLabel2.setText("Choose products"); btnSaveOrder.setText("Save"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addGap(18, 18, 18) .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel2) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 323, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnSaveOrder)) .addContainerGap(119, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(34, 34, 34) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(btnSaveOrder) .addContainerGap(44, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73192346", "0.7290526", "0.7290526", "0.7290526", "0.7285891", "0.72480357", "0.7213616", "0.7207808", "0.71955067", "0.71891475", "0.71844363", "0.7159038", "0.71474695", "0.7092269", "0.7079923", "0.70560205", "0.69864315", "0.697697", "0.69552195", "0.6953691", "0.69458...
0.0
-1
Created by deepak on 12/15/14.
public interface SearchDAO { public void insert(String keyWord, Book book); public List<Long> getMatchingBooks(String keyword); public void removeBook(long id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "@Overri...
[ "0.5856917", "0.5812975", "0.570082", "0.5671828", "0.5663034", "0.56451064", "0.5619356", "0.55944276", "0.5588002", "0.5588002", "0.5561003", "0.5561003", "0.5561003", "0.5561003", "0.5561003", "0.55491126", "0.5547273", "0.5544264", "0.55376357", "0.55291575", "0.5522021",...
0.0
-1
/ Fetch the Latitude & Longitude values from the text files in to appropriate Maps. This will be done only once.
protected void activate(ComponentContext ctxt) { BundleContext bContext = ctxt.getBundleContext(); this.deleteButtonMousePressedImagePath = bContext.getBundle().getResource( DELETE_BUTTON_MOUSE_PRESSED_IMAGE_FILE_PATH); ParameterTable.setDeleteButtonMousePressedImageFile(deleteButtonMousePressedImagePath); this.deleteButtonNormalStateImagePath = bContext.getBundle().getResource( DELETE_BUTTON_NORMAL_STATE_IMAGE_FILE_PATH); ParameterTable.setDeleteButtonNormalStateImageFile(deleteButtonNormalStateImagePath); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void readLocations() throws ProgressionException\n\t{\n\t\t//File file = GeoDis_GUI.inputfile;\n\t\t//infilename = file.getPath();\n\t\t//System.err.println(file.getPath());\n\t\t//infile = new TextInputStream(file.getPath());\n\t\tlogfile.print(\"\\nReading geographical locations ...\");\n\t\tinfile...
[ "0.6711289", "0.6207944", "0.59979427", "0.59726584", "0.59726566", "0.59235626", "0.5810249", "0.57775736", "0.57174146", "0.56100655", "0.5609592", "0.5587817", "0.55632454", "0.55587226", "0.55335927", "0.5531478", "0.5528012", "0.551641", "0.5417091", "0.54151654", "0.540...
0.0
-1
Elasticsearch create,delete,index,update basic template Provide create template method.
public interface ElasticsearchTemplate { /** * Logback logger. */ final static Logger logger = LoggerFactory.getLogger(ElasticsearchTemplate.class); /** * Constant prefix. */ final String PREFIX = "_"; /** * Constant default doc type for default _doc. */ final String DEFAULT_DOC = "_doc"; /** * Constant retry on conflict for default three times. */ final Integer RETRY_ON_CONFLICT = 3; /** * Constant elasticsearch template doc as upsert for default true. */ final Boolean DOC_AS_UPSERT = true; /** * Constant elasticsearch template doc basic system properties. */ final String [] templateProperties = { "index", "id", "type" }; /** * Judge current elasticsearch template whether exists. * @return no exists. */ default Boolean isEmpty(){ return builder().length() == 0; } ThreadLocal<StringBuilder> templateBuilder = new ThreadLocal<>(); /** * Build or Reset current elasticsearch template. */ default void refactoring() { templateBuilder.set(new StringBuilder()); } /** * Get current elasticsearch template. * @return current elasticsearch template. */ default StringBuilder builder() { return templateBuilder.get(); } /** * Construct a elasticsearch template basic system properties. * @param indexType Current elasticsearch index type. * @param templateProperty Current elasticsearch template property. * @param <T> Serializable. */ default <T> void constructTemplate(ElasticsearchIndexType indexType, T templateProperty){ builder().append(String.format("{\"%s\":", indexType.getDisplayName())); java.lang.Class<?> templatePropertyClass = templateProperty.getClass(); java.lang.invoke.MethodHandles.Lookup lookup = MethodHandles.lookup(); try { for (String templateProp : templateProperties) { VarHandle varHandle = lookup.findVarHandle(templatePropertyClass, PREFIX + templateProp, String.class); Object value = varHandle.get(templateProperty); if(StringUtils.isEmpty(value)){ if(templateProp.equals("type")){ value = PREFIX + DEFAULT_DOC; }else if(templateProp.equals("id")){ value = UUID.randomUUID().toString(); } } if(!StringUtils.isEmpty(value)){ builder().append(String.format("\"%s%s\":\"%s\"", PREFIX, templateProp, value)); } } } catch (IllegalAccessException e) { e.printStackTrace(); } catch (NoSuchFieldException e) { e.printStackTrace(); } builder().append("}"); } /** * Construct a elasticsearch template basic system properties. * @param indexType Current elasticsearch index type. * @param indexName Current elasticsearch template property. * @param docId Current elasticsearch template doc id. * @param <T> Serializable. */ default <T> void constructTemplate(ElasticsearchIndexType indexType, String indexName, String docId){ builder().append(String.format("{\"%s\":{\"_index\":\"%s\",\"_id\":\"%s\",\"_type\":\"_doc\",\"_retry_on_conflict\":%d}}", indexType.getDisplayName(), indexName, docId, RETRY_ON_CONFLICT)); } /** * Append property of Current Elasticsearch index to String builder. * @param propertyName property Name. * @param propertyValue property Value. */ default void append(String propertyName, Object propertyValue){ builder().append(String.format("\"%s\":\"%s\"",propertyName, URLDecoder.decode(URLEncoder.encode(propertyValue.toString(), Charset.forName("UTF-8")), Charset.forName("UTF-8")).replace("%0A", ""))); } /** * Append current template properties of Current Elasticsearch index to String builder. * @param cursor a query cursor. * @param templateProperties current template properties. */ default void append(QueryCursor cursor, String... templateProperties){ int i = 0, len = templateProperties.length; for (; i < len; i++) { String propertyName = templateProperties[i]; String value = null; try { value = cursor.getString(propertyName); }catch (Throwable t){ logger.error("according column name to result set to get column value find a fail, {}", t); } if(StringUtils.isEmpty(value)){ value = ""; } append(propertyName, value); builder().append(","); } } /** * According query cursor and index name and template properties to created a elasticsearch template. * @param cursor a query cursor. * @param indexName Current index name. * @param templateProperties Current template properties. * @throws SQLException Throw SQL exception. */ void create(QueryCursor cursor, String indexName, String... templateProperties) throws SQLException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(QueryCursor cursor, String indexName, String... templateProperties) throws SQLException;", "default <T> void constructTemplate(ElasticsearchIndexType indexType, T templateProperty){\n builder().append(String.format(\"{\\\"%s\\\":\", indexType.getDisplayName()));\n java.lang.Class<?> tem...
[ "0.66979647", "0.6218152", "0.6199662", "0.6150269", "0.6089592", "0.60375214", "0.60291326", "0.592756", "0.5797203", "0.5783556", "0.56175023", "0.55915505", "0.55829686", "0.55806464", "0.55016506", "0.5457612", "0.5441306", "0.5435096", "0.53993064", "0.53557694", "0.5332...
0.69418013
0
Judge current elasticsearch template whether exists.
default Boolean isEmpty(){ return builder().length() == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ElasticsearchTemplate {\n\n /**\n * Logback logger.\n */\n final static Logger logger = LoggerFactory.getLogger(ElasticsearchTemplate.class);\n\n /**\n * Constant prefix.\n */\n final String PREFIX = \"_\";\n\n /**\n * Constant default doc type for default _doc.\...
[ "0.6337434", "0.62823445", "0.61998", "0.6170551", "0.5994156", "0.5986907", "0.59061384", "0.58814275", "0.5715847", "0.5669856", "0.5581845", "0.5578512", "0.5556063", "0.5555257", "0.5555136", "0.552561", "0.5463759", "0.5458824", "0.53899086", "0.538383", "0.53757393", ...
0.0
-1
Build or Reset current elasticsearch template.
default void refactoring() { templateBuilder.set(new StringBuilder()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ElasticsearchTemplate {\n\n /**\n * Logback logger.\n */\n final static Logger logger = LoggerFactory.getLogger(ElasticsearchTemplate.class);\n\n /**\n * Constant prefix.\n */\n final String PREFIX = \"_\";\n\n /**\n * Constant default doc type for default _doc.\...
[ "0.7232321", "0.6132385", "0.60582453", "0.54728407", "0.5399925", "0.5372385", "0.5346865", "0.53095174", "0.5181714", "0.4942357", "0.49275944", "0.48834917", "0.48754254", "0.484472", "0.48185825", "0.48108578", "0.48038077", "0.47729394", "0.47571182", "0.4753274", "0.475...
0.5317251
7
Get current elasticsearch template.
default StringBuilder builder() { return templateBuilder.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTemplate();", "public interface ElasticsearchTemplate {\n\n /**\n * Logback logger.\n */\n final static Logger logger = LoggerFactory.getLogger(ElasticsearchTemplate.class);\n\n /**\n * Constant prefix.\n */\n final String PREFIX = \"_\";\n\n /**\n * Constant default ...
[ "0.665518", "0.6575539", "0.6375065", "0.6168518", "0.6163981", "0.61549366", "0.61374485", "0.6105595", "0.60913473", "0.60713893", "0.6010003", "0.6009354", "0.5995624", "0.5987551", "0.5957954", "0.5938688", "0.5924273", "0.58404857", "0.58255446", "0.57896096", "0.5766694...
0.0
-1
Construct a elasticsearch template basic system properties.
default <T> void constructTemplate(ElasticsearchIndexType indexType, T templateProperty){ builder().append(String.format("{\"%s\":", indexType.getDisplayName())); java.lang.Class<?> templatePropertyClass = templateProperty.getClass(); java.lang.invoke.MethodHandles.Lookup lookup = MethodHandles.lookup(); try { for (String templateProp : templateProperties) { VarHandle varHandle = lookup.findVarHandle(templatePropertyClass, PREFIX + templateProp, String.class); Object value = varHandle.get(templateProperty); if(StringUtils.isEmpty(value)){ if(templateProp.equals("type")){ value = PREFIX + DEFAULT_DOC; }else if(templateProp.equals("id")){ value = UUID.randomUUID().toString(); } } if(!StringUtils.isEmpty(value)){ builder().append(String.format("\"%s%s\":\"%s\"", PREFIX, templateProp, value)); } } } catch (IllegalAccessException e) { e.printStackTrace(); } catch (NoSuchFieldException e) { e.printStackTrace(); } builder().append("}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ElasticsearchTemplate {\n\n /**\n * Logback logger.\n */\n final static Logger logger = LoggerFactory.getLogger(ElasticsearchTemplate.class);\n\n /**\n * Constant prefix.\n */\n final String PREFIX = \"_\";\n\n /**\n * Constant default doc type for default _doc.\...
[ "0.64144766", "0.6015844", "0.57684904", "0.555305", "0.5438931", "0.53464305", "0.53116155", "0.52905434", "0.52713215", "0.5230059", "0.5227433", "0.51722866", "0.5089301", "0.5075263", "0.50732493", "0.50584817", "0.5044592", "0.500927", "0.4998475", "0.4964822", "0.496034...
0.72094077
0
Construct a elasticsearch template basic system properties.
default <T> void constructTemplate(ElasticsearchIndexType indexType, String indexName, String docId){ builder().append(String.format("{\"%s\":{\"_index\":\"%s\",\"_id\":\"%s\",\"_type\":\"_doc\",\"_retry_on_conflict\":%d}}", indexType.getDisplayName(), indexName, docId, RETRY_ON_CONFLICT)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default <T> void constructTemplate(ElasticsearchIndexType indexType, T templateProperty){\n builder().append(String.format(\"{\\\"%s\\\":\", indexType.getDisplayName()));\n java.lang.Class<?> templatePropertyClass = templateProperty.getClass();\n java.lang.invoke.MethodHandles.Lookup lookup = ...
[ "0.72094077", "0.64144766", "0.6015844", "0.57684904", "0.555305", "0.53464305", "0.53116155", "0.52905434", "0.52713215", "0.5230059", "0.5227433", "0.51722866", "0.5089301", "0.5075263", "0.50732493", "0.50584817", "0.5044592", "0.500927", "0.4998475", "0.4964822", "0.49603...
0.5438931
5
Append property of Current Elasticsearch index to String builder.
default void append(String propertyName, Object propertyValue){ builder().append(String.format("\"%s\":\"%s\"",propertyName, URLDecoder.decode(URLEncoder.encode(propertyValue.toString(), Charset.forName("UTF-8")), Charset.forName("UTF-8")).replace("%0A", ""))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\r\n return TextFormat.getInstance(Index.class).formatToString(this);\r\n }", "public org.apache.calcite.avatica.proto.Responses.DatabasePropertyElement.Builder addPropsBuilder(\n int index) {\n return getPropsFieldBuilder().addBuilder(\n index, org....
[ "0.59263283", "0.57391334", "0.564885", "0.5534072", "0.5521891", "0.5521891", "0.5521891", "0.5521891", "0.5521891", "0.55052364", "0.55052364", "0.55052364", "0.5392075", "0.53905064", "0.538842", "0.5378925", "0.5370665", "0.53638273", "0.5309359", "0.5291089", "0.5284485"...
0.0
-1
Append current template properties of Current Elasticsearch index to String builder.
default void append(QueryCursor cursor, String... templateProperties){ int i = 0, len = templateProperties.length; for (; i < len; i++) { String propertyName = templateProperties[i]; String value = null; try { value = cursor.getString(propertyName); }catch (Throwable t){ logger.error("according column name to result set to get column value find a fail, {}", t); } if(StringUtils.isEmpty(value)){ value = ""; } append(propertyName, value); builder().append(","); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default <T> void constructTemplate(ElasticsearchIndexType indexType, T templateProperty){\n builder().append(String.format(\"{\\\"%s\\\":\", indexType.getDisplayName()));\n java.lang.Class<?> templatePropertyClass = templateProperty.getClass();\n java.lang.invoke.MethodHandles.Lookup lookup = ...
[ "0.6761366", "0.6401465", "0.6127981", "0.6044015", "0.5367192", "0.52489144", "0.52143544", "0.52120835", "0.5151202", "0.5129426", "0.50204414", "0.49304676", "0.4907496", "0.48056668", "0.48014784", "0.4796261", "0.4793396", "0.47645068", "0.47567618", "0.47326252", "0.472...
0.45063055
41
According query cursor and index name and template properties to created a elasticsearch template.
void create(QueryCursor cursor, String indexName, String... templateProperties) throws SQLException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default <T> void constructTemplate(ElasticsearchIndexType indexType, T templateProperty){\n builder().append(String.format(\"{\\\"%s\\\":\", indexType.getDisplayName()));\n java.lang.Class<?> templatePropertyClass = templateProperty.getClass();\n java.lang.invoke.MethodHandles.Lookup lookup = ...
[ "0.71634954", "0.7060126", "0.6644985", "0.58739763", "0.57466567", "0.5659182", "0.557471", "0.5423217", "0.53579235", "0.53466576", "0.52876115", "0.5270962", "0.5236606", "0.51827365", "0.5156643", "0.5139981", "0.5138704", "0.51324034", "0.50548536", "0.50518286", "0.5040...
0.80213165
0
Passing Data To New Activity Using Bundle
private void BundleData(Intent intent) { bundle=new Bundle(); bundle.putString("FNAME",fname); bundle.putString("LNAME",lname); bundle.putString("LOCALITY",locality); bundle.putString("CITY",city); bundle.putInt("PINCODE",pincode); bundle.putString("TIME_TO_CALL",timers); bundle.putString("PHONE",phone); bundle.putString("ALTPHONE",altphone); bundle.putString("EMAIL",emailid); intent.putExtras(bundle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n Intent myIntent = new Intent(DriverPrefrActivity.this, SearchParkActivity.class);\n //Creating a bundle\n Bundle bundle = new Bundle();\n //Adding values to bundle\n bundle.putString...
[ "0.73469716", "0.7055243", "0.6844033", "0.6821715", "0.67566526", "0.662919", "0.6619268", "0.6614082", "0.64876825", "0.6459636", "0.6442739", "0.64140046", "0.6412474", "0.63955086", "0.637001", "0.63693374", "0.6362234", "0.634538", "0.6307893", "0.62969095", "0.6280954",...
0.72859
1
Main HTTP Service requests POST method
@SuppressLint("HandlerLeak") public void constructConnectionAndHitPOST(final String successMessage, final String startingMessage, final List<NameValuePair> paramsList, final Object managerObject, final String classString, final String serviceName, final String loginOrAuth) { { final Handler handler = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); switch (msg.what) { case HttpConnection.DID_START: Log.d("Request", startingMessage); break; case 200: Log.d("Response Recieved", successMessage); handleFinishResponse(); break; case 401: Log.d("Username does not exists or Invalid password", "401"); handleFailResponse("Access denied. Please login"); break; case 400: Log.d("Please check your internet connection.", "400"); handleFailResponse("Something went wrong. Please try again."); break; case 500: Log.d("Something went wrong. Please try again later", "500"); handleFailResponse("Something went wrong. Please try again later"); break; } } }; final HttpConnection connection = new HttpConnection(handler); final StringBuilder builder = new StringBuilder(); // ------------------- Construct Service Url ------------------// if (loginOrAuth.equalsIgnoreCase(Constants.SERVER_URL_AUTH)) { builder.append(Constants.SERVER_URL_AUTH); } else { builder.append(Constants.SERVER_URL); } final String httpRequestUrl = builder.toString(); connection.post(httpRequestUrl, paramsList); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String post();", "public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }", "@Override\n public String getMethod() {\n return \"POST\";\n }", "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n ...
[ "0.6990122", "0.687731", "0.68590254", "0.68429214", "0.6781991", "0.66770923", "0.664039", "0.6605113", "0.65824944", "0.6580691", "0.654284", "0.65185493", "0.6498211", "0.64890367", "0.6480405", "0.6447213", "0.640817", "0.6357779", "0.6345753", "0.63414705", "0.6328044", ...
0.0
-1
TODO: It seems Springdoc could not handle OpenAPI document generation for the object type inputs. Need to figure it out and fix
@Operation(description = "Lists all genome sequencing projects.") @GetMapping(value = "/projects", produces = APPLICATION_JSON_VALUE) public Page<Project> getAllProjects(ProjectSpec projectSpec, Pageable pageable) { return repository.findAll(projectSpec, pageable); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "springfox.documentation.schema.Model create(ModelContext context);", "InputObjectTypeDefinition createInputObjectTypeDefinition();", "@Service(name = \"CustomerService\")\n@OpenlegacyDesigntime(editor = \"WebServiceEditor\")\npublic interface CustomerServiceService {\n\n public CustomerServiceOut getCustome...
[ "0.6759293", "0.6287197", "0.62112755", "0.612325", "0.6100771", "0.59618795", "0.594483", "0.59213865", "0.59123224", "0.577995", "0.5674948", "0.56595355", "0.5627156", "0.55698603", "0.55698603", "0.5494936", "0.54880345", "0.54880345", "0.54880345", "0.5462898", "0.543406...
0.0
-1
Launch the google URL in the browser
@Test @WebTest public void DemoTest1() throws InterruptedException { Grid.driver().get("http://www.google.com/"); TextField field = new TextField("id=lst-ib"); //Thread will wait until TextFiled element present in the browser WebDriverWaitUtils.waitUntilElementIsPresent(field.getLocator()); //Search for the string 'SeLion' in the text box field.type("Selenium\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }", "public void openUrlInBrowser(String URL) {}", "private void openUrl() throws IOExcepti...
[ "0.7323991", "0.7245591", "0.71191615", "0.6983017", "0.6909098", "0.686056", "0.6805561", "0.6799585", "0.67630196", "0.673001", "0.6710209", "0.6624031", "0.660287", "0.65603495", "0.6558193", "0.655295", "0.65410686", "0.6512496", "0.64950126", "0.64879584", "0.64843655", ...
0.0
-1
Creates an MQLResult object and calls parse()
public MQLResult(JSONArray book_results, JSONArray organization_results){ this.book_results = book_results; this.organization_results = organization_results; parse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "ArrayList<Map<String,Object>> parseQueryResult(Object result) { return null;}", "public static Result fromXMLElement(String query, XMLElement resultElement){\n\t\tResult result = new Result();\n\t\t\n\t\t/* Set query. */\n\t\tresult.query = query;\n\t\t...
[ "0.6305668", "0.61621785", "0.612366", "0.5776478", "0.55425864", "0.54049706", "0.53625673", "0.53584635", "0.53373504", "0.53373504", "0.53019565", "0.52989775", "0.5292161", "0.52093333", "0.5202141", "0.51975703", "0.51852983", "0.51758796", "0.5169715", "0.51487184", "0....
0.53140146
10
Sorts through the two JSONArrays. Extracts the person's name and creates a Role object with their name and job (author or businessperson) Consolidates all these matchings of Role and the thing they created into mql_map
private void parse(){ for (Object res : book_results){ String author = JsonPath.read(res,"$.name").toString(); Role role = new Role(author, "Author"); List<String> books = JsonPath.read(res,"$./book/author/works_written[*].a:name"); mql_map.put(role, books); } for (Object res : organization_results){ String businessperson = JsonPath.read(res,"$.name").toString(); Role role = new Role(businessperson, "Businessperson"); List<String> organizations = JsonPath.read(res,"$./organization/organization_founder/organizations_founded[*].a:name"); mql_map.put(role, organizations); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sortByLastName() { \n\t\t\n\t\tint numAccounts = size;\n\t\tString firstHolder_lname;\n\t\tString secondHolder_lname;\n\t\t\n\t\tfor (int i = 0; i < numAccounts-1; i++) {\n\t\t\t\n\t\t\t\n\t\t\tint min_idx = i;\n\t\t\t\n\t\t\t\n\t\t\tfor (int j = i+1; j < numAccounts; j++) {\n\t\t\t\t\n\t\t\t\t// Retr...
[ "0.50838035", "0.4980719", "0.49787527", "0.49279475", "0.49262375", "0.48645812", "0.48461086", "0.47439715", "0.47274438", "0.4667264", "0.46572137", "0.4649998", "0.4638654", "0.46280387", "0.46217632", "0.4612417", "0.45946667", "0.45216474", "0.45196772", "0.45190692", "...
0.6367021
0
return the map MQLMap
public Map getMQLMap(){ return this.mql_map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map queryForMap(String sql) {\n\t\treturn this.baseDaoSupport.queryForMap(sql);\n\t}", "public MultiValueMap<String, String> getMap() {\r\n\t\tMultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();\r\n\t\t\r\n\t\tif(this.country != null) \t\tmap.add(\"country\", this.g...
[ "0.6766886", "0.67311716", "0.6654924", "0.6619647", "0.653218", "0.6526581", "0.6526581", "0.6491747", "0.64582074", "0.6397111", "0.63866997", "0.63850003", "0.6381695", "0.6375291", "0.6374278", "0.6362988", "0.6361681", "0.63603956", "0.63367593", "0.6297127", "0.62966615...
0.8289718
0
callback method to detect whether fragment is visible to user.
@Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); if (isVisibleToUser) { if (getMapRef() == null) { Handler handler = new Handler(); handler.postDelayed(new Runnable() { public void run() { if (getMapRef() != null) { focus(); } } }, 500); if (getMapRef() != null) { focus(); } } else { focus(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getIsVisible()\n\t{\n\t\tif (getParentFragment() != null && getParentFragment() instanceof BaseFragment)\n\t\t{\n\t\t\treturn isVisible() && ((BaseFragment) getParentFragment()).getIsVisible();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn isVisible();\n\t\t}\n\t}", "public interface FragmentVisibility {\...
[ "0.72043526", "0.68084663", "0.64217544", "0.63993853", "0.63993853", "0.6352166", "0.6352166", "0.6337089", "0.63290995", "0.6323425", "0.6323425", "0.6323425", "0.63187146", "0.62966996", "0.6294445", "0.6245493", "0.62157685", "0.62107617", "0.6207984", "0.6192274", "0.619...
0.0
-1
position and zoom map to show current hazard under review
private void focus() { getMapRef().animateCamera(CameraUpdateFactory.newLatLngZoom( newHazard.getLatLong(), FOCUS_ZOOM)); switch (newHazard.getTitle()) { case "Road Works" : getMapRef().addMarker(new MarkerOptions() .position(newHazard.getLatLong()) .flat(true) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_warning_orange_24dp))); break; case "Pothole" : getMapRef().addMarker(new MarkerOptions() .position(newHazard.getLatLong()) .flat(true) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_move_to_inbox_orange_24dp))); break; case "Road Closure" : getMapRef().addMarker(new MarkerOptions() .position(newHazard.getLatLong()) .flat(true) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_directions_car_orange_24dp))); break; case "Flooding" : getMapRef().addMarker(new MarkerOptions() .position(newHazard.getLatLong()) .flat(true) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_pool_orange_24dp))); break; case "Traffic Accident" : getMapRef().addMarker(new MarkerOptions() .position(newHazard.getLatLong()) .flat(true) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_directions_car_orange_24dp))); break; case "Broken Glass" : getMapRef().addMarker(new MarkerOptions() .position(newHazard.getLatLong()) .flat(true) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_local_bar_orange_24dp))); break; default : getMapRef().addMarker(new MarkerOptions() .position(newHazard.getLatLong()) .flat(true) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_error_orange_24dp))); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCameraMove() {\n zoom = GMap.getCameraPosition().zoom;\n if(zoom >= 17.2f){\n map_label.setVisible(true);\n mapOverlay.setVisible(false);\n }\n else{\n map_label.setVisible(false);\n mapOverlay.setVisible(true);\n ...
[ "0.6430594", "0.61818475", "0.61644965", "0.61139065", "0.6033716", "0.60165286", "0.5990727", "0.59523445", "0.58970284", "0.5870724", "0.5858267", "0.58580256", "0.5852735", "0.5850674", "0.5848089", "0.58248806", "0.5793527", "0.57915187", "0.57737005", "0.5752036", "0.574...
0.61846215
1
return hazard description entered by user
public String getDescription() { EditText descriptionField = (EditText) rootView.findViewById(R.id.hazard_description); return descriptionField.getText().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getDisplay_description();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String ...
[ "0.667442", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0.6507078", "0...
0.74284863
0
TODO Autogenerated method stub
@Override public void addListener(ILabelProviderListener listener) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void dispose() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public boolean isLabelProperty(Object element, String property) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void removeListener(ILabelProviderListener listener) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public Image getColumnImage(Object element, int columnIndex) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0...
0.0
-1
Funcion que convierte el objeto DomicilioTipoBean en TRPEALTADOMICEVTY
public TRPEALTADOMICEVTY wrappAltaDomicilio(DomicilioTipoBean domicilio){ Mapper mapper = dozerBeanMapper; return mapper.map(domicilio, TRPEALTADOMICEVTY.class,"altaDomicilioPersona"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setTipo() {\n if (getNumElementos() <= 0) {\n restartCelda();\n } else if (getNumElementos() > 1) { // Queda más de un elemento\n this.setTipoCelda(Juego.TVARIOS);\n } else { // Si queda solo un tipo de elemento, miramos si es un CR, edificio o un personaje\n...
[ "0.6186048", "0.61473405", "0.6015945", "0.58415616", "0.58415616", "0.57238835", "0.56942314", "0.5683771", "0.56662494", "0.5665992", "0.565051", "0.563823", "0.5542521", "0.5527856", "0.5504809", "0.5494259", "0.5471334", "0.547009", "0.5463751", "0.5463751", "0.5445039", ...
0.7083709
0
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79046476", "0.7805623", "0.7766615", "0.77274555", "0.7632045", "0.76220745", "0.75848633", "0.7531134", "0.74884325", "0.74575055", "0.74575055", "0.74388313", "0.74218154", "0.7403308", "0.7391667", "0.7386889", "0.73792624", "0.73705244", "0.7362704", "0.7355958", "0.73...
0.0
-1
TODO Autogenerated method stub
public CAdxWebServiceXmlCC getCAdxWebServiceXmlCC() throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public CAdxWebServiceXmlCC getCAdxWebServiceXmlCC(URL portAddress) throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public String getCAdxWebServiceXmlCCAddress() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public Call createCall() throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public Call createCall(QName arg0) throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public Call createCall(QName arg0, QName arg1) throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public Call createCall(QName arg0, String arg1) throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public Call[] getCalls(QName arg0) throws ServiceException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public HandlerRegistry getHandlerRegistry() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1