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
zeroing out the values above and below the pivot
public static void zeroOutValuesAboveAndBelowThePivot(float[][] matrix, int column, int dimension){ float zeroValue; // the coefficient that we want to 0 out for (int i = 0; i <dimension; i++){ if (column == i){ // if we are in the same row as the pivot, skip (because we don't want to zero out the pivot) continue;} zeroValue = matrix[i][column]; System.out.print("Replacing row" + (i+1) + " with row" + (i+1) + " - " + Math.round(zeroValue*1000)/1000.0d + "*" + "row" + (column+1) + " to give us:\n\n"); for (int j = 0; j <= dimension; j++){ matrix[i][j] -= zeroValue*matrix[column][j];} printMatrix(matrix, dimension); } // doing operations on the whole row }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int getPivot(int left, int right) {\n\t\treturn (left+right)/2;\n\t}", "protected void pivot() {\n\t\twhile (seenColor != ev3.SUIVRE && c < 10) {\n\t\t\tif (first) {// on indique la futur direction pour tourne que la\n\t\t\t\t\t\t// premiere fois\n\t\t\t\tc = lastC % 2;// on recuperere la derniere...
[ "0.5319276", "0.5301632", "0.52926373", "0.5253565", "0.5236052", "0.52118933", "0.5157639", "0.51568246", "0.51560664", "0.50840497", "0.50470376", "0.501451", "0.5008219", "0.49830046", "0.49643847", "0.49540523", "0.49300975", "0.49282306", "0.4915142", "0.4868144", "0.486...
0.6292645
0
do all necessary row operations to complete all steps on one column
public static void solveColumn(float[][] matrix, int column, int dimension){ System.out.print("Working on column " + (column+1) + " now\n\n"); checkPivot(matrix, column, dimension); // make sure the entry where we want the pivot is non-zero divideRow(matrix, column, dimension); // divide the row by the value we want to make a pivot zeroOutValuesAboveAndBelowThePivot(matrix, column, dimension); // zero'ing out everything about and below the pivot }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void populateDynamicCells(int resultsRow) {\n }", "private void transformRows() {\n this.rowCounts = this.rowDeduplicator.values().toIntArray();\n }", "public void doStep() {\n\t\ttry {\n\t\t\tLifeMatrix newMatrix = new LifeMatrix(_numRows, _numColumns);\n\t\t\tfor (int row=0; row<_numRo...
[ "0.5806786", "0.57867146", "0.5702131", "0.5677117", "0.56665146", "0.5665352", "0.564499", "0.5643232", "0.5640282", "0.55724794", "0.55243057", "0.55040187", "0.5470449", "0.54140735", "0.541286", "0.5334739", "0.53167003", "0.5299382", "0.5250529", "0.52478737", "0.522936"...
0.0
-1
System.out.println("==>"+new Throwable().getStackTrace()[0].getClassName()+" > "+new Throwable().getStackTrace()[0].getMethodName()); System.out.println("===>Line number: "+new Throwable().getStackTrace()[0].getLineNumber());
public static utilitys getInstance(){ return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String callMethodAndLine() {\n\t\tStackTraceElement thisMethodStack = (new Exception()).getStackTrace()[4];\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb\n.append(AT)\n\t\t\t\t.append(thisMethodStack.getClassName() + \".\")\n\t\t\t\t.append(thisMethodStack.getMethodName())\n\t\t\t\t.append(\"...
[ "0.745975", "0.7288372", "0.72656983", "0.7034198", "0.70005894", "0.69462967", "0.68141174", "0.6794273", "0.67307234", "0.66870004", "0.6644045", "0.6621258", "0.657511", "0.6554631", "0.655047", "0.6518469", "0.64963436", "0.6484845", "0.64710677", "0.64437026", "0.6422418...
0.0
-1
Returns a token upon successful login.
public ServerResponse submitLogin(LoginItem loginItem) throws ServerException { LoginXmlSerializer serializer = new LoginXmlSerializer(); String xmlData = serializer.objectToXml(loginItem); RestService service = new RestService(Config.TARGET_DOMAIN, xmlData, Config.SERVICE_PORT); String response = null; try{ String postUrl = Config.getSecureLoginURLforConnectionTest(); response = service.executePost(postUrl); } catch (Exception e){ throw new ServerException("Server error\n" + e.getMessage()); } ServerResponseXMLSerializer responseSerializer = new ServerResponseXMLSerializer(); ServerResponse serverResponse = new ServerResponse(); serverResponse.token = responseSerializer.getToken(response); return serverResponse; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AuthToken loginUser(){\n return null;\n }", "public LoginToken getLoginToken() {\n return loginToken;\n }", "public String getLoginToken() {\n return loginToken;\n }", "public String getToken();", "@Test\n public void cTestGetLoginToken() {\n token = given()\n...
[ "0.7431972", "0.734514", "0.73336", "0.6910068", "0.68510073", "0.68411064", "0.6833423", "0.68151575", "0.68121713", "0.6672384", "0.6619081", "0.6617666", "0.6617666", "0.6617666", "0.6617666", "0.6617666", "0.6617666", "0.65873086", "0.65508807", "0.653363", "0.65214175", ...
0.0
-1
MailDaemon md = new MailDaemon(); System.out.println("Mail"); md.setMailHost("10.253.65.14"); System.out.println(md.mailHost); md.setSubject("TEST"); md.setMessage("TEST"); System.out.println(md.message);
public static void main(String[] args) { try { MailDaemon.simpleSend("10.253.65.14", new String[]{"ralph.hodgson@pa.press.net"}, "ralph.hodgson@pa.press.net", "TEST", "TEST"); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getMailhost();", "public static void main(String[] args) throws AddressException, MessagingException, IOException {\n MonitoringMail mail = new MonitoringMail();\n mail.sendMail(TestConfig.server, TestConfig.from, TestConfig.to, TestConfig.subject, TestConfig.messageBody, TestConfig.attachmentPath...
[ "0.6675899", "0.64098436", "0.62788546", "0.6272377", "0.62495416", "0.62009704", "0.6123334", "0.6097635", "0.6083425", "0.60263914", "0.6004937", "0.5955348", "0.5952856", "0.59265", "0.59253114", "0.58757216", "0.5825059", "0.58205545", "0.57958925", "0.57914853", "0.57755...
0.65817964
1
Constructs this helperClasses.ListImages object
public ListImages(File directoryOfInterest, CentralController centralController) throws IOException { this.centralController = centralController; directory = directoryOfInterest; imagesInDirectory = new ArrayList<>(); allImagesUnderDirectory = new ArrayList<>(); // updates the imagesInDirectory list fillImagesInDirectory(); // updates the allImagesUnderDirectory list fillAllImagesUnderDirectory(directory); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageList() {\n\t\timageList = new ImageIcon[] { ImageList.BALLOON, ImageList.BANANA, ImageList.GENIE, ImageList.HAMSTER,\n\t\t\t\tImageList.HEART, ImageList.LION, ImageList.MONEY, ImageList.SMOOTHIE, ImageList.TREE, ImageList.TRUCK };\n\t}", "public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String...
[ "0.7522456", "0.7234399", "0.6887931", "0.6833843", "0.65952617", "0.6563624", "0.6559129", "0.65370756", "0.6531805", "0.6477041", "0.64540887", "0.64514273", "0.6442766", "0.6428296", "0.64199", "0.6408172", "0.6387006", "0.6370418", "0.636462", "0.631759", "0.63080055", ...
0.598153
48
Returns all images inside the directory including sub directories
public ArrayList<ImageFile> getAllImagesUnderDirectory() throws IOException { return allImagesUnderDirectory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<InputStream> getAllImages(){\n\t\treturn IOHandler.getResourcesIn(IMAGES_DIR);\n\t}", "public ArrayList<ImageFile> getImagesInDirectory() throws IOException {\n\n return imagesInDirectory;\n }", "private void fillImagesInDirectory() throws IOException {\n // get the list of all files ...
[ "0.76984495", "0.7675707", "0.732701", "0.7298585", "0.7141194", "0.70884603", "0.6999617", "0.6911958", "0.6821668", "0.6800525", "0.67931277", "0.6767247", "0.670807", "0.6703817", "0.6665634", "0.66545665", "0.6606171", "0.65891814", "0.64672476", "0.64127165", "0.6345037"...
0.83887464
0
Returns all images in the directory not considering subdirectories
public ArrayList<ImageFile> getImagesInDirectory() throws IOException { return imagesInDirectory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<ImageFile> getAllImagesUnderDirectory() throws IOException {\n return allImagesUnderDirectory;\n }", "public static List<InputStream> getAllImages(){\n\t\treturn IOHandler.getResourcesIn(IMAGES_DIR);\n\t}", "private static ArrayList<String> getImagesInFileSystem() {\n\t\t// get file list i...
[ "0.81187475", "0.7453991", "0.7192897", "0.71125233", "0.69569206", "0.6925639", "0.6834707", "0.683443", "0.6716072", "0.6596815", "0.6561458", "0.65110594", "0.64350474", "0.63970506", "0.6378593", "0.6359459", "0.63360065", "0.6286159", "0.62339944", "0.6233464", "0.619299...
0.73923934
2
idea from Returns true if the File file is an image
private boolean isImage(File file) throws IOException { if (!file.isFile()) { return false; } else if (ImageIO.read(file) == null) // if cannot be read by imageIO, then not image { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isImageType();", "private void isImage(MultipartFile file) {\n if(!Arrays.asList(IMAGE_JPEG.getMimeType(), IMAGE_PNG.getMimeType(), IMAGE_GIF.getMimeType(), IMAGE_BMP.getMimeType(), IMAGE_SVG.getMimeType()).contains(file.getContentType()))\n throw new IllegalStateException(\"File must b...
[ "0.79321057", "0.7875473", "0.7800246", "0.7379953", "0.73147", "0.7257706", "0.718502", "0.7085752", "0.67802286", "0.6753648", "0.6725081", "0.6632555", "0.65914714", "0.654003", "0.65396625", "0.6528686", "0.6517389", "0.64945585", "0.64634943", "0.6444076", "0.64341384", ...
0.8187062
0
Updates imagesInDirectory with all the imageFiles in directory
private void fillImagesInDirectory() throws IOException { // get the list of all files (including directories) in the directory of interest File[] fileArray = directory.listFiles(); assert fileArray != null; for (File file : fileArray) { // the file is an image, then add it if (isImage(file)) { ImageFile imageFile = new ImageFile(file.getAbsolutePath()); // if the image is already saved, reuse it if (centralController.getImageFileController().hasImageFile(imageFile)) { imagesInDirectory.add(centralController.getImageFileController().getImageFile(imageFile)); } else { imagesInDirectory.add(imageFile); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void fillAllImagesUnderDirectory(File directory) throws IOException {\n // get the list of all files (including directories) in the directory of interest\n File[] fileArray = directory.listFiles();\n assert fileArray != null;\n\n for (File file : fileArray) {\n // if the file is an image, ...
[ "0.77395254", "0.73937416", "0.7310977", "0.71718806", "0.69413006", "0.68892825", "0.6562517", "0.65044665", "0.63955027", "0.62287384", "0.612646", "0.5886662", "0.57589346", "0.57460743", "0.57246864", "0.5724667", "0.57209796", "0.5659538", "0.56417865", "0.5574104", "0.5...
0.82061785
0
Updates allImagesUnderDirectory with all the imageFiles under directory including sub directories
private void fillAllImagesUnderDirectory(File directory) throws IOException { // get the list of all files (including directories) in the directory of interest File[] fileArray = directory.listFiles(); assert fileArray != null; for (File file : fileArray) { // if the file is an image, then add it if (isImage(file)) { ImageFile imageFile = new ImageFile(file.getAbsolutePath()); // if the image is already saved, reuse it if (centralController.getImageFileController().hasImageFile(imageFile)) { allImagesUnderDirectory .add(centralController.getImageFileController().getImageFile(imageFile)); } else if (imagesInDirectory.contains(imageFile)) { allImagesUnderDirectory.add(imagesInDirectory.get(imagesInDirectory.indexOf(imageFile))); } else { allImagesUnderDirectory.add(imageFile); } } else if (file.isDirectory()) { fillAllImagesUnderDirectory(file); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void fillImagesInDirectory() throws IOException {\n // get the list of all files (including directories) in the directory of interest\n File[] fileArray = directory.listFiles();\n assert fileArray != null;\n for (File file : fileArray) {\n // the file is an image, then add it\n if (is...
[ "0.8071878", "0.73567533", "0.72230315", "0.70321447", "0.6847166", "0.6623378", "0.63261145", "0.62231773", "0.61737776", "0.60001826", "0.5752656", "0.57161874", "0.56287193", "0.5544961", "0.54636806", "0.54493654", "0.5437295", "0.5434152", "0.5349829", "0.5313424", "0.52...
0.81781566
0
Adds this observer to all the image files
public void addObserversToImageFiles(Observer observer) { for (ImageFile imageFile : allImagesUnderDirectory) { imageFile.addObserver(observer); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void registerObserver(AchieveImageController controller);", "@Override\n public void refreshUI(final List<OIFitsFile> oifitsFiles) {\n for (OIFitsFile oifitsFile : oifitsFiles) {\n // fire OIFitsCollectionChanged:\n addOIFitsFile(oifitsFile);\n }\n ...
[ "0.6313556", "0.60854423", "0.60235023", "0.5846483", "0.5793017", "0.5775222", "0.5770505", "0.5755016", "0.572242", "0.5610602", "0.5606776", "0.55949956", "0.55944175", "0.5573651", "0.55624044", "0.5561304", "0.55587626", "0.55384517", "0.552108", "0.54877144", "0.5481136...
0.81998515
0
Callback to be invoked when PurpleEntry is selected
public void performAction();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onValueSelected(Entry e, int dataSetIndex, Highlight h) {\n\t\t\n\t}", "public void onIndividualSelected(Individual individual) {\n\t\t\n\t}", "public void OnRecipeSelected();", "void onItemSelected(Bundle args);", "public void onComidaSelected(int comidaId);", "public void onIte...
[ "0.6189717", "0.6145002", "0.6045539", "0.60326684", "0.6025686", "0.60222846", "0.6012047", "0.59849405", "0.59358025", "0.59358025", "0.5919917", "0.58918804", "0.5839181", "0.5822832", "0.58111185", "0.5799444", "0.57512635", "0.57107943", "0.5709559", "0.57066596", "0.570...
0.0
-1
TODO : ajouter les users
public String toString(){ return "ID : "+id+"\nNom : "+nom+"\nMdp : "+mdp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initUsers() {\n User user1 = new User(\"Alicja\", \"Grzyb\", \"111111\", \"grzyb\");\n User user2 = new User(\"Krzysztof\", \"Kowalski\", \"222222\", \"kowalski\");\n User user3 = new User(\"Karolina\", \"Nowak\", \"333333\", \"nowak\");\n User user4 = new User(\"Zbigniew\",...
[ "0.7595872", "0.7385698", "0.7212881", "0.71786654", "0.71714824", "0.7103671", "0.70412505", "0.69879633", "0.69850844", "0.6953936", "0.6905544", "0.6897965", "0.6880072", "0.68777484", "0.68756837", "0.6865884", "0.6839848", "0.6824151", "0.68239784", "0.68023646", "0.6755...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_calculator, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
Criando um cliente e adicionando os dados a ele.
public static void main(String[] args) throws IOException, ClassNotFoundException { Cliente clienteWriter = new Cliente(); clienteWriter.setNome("Mateus Medeiros"); clienteWriter.setProfissao("Dev Full Stack"); clienteWriter.setCpf("0901231231"); // CRIANDO UM ARQUIVO // Usando o serializable é criado um aquivo com os dados da Classe Cliente, nesse caso do formato .bin // Nele é salvo o ID que está versionado na Classe cliente, e os dados em linguagem de máquina ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("cliente.bin")); oos.writeObject(clienteWriter); oos.close(); //Lendo o arquivo .bin e transformando a linguagem de máquina em objeto Java. //OBS: é verificado o serialUID caso diferente lança excecao e não lê o arquivo. ObjectInputStream ois = new ObjectInputStream(new FileInputStream("cliente.bin")); Cliente clienteReader = (Cliente) ois.readObject(); ois.close(); //Exibindo o arquivo no console. System.out.println(clienteReader.getNome()); System.out.println(clienteReader.getCpf()); System.out.println(clienteReader.getProfissao()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Cliente llenarDatosCliente() {\r\n\t\tCliente cliente1 = new Cliente();\r\n\t\tcliente1.setApellido(\"De Assis\");\r\n\t\tcliente1.setDni(368638373);\r\n\t\tcliente1.setNombre(\"alexia\");\r\n\t\tcliente1.setId(100001);\r\n\r\n\t\treturn cliente1;\r\n\t}", "public void carregarCliente() {\n\t\tget...
[ "0.7468838", "0.7233037", "0.7219738", "0.703807", "0.6988771", "0.6967463", "0.69118327", "0.68429184", "0.68141377", "0.68132114", "0.67816615", "0.6726239", "0.66951984", "0.66741884", "0.6642405", "0.6628796", "0.6587987", "0.6570494", "0.65676844", "0.6566158", "0.653971...
0.0
-1
Creates an IntentService. Invoked by your subclass's constructor.
public InitService(String name) { super("InitService"); }
{ "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.8280781", "0.8213187", "0.80132484", "0.7954963", "0.78675824", "0.7616548", "0.7522625", "0.715798", "0.7155414", "0.6938953", "0.6776343", "0.6630227", "0.66172403", "0.66161776", "0.6569701", "0.65577745", "0.64851856", "0.6444905", "0.64208555", "0.6402491", "0.6334728...
0.0
-1
TODO Autogenerated method stub
public List showAll() { Session session = null; List temp = new ArrayList(); try { session = MyUtility.getSession();// Static Method which makes only // one object as method is // static Query q = session.createQuery("FROM AuctionVO "); temp = q.list(); } catch (Exception e) { //System.out.println(e.getMessage()); e.printStackTrace(); } finally { //session.close(); } return temp; }
{ "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 List getElementByID(AuctionVO auctionVO) { Session session = null; List temp = null; try { session = MyUtility.getSession();// Static Method which makes only // one object as method is // static Transaction tr = session.beginTransaction(); Query q = session.createQuery("FROM AuctionVO WHERE auction_Id = '" + auctionVO.getAuction_Id() + "'"); temp = q.list(); tr.commit(); } catch (Exception e) { System.out.println(e.getMessage()); } finally { session.close(); } return temp; }
{ "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 void update(AuctionVO auctionVO) { Session session = null; try{ session = MyUtility.getSession();// Static Method which makes only one object as method is static Transaction tr = session.beginTransaction(); session.update(auctionVO); tr.commit(); }catch(Exception e) { System.out.println(e.getMessage()); } finally { session.close(); } }
{ "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 static void main(String[] args) { int n = 7; for (int i = n; i >= 0; i--) { for(int j=0; j<n-i; j++) { System.out.print(" "); } for (int j = n; j >= n-i; j--) { System.out.print("*"); } System.out.println(""); } }
{ "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 static void main(String[] args) { System.out.println(intToRoman(10)); }
{ "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 onClick(DialogInterface dialog, int which) { dialog.cancel(); }
{ "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
Make JPQL call to get the inventory items for the shop.
public List<Inventory> getInventory();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<InventoryItem> getInventory();", "List<InventoryItem> getInventory(String username, int appId);", "Collection<Item> getInventory();", "List<InventoryItem> getInventory(int appId);", "List<InventoryItem> getInventory(String username);", "List<SimpleInventory> getInventories();", "public static Arra...
[ "0.6952404", "0.6851248", "0.6805953", "0.67643964", "0.6685911", "0.63414764", "0.62356246", "0.61514366", "0.60712355", "0.59704", "0.5861722", "0.5857923", "0.5850549", "0.5828873", "0.58180803", "0.5727921", "0.57093376", "0.5705859", "0.5623164", "0.5622167", "0.5591426"...
0.64543104
5
Imposta l'oggetto che contiene le informazioni relative al cast, necessario per la formattazione corretta dei messaggi
public void setCast(Cast cast) { this.cast = cast; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String converterTemperatura(Medidas medidaUm, Medidas medidaDois) {\n String medidaUmUnidade = medidaUm.getUnidadeDeTemperatura();\n String medidaDoisUnidade = medidaDois.getUnidadeDeTemperatura();\n boolean unidadesIguais = medidaUmUnidade.equals(medidaDoisUnidade) ? true : false;\n String erro...
[ "0.61598575", "0.56428015", "0.5632667", "0.5540711", "0.55390096", "0.55380964", "0.55292153", "0.55157954", "0.5489099", "0.5472298", "0.5441017", "0.5429548", "0.5422333", "0.542213", "0.54067314", "0.5361307", "0.53371626", "0.53319085", "0.52792996", "0.52748394", "0.526...
0.0
-1
Carica un copione, aggiornando lo stato di tutti i tablet
public void caricaCopione(Scena scena) { // recupera l'elenco delle battute ArrayList<Battuta> copione = scena.getBattute(); aggiornaMappeColori(scena); // per ogni battuta for (int i = 0; i < copione.size(); i++) { invia(copione.get(i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void copiarComprobanteContabilidad() {\r\n if (!tab_tabla1.isFilaInsertada()) {\r\n TablaGenerica tab_cabecera = ser_comprobante.getCabeceraComprobante(tab_tabla1.getValorSeleccionado());\r\n TablaGenerica tab_detalle = ser_comprobante.getDetallesComprobante(tab_tabla1.getValorS...
[ "0.6368378", "0.5974035", "0.584916", "0.54508835", "0.53885376", "0.5360996", "0.5354695", "0.53187966", "0.5314489", "0.5252827", "0.5251571", "0.5237816", "0.52239645", "0.5215037", "0.52063674", "0.52032536", "0.5202613", "0.5190457", "0.5185493", "0.5167521", "0.5151023"...
0.5570766
3
associa ad ogni personaggio della scena un colore creando una mappa di colori
private void aggiornaMappeColori(Scena scena) { MappaColori colori=creaMappaColoriCompleta(scena.getPersonaggiPrincipali()); // pulisce l'elenco delle mappe di colori associate ad ogni // visualizzatore aggiornaColori(colori); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void colorearSecuencialAlternativo() {\n\t\tint color;\n\t\tcantColores = 0;\n\t\tfor (int i = 0; i < cantNodos; i++) {\n\t\t\tcolor = 1;\n\t\t\t/** Mientras el color no se pueda usar, elijo otro color **/\n\t\t\twhile (!sePuedeColorear(i, color))\n\t\t\t\tcolor++;\n\n\t\t\tnodos.get(i).setColor(color);\n\n...
[ "0.6472919", "0.60227346", "0.59486157", "0.5778852", "0.56138027", "0.5594463", "0.5566299", "0.55555856", "0.55333704", "0.55295104", "0.5522828", "0.55154175", "0.5487578", "0.5452056", "0.5433769", "0.5420743", "0.5419102", "0.5391007", "0.53805375", "0.53764546", "0.5373...
0.77253294
0
Invia una battuta a tutti i visualizzatori
private void invia(Battuta battuta) { String nomePersonaggio = battuta.getNomePersonaggio(); String nomeAttore = cast.getAttore(nomePersonaggio); String battuta_ = battuta.getBattuta(); String messaggio = formattaBattuta(nomePersonaggio, nomeAttore, battuta_); for (int j = 0; j < visualizzatori.size(); j++) { // recupera il colore da associare alla battuta ColoreMessaggio colore = mappaColori.get(j).getColore( nomePersonaggio); // carica il messaggio sul visualizzatore visualizzatori.get(j).addMessaggio( new Messaggio(colore, messaggio)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void visualChange();", "public static void launchVisualEffect() {\n\n Object[][] multiDimensionalTrailTracker = new Object[trackAmount][individualEffectsPerTrack];\n\n for (int i = 0; i < multiDimensionalTrailTracker.length; i++) {\n ArrayList<Object> localObjects = new ArrayList<...
[ "0.6558939", "0.61309993", "0.6117068", "0.6094386", "0.6021353", "0.59938174", "0.58898747", "0.58861816", "0.58823895", "0.5843054", "0.5840851", "0.580068", "0.57905525", "0.57643545", "0.57213074", "0.5719768", "0.57194364", "0.5719087", "0.57040495", "0.5677352", "0.5676...
0.6346966
1
ToDO use apache kafka, spark and a nosql cassandra db for persistence
public void analyze(AnalyticsRequest request){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CassandraService(JavaSparkContext sparkContext) {\n this.sparkContext = sparkContext;\n\n //Создаю коннектор к Cassandra для native запроса\n CassandraConnector connector = CassandraConnector.apply(sparkContext.getConf());\n\n try (CqlSession session = connector.openSession()) {...
[ "0.6696586", "0.6308521", "0.5783878", "0.572291", "0.5377468", "0.5362381", "0.5322494", "0.52574575", "0.5169701", "0.5162803", "0.51132464", "0.50916463", "0.5090302", "0.5037158", "0.50306636", "0.4972052", "0.49719727", "0.49650073", "0.49632132", "0.4956117", "0.4925552...
0.0
-1
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / /
public static GlyphLayout get(LayoutEngineFactory paramLayoutEngineFactory) /* */ { /* 184 */ if (paramLayoutEngineFactory == null) { /* 185 */ paramLayoutEngineFactory = SunLayoutEngine.instance(); /* */ } /* 187 */ GlyphLayout localGlyphLayout = null; /* 188 */ synchronized (GlyphLayout.class) { /* 189 */ if (cache != null) { /* 190 */ localGlyphLayout = cache; /* 191 */ cache = null; /* */ } /* */ } /* 194 */ if (localGlyphLayout == null) { /* 195 */ localGlyphLayout = new GlyphLayout(); /* */ } /* 197 */ localGlyphLayout._lef = paramLayoutEngineFactory; /* 198 */ return localGlyphLayout; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int getNumPatterns() { return 64; }", "double passer();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "void mo33732Px();", "public void method_4270() {}", "public void gored() {\n\t\t\n\t}", "public Integer getWidth(){return this....
[ "0.5152037", "0.51435435", "0.51153874", "0.5099663", "0.5029635", "0.5000243", "0.49967322", "0.49762234", "0.49753973", "0.49611163", "0.49578944", "0.4940019", "0.4934584", "0.49266502", "0.49256295", "0.49233234", "0.49209163", "0.4920168", "0.49131197", "0.4900526", "0.4...
0.0
-1
/ / / / /
public static void done(GlyphLayout paramGlyphLayout) /* */ { /* 206 */ paramGlyphLayout._lef = null; /* 207 */ cache = paramGlyphLayout; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public void gored() {\n\t\t\n\t}", "public static void bottomHalf() {\n\n ...
[ "0.5654086", "0.5282051", "0.5270874", "0.5268489", "0.5230159", "0.5229372", "0.5205559", "0.51923394", "0.51524484", "0.50993294", "0.50948834", "0.5071109", "0.5043058", "0.5009983", "0.5006536", "0.49739555", "0.49691963", "0.4959123", "0.49568397", "0.49425906", "0.49421...
0.0
-1
/ / / / / / /
public static SDCache get(Font paramFont, FontRenderContext paramFontRenderContext) /* */ { /* 310 */ if (paramFontRenderContext.isTransformed()) { /* 311 */ localObject = paramFontRenderContext.getTransform(); /* 312 */ if ((((AffineTransform)localObject).getTranslateX() != 0.0D) || /* 313 */ (((AffineTransform)localObject).getTranslateY() != 0.0D)) /* */ { /* */ /* */ /* 317 */ localObject = new AffineTransform(((AffineTransform)localObject).getScaleX(), ((AffineTransform)localObject).getShearY(), ((AffineTransform)localObject).getShearX(), ((AffineTransform)localObject).getScaleY(), 0.0D, 0.0D); /* */ /* */ /* */ /* 321 */ paramFontRenderContext = new FontRenderContext((AffineTransform)localObject, paramFontRenderContext.getAntiAliasingHint(), paramFontRenderContext.getFractionalMetricsHint()); /* */ } /* */ } /* */ /* */ /* 326 */ Object localObject = new SDKey(paramFont, paramFontRenderContext); /* 327 */ ConcurrentHashMap localConcurrentHashMap = null; /* 328 */ SDCache localSDCache = null; /* 329 */ if (cacheRef != null) { /* 330 */ localConcurrentHashMap = (ConcurrentHashMap)cacheRef.get(); /* 331 */ if (localConcurrentHashMap != null) { /* 332 */ localSDCache = (SDCache)localConcurrentHashMap.get(localObject); /* */ } /* */ } /* 335 */ if (localSDCache == null) { /* 336 */ localSDCache = new SDCache(paramFont, paramFontRenderContext); /* 337 */ if (localConcurrentHashMap == null) { /* 338 */ localConcurrentHashMap = new ConcurrentHashMap(10); /* 339 */ cacheRef = new SoftReference(localConcurrentHashMap); /* */ } /* 341 */ else if (localConcurrentHashMap.size() >= 512) { /* 342 */ localConcurrentHashMap.clear(); /* */ } /* 344 */ localConcurrentHashMap.put(localObject, localSDCache); /* */ } /* 346 */ return localSDCache; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private int rightChild(int i){return 2*i+2;}", "public abstract void b...
[ "0.54567957", "0.53680295", "0.53644985", "0.52577376", "0.52142847", "0.51725817", "0.514088", "0.50868535", "0.5072305", "0.504888", "0.502662", "0.50005764", "0.49740013", "0.4944243", "0.4941118", "0.4937142", "0.49095523", "0.48940238", "0.48719338", "0.48613623", "0.486...
0.0
-1
/ / / / / / / / / / / / / / /
public StandardGlyphVector layout(Font paramFont, FontRenderContext paramFontRenderContext, char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, StandardGlyphVector paramStandardGlyphVector) /* */ { /* 365 */ if ((paramArrayOfChar == null) || (paramInt1 < 0) || (paramInt2 < 0) || (paramInt2 > paramArrayOfChar.length - paramInt1)) { /* 366 */ throw new IllegalArgumentException(); /* */ } /* */ /* 369 */ init(paramInt2); /* */ /* */ /* */ /* 373 */ if (paramFont.hasLayoutAttributes()) { /* 374 */ localObject1 = ((AttributeMap)paramFont.getAttributes()).getValues(); /* 375 */ if (((AttributeValues)localObject1).getKerning() != 0) this._typo_flags |= 0x1; /* 376 */ if (((AttributeValues)localObject1).getLigatures() != 0) { this._typo_flags |= 0x2; /* */ } /* */ } /* 379 */ this._offset = paramInt1; /* */ /* */ /* */ /* 383 */ Object localObject1 = SDCache.get(paramFont, paramFontRenderContext); /* 384 */ this._mat[0] = ((float)((SDCache)localObject1).gtx.getScaleX()); /* 385 */ this._mat[1] = ((float)((SDCache)localObject1).gtx.getShearY()); /* 386 */ this._mat[2] = ((float)((SDCache)localObject1).gtx.getShearX()); /* 387 */ this._mat[3] = ((float)((SDCache)localObject1).gtx.getScaleY()); /* 388 */ this._pt.setLocation(((SDCache)localObject1).delta); /* */ /* 390 */ int i = paramInt1 + paramInt2; /* */ /* 392 */ int j = 0; /* 393 */ int k = paramArrayOfChar.length; /* 394 */ if (paramInt3 != 0) { /* 395 */ if ((paramInt3 & 0x1) != 0) { /* 396 */ this._typo_flags |= 0x80000000; /* */ } /* */ /* 399 */ if ((paramInt3 & 0x2) != 0) { /* 400 */ j = paramInt1; /* */ } /* */ /* 403 */ if ((paramInt3 & 0x4) != 0) { /* 404 */ k = i; /* */ } /* */ } /* */ /* 408 */ int m = -1; /* */ /* 410 */ Object localObject2 = FontUtilities.getFont2D(paramFont); /* 411 */ if ((localObject2 instanceof FontSubstitution)) { /* 412 */ localObject2 = ((FontSubstitution)localObject2).getCompositeFont2D(); /* */ } /* */ /* 415 */ this._textRecord.init(paramArrayOfChar, paramInt1, i, j, k); /* 416 */ int n = paramInt1; /* 417 */ if ((localObject2 instanceof CompositeFont)) { /* 418 */ this._scriptRuns.init(paramArrayOfChar, paramInt1, paramInt2); /* 419 */ this._fontRuns.init((CompositeFont)localObject2, paramArrayOfChar, paramInt1, i); /* 420 */ while (this._scriptRuns.next()) { /* 421 */ i1 = this._scriptRuns.getScriptLimit(); /* 422 */ i2 = this._scriptRuns.getScriptCode(); /* 423 */ while (this._fontRuns.next(i2, i1)) { /* 424 */ PhysicalFont localPhysicalFont = this._fontRuns.getFont(); /* */ /* */ /* */ /* */ /* */ /* */ /* 431 */ if ((localPhysicalFont instanceof NativeFont)) { /* 432 */ localPhysicalFont = ((NativeFont)localPhysicalFont).getDelegateFont(); /* */ } /* 434 */ int i4 = this._fontRuns.getGlyphMask(); /* 435 */ int i5 = this._fontRuns.getPos(); /* 436 */ nextEngineRecord(n, i5, i2, m, localPhysicalFont, i4); /* 437 */ n = i5; /* */ } /* */ } /* */ } /* 441 */ this._scriptRuns.init(paramArrayOfChar, paramInt1, paramInt2); /* 442 */ while (this._scriptRuns.next()) { /* 443 */ i1 = this._scriptRuns.getScriptLimit(); /* 444 */ i2 = this._scriptRuns.getScriptCode(); /* 445 */ nextEngineRecord(n, i1, i2, m, (Font2D)localObject2, 0); /* 446 */ n = i1; /* */ } /* */ /* */ /* 450 */ int i1 = 0; /* 451 */ int i2 = this._ercount; /* 452 */ int i3 = 1; /* */ /* 454 */ if (this._typo_flags < 0) { /* 455 */ i1 = i2 - 1; /* 456 */ i2 = -1; /* 457 */ i3 = -1; /* */ } /* */ /* */ /* 461 */ this._sd = ((SDCache)localObject1).sd; /* 462 */ Object localObject3; for (; i1 != i2; i1 += i3) { /* 463 */ localObject3 = (EngineRecord)this._erecords.get(i1); /* */ for (;;) { /* */ try { /* 466 */ ((EngineRecord)localObject3).layout(); /* */ } /* */ catch (IndexOutOfBoundsException localIndexOutOfBoundsException) /* */ { /* 470 */ if (this._gvdata._count >= 0) { /* 471 */ this._gvdata.grow(); /* */ } /* */ } /* */ } /* */ /* 476 */ if (this._gvdata._count < 0) { /* */ break; /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* 489 */ if (this._gvdata._count < 0) { /* 490 */ localObject3 = new StandardGlyphVector(paramFont, paramArrayOfChar, paramInt1, paramInt2, paramFontRenderContext); /* 491 */ if (FontUtilities.debugFonts()) { /* 492 */ FontUtilities.getLogger().warning("OpenType layout failed on font: " + paramFont); /* */ } /* */ } /* */ else { /* 496 */ localObject3 = this._gvdata.createGlyphVector(paramFont, paramFontRenderContext, paramStandardGlyphVector); /* */ } /* */ /* 499 */ return (StandardGlyphVector)localObject3; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "double passer();", "int getWidth() {return width;}", "public Integer getWidth(){return this.width;}", "public void...
[ "0.54599804", "0.5361702", "0.50828", "0.50729156", "0.5065769", "0.50643295", "0.50565934", "0.5055456", "0.5028421", "0.50179166", "0.50039816", "0.499804", "0.49814743", "0.49544477", "0.49448815", "0.49297482", "0.49270833", "0.49128833", "0.49060607", "0.49048623", "0.49...
0.0
-1
/ / / / /
private GlyphLayout() /* */ { /* 507 */ this._gvdata = new GVData(); /* 508 */ this._textRecord = new TextRecord(); /* 509 */ this._scriptRuns = new ScriptRun(); /* 510 */ this._fontRuns = new FontRunIterator(); /* 511 */ this._erecords = new ArrayList(10); /* 512 */ this._pt = new Point2D.Float(); /* 513 */ this._sd = new FontStrikeDesc(); /* 514 */ this._mat = new float[4]; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public void gored() {\n\t\t\n\t}", "public static void bottomHalf() {\n\n ...
[ "0.5654086", "0.5282051", "0.5270874", "0.5268489", "0.5230159", "0.5229372", "0.5205559", "0.51923394", "0.51524484", "0.50993294", "0.50948834", "0.5071109", "0.5043058", "0.5009983", "0.5006536", "0.49739555", "0.49691963", "0.4959123", "0.49568397", "0.49425906", "0.49421...
0.0
-1
Add to result collection only items wich suits player's level
private Collection<ExtractedItemsCollection> filterItemsByLevel(Player player, List<ExtractedItemsCollection> itemsCollections) { int playerLevel = player.getLevel(); Collection<ExtractedItemsCollection> result = new ArrayList<ExtractedItemsCollection>(); for (ExtractedItemsCollection collection : itemsCollections) { if (collection.getMinLevel() > playerLevel) { continue; } if (collection.getMaxLevel() > 0 && collection.getMaxLevel() < playerLevel) { continue; } result.add(collection); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Collection<ExtractedItemsCollection> filterItemsByLevel(Player player, List<ExtractedItemsCollection> itemsCollections) {\n int playerLevel = player.getLevel();\n Collection<ExtractedItemsCollection> result = new ArrayList<ExtractedItemsCollection>();\n for (ExtractedItemsCollection co...
[ "0.6738968", "0.5857044", "0.5766057", "0.5705893", "0.5622191", "0.5591501", "0.55405885", "0.54368514", "0.5350056", "0.5328953", "0.52985424", "0.52645034", "0.5239943", "0.52378356", "0.5237445", "0.5236374", "0.5212557", "0.5182342", "0.5171264", "0.51368415", "0.5125095...
0.6718287
1
Select only 1 item based on chance attributes
private ExtractedItemsCollection selectItemByChance(Collection<ExtractedItemsCollection> itemsCollections) { float sumOfChances = calcSumOfChances(itemsCollections); float currentSum = 0f; float rnd = (float) Rnd.get(0, (int) (sumOfChances - 1) * 1000) / 1000; ExtractedItemsCollection selectedCollection = null; for (ExtractedItemsCollection collection : itemsCollections) { currentSum += collection.getChance(); if (rnd < currentSum) { selectedCollection = collection; break; } } return selectedCollection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Item chooseValidItem()\n {\n\n // Sets the intial random value.\n int numberRandom = random.nextInt(items.size());\n\n while (trackItems.contains(items.get(numberRandom).getName())){\n numberRandom = random.nextInt(items.size());\n }\n\n // Loops until a unu...
[ "0.61502117", "0.60203624", "0.60139626", "0.60027", "0.5979687", "0.59475374", "0.59321594", "0.59087867", "0.5887832", "0.58816373", "0.5857283", "0.5857283", "0.58008635", "0.57967687", "0.5769362", "0.57529676", "0.57526654", "0.5745437", "0.57307464", "0.56774706", "0.56...
0.69622666
1
insert the query into the list of queries.
public Exact_Period_Count create_query(String word, Date min, Date max) { Exact_Period_Count query = new Exact_Period_Count(word, min, max); if(!m_table.containsKey(word)) m_table.put(word, new LinkedList<Exact_Period_Count>()); m_table.get(word).add(query); m_queryList.add(query); return query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void add(Query query) {\n queries.add(query);\n executeThread();\n }", "private void addQuery(String query){\n this.queries.add( query);\n }", "private void addQueries(String query){\n ArrayList <String> idsFullSet = new ArrayList <String>(searchIDs);\n while(...
[ "0.7202301", "0.7117388", "0.6814981", "0.6477031", "0.613419", "0.6087786", "0.59718055", "0.5970796", "0.59265864", "0.5770122", "0.5653999", "0.56265986", "0.56216514", "0.5536768", "0.54655063", "0.54340917", "0.53840095", "0.52929956", "0.52869904", "0.52868164", "0.5238...
0.0
-1
given a single word and the date which that word occurred, update the queries of interest so they count this word.
public void update_query(String word, Date time) { List<Exact_Period_Count> queries = m_table.get(word); if(queries != null) for(Exact_Period_Count i : queries) i.Add_ifInRange(time); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateCount(String word) {\n\t\t\tthis.count += invertedIndex.get(word).get(this.location).size();\n\t\t\tthis.score = (double) this.count / counts.get(this.location);\n\t\t}", "public void addToStatByDay(Date date, String word, int n) {\n\t\tString collection = simpleDateFormat.format(date);\n\t\tC...
[ "0.6679594", "0.6283755", "0.6060499", "0.6020642", "0.600903", "0.5995564", "0.5875993", "0.5806435", "0.5792307", "0.56529236", "0.5627714", "0.55316556", "0.5507088", "0.5481717", "0.5409441", "0.53621966", "0.5361106", "0.5350937", "0.53137004", "0.52374303", "0.52260447"...
0.751059
0
update all the queries with the words in a TwitterParser.
public void update_query(TwitterParser tweet) { for(String s : tweet.get_words()) update_query(s, tweet.get_date()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void statsForQuery(String query) {\n\t\tHashMap<String,Integer> oldTerms=newTerms; // record the terms to analyze modified queries\n\t\tnewTerms=new HashMap<String,Integer>();\n\t\t\t\t\n\t\tString terms[]=query.split(\"\\\\s\");\t\t\t\t\n\t\tint matchingTerms=0;\n\t\tint matchingTermsStopwords=0;\n...
[ "0.5770663", "0.5483876", "0.54636574", "0.54265904", "0.53978866", "0.53803205", "0.53659815", "0.5358132", "0.5322717", "0.53221047", "0.51714605", "0.51614255", "0.51494277", "0.5146193", "0.51078546", "0.5097823", "0.50634074", "0.5047072", "0.50373644", "0.49558935", "0....
0.8137958
0
return the number of queries registered
public int queries_registered() { return m_queryList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getQueriesCount();", "public int getQueriesCount() {\n return queries_.size();\n }", "public int size()\n {\n return queries.size();\n }", "public int getQueriesCount() {\n if (queriesBuilder_ == null) {\n return queries_.size();\n } else {\n return qu...
[ "0.8646373", "0.81842846", "0.7782202", "0.76388067", "0.7520102", "0.7372208", "0.72870225", "0.7141199", "0.71207625", "0.7116052", "0.70357084", "0.6993996", "0.6993996", "0.6966881", "0.6884084", "0.68633187", "0.68469626", "0.6838031", "0.6806354", "0.67756236", "0.67756...
0.83628505
1
return an iterator of the queries which have been inserted into this data structure. The items will be returned in an undefined order.
public Iterator<Exact_Period_Count> get_QueryIterator() { return m_queryList.iterator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Iterator<SingleQuery> iterator() {\n return new QueryHistoryIterator();\n }", "@Override\n public boolean hasNext() {\n return i+1 < queries.size();\n }", "public Iterator<Map<String, Object>> getQueryResult() {\n return queryResult;\n }", "p...
[ "0.6601172", "0.63295406", "0.6273219", "0.61868316", "0.6106422", "0.6030237", "0.6017817", "0.6002854", "0.5980338", "0.5969827", "0.5913603", "0.5860767", "0.5841765", "0.58127797", "0.5802413", "0.5791305", "0.5786459", "0.57830966", "0.5754241", "0.5752892", "0.57381386"...
0.6522874
1
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { out.println("<html>"); out.println("<head>"); out.println("<title>Servlet JSONCollector</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Servlet JSONCollector at " + request.getContextPath () + "</h1>"); out.println("</body>"); out.println("</html>"); } finally { out.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_...
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.6392...
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro...
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234",...
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n ...
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197"...
0.0
-1
Handles the HTTP PUT method.
@Override protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int contentLength = request.getContentLength(); logger.debug("ContentLength: " + contentLength); if (contentLength > MAX_JSON_LENGTH) { String em = "Content length of " + contentLength + " too long, max is " + MAX_JSON_LENGTH; logger.error(em); response.sendError(400, em); return; } String contentType = request.getContentType(); logger.debug("ContentType: " + contentType); if ("application/json".equalsIgnoreCase(contentType)) { JSONHandler jh = new JSONHandler(); jh.handle(request, response); return; } response.sendError(400, "Content type not supported"); response.flushBuffer(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPut(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}", "public void handlePut( HttpExchange exchange ) throws IOException {\n\n }", "@PUT\n @Path(\"/update\")\n public void put() {\n System.out.println(\"PUT invoked\");\n }...
[ "0.7783537", "0.76511437", "0.7575047", "0.72501165", "0.72248536", "0.72070843", "0.7002999", "0.69825894", "0.6779401", "0.6763341", "0.66422504", "0.6540558", "0.6451364", "0.6425723", "0.6339936", "0.63293314", "0.63282424", "0.63236594", "0.62791616", "0.6270535", "0.618...
0.64461136
13
Find the max element in arr and return it's index
int select(int arr[], int i) { // Your code here int index_of_max; index_of_max = i; //linear search for (int j = 0; j <= i; j++) { if (arr[j] > arr[index_of_max]) { index_of_max = j; } } return index_of_max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int findMaxInArr(int[] arr) {\n\n\t\tint max = arr[0];\n\t\tfor (int elem : arr) {\n\t\t\tif (elem > max) {\n\t\t\t\tmax = elem;\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public int findMax(int[] arr) {\n return 0;\n }", "public static <T extends Comparable<T>> int findMaxIndex(T[] arr)...
[ "0.80914384", "0.80651814", "0.79477954", "0.77027094", "0.7642541", "0.7633973", "0.7633509", "0.7559472", "0.7537176", "0.7536367", "0.7501793", "0.74220234", "0.74202794", "0.7419712", "0.73471034", "0.72963417", "0.7291788", "0.72717756", "0.7250218", "0.723062", "0.71818...
0.7255945
18
Check if response ok.
public boolean hasFailed () { return exception_ != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static boolean checkOk(String response) {\n\t\tMatcher m = PAT_ES_SUCCESS.matcher(response);\n\t\tif (m.find()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@SuppressWarnings(\"unchecked\")\n private boolean checkResponse (HttpResponse<?> pResponse) {\n boolean result = false;\n if (pResponse !...
[ "0.77896523", "0.76638013", "0.7646322", "0.7612965", "0.7612965", "0.7612965", "0.7612965", "0.7612965", "0.7612965", "0.7612965", "0.7612965", "0.7612965", "0.7497993", "0.7412836", "0.7278467", "0.7221364", "0.7185989", "0.7042344", "0.7031471", "0.6997169", "0.6978525", ...
0.0
-1
To check if retried for failure case.
public boolean isRetried () { return hasFailed () && retried_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isRetry();", "@Override\n\t\tpublic boolean isRetry() { return true; }", "@Test\n public void testCanRetry() {\n assertEquals(0, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(1, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(2,...
[ "0.7891941", "0.7755065", "0.775157", "0.75943995", "0.7544611", "0.7480066", "0.7166326", "0.7145832", "0.711136", "0.70976824", "0.7088022", "0.7073258", "0.69968355", "0.69838446", "0.6983276", "0.697466", "0.6925689", "0.6853585", "0.6783087", "0.67715406", "0.6661191", ...
0.8073241
0
Get any errors. Not null if hasFailed() is true.
public Exception getException () { return exception_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Exception> getErrors() {\n\t\treturn null;\n\t}", "public List<ErrorResult> getErrorResults()\n {\n \tif(this.errorResults == null) {\n \t\tthis.errorResults = new ArrayList<ErrorResult>();\n \t}\n return errorResults;\n }", "public List<QueryError> getErrors() {\n retu...
[ "0.6926898", "0.67415875", "0.6461089", "0.6456702", "0.6447508", "0.6432412", "0.64152503", "0.63991576", "0.63926595", "0.635077", "0.6349876", "0.63295746", "0.6306296", "0.6262776", "0.6258858", "0.6242463", "0.62344754", "0.6228874", "0.6225439", "0.62233305", "0.6210395...
0.0
-1
Get the response. OK if hasFailed() returns false.
public Object getResponse () { return response_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public br.com.sergio.wallet.Response getResponse() {\n br.com.sergio.wallet.Response result = br.com.sergio.wallet.Response.valueOf(response_);\n return result == null ? br.com.sergio.wallet.Response.UNRECOGNIZED : result;\n }", "boolean hasResponse();", "boolean hasResponse();", "boolean hasResponse(...
[ "0.65462244", "0.64685124", "0.64685124", "0.64685124", "0.64685124", "0.64685124", "0.64685124", "0.64685124", "0.64685124", "0.64685124", "0.64556724", "0.63884383", "0.6374096", "0.620016", "0.6184445", "0.6174047", "0.61561215", "0.60324234", "0.5978566", "0.59542656", "0...
0.58507067
35
Get the participant who replied this.
public Participant getParticipant () { return participant_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VitalParticipant getParticipant() {\n\t\treturn this.getAssignmentResponse().getParticipant();\n }", "java.lang.String getParticipant();", "public Integer getParticipant() {\n return participant;\n }", "public String getParticipantId() {\r\n\t\treturn participantId;\r\n\t}", "public int...
[ "0.7073355", "0.67800677", "0.6516061", "0.63546085", "0.6300195", "0.62007415", "0.6170338", "0.603594", "0.6014673", "0.59159523", "0.5844882", "0.58255196", "0.5801393", "0.58013785", "0.5732254", "0.5705866", "0.5681438", "0.5668356", "0.56593156", "0.5650143", "0.5588311...
0.68118876
1
/Check for the arguments
@SuppressWarnings({ "deprecation" }) public int run(String[] args) throws IOException { if (args.length < 3 || args.length > 5) { System.err.println("Usage: HBaseStationImporter <file-system> <input> <table-name> <hdfs-master-url>"); System.err.println(args.length); return -1; } String fileSystem = args[0]; String inputPath = args[1]; String hbaseTable = args[2]; boolean isHdfsPath = args.length ==4? true:false ; String hdfsMaster = null; /*Check whether file system is null/empty */ if (fileSystem.length() == 0 || fileSystem == null){ System.err.println("File System cannot be null/empty"); return -1; }else if (fileSystem.equalsIgnoreCase("local") || fileSystem.equalsIgnoreCase("hdfs")){ System.out.println(fileSystem.toUpperCase() + " File system is supported"); }else{ System.err.println("Only Local/HDFS file system is supported"+fileSystem); return -1; } /*Check whether input path is null/empty */ if (inputPath.length() == 0 || inputPath == null){ System.err.println("Input Path cannot be null/empty"); return -1; } /*Check whether HTable name is null/empty */ if (hbaseTable.length() == 0 || hbaseTable == null){ System.err.println("HTable name cannot be null/empty"); return -1; } /*If file is being read from HDFS check whether HDFS Master URL name is null/empty */ if (isHdfsPath){ if(args[3].length() !=0 && args[3] != null){ hdfsMaster = args[3]; }else{ System.err.println("HDFS Master URL cannot be null/empty"); return -1; } } /*System.out.println(args[0]+args[1]+args[2]+isHdfsPath+hdfsMaster); System.exit(1);*/ Configuration config = HBaseConfiguration.create(); Connection connection = ConnectionFactory.createConnection(config); try { /*Get an object for the table we created*/ TableName tableName = TableName.valueOf(hbaseTable); Table table = connection.getTable(tableName); try { NcdcStationMetadata metadata = new NcdcStationMetadata(); metadata.initialize(inputPath, isHdfsPath, hdfsMaster); Map<String, String> stationIdToNameMap = metadata.getStationIdToNameMap(); for (Map.Entry<String, String> entry : stationIdToNameMap.entrySet()) { Put put = new Put(Bytes.toBytes(entry.getKey())); put.add(HBaseStationQuery.INFO_COLUMNFAMILY, HBaseStationQuery.NAME_QUALIFIER, Bytes.toBytes(entry.getValue())); put.add(HBaseStationQuery.INFO_COLUMNFAMILY, HBaseStationQuery.DESCRIPTION_QUALIFIER, Bytes.toBytes("(unknown)")); put.add(HBaseStationQuery.INFO_COLUMNFAMILY, HBaseStationQuery.LOCATION_QUALIFIER, Bytes.toBytes("(unknown)")); table.put(put); } } finally { table.close(); } } finally { connection.close(); } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void argumentChecker(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tif (args.length != 2) {\n\t\t\tSystem.out.println(\"Invalid arguments. \\nExpected:\\tDriver inputFile.txt outputFile.txt\");\n\t\t}\n\t}", "static Boolean verifyArguments(String[] args)\n {\n if (args.length <...
[ "0.7902268", "0.7892112", "0.78161126", "0.78028995", "0.766213", "0.7510147", "0.7436258", "0.7334726", "0.7330368", "0.71006274", "0.70446545", "0.7041946", "0.70226336", "0.7015839", "0.69926804", "0.6920049", "0.6919219", "0.6915273", "0.68846893", "0.6878546", "0.6854753...
0.0
-1
Read text file, where each line uses "\\r\\n", and parse based on delimiter.
public void read(File file, String sep, boolean bQuoted) throws Exception { BufferedReader reader = new BufferedReader(new FileReader(file)); for (int i=1;;i++) { String line = reader.readLine(); if (line == null) break; String[] ss = parse(line, sep, bQuoted, i); if (ss != null) process(ss, i); } reader.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] parseLine() throws IOException, FHIRException {\n\t\tList<String> res = new ArrayList<String>();\n\t\tStringBuilder b = new StringBuilder();\n\t\tboolean inQuote = false;\n\n\t\twhile (more() && !finished(inQuote, res.size())) {\n\t\t\tchar c = peek();\n\t\t\tnext();\n\t\t\tif (c == '\"' && doingQ...
[ "0.5693465", "0.5472542", "0.5399809", "0.5289674", "0.528553", "0.5281182", "0.5250834", "0.52183306", "0.52131283", "0.5206858", "0.52057856", "0.51863337", "0.51738954", "0.51703733", "0.5159343", "0.5158927", "0.5151643", "0.51470363", "0.51443064", "0.51399285", "0.50983...
0.48136342
49
parse line into columns
public String[] parse(String line, String sep, boolean bQuoted, int lineNumber) { int pos = 0; String[] flds = new String[0]; StringTokenizer tok = new StringTokenizer(line, sep, true); for ( ;tok.hasMoreTokens(); ) { String word = tok.nextToken(); if (word.equals(sep)) { pos++; } else { int x = word.length(); if (bQuoted && x > 2) { if ( word.charAt(0) == '"' && word.charAt(x-1) == '"') { word = word.substring(1, x-1); } } flds = Arrays.copyOf(flds, pos+1); flds[pos] = word; } } return flds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String[] readLine( String line ) throws IOException {\n if ( StringUtils.isBlank( line ) ) {\n return null;\n }\n if ( line.startsWith( \"#\" ) ) {\n return null;\n }\n\n String[] fields = StringUtils.splitPreserveAllTokens( line, '\\t' );\n i...
[ "0.7137207", "0.68578094", "0.62982637", "0.5977439", "0.593722", "0.58405757", "0.572389", "0.5715253", "0.56843793", "0.56830716", "0.56508213", "0.56328136", "0.5564758", "0.55202264", "0.55176425", "0.5506241", "0.5441957", "0.5401197", "0.5399271", "0.5388428", "0.537178...
0.5231
28
How many successive recognition are failed
public BluetoothService(Activity activity){ mActivity = activity; mUserWarningService = new UserWarningService(mActivity.getApplicationContext()); /* float [][] testdata ={{1},{2},{6},{4},{5},{6},{7},{8},{9},{10}}; float f1 = Mean(testdata, 0,10); float f2 = Var(testdata, 0,10); float f3 = Rms(testdata, 0,10); float f4 = Skew(testdata, 0,10); int x = 1; */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getErrorCount();", "private int calculateImagesNotFound() {\n int imagesNotFound = 0;\n for (int count : countImagesNotFound) {\n imagesNotFound += count;\n }\n\n return imagesNotFound;\n }", "public float testAll(){\n List<Long> allIdsToTest = new ArrayList...
[ "0.6402401", "0.61018664", "0.60938275", "0.60829276", "0.6051124", "0.5920897", "0.5871161", "0.58671546", "0.58668494", "0.58400095", "0.5822749", "0.58099616", "0.576827", "0.5765409", "0.57520086", "0.57497376", "0.5723696", "0.5720103", "0.5712351", "0.5712351", "0.56972...
0.0
-1
preprocess + let data come into your model
public void process(){ for(int i = 0; i < STEP_SIZE; i++){ String tmp = "" + accData[i][0] + "," + accData[i][1] + ","+accData[i][2] + "," + gyData[i][0] + "," + gyData[i][1] + "," + gyData[i][2] + "\n"; try{ stream.write(tmp.getBytes()); }catch(Exception e){ //Log.d(TAG,"!!!"); } } /** * currently we don't apply zero-mean, unit-variance operation * to the data */ // only accelerator's data is using, currently 200 * 3 floats // parse the 1D-array to 2D if(recognizer.isInRecognitionState() && recognizer.getGlobalRecognitionTimes() >= Constants.MAX_GLOBAL_RECOGNITIOME_TIMES){ recognizer.resetRecognitionState(); } if(recognizer.isInRecognitionState()){ recognizer.removeOutliers(accData); recognizer.removeOutliers(gyData); double [] feature = new double [FEATURE_SIZE]; recognizer.extractFeatures(feature, accData, gyData); int result = recognizer.runModel(feature); String ret = "@@@"; if(result != Constants.UNDEF_RET){ if(result == Constants.FINISH_RET){ mUserWarningService.playSpeech("Step" + Integer.toString(recognizer.getLastGesture()) + Constants.RIGHT_GESTURE_INFO); waitForPlayout(2000); mUserWarningService.playSpeech(Constants.FINISH_INFO); waitForPlayout(1); recognizer.resetLastGesutre(); recognizer.resetRecognitionState(); ret += "1"; }else if(result == Constants.RIGHT_RET){ mUserWarningService.playSpeech("Step" + Integer.toString(recognizer.getLastGesture()) + Constants.RIGHT_GESTURE_INFO); waitForPlayout(2000); mUserWarningService.playSpeech("Now please do Step " + Integer.toString(recognizer.getExpectedGesture())); waitForPlayout(1); ret += "1"; }else if(result == Constants.ERROR_RET){ mUserWarningService.playSpeech(Constants.WRONG_GESTURE_WARNING + recognizer.getExpectedGesture()); waitForPlayout(1); ret += "0"; }else if(result == Constants.ERROR_AND_FORWARD_RET){ mUserWarningService.playSpeech(Constants.WRONG_GESTURE_WARNING + recognizer.getLastGesture()); waitForPlayout(1); if(recognizer.getExpectedGesture() <= Constants.STATE_SPACE){ mUserWarningService.playSpeech( "Step " + recognizer.getLastGesture() + "missing " + ". Now please do Step" + Integer.toString(recognizer.getExpectedGesture())); waitForPlayout(1); }else{ recognizer.resetRecognitionState(); mUserWarningService.playSpeech("Recognition finished."); waitForPlayout(1); } ret += "0"; } ret += "," + Integer.toString(result) + "@@@"; Log.d(TAG, ret); Message msg = new Message(); msg.obj = ret; mWriteThread.writeHandler.sendMessage(msg); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void preprocess() {\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "protected abstract String getPreprocessingModel(PipelineData data);", "@Override\n public void preprocess() {\n }", "public Instances preprocess(Pipe...
[ "0.7185971", "0.7185971", "0.7185971", "0.7185971", "0.7007652", "0.6891497", "0.670891", "0.6673237", "0.6248359", "0.6137292", "0.60628426", "0.60427654", "0.6022668", "0.5856188", "0.5828943", "0.57392967", "0.5682014", "0.56186295", "0.5596448", "0.5583993", "0.55220217",...
0.50452185
57
Creates a new instance of Shoes1
public S11() { super(); strapAllowed = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Shoe makeShoe() {\n\treturn new Shoe();\r\n}", "public Builder setShoes(int value) {\n bitField0_ |= 0x00000040;\n shoes_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tb...
[ "0.63881224", "0.6093631", "0.5865987", "0.5781937", "0.5758739", "0.5715601", "0.566431", "0.5658865", "0.5637096", "0.5635976", "0.5613923", "0.55561376", "0.55540943", "0.5502848", "0.5495485", "0.5494501", "0.5465456", "0.5439522", "0.54329926", "0.5423003", "0.5417282", ...
0.0
-1
Sends this game room data to the sender.
private void reportData() { getSender().tell(new GameRoomDataMessage(gameRoomName, capacity, players), this.getSelf()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n ...
[ "0.63992137", "0.6192966", "0.612981", "0.5966736", "0.5933615", "0.5921348", "0.5861404", "0.57848054", "0.5742484", "0.5729097", "0.5728792", "0.5726734", "0.5705594", "0.5698152", "0.5697204", "0.56924325", "0.5662241", "0.56295025", "0.5615319", "0.5601851", "0.55874306",...
0.6802887
0
do something on text submit
@Override public boolean onQueryTextSubmit(String query) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String submitText();", "public abstract void onSubmit(String text);", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n String texto = tf.getText();\r\n //lo seteo como texto en el Label\r\n ...
[ "0.8139478", "0.7695989", "0.761549", "0.6559422", "0.62833065", "0.6247281", "0.62422806", "0.6209692", "0.61793965", "0.61535156", "0.6114862", "0.61136705", "0.60990274", "0.6096528", "0.6096066", "0.6078686", "0.60772824", "0.6067253", "0.6067033", "0.6063585", "0.6063439...
0.0
-1
Handles album search feature. Filters albums on device by user input.
@Override public boolean onQueryTextChange(String userInput) { filterAudio(userInput); SingletonController.getInstance().setFilter(userInput); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void displayFilteredAlbums();", "List<AlbumVO> searchAlbum(String searchText) throws Exception;", "public void searchByAlbum()\n {\n String input = JOptionPane.showInputDialog(null,\"Enter the album you'd like to search for:\");\n input = input.replaceAll(\" \", \"_\").toUpperCase();\n \n ...
[ "0.726591", "0.7028412", "0.69864064", "0.647803", "0.6431112", "0.60357726", "0.59744805", "0.5903525", "0.58899736", "0.5871359", "0.57533777", "0.57224923", "0.5714327", "0.56910765", "0.5680187", "0.56647885", "0.5648644", "0.5630123", "0.5564949", "0.5515667", "0.5512659...
0.54774463
25
Attached to a button in fragment_album_song_selection.xml; does not override the back button
public void backButtonPressed(View view) { onBackPressed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}", "@Override\n\tpublic void backButton() {\n\n\t}", "@Override\n public void backButton() {\n\n\n }", "void onUpOrBackClick();", "void onGoBackButtonClick();", "private void configureBackButton() {\n LinearLayout layoutTop = (LinearLayou...
[ "0.7029968", "0.6999739", "0.69249445", "0.6672011", "0.66695297", "0.65880305", "0.6574326", "0.64732826", "0.64306885", "0.6428561", "0.64229625", "0.6364474", "0.63193864", "0.62992746", "0.62765104", "0.6265679", "0.6260774", "0.6260774", "0.6260774", "0.6260774", "0.6257...
0.5966986
75
Only reset the adapter if the position has changed
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (position != mClickTypeSelection) { setActionSpinner(true, position); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onDataSetChanged() {\n }", "public void dataSetChanged() {\n int count = this.mAdapter.getCount();\n this.mExpectedAdapterCount = count;\n boolean z = this.mItems.size() < (this.mOffscreenPageLimit * 2) + 1 && this.mItems.size() < count;\n ...
[ "0.6914882", "0.6907704", "0.68947357", "0.6882564", "0.6875764", "0.67636395", "0.66102964", "0.66094327", "0.65814525", "0.6556969", "0.6543786", "0.65247923", "0.652151", "0.64932853", "0.6487625", "0.6471397", "0.64660144", "0.64654386", "0.64120936", "0.6403884", "0.6389...
0.0
-1
Only reset the adapter if the position has changed
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (position != mHoldTypeSelection) { setActionSpinner(false, position); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onDataSetChanged() {\n }", "public void dataSetChanged() {\n int count = this.mAdapter.getCount();\n this.mExpectedAdapterCount = count;\n boolean z = this.mItems.size() < (this.mOffscreenPageLimit * 2) + 1 && this.mItems.size() < count;\n ...
[ "0.6914882", "0.6907704", "0.68947357", "0.6882564", "0.6875764", "0.67636395", "0.66102964", "0.66094327", "0.65814525", "0.6556969", "0.6543786", "0.65247923", "0.652151", "0.64932853", "0.6487625", "0.6471397", "0.64660144", "0.64654386", "0.64120936", "0.6403884", "0.6389...
0.0
-1
We are adding a button, not editing one
public void showAddButtonDialog() { mEditMode = false; mDialogTitle.setText(mContext.getString(R.string.dialog_title_add)); mControllerReading.setText(mContext.getString(R.string.dialog_controller_reading_default)); mDebounceMultiplier.setChecked(false); mDebounceSpinner.setSelection(0); mClickActionTypeSpinner.setSelection(0); mClickActionSpinner.setSelection(0); mHoldActionTypeSpinner.setSelection(0); mHoldActionSpinner.setSelection(0); mButtonDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NotNull\n TBItemButton addButton() {\n @NotNull TBItemButton butt = new TBItemButton(myItemListener, myStats != null ? myStats.getActionStats(\"simple_button\") : null);\n myItems.addItem(butt);\n return butt;\n }", "private void setAddButtonUI() {\n addButton = new JButton(\"Add\");\n ...
[ "0.773607", "0.7608008", "0.75572616", "0.75367725", "0.74493194", "0.7427834", "0.74222785", "0.74188054", "0.7282987", "0.72812825", "0.7187246", "0.7182512", "0.71620655", "0.7161267", "0.71592486", "0.71413666", "0.7133197", "0.7097612", "0.70935524", "0.7071916", "0.7070...
0.0
-1
Populate an action spinner based on its type
private void setActionSpinner(boolean isClickAction, int pos) { Spinner actionSpinner, typeSpinner; if (isClickAction) { actionSpinner = mClickActionSpinner; typeSpinner = mClickActionTypeSpinner; mClickTypeSelection = pos; } else { actionSpinner = mHoldActionSpinner; typeSpinner = mHoldActionTypeSpinner; mHoldTypeSelection = pos; } ArrayAdapter<String> actionAdapter; LinearLayout.LayoutParams actionParams = new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT); LinearLayout.LayoutParams actionTypeParams = new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT); actionParams.weight = 1; actionTypeParams.weight = 1; switch (pos) { case 0: // Action Type: None actionSpinner.setVisibility(View.GONE); actionAdapter = new ArrayAdapter<>(mContext, android.R.layout.simple_spinner_item, mContext.getResources().getStringArray(R.array.dialog_spinner_empty)); actionAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); actionSpinner.setAdapter(actionAdapter); actionParams.weight = 0; actionTypeParams.weight = 2; actionSpinner.setLayoutParams(actionParams); typeSpinner.setLayoutParams(actionTypeParams); break; case 1: // Action Type: Volume actionSpinner.setVisibility(View.VISIBLE); actionAdapter = new ArrayAdapter<>(mContext, android.R.layout.simple_spinner_item, mContext.getResources().getStringArray(R.array.dialog_action_volume)); actionAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); actionSpinner.setAdapter(actionAdapter); actionSpinner.setLayoutParams(actionParams); typeSpinner.setLayoutParams(actionTypeParams); break; case 2: // Action Type: Media actionSpinner.setVisibility(View.VISIBLE); actionAdapter = new ArrayAdapter<>(mContext, android.R.layout.simple_spinner_item, mContext.getResources().getStringArray(R.array.dialog_action_media)); actionAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); actionSpinner.setAdapter(actionAdapter); actionSpinner.setLayoutParams(actionParams); typeSpinner.setLayoutParams(actionTypeParams); break; case 3: // Action Type: Integrated actionSpinner.setVisibility(View.VISIBLE); actionAdapter = new ArrayAdapter<>(mContext, android.R.layout.simple_spinner_item, mContext.getResources().getStringArray(R.array.dialog_action_integrated)); actionAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); actionSpinner.setAdapter(actionAdapter); actionSpinner.setLayoutParams(actionParams); typeSpinner.setLayoutParams(actionTypeParams); break; case 4: // Action Type: Application actionSpinner.setVisibility(View.VISIBLE); AppListAdapter appAdapter = new AppListAdapter(mContext); actionSpinner.setAdapter(appAdapter); actionSpinner.setLayoutParams(actionParams); typeSpinner.setLayoutParams(actionTypeParams); break; case 5: // Action Type: Tasker actionSpinner.setVisibility(View.VISIBLE); if (mTaskerTasks != null) { actionAdapter = new ArrayAdapter<>(mContext, android.R.layout.simple_spinner_item, mTaskerTasks); } else { actionAdapter = new ArrayAdapter<>(mContext, android.R.layout.simple_spinner_item, mContext.getResources().getStringArray(R.array.dialog_spinner_empty)); } actionSpinner.setAdapter(actionAdapter); actionSpinner.setLayoutParams(actionParams); typeSpinner.setLayoutParams(actionTypeParams); break; default: actionSpinner.setVisibility(View.GONE); actionParams.weight = 0; actionTypeParams.weight = 2; actionSpinner.setLayoutParams(actionParams); typeSpinner.setLayoutParams(actionTypeParams); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createAction() {\n setupPrioritySpinner();\n mPriority.setSelection(getActivity().getSharedPreferences(TASK_PREFS, Context.MODE_PRIVATE).getInt(PRIORITY_PREF, 0));\n }", "private void spinnerAction() {\n Spinner spinnerphonetype = (Spinner) findViewById(R.id.activity_one_phon...
[ "0.6103016", "0.6077356", "0.60322636", "0.601555", "0.5984481", "0.5956611", "0.59526837", "0.5842299", "0.5818588", "0.58178174", "0.5780438", "0.5749028", "0.56265414", "0.55930096", "0.55812454", "0.5545105", "0.5456515", "0.5418632", "0.5398931", "0.5382475", "0.5338547"...
0.7030165
0
Gets the DB connection
public static Connection getConnection() { return conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(dbDriver);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(dbConnectionURL, dbUser, dbPasswo...
[ "0.81851965", "0.80784845", "0.80336136", "0.8011784", "0.798684", "0.7976663", "0.7974228", "0.797096", "0.79584277", "0.7934046", "0.793022", "0.7910675", "0.78969115", "0.7868214", "0.7827344", "0.7807825", "0.78040147", "0.7792598", "0.77527666", "0.7744297", "0.77251637"...
0.7940498
9
constructs CertificateValidationContext from the resources filepath.
private static final CertificateValidationContext getCertContextFromPath(String pemFilePath) throws IOException { return CertificateValidationContext.newBuilder() .setTrustedCa( DataSource.newBuilder().setFilename(TestUtils.loadCert(pemFilePath).getAbsolutePath())) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static final CertificateValidationContext getCertContextFromPathAsInlineBytes(\n String pemFilePath) throws IOException, CertificateException {\n X509Certificate x509Cert = TestUtils.loadX509Cert(pemFilePath);\n return CertificateValidationContext.newBuilder()\n .setTrustedCa(\n ...
[ "0.61176896", "0.5799691", "0.57057583", "0.55173784", "0.54214495", "0.54201305", "0.49235895", "0.48762348", "0.4784843", "0.47464937", "0.47242656", "0.4717961", "0.46499792", "0.46359733", "0.46232182", "0.4621227", "0.46198633", "0.46148053", "0.45626247", "0.4541877", "...
0.6537718
0
constructs CertificateValidationContext from pemFilePath and sets contents as inlinebytes.
private static final CertificateValidationContext getCertContextFromPathAsInlineBytes( String pemFilePath) throws IOException, CertificateException { X509Certificate x509Cert = TestUtils.loadX509Cert(pemFilePath); return CertificateValidationContext.newBuilder() .setTrustedCa( DataSource.newBuilder().setInlineBytes(ByteString.copyFrom(x509Cert.getEncoded()))) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static final CertificateValidationContext getCertContextFromPath(String pemFilePath)\n throws IOException {\n return CertificateValidationContext.newBuilder()\n .setTrustedCa(\n DataSource.newBuilder().setFilename(TestUtils.loadCert(pemFilePath).getAbsolutePath()))\n .build...
[ "0.7474138", "0.53416544", "0.5284994", "0.51318645", "0.47603047", "0.45531023", "0.45502505", "0.45317042", "0.45222408", "0.44545093", "0.4445764", "0.44305614", "0.43665382", "0.4363274", "0.4307463", "0.43048468", "0.42949504", "0.4292582", "0.42780608", "0.42624116", "0...
0.8407006
0
Constructor with specified initial values
public Product(String id, String name, String description) { this.id = id; this.name = name; this.description = description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConstructorsDemo() \n\t {\n\t x = 5; // Set the initial value for the class attribute x\n\t }", "public InitialData(){}", "public void init(Object[] initialParams) {\n\t \n\t}", "public Initialization()\r\n {\r\n C.cinit();\r\n init(\"2\",0);\r\n \r\n init(\"2\",1);...
[ "0.67586315", "0.6732957", "0.6700343", "0.6582033", "0.6577564", "0.6533861", "0.6451989", "0.64434546", "0.6440125", "0.638089", "0.6312323", "0.6276497", "0.6258018", "0.6253083", "0.62529725", "0.62525135", "0.6252151", "0.6190911", "0.6179333", "0.6179225", "0.6168912", ...
0.0
-1
Creates a table model for closed patterns mined from byte sequences
public ClosedPatternTableModel(List<ClosedPatternRowObject> rowObjects, ServiceProvider serviceProvider) { super(MODEL_NAME, serviceProvider); this.rowObjects = rowObjects; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HdbSequenceModel createHdbSequenceModel();", "Table8 create(Table8 table8);", "HdbSequenceElements createHdbSequenceElements();", "ByteDataTable()\n\t{\n\t\tsuper();\n\n\t\tdouble cellWidth = WIDEST_BYTE_STRING.getBoundsInLocal().getWidth();\n\t\tArrayList<TableColumn<Row, String>> columns = new ArrayList<Ta...
[ "0.5672329", "0.5323669", "0.5313757", "0.5293912", "0.50130844", "0.49442813", "0.49246994", "0.4910212", "0.48609516", "0.48463565", "0.47846186", "0.4760375", "0.47598726", "0.4754189", "0.47384945", "0.47344264", "0.47231075", "0.4696092", "0.4688698", "0.46689126", "0.46...
0.4791299
10
Main entry point of class given a particular set of haplotypes, samples and reference context, compute genotype likelihoods and assemble into a list of variant contexts and genomic events ready for calling The list of samples we're working with is obtained from the readLikelihoods
public CalledHaplotypes assignGenotypeLikelihoods(final List<Haplotype> haplotypes, final ReadLikelihoods<Haplotype> readLikelihoods, final Map<String, List<GATKRead>> perSampleFilteredReadList, final byte[] ref, final SimpleInterval refLoc, final SimpleInterval activeRegionWindow, final FeatureContext tracker, final List<VariantContext> activeAllelesToGenotype, final boolean emitReferenceConfidence, final int maxMnpDistance, final SAMFileHeader header, final boolean withBamOut) { // sanity check input arguments Utils.nonEmpty(haplotypes, "haplotypes input should be non-empty and non-null"); Utils.validateArg(readLikelihoods != null && readLikelihoods.numberOfSamples() > 0, "readLikelihoods input should be non-empty and non-null"); Utils.validateArg(ref != null && ref.length > 0, "ref bytes input should be non-empty and non-null"); Utils.nonNull(refLoc, "refLoc must be non-null"); Utils.validateArg(refLoc.size() == ref.length, " refLoc length must match ref bytes"); Utils.nonNull(activeRegionWindow, "activeRegionWindow must be non-null"); Utils.nonNull(activeAllelesToGenotype, "activeAllelesToGenotype must be non-null"); Utils.validateArg(refLoc.contains(activeRegionWindow), "refLoc must contain activeRegionWindow"); ParamUtils.isPositiveOrZero(maxMnpDistance, "maxMnpDistance may not be negative."); // update the haplotypes so we're ready to call, getting the ordered list of positions on the reference // that carry events among the haplotypes final SortedSet<Integer> startPosKeySet = decomposeHaplotypesIntoVariantContexts(haplotypes, ref, refLoc, activeAllelesToGenotype, maxMnpDistance); // Walk along each position in the key set and create each event to be outputted final Set<Haplotype> calledHaplotypes = new HashSet<>(); final List<VariantContext> returnCalls = new ArrayList<>(); final int ploidy = configuration.genotypeArgs.samplePloidy; final List<Allele> noCallAlleles = GATKVariantContextUtils.noCallAlleles(ploidy); if (withBamOut) { //add annotations to reads for alignment regions and calling regions AssemblyBasedCallerUtils.annotateReadLikelihoodsWithRegions(readLikelihoods, activeRegionWindow); } for( final int loc : startPosKeySet ) { if( loc < activeRegionWindow.getStart() || loc > activeRegionWindow.getEnd() ) { continue; } final List<VariantContext> activeEventVariantContexts; if( activeAllelesToGenotype.isEmpty() ) { activeEventVariantContexts = getVariantContextsFromActiveHaplotypes(loc, haplotypes, true); } else { // we are in GGA mode! activeEventVariantContexts = getVariantContextsFromGivenAlleles(loc, activeAllelesToGenotype, true); } final List<VariantContext> eventsAtThisLocWithSpanDelsReplaced = replaceSpanDels(activeEventVariantContexts, Allele.create(ref[loc - refLoc.getStart()], true), loc); VariantContext mergedVC = AssemblyBasedCallerUtils.makeMergedVariantContext(eventsAtThisLocWithSpanDelsReplaced); if( mergedVC == null ) { continue; } final Map<Allele, List<Haplotype>> alleleMapper = createAlleleMapper(mergedVC, loc, haplotypes, activeAllelesToGenotype); if( configuration.debug && logger != null ) { logger.info("Genotyping event at " + loc + " with alleles = " + mergedVC.getAlleles()); } mergedVC = removeAltAllelesIfTooManyGenotypes(ploidy, alleleMapper, mergedVC); ReadLikelihoods<Allele> readAlleleLikelihoods = readLikelihoods.marginalize(alleleMapper, new SimpleInterval(mergedVC).expandWithinContig(ALLELE_EXTENSION, header.getSequenceDictionary())); if (configuration.isSampleContaminationPresent()) { readAlleleLikelihoods.contaminationDownsampling(configuration.getSampleContamination()); } if (emitReferenceConfidence) { mergedVC = addNonRefSymbolicAllele(mergedVC); readAlleleLikelihoods.addNonReferenceAllele(Allele.NON_REF_ALLELE); } final GenotypesContext genotypes = calculateGLsForThisEvent(readAlleleLikelihoods, mergedVC, noCallAlleles); final VariantContext call = calculateGenotypes(new VariantContextBuilder(mergedVC).genotypes(genotypes).make(), getGLModel(mergedVC), header); if( call != null ) { readAlleleLikelihoods = prepareReadAlleleLikelihoodsForAnnotation(readLikelihoods, perSampleFilteredReadList, emitReferenceConfidence, alleleMapper, readAlleleLikelihoods, call); final VariantContext annotatedCall = makeAnnotatedCall(ref, refLoc, tracker, header, mergedVC, readAlleleLikelihoods, call); returnCalls.add( annotatedCall ); if (withBamOut) { AssemblyBasedCallerUtils.annotateReadLikelihoodsWithSupportedAlleles(call, readAlleleLikelihoods); } // maintain the set of all called haplotypes call.getAlleles().stream().map(alleleMapper::get).filter(Objects::nonNull).forEach(calledHaplotypes::addAll); } } final List<VariantContext> phasedCalls = doPhysicalPhasing ? phaseCalls(returnCalls, calledHaplotypes) : returnCalls; return new CalledHaplotypes(phasedCalls, calledHaplotypes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Pair<List<Genotype>, GenotypeLocusData> createCalls(RefMetaDataTracker tracker, char ref, HashMap<String, AlignmentContextBySample> contexts, GenomeLoc loc) {\n int indexOfMax = 0;\n char baseOfMax = ref;\n double maxConfidence = Double.MIN_VALUE;\n for ( char altAllele : Ba...
[ "0.6090553", "0.5699476", "0.5572057", "0.544278", "0.51581347", "0.5144002", "0.5089874", "0.5086845", "0.49968785", "0.497307", "0.4966495", "0.49226713", "0.48920146", "0.48797348", "0.48691142", "0.48639128", "0.48469388", "0.4841646", "0.4830717", "0.4826987", "0.4819725...
0.6467147
0
For a particular event described in inputVC, form PL vector for each sample by looking into allele read map and filling likelihood matrix for each allele
protected GenotypesContext calculateGLsForThisEvent(final ReadLikelihoods<Allele> readLikelihoods, final VariantContext mergedVC, final List<Allele> noCallAlleles ) { Utils.nonNull(readLikelihoods, "readLikelihoods"); Utils.nonNull(mergedVC, "mergedVC"); final List<Allele> vcAlleles = mergedVC.getAlleles(); final AlleleList<Allele> alleleList = readLikelihoods.numberOfAlleles() == vcAlleles.size() ? readLikelihoods : new IndexedAlleleList<>(vcAlleles); final GenotypingLikelihoods<Allele> likelihoods = genotypingModel.calculateLikelihoods(alleleList,new GenotypingData<>(ploidyModel,readLikelihoods)); final int sampleCount = samples.numberOfSamples(); final GenotypesContext result = GenotypesContext.create(sampleCount); for (int s = 0; s < sampleCount; s++) { result.add(new GenotypeBuilder(samples.getSample(s)).alleles(noCallAlleles).PL(likelihoods.sampleLikelihoods(s).getAsPLs()).make()); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processData() {\n\t\tfloat S, M, VPR, VM;\n\t\tgetCal();\n\t\tgetTimestamps();\n\t\t\n \n\t\tfor(int i = 0; i < r.length; i++) {\n\t\t\t//get lux\n\t\t\tlux[i] = RGBcal[0]*vlam[0]*r[i] + RGBcal[1]*vlam[1]*g[i] + RGBcal[2]*vlam[2]*b[i];\n \n\t\t\t//get CLA\n\t\t\tS = RGBcal[0]*smac[0]*r[i] + RGBcal...
[ "0.55143595", "0.5257567", "0.5253568", "0.5126732", "0.5029475", "0.49475676", "0.475419", "0.4689893", "0.46602765", "0.46556956", "0.46436468", "0.4636452", "0.4616809", "0.46162686", "0.45779273", "0.4552181", "0.45322683", "0.45222244", "0.45200452", "0.45139152", "0.450...
0.45966536
14
Removes symbolic events from list of haplotypes
protected static void cleanUpSymbolicUnassembledEvents( final List<Haplotype> haplotypes ) { Utils.nonNull(haplotypes); final List<Haplotype> haplotypesToRemove = new ArrayList<>(); for( final Haplotype h : haplotypes ) { for( final VariantContext vc : h.getEventMap().getVariantContexts() ) { if( vc.isSymbolic() ) { for( final Haplotype h2 : haplotypes ) { for( final VariantContext vc2 : h2.getEventMap().getVariantContexts() ) { if( vc.getStart() == vc2.getStart() && (vc2.isIndel() || vc2.isMNP()) ) { // unfortunately symbolic alleles can't currently be combined with non-point events haplotypesToRemove.add(h); break; } } } } } } haplotypes.removeAll(haplotypesToRemove); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeEvents(){\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n List<EventTrigger> eventTriggers = new ArrayList<EventTrigger>(eventGroup.getValue());\n for(Event...
[ "0.62496066", "0.61110765", "0.5973948", "0.584533", "0.559651", "0.55690175", "0.5568766", "0.5551485", "0.5541244", "0.545574", "0.5433662", "0.5427607", "0.5404674", "0.5395377", "0.5385274", "0.5372184", "0.53649515", "0.5361955", "0.5355863", "0.53547347", "0.5315206", ...
0.7949662
0
check whether all alleles of a vc, including the ref but excluding the NON_REF allele, are one base in length
protected static GenotypeLikelihoodsCalculationModel getGLModel(final VariantContext vc) { final boolean isSNP = vc.getAlleles().stream().filter(a -> !a.isSymbolic()).allMatch(a -> a.length() == 1); return isSNP ? GenotypeLikelihoodsCalculationModel.SNP : GenotypeLikelihoodsCalculationModel.INDEL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Requires(\"c != null\")\n private boolean pathIsTooDivergentFromReference( final Cigar c ) {\n for( final CigarElement ce : c.getCigarElements() ) {\n if( ce.getOperator().equals(CigarOperator.N) ) {\n return true;\n }\n }\n return false;\n }", "pr...
[ "0.60040134", "0.5925773", "0.5669743", "0.56538004", "0.55959177", "0.5359747", "0.5301991", "0.52329344", "0.5226109", "0.52134645", "0.5165535", "0.5137831", "0.51305974", "0.512898", "0.51215273", "0.5121229", "0.5106983", "0.5102223", "0.50951576", "0.5080747", "0.505746...
0.0
-1
Created by Zachary Herridge on 7/26/2018.
public interface MessagingQueueListener { void onMessage(MessageEvent messageEvent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public int describeContents() { return 0; }", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n...
[ "0.573949", "0.55468684", "0.5527791", "0.5520735", "0.55133224", "0.5490192", "0.5383327", "0.53155816", "0.5302001", "0.5288547", "0.52827984", "0.5263403", "0.5252079", "0.5252079", "0.5252079", "0.5252079", "0.5252079", "0.5252079", "0.525117", "0.5250782", "0.5250782", ...
0.0
-1
abstract public MarshalerAbstract getMarshaler();
abstract public String getApplicationName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public javax.slee.resource.Marshaler getMarshaler() {\r\n \t\treturn null;\r\n \t}", "public Marshaller getMarshaller()\n throws JAXBException {\n return getMarshaller(true);\n }", "public static BinaryMessageEncoder<BirthInfo> getEncoder() {\n return ENCODER;\n }", "SerializeFactory getSerializeF...
[ "0.8104173", "0.6168797", "0.6043439", "0.6023546", "0.59082437", "0.58513504", "0.58489823", "0.5839952", "0.5833148", "0.5818269", "0.58161175", "0.57810843", "0.577914", "0.577914", "0.5763591", "0.57404953", "0.5733276", "0.57210857", "0.5703297", "0.56488496", "0.5632243...
0.0
-1
Have to implement a faster version with streams
public void createHashedVector() { Double val; for(int i=0; i < this.size; i++) { val = this.get(i); if(val !=0) { this.hmap.put(i, val); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void doStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.stream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doStream(): \" + ans);\n long e = System.currentTime...
[ "0.5832039", "0.5615606", "0.5608581", "0.5558672", "0.5539166", "0.5515144", "0.544838", "0.5413682", "0.53811324", "0.53343374", "0.52857727", "0.52849215", "0.5282471", "0.5239383", "0.523746", "0.523316", "0.5227797", "0.52234536", "0.5206238", "0.5193808", "0.5181343", ...
0.0
-1
/ Code within the callback can roll the transaction back by calling the setRollbackOnly() method on the supplied TransactionStatus object
@Override public Object doInTransaction(TransactionStatus transactionStatus) { transactionStatus.setRollbackOnly(); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void rollbackTransaction();", "@Override\n public void rollbackTx() {\n \n }", "@Override\r\n\tpublic void setRollbackOnly() throws IllegalStateException, SystemException {\r\n\t\trequireTransaction(\"set rollback\");\r\n\t\tgetTransaction().setRollbackOnly();\r\n\t}", "public static void setRollbackOnl...
[ "0.7189756", "0.7120261", "0.7107874", "0.709808", "0.7001101", "0.6980156", "0.69780046", "0.6925179", "0.6857502", "0.6855202", "0.68451256", "0.6762191", "0.6731523", "0.67129046", "0.66981596", "0.66524994", "0.6646384", "0.663933", "0.663919", "0.6625552", "0.6606226", ...
0.7596605
0
initialize your data structure here.
public MinStack() { stack = new Stack<Integer>(); minStack = new Stack<Integer>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initData() {\n\t}", "private void initData() {\n }", "private void initData() {\n\n }", "public void initData() {\n }", "public void initData() {\n }", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Over...
[ "0.7977482", "0.7960524", "0.77892214", "0.77469254", "0.77469254", "0.7558169", "0.7558169", "0.7558169", "0.7558169", "0.7558169", "0.7558169", "0.7555887", "0.74711394", "0.74664557", "0.7456787", "0.7442776", "0.74332404", "0.74293566", "0.74293566", "0.74293566", "0.7424...
0.0
-1
/ http .authorizeRequests() .antMatchers("/css/", "/").permitAll() .antMatchers("/user/").hasRole("USER") .and() .formLogin().loginPage("/login").failureUrl("/loginerror").defaultSuccessUrl("/user/index");
@Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() // Los recursos estáticos no requieren autenticación .antMatchers("/css/**", "/").permitAll() .antMatchers( "/vendors/**", "/img/**", "/js/**", "/scss/**", "/node_modules/**").permitAll() //Asignar permisos a URLs por ROLES .antMatchers("/monedas/**").hasAnyAuthority("ROLE_USER") .antMatchers("/tasas/**").hasAnyAuthority("ROLE_USER") // Todas las demás URLs de la Aplicación requieren autenticación .anyRequest().authenticated() // El formulario de Login no requiere autenticacion //.and().formLogin().permitAll(); //Asi se usa para usar el por dedecto de spring security // El formulario de Login no requiere autenticacion //.and().formLogin().loginPage("/login").permitAll() .and().formLogin().loginPage("/login").failureUrl("/login-error").defaultSuccessUrl("/").permitAll() .and().logout().permitAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void configure(HttpSecurity http) throws Exception {\n \thttp\n .authorizeRequests()\n .antMatchers(resources).permitAll() \n .antMatchers(\"/\",\"/index\", \"/usuarioForm\").permitAll()\n .anyRequest().authenticated()\n .and()\n .formL...
[ "0.80347663", "0.768262", "0.75601685", "0.74140376", "0.7339735", "0.73328567", "0.71340895", "0.7128428", "0.7117923", "0.6985396", "0.6900678", "0.6856645", "0.6810636", "0.67429996", "0.66432226", "0.6628903", "0.6618401", "0.6531288", "0.65220636", "0.65088916", "0.65029...
0.6532591
17
If start is after 16:00 add one day = 1440 minutes
private Integer getStandardStart(int startTime) { if (startTime % 1440 > 960) { startTime += 1440; } int startOfDay = startTime - (startTime % 1440); //we need a standard variable to indicate the day of week; //standard day starts at 08:00 = 480 minutes and ends at 16:00 = 960 minutes capacityEndTime = startOfDay + 960; return startOfDay + 480; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void increment_time()\n\t{\n\t\ttime_of_day = time_of_day + 1;\n\t\tif(time_of_day>=120)\n\t\t{\n\t\t\ttime_of_day=time_of_day-120;\n\t\t}\n\t}", "private Date stepTime(Date d, int mins) {\n\t\tif (d == null) return d;\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(d);\n\t\tcal.add(C...
[ "0.66337526", "0.6062038", "0.5722276", "0.5685164", "0.56656003", "0.564328", "0.5633698", "0.5568818", "0.55547464", "0.55514425", "0.5504714", "0.5475176", "0.5472962", "0.5465932", "0.54124546", "0.5397302", "0.53697264", "0.53657097", "0.5341377", "0.5337767", "0.5337767...
0.5144323
47
Graph: 0 1 2 3 4 5
@Test public void testMiniFatTreeExtension() throws IOException { Graph: // // 0 1 // 2 3 4 5 // File inFile = constructGraph( 6, 16, "incl_range(2,5)", "set(0,1)", "incl_range(2,5)", "2 0\n0 2\n2 1\n1 2\n3 0\n0 3\n3 1\n1 3\n4 0\n0 4\n4 1\n1 4\n5 0\n0 5\n5 1\n1 5" ); // Perform extension File tempOut = File.createTempFile("topology", ".tmp"); TopologyServerExtender extender = new TopologyServerExtender(inFile.getAbsolutePath(), tempOut.getAbsolutePath()); extender.extendRegular(7); assertTrue(inFile.delete()); Pair<Graph, GraphDetails> res = GraphReader.read(tempOut.getAbsolutePath()); GraphDetails details = res.getRight(); // Graph dimensions assertEquals(34, details.getNumNodes()); // 6 + 4*7 = 34 assertEquals(72, details.getNumEdges()); // 16 + 2*4*7 = 16 + 56 = 72 // Sets assertTrue(details.isAutoExtended()); assertEquals(createSet(2, 3, 4, 5), details.getTorNodeIds()); // ToRs remain the same assertEquals(createSet(0, 1), details.getSwitchNodeIds()); // Switches remain the same Set<Integer> servers = new HashSet<>(); for (int i = 6; i < 34; i++ ) { servers.add(i); } assertEquals(servers, details.getServerNodeIds()); // Servers are added // Test saved mapping from server perspective for (int i = 6; i < 34; i++ ) { assertEquals((int) details.getTorIdOfServer(i), 2 + (int) Math.floor((double) (i - 6) / 7.0)); } // Test saved mapping from ToR perspective for (int i = 2; i <= 5; i++ ) { Set<Integer> torServers = new HashSet<>(); for (int j = 6 + (i - 2) * 7; j < 6 + (i - 1) * 7; j++ ) { torServers.add(j); } assertEquals(torServers, details.getServersOfTor(i)); } assertTrue(tempOut.delete()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void graph4() {\n\t\tconnect(\"8\", \"9\");\n\t\tconnect(\"3\", \"1\");\n\t\tconnect(\"3\", \"2\");\n\t\tconnect(\"3\", \"9\");\n\t\tconnect(\"4\", \"3\");\n\t\t//connect(\"4\", \"5\");\n\t\t//connect(\"4\", \"7\");\n\t\t//connect(\"5\", \"7\");\t\t\n\t}", "void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnec...
[ "0.7336581", "0.7333114", "0.69780195", "0.6922994", "0.6810699", "0.67952925", "0.67088103", "0.6617793", "0.65478635", "0.6517651", "0.6411857", "0.6409773", "0.6404483", "0.6321491", "0.6290659", "0.6274279", "0.62680465", "0.62374824", "0.62269634", "0.61501545", "0.61377...
0.0
-1
Returns the optional QueryCache.
public static QueryCache getQueryCache(Cache<?, ?> cache) { return SecurityActions.getCacheComponentRegistry(cache.getAdvancedCache()).getComponent(QueryCache.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected String getQueryCacheName() {\n\t\treturn null;\n\t}", "private static InternalCacheConfig defaultQueryCacheConfig() {\n InternalCacheConfig cacheConfig = new InternalCacheConfig();\n cacheConfig.maxIdle = Duration.ofSeconds(100);\n cacheConfig.objectCount = 10_000;\n ...
[ "0.6638221", "0.6287616", "0.6102152", "0.60510445", "0.601165", "0.5950047", "0.5935736", "0.5778335", "0.5751855", "0.5709542", "0.5628802", "0.56202567", "0.55991095", "0.5594701", "0.5582303", "0.55820054", "0.55799973", "0.557114", "0.555522", "0.5553081", "0.55258054", ...
0.6397892
1
TODO Autogenerated method stub
@Override public void insertAccount() throws Exception { }
{ "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
metri_quadri_distrutti_del_porto = potenza_di_fuoco_invasori 2.5
public boolean portoDistrutto() { return p.getDimensioneSqMetersNonDistrutta() <= 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mutacioni(Individe individi, double probabiliteti) {\n int gjasaPerNdryshim = (int) ((1 / probabiliteti) * Math.random());\r\n if (gjasaPerNdryshim == 1) {\r\n int selectVetura1 = (int) (Math.random() * individi.pikatEVeturave.length);//selekton veturen e pare\r\n in...
[ "0.65374136", "0.64575756", "0.6166911", "0.60817415", "0.60675704", "0.6059871", "0.6046768", "0.60442775", "0.5940789", "0.58433855", "0.58246195", "0.58072853", "0.58033663", "0.5800611", "0.5777529", "0.57630223", "0.57530236", "0.5744059", "0.5742758", "0.57394457", "0.5...
0.0
-1
/ JADX WARNING: Removed duplicated region for block: B:26:0x0087 / JADX WARNING: Removed duplicated region for block: B:19:0x0067
private void c() { /* r14 = this; r12 = android.os.SystemClock.elapsedRealtime(); r8 = r14.d(); r0 = r14.t; if (r0 == 0) goto L_0x007a; L_0x000c: r0 = 1; r7 = r0; L_0x000e: r0 = r14.r; r0 = r0.a(); if (r0 != 0) goto L_0x0018; L_0x0016: if (r7 == 0) goto L_0x007d; L_0x0018: r0 = 1; r10 = r0; L_0x001a: if (r10 != 0) goto L_0x0095; L_0x001c: r0 = r14.d; r0 = r0.b; if (r0 != 0) goto L_0x0028; L_0x0022: r0 = -1; r0 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1)); if (r0 != 0) goto L_0x0032; L_0x0028: r0 = r14.p; r0 = r12 - r0; r2 = 2000; // 0x7d0 float:2.803E-42 double:9.88E-321; r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1)); if (r0 <= 0) goto L_0x0095; L_0x0032: r14.p = r12; r0 = r14.d; r1 = r14.f; r1 = r1.size(); r0.a = r1; r0 = r14.c; r1 = r14.f; r2 = r14.o; r4 = r14.m; r6 = r14.d; r0.getChunkOperation(r1, r2, r4, r6); r0 = r14.d; r0 = r0.a; r0 = r14.a(r0); r1 = r14.d; r1 = r1.b; if (r1 != 0) goto L_0x0080; L_0x0059: r4 = -1; L_0x005b: r0 = r14.b; r2 = r14.m; r1 = r14; r6 = r10; r0 = r0.update(r1, r2, r4, r6); if (r7 == 0) goto L_0x0087; L_0x0067: r0 = r14.v; r0 = r12 - r0; r2 = r14.u; r2 = (long) r2; r2 = r14.c(r2); r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1)); if (r0 < 0) goto L_0x0079; L_0x0076: r14.e(); L_0x0079: return; L_0x007a: r0 = 0; r7 = r0; goto L_0x000e; L_0x007d: r0 = 0; r10 = r0; goto L_0x001a; L_0x0080: if (r0 == 0) goto L_0x0095; L_0x0082: r4 = r14.d(); goto L_0x005b; L_0x0087: r1 = r14.r; r1 = r1.a(); if (r1 != 0) goto L_0x0079; L_0x008f: if (r0 == 0) goto L_0x0079; L_0x0091: r14.f(); goto L_0x0079; L_0x0095: r4 = r8; goto L_0x005b; */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.exoplayer.chunk.ChunkSampleSource.c():void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test (timeout=180000)\n public void testDegenerateRegions() throws Exception {\n TableName table = TableName.valueOf(\"tableDegenerateRegions\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, ...
[ "0.5977682", "0.59522206", "0.57200843", "0.57190716", "0.56996214", "0.5614598", "0.5485327", "0.5483199", "0.54684085", "0.5417067", "0.5406487", "0.5353741", "0.5343063", "0.5332558", "0.5328872", "0.5320241", "0.5316172", "0.52818745", "0.5281417", "0.5266477", "0.5265458...
0.0
-1
print the result without duplications
private void printData(Set<ModelData> data) { for (ModelData modelData : data) { Log.i(TAG,"Id "+modelData.getId()+",Name: "+modelData.getName()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void duplicate() {\n System.out.println(\"Je bent al in bezit van deze vragenlijst!\");\n }", "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\"...
[ "0.6816762", "0.62523186", "0.6202981", "0.6198502", "0.6143679", "0.6093933", "0.60280854", "0.60063213", "0.6002707", "0.59614253", "0.59590226", "0.5910345", "0.5868154", "0.5817361", "0.5770535", "0.5763108", "0.57612514", "0.57511395", "0.57430786", "0.5732327", "0.57254...
0.0
-1
Test of collectIdentifierValues method, of class CommandLineArgumentParser.
@Test public void testCollectIdentifierValues() throws Exception{ System.out.println("collectIdentifierValues"); char u = 'u'; char h ='h'; char k ='k'; System.out.println("test1"); String [] instanceInput = {"1u","chat.txt","user1"}; CommandLineArgumentParser instance = new CommandLineArgumentParser(instanceInput); String [] expResult = {"user1"}; String []result = instance.collectIdentifierValues(u,instanceInput); System.out.println(Arrays.toString(result)+" expected: "+Arrays.toString(expResult)); System.out.println("test2"); String [] instanceInput2 = {"2u","chat.txt","user1","user2"}; CommandLineArgumentParser instance2 = new CommandLineArgumentParser(instanceInput2); String [] expResult2 = {"user1","user2"}; String []result2 = instance2.collectIdentifierValues(u,instanceInput2); System.out.println(Arrays.toString(result2)+" expected: "+Arrays.toString(expResult2)); System.out.println("test3"); String [] instanceInput3 = {"1k3u","chat.txt","keyWord","user1","user2","user3"}; CommandLineArgumentParser instance3 = new CommandLineArgumentParser(instanceInput3); String [] expResult3 = {"user1","user2","user3"}; String []result3 = instance3.collectIdentifierValues(u,instanceInput3); System.out.println(Arrays.toString(result3)+" expected: "+Arrays.toString(expResult3)); System.out.println("test4"); String [] instanceInput4 = {"2k1u1h","chat.txt","keyWord1","keyWord1","user1","hiddenWord"}; CommandLineArgumentParser instance4 = new CommandLineArgumentParser(instanceInput4); String [] expResult4 = {"user1"}; String [] result4 = instance4.collectIdentifierValues(u,instanceInput4); System.out.println(Arrays.toString(result4)+" expected: "+Arrays.toString(expResult4)); System.out.println("test5"); String [] instanceInput5 = {"2h3k","chat.txt","hiddenWord1","hiddenWord2","keyWord","keyWord","keyword3"}; CommandLineArgumentParser instance5 = new CommandLineArgumentParser(instanceInput5); String [] expResult5 = {"hiddenWord1","hiddenWord2"}; String [] result5 = instance5.collectIdentifierValues(h,instanceInput5); System.out.println(Arrays.toString(result5)+" expected: "+Arrays.toString(expResult5)); System.out.println("test6"); String [] instanceInput6 = {"3k2h","chat.txt","keyWord1","keyWord2","keyWord3","hiddenWord1","hiddenWord2"}; CommandLineArgumentParser instance6 = new CommandLineArgumentParser(instanceInput6); String [] expResult6 = {"keyWord1","keyWord2","keyWord3"}; String [] result6 = instance6.collectIdentifierValues(k,instanceInput6); System.out.println(Arrays.toString(result6)+" expected: "+Arrays.toString(expResult6)); System.out.println("test7"); String [] instanceInput7 = {"1u1k1h","chat.txt","username1","keyWord1","hiddenWord1"}; CommandLineArgumentParser instance7 = new CommandLineArgumentParser(instanceInput7); String [] expResult7 = {"keyWord1"}; String [] result7 = instance7.collectIdentifierValues(k,instanceInput7); System.out.println(Arrays.toString(result7)+" expected: "+Arrays.toString(expResult7)); System.out.println("test8"); String [] instanceInput8 = {"1u","chat.txt","mike"}; CommandLineArgumentParser instance8 = new CommandLineArgumentParser(instanceInput8); String [] expResult8 = {"mike"}; String [] result8 = instance8.collectIdentifierValues(u,instanceInput8); System.out.println(Arrays.toString(result8)+" expected: "+Arrays.toString(expResult8)); assertEquals(Arrays.toString(expResult), Arrays.toString(result)); assertEquals(Arrays.toString(expResult2), Arrays.toString(result2)); assertEquals(Arrays.toString(expResult3), Arrays.toString(result3)); assertEquals(Arrays.toString(expResult4), Arrays.toString(result4)); assertEquals(Arrays.toString(expResult5), Arrays.toString(result5)); assertEquals(Arrays.toString(expResult6), Arrays.toString(result6)); assertEquals(Arrays.toString(expResult7), Arrays.toString(result7)); assertEquals(Arrays.toString(expResult8), Arrays.toString(result8)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testTallyIdentifiers() throws Exception {\r\n System.out.println(\"tallyIdentifiers\");\r\n String identifiers = \"1k2h3u\";\r\n String [] args= {\"1k2h3u\",\"test\"};\r\n CommandLineArgumentParser instance = new CommandLineArgumentParser(args);\r\n int e...
[ "0.6263417", "0.5575525", "0.5280657", "0.5253385", "0.52436274", "0.5234544", "0.5217076", "0.51767665", "0.5158806", "0.514335", "0.5123334", "0.51193875", "0.5069831", "0.49926808", "0.49160537", "0.49060717", "0.48728544", "0.48550496", "0.48496848", "0.484878", "0.481997...
0.7230284
0
Test of createOutputFilePath method, of class CommandLineArgumentParser.
@Test public void testCreateOutputFilePath() throws Exception { System.out.println("createOutputFilePath"); String [] instanceInput = {"ukh","chat.txt","mike","keyWord","hiddenWord"}; CommandLineArgumentParser instance = new CommandLineArgumentParser(instanceInput); String expResult = "chat.json"; String result = instance.createOutputFilePath(); System.out.println(expResult+" "+result); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File getOutputFilePath() {\n return outputFile;\n }", "private static File determineOutputFile(CommandLine optionLine)\n {\n String output = optionLine.getOptionValue(Environment.OUTPUT);\n if (!StringUtils.isEmpty(output)) {\n return new File(output);\n }\n System....
[ "0.6269155", "0.62538016", "0.61790156", "0.6000293", "0.5999795", "0.5980241", "0.5939752", "0.5849184", "0.5709826", "0.55870533", "0.55534226", "0.55296856", "0.5522623", "0.55176675", "0.5514343", "0.5508993", "0.54581726", "0.54474366", "0.5426738", "0.5406867", "0.53619...
0.81863743
0
Test of checkInput method, of class CommandLineArgumentParser.
@Test public void testCheckInput() throws Exception { System.out.println("checkInput"); System.out.println("test1"); String[] arguments = {"1k2h3u","test.txt","1","2","3","4","5","6"}; CommandLineArgumentParser instance =new CommandLineArgumentParser(arguments); String expResult = "correct"; String result = instance.checkInput(arguments); assertEquals(expResult, result); System.out.println("test 2"); String[] arguments2 = {"1k","test.txt","1"}; String expResult2 = "correct"; String result2 = instance.checkInput(arguments2); assertEquals(expResult2, result2); System.out.println("test 3"); String[] arguments3 = {"chat.txt"}; String expResult3 = "correct"; String result3 = instance.checkInput(arguments3); assertEquals(expResult3, result3); System.out.println("test 4"); String[] arguments4 = {"1k2h3u","test.txt","1","2","3","4","5"}; String expResult4 = "Incorrect number of arguments"; String result4 = instance.checkInput(arguments4); assertEquals(expResult4, result4); System.out.println("test 5"); String[] arguments5 = {}; String expResult5 = "Need at least one argument with input file path"; String result5 = instance.checkInput(arguments5); assertEquals(expResult5, result5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGetInputArguments() {\n List<String> args = mb.getInputArguments();\n assertNotNull(args);\n for (String string : args) {\n assertNotNull(string);\n assertTrue(string.length() > 0);\n }\n }", "protected abstract boolean checkInput();", "publi...
[ "0.7267352", "0.71635056", "0.70276856", "0.67909145", "0.6767938", "0.6764676", "0.6728627", "0.6693893", "0.6491859", "0.6466175", "0.64212334", "0.63676536", "0.63346225", "0.63318336", "0.6305013", "0.62908936", "0.6280127", "0.6269841", "0.62272334", "0.6204189", "0.6189...
0.8165666
0
Test of tallyIdentifiers method, of class CommandLineArgumentParser.
@Test public void testTallyIdentifiers() throws Exception { System.out.println("tallyIdentifiers"); String identifiers = "1k2h3u"; String [] args= {"1k2h3u","test"}; CommandLineArgumentParser instance = new CommandLineArgumentParser(args); int expResult = 6; int result = instance.tallyIdentifiers(identifiers); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testCollectIdentifierValues() throws Exception{\r\n System.out.println(\"collectIdentifierValues\");\r\n \r\n char u = 'u';\r\n char h ='h';\r\n char k ='k';\r\n \r\n System.out.println(\"test1\"); \r\n String [] instanceInput = {\...
[ "0.58356756", "0.5643694", "0.53476745", "0.53120995", "0.51540637", "0.51304716", "0.50592357", "0.50332886", "0.50042164", "0.49822244", "0.49704313", "0.4968339", "0.49462804", "0.49261093", "0.4922097", "0.4916097", "0.48984516", "0.48850554", "0.48599166", "0.48479018", ...
0.8549768
0
cette methode decremente le pin_count
public void decrementerPinCount() { this.pin_count--; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void decrementGazingCount() {\n // TODO - You fill in here.\n mGazingThreads.decrementAndGet();\n }", "public void decrease() {\r\n\t\t\tsynchronized (activity.getTaskTracker()) {\r\n\t\t\t\tactivity.getTaskTracker().count--;\r\n\t\t\t\tLog.d(LOGTAG, \"Decremented task count to \" + coun...
[ "0.6516814", "0.63816845", "0.6379723", "0.63465506", "0.6334019", "0.61610556", "0.6149597", "0.614528", "0.61300534", "0.6071335", "0.6057952", "0.59765255", "0.5948149", "0.5948149", "0.59462273", "0.59323865", "0.590444", "0.588798", "0.58657634", "0.5859603", "0.58585864...
0.8049414
0
methode qui renitialise de nouveau une Frame
public void renitialiser() { buffer = new byte[Constants.PAGESIZE]; idDeLaPage = null; pin_count = 0; flagDirty = 0; estCharge = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FRAME createFRAME();", "public static void changeFrame() {\r\n\t\t\r\n\t}", "Frame createFrame();", "public void buildFrame();", "public abstract void newWindow(ReFrame newFrame);", "void finishFrame() {\n\t\tcontrollers[CONTROLLER_OLD].set(controllers[CONTROLLER_NEW]);\n\t}", "public void limpaFrameIn...
[ "0.73807144", "0.7096805", "0.70465606", "0.7016401", "0.6931308", "0.6802761", "0.6732696", "0.6620053", "0.6588538", "0.65866816", "0.6566119", "0.656244", "0.6552291", "0.6485893", "0.6428019", "0.6421867", "0.6382397", "0.6371393", "0.62808895", "0.6262508", "0.6262128", ...
0.0
-1
wait until all runnable(s) have finished executing
public static void flushScheduler() { while (!RuntimeEnvironment.getMasterScheduler().advanceToLastPostedRunnable()) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void waitUntilAllThreadsAreFinished() {\n int index = 1;\n\n while (true) {\n while (index <= noThread) {\n if (carry[index] == -1) {\n index = 1;\n } else {\n index++;\n }\n }\n ...
[ "0.7251688", "0.71542084", "0.71353525", "0.7078263", "0.6842565", "0.6841239", "0.67312914", "0.6613561", "0.6447274", "0.6447102", "0.6428899", "0.63535523", "0.62528485", "0.61659145", "0.6042079", "0.6000584", "0.5982692", "0.5973279", "0.5945805", "0.5928671", "0.5923713...
0.0
-1
Display the provided message as an information to the user
public EObject displayInfo(EObject context, String title, String message) { MessageDialog.openInformation(Display.getCurrent().getActiveShell(), title, message); return context; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayMessage(String message) {\n }", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "private void displayMessage(String info) {\n \tif (message == null) {\n \t\tsetupMessage();\n \t}\n \tmessage.setLabel(info);\n\t\tadd(message, 6, 15);\n }", "...
[ "0.79723346", "0.7958411", "0.7895593", "0.78872746", "0.78872746", "0.77887356", "0.7770552", "0.77664757", "0.77549875", "0.7751561", "0.774048", "0.7717888", "0.771012", "0.7611875", "0.75800794", "0.75740224", "0.75396025", "0.7480221", "0.74744344", "0.74133736", "0.7385...
0.0
-1
metodo implementado por la interfaz IVentanas que inicializa componentes de la ventana
public void inicializar() { try { setDefaultLookAndFeelDecorated(true); com.jtattoo.plaf.hifi.HiFiLookAndFeel.setTheme("Large-Font", "INSERT YOUR LICENSE KEY HERE", "Gallery of Fantastic Puzzles"); UIManager.setLookAndFeel("com.jtattoo.plaf.hifi.HiFiLookAndFeel"); } catch (Exception e) { e.printStackTrace(); } //Configuración del JDialog setBounds(100, 100, 450, 300); this.setLocationRelativeTo(null); getContentPane().setLayout(new BorderLayout()); contentPanel.setLayout(new FlowLayout()); contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel, BorderLayout.CENTER); //Componentes del JDialog { //TEXTO DE BIENVENIDA dtrpnBienve = new JEditorPane(); dtrpnBienve.setOpaque(false); dtrpnBienve.setEditable(false); dtrpnBienve.setPreferredSize(new Dimension(400, 130)); dtrpnBienve.setFont(new Font("Segoe UI", Font.BOLD, 15)); dtrpnBienve.setText( "Bienvenido/a a GFPuzzles, la aplicación desarrollada por \r\nAlige Development para la Gestión de su Galería de Arte\r\n\r\nPara más información, consulte los siguientes \r\napartados del menú Ayuda."); contentPanel.add(dtrpnBienve); } { //ICONO CORPORATIVO lblNewLabel = new JLabel(""); lblNewLabel.setVerticalAlignment(SwingConstants.BOTTOM); lblNewLabel.setIcon(new ImageIcon(DialogBienve.class.getResource("/images/19-70x70.png"))); contentPanel.add(lblNewLabel); } { //PANEL DESTINADO PARA LOS BOTONES buttonPane = new JPanel(); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane, BorderLayout.SOUTH); { //BOTON OK btnOkBienve = new JButton("OK"); btnOkBienve.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { DialogBienve.this.dispose(); } }); btnOkBienve.setActionCommand("OK"); buttonPane.add(btnOkBienve); getRootPane().setDefaultButton(btnOkBienve); } { //etiqueta utilizada para separar el icono del cuadro de texto lblNewLabel_1 = new JLabel(""); lblNewLabel_1.setPreferredSize(new Dimension(30, 14)); lblNewLabel_1.setMinimumSize(new Dimension(246, 14)); lblNewLabel_1.setMaximumSize(new Dimension(246, 14)); buttonPane.add(lblNewLabel_1); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initcomponent() {\n\r\n\t}", "private void inicializarcomponentes() {\n Comunes.cargarJList(jListBecas, becasFacade.getTodasBecasVigentes());\n \n }", "private void inicializarComponentes() {\n universidadesIncluidos = UniversidadFacade.getInstance().listarTodosUniversidadOr...
[ "0.76063985", "0.7601321", "0.74748915", "0.7347636", "0.72658396", "0.7218748", "0.720572", "0.7161264", "0.7161264", "0.7034087", "0.7027732", "0.6981768", "0.6972547", "0.69383496", "0.69087225", "0.6872594", "0.6842815", "0.6841878", "0.6813803", "0.68136144", "0.68051547...
0.0
-1
Check if existing ApiResponse set
@Override public void process(Exchange exchange) throws Exception { ApiResponse existing = exchange.getProperty(PROPERTY_API_RESPONSE, ApiResponse.class); // Check if any ApiResponse's failed boolean failure = exchange.getIn().getBody(List.class).stream().anyMatch(o -> o instanceof ApiResponse && ((ApiResponse) o).getCode() != 200); // If found existing and it contains a failure then fail this response if (existing != null && existing.getCode() != ApiResponse.SUCCESS) { failure = true; } // Create ApiResponse and all list of responses ApiResponse response = failure ? ApiResponse.badRequest() : ApiResponse.success(); response.setResponses(exchange.getIn().getBody(List.class)); // If found existing then add responses if (existing != null && existing.getResponses() != null) { response.getResponses().addAll(existing.getResponses()); } // Flatten responses if single if (response.getResponses().size() == 1) { response = response.getResponses().get(0); } // Set as exchange property to be picked up by ApiResponseProcessor exchange.setProperty(PROPERTY_API_RESPONSE, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasListResponse();", "default boolean checkJsonResp(JsonElement response) {\n return false;\n }", "public boolean hasResponse() {\n return responseBuilder_ != null || response_ != null;\n }", "boolean hasResponse();", "boolean hasResponse();", "boolean hasResponse();", "boolean hasR...
[ "0.6937173", "0.68751556", "0.6615145", "0.660749", "0.660749", "0.660749", "0.660749", "0.660749", "0.660749", "0.660749", "0.660749", "0.660749", "0.6594541", "0.6525748", "0.6525748", "0.6525748", "0.6525748", "0.6500111", "0.64995104", "0.6480434", "0.6470995", "0.64582...
0.6125898
35
TODO: Return the communication channel to the service.
@Override public IBinder onBind(Intent intent) { return localBinder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Channel channel() {\n return channel;\n }", "public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}", "SocketChannel getChannel();", "EzyChannel getChannel();", "public Channel getChannel()\n {\n return channel;\n }", "java.lang.String getChannel();", "protected Channel getC...
[ "0.7437254", "0.73157257", "0.7183302", "0.7135984", "0.7129005", "0.71285546", "0.7090409", "0.7070889", "0.7067624", "0.7038997", "0.6988283", "0.6917885", "0.68884337", "0.67946744", "0.67914945", "0.67852235", "0.677885", "0.674656", "0.67354923", "0.6681876", "0.66714543...
0.0
-1
REMOTE UPADTE AND LOCAL UPDATE
public Monitor updateMonitor(Monitor monitor) { try { Monitor updatedContact = api.updateMonitor(monitor); repo.save(updatedContact); return repo.save(updatedContact); } catch (IOException e) { e.printStackTrace(); } return repo.save(monitor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean updateBase(TRemoteHostOperateVo source, TRemoteHostOperateVo target);", "boolean requestRemoteUpdate(ITemplateKey key, PacketDistributor.PacketTarget target);", "boolean requestRemoteUpdate(ITemplateKey key);", "public boolean update() {\n\t\ttry {\n\t\t\tbyte[] buffer = \"UPDATE\".getBytes();\n\t\t\...
[ "0.61436844", "0.6012851", "0.6011923", "0.6004924", "0.5963125", "0.5922011", "0.59215987", "0.59142244", "0.5881977", "0.58695716", "0.5850547", "0.58414084", "0.58407694", "0.5792525", "0.57796276", "0.5762824", "0.5756938", "0.57413065", "0.5738862", "0.5731636", "0.57262...
0.0
-1
POST AND LOCAL SAVE
public Monitor postMonitor(Monitor monitor) { try { Monitor createdContact = api.createMonitor(monitor); repo.save(createdContact); return repo.save(createdContact); } catch (IOException e) { e.printStackTrace(); } return repo.save(monitor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void savePost(Post post);", "public void save();", "public void save();", "public void save();", "public void save();", "protected abstract void doSave();", "Post save(Post post) throws Exception;", "void save();", "void save();", "void save();", "public void save() {\t\n\t\n\t\n\t}", "public...
[ "0.6846179", "0.67577636", "0.67577636", "0.67577636", "0.67577636", "0.6737678", "0.656752", "0.65568197", "0.65568197", "0.65568197", "0.65353346", "0.65038836", "0.6387948", "0.6385712", "0.6381876", "0.63679147", "0.6362697", "0.6352645", "0.6333166", "0.63237625", "0.628...
0.0
-1