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
Create an updated entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity.
public static InventoryProvider createUpdatedEntity(EntityManager em) { InventoryProvider inventoryProvider = new InventoryProvider() .idInventoryProvider(UPDATED_ID_INVENTORY_PROVIDER) .code(UPDATED_CODE) .name(UPDATED_NAME) .price(UPDATED_PRICE) .cuantity(UPDATED_CUANTITY); return inventoryProvider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Student createUpdatedEntity(EntityManager em) {\n Student student = new Student()\n .firstName(UPDATED_FIRST_NAME)\n .middleName(UPDATED_MIDDLE_NAME)\n .lastName(UPDATED_LAST_NAME)\n .studentRegNumber(UPDATED_STUDENT_REG_NUMBER)\n .dateOfB...
[ "0.69449216", "0.67896795", "0.67879814", "0.67179096", "0.6694456", "0.66922057", "0.66643107", "0.66368437", "0.6620929", "0.6514777", "0.6509406", "0.6446852", "0.6423282", "0.6420849", "0.6420615", "0.64165777", "0.6411613", "0.6408787", "0.6403848", "0.63932365", "0.6390...
0.5980898
80
private ArrayList mTitlePostions = new ArrayList();
public FeedAdapter(Context context, List<DailyInfo.IssueListBean.ItemListBean> list) { super(context); this.list = list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MusicScore ()\n {\n score = new ArrayList<Note>();\n }", "private MyAlbumList() {\n albums = new ArrayList<Album>();\n }", "List<String> getAllTitles(){\n return mAllTitles;\n }", "public Post()\n {\n nachrichten = new ArrayList<Nachricht>();\n }", "publ...
[ "0.6363651", "0.63118225", "0.62817776", "0.6250328", "0.61055803", "0.5981461", "0.59553814", "0.59485656", "0.5882379", "0.5863137", "0.5847231", "0.5845471", "0.5813645", "0.58076745", "0.58076745", "0.5793186", "0.576122", "0.57354856", "0.57187206", "0.5706688", "0.56853...
0.0
-1
Player player = e.getPlayer(); ScoreboardManager manager = Bukkit.getScoreboardManager(); Scoreboard tVsK = TitansAndKings.getTVsK(); player.setScoreboard(tVsK);
@EventHandler public void onLogin(PlayerJoinEvent e){ try { File file = new File("plugins"+File.separator+"TitansAndKings"+File.separator+"users"+File.separator+e.getPlayer().getName()+".yml"); if(!(file.exists())){ file.createNewFile(); } } catch (IOException event) { event.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setScoreboard(final Player player) {\n ConfigurationSection scoreboardSettings = ConfigurationManager.getInstance().getMainConfiguration().getConfigurationSection(Strings.CONFIG_SCOREBOARD_SECTION);\n\n ScoreboardManager scoreboardManager = CustomGUIShop.getInstance().getServer().getScore...
[ "0.76686203", "0.730005", "0.7162943", "0.7093936", "0.70646656", "0.69435316", "0.6744507", "0.6727955", "0.6501181", "0.6478074", "0.64514774", "0.64486206", "0.63764346", "0.6303643", "0.62497807", "0.6241053", "0.61931473", "0.6177258", "0.61700463", "0.6169412", "0.61683...
0.0
-1
crxNodeEntityRepository = new AbstractEntityRepository();
@Before public void setup() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Repository() {\n\n }", "protected XMLRepositoryImpl() {\n }", "private EmployeeRepository(){\n\t\t\n\t}", "@Repository\npublic interface ItemComboRepository extends Neo4jRepository<ItemCombo, Long> {\n\n ItemRepository findByCode(String code);\n\n}", "public ProductoRepository() {}", "pr...
[ "0.6547328", "0.65025824", "0.64323604", "0.61989325", "0.61563456", "0.61114097", "0.59905386", "0.59905386", "0.597783", "0.59642184", "0.5955535", "0.59553933", "0.5948089", "0.5928903", "0.59260064", "0.5900419", "0.5898223", "0.585374", "0.5833617", "0.58045477", "0.5799...
0.0
-1
Constructor for objects of class Jugador
public Jugador(int dorsal) { Random rmd = new Random(); edad = rmd.nextInt(23)+18 ; estadoForma = rmd.nextInt(11); int nom = rmd.nextInt(33); Nombres nomb = new Nombres(); nombre = nomb.getNombre(nom); this.dorsal = dorsal; this.nombre = nombre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Clasificacion (ArrayList<Jugador> jugadores)\n\t{\n\t\tthis.jugadores = jugadores;\n\t\tthis.numJug = jugadores.size();\n\t\tthis.podio = new ArrayList<Jugador>();\n\t\tthis.ganadores = new ArrayList<Jugador>();\n\t\tthis.baraja = new Baraja();\n\t\tbaraja.barajar(); baraja.barajar();\n\t\tbarajaDeCartas = ...
[ "0.73174596", "0.72974384", "0.7085698", "0.7084891", "0.69907904", "0.69615376", "0.6926507", "0.6865664", "0.6824265", "0.67827225", "0.675621", "0.6749874", "0.6748682", "0.6724667", "0.67099655", "0.67007947", "0.6697388", "0.669444", "0.66431093", "0.66301095", "0.662117...
0.6847109
8
nextInt is normally exclusive of the top value, so add 1 to make it inclusive
public void randomize() { x = ThreadLocalRandom.current().nextInt(0, 499 + 1); y = ThreadLocalRandom.current().nextInt(0, 499 + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int nextInt() {\n return super.nextInt();\n }", "@Override\n public int nextInt(int bound) {\n return super.nextInt(bound);\n }", "private int nextInt() {\n if (console) {\n return con.nextInt();\n }\n return scan.nextInt();\n }", ...
[ "0.7536694", "0.7304919", "0.69076127", "0.6808714", "0.6789383", "0.6706691", "0.6684705", "0.6669792", "0.66365665", "0.6599863", "0.65611815", "0.65253556", "0.6514477", "0.64954185", "0.6481946", "0.64727646", "0.6462342", "0.6456103", "0.64338446", "0.64247423", "0.64097...
0.0
-1
Metodo per trovare i vicini di uno specifico vertice
public List<String> displayNeighbours(String parolaInserita) { List<String> resultString = new ArrayList<String>(); Set<DefaultEdge> result = grafo.edgesOf(parolaInserita); for(DefaultEdge tmp : result) { resultString.add(tmp.toString()); } return resultString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void AgregarVertice(int v) {\n\t\tNodoGrafo aux = new NodoGrafo();\n\t\taux.nodo = v;\n\t\taux.arista = null;\n\t\taux.sigNodo = origen;\n\t\torigen = aux;\n\t}", "public Vertice GetExtremoInicial(){\r\n return this.Vi;\r\n }", "public boolean foiChecado(Vertice v){\n int i = v.label;\n...
[ "0.65846854", "0.65671766", "0.63920873", "0.620815", "0.6205552", "0.61822325", "0.6154753", "0.605989", "0.6047458", "0.60207886", "0.5944882", "0.5927921", "0.5897734", "0.56807876", "0.56515783", "0.56381345", "0.56185067", "0.56172305", "0.5612151", "0.560175", "0.559483...
0.0
-1
Metodo per trovare il massimo grado tra tutti i vertici
public int findMaxDegree() { int gradoMax = 0; for(String s : grafo.vertexSet()) { int grado = grafo.degreeOf(s); if(grado > gradoMax) { gradoMax = grado; verticeGradoMax = s; } } return gradoMax; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int grado() {\n \t//Paso 1: almacenar en un array los grados de todos los vertices\n \t//Paso 2: sacar el maximo grado de los vertices\n \t\n \tint[] v = getArrayGrados();\n \treturn maximo(v);\n \t\n \t\n }", "public int getGradoMinimo() {\n\t\treturn grMin;\n\t}", "public void ...
[ "0.6936103", "0.62807524", "0.61965245", "0.619453", "0.5985954", "0.5962495", "0.58740836", "0.58438236", "0.5790203", "0.57490027", "0.57432425", "0.57382715", "0.5731872", "0.5730673", "0.5698088", "0.56783617", "0.5674286", "0.5672753", "0.5658088", "0.564901", "0.5646117...
0.5223899
100
Gets an elementary file. Hangs if there is already an open request.
public Promise<byte[]> readFile(ElementaryFileID id) { try { getFileLock.acquire(); } catch (InterruptedException e) { return Promise.reject(e); } return this.presentationLayer.selectDF(this.appId).then((res) -> { return openApduFile(id).then((file) -> this.resolveApduFile(file)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RandomAccessFile getFile()\n {\n \treturn f;\n }", "public File getFile() {\n // some code goes here\n return m_f;\n }", "File getFile();", "File getFile();", "public File getFile() {\n // some code goes here\n return f;\n }", "public File getFile();", ...
[ "0.65446585", "0.6480885", "0.64564687", "0.64564687", "0.6407899", "0.62929684", "0.62929684", "0.6284081", "0.62837666", "0.6210387", "0.61460936", "0.6139084", "0.6139084", "0.6132655", "0.6063939", "0.6056273", "0.6023862", "0.6019602", "0.5990793", "0.59686124", "0.59289...
0.5430243
70
Creates the initial part of a APDU file by selecting the ElementaryFileID on at the holder and read a few initial bytes. This is done to know how large the file is. As all APDU files are TLV (tag, length, value). We'll know what to expect size wise. Then the resolveApduFile method can download any remaining bytes left.
private Promise<ApduFile> openApduFile(ElementaryFileID fileID) { Promise<byte[]> firstChunk; if (fileID.isShortIDAvailable()) { firstChunk = this.presentationLayer.readBinary(fileID, (byte)0);//If short file id is available, a read will also instantly select the file. } else { firstChunk = this.presentationLayer.selectEF(fileID).then((v) -> this.presentationLayer.readBinary((byte)0));//Select and read the first part. } return firstChunk.then((data) -> { try { ApduFile result = new ApduFile(data); return Promise.resolve(result); }catch (Exception e) { return Promise.reject(e); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void selectByFileIdentifier(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer...
[ "0.61040646", "0.60836005", "0.58613026", "0.5642861", "0.55860305", "0.53996223", "0.5318007", "0.530141", "0.529741", "0.52957124", "0.5150561", "0.48917672", "0.48837897", "0.48821312", "0.4863961", "0.48252723", "0.47529075", "0.47368568", "0.47343194", "0.4722294", "0.47...
0.6649243
0
This method will take a complete or incomplete APDu file and keeps reading until it is complete. Then return the bytes.
private Promise<byte[]> resolveApduFile(ApduFile file) { return new Promise<>(settlement -> { while (!file.isComplete()) { try { chunkWaitingLock.acquire(); } catch (InterruptedException e) { Promise.reject(e); } short offset = file.getCurrentSize(); Promise<byte[]> promise = this.presentationLayer.readBinary(offset); try { byte[] data = promise.getValue(); file.appendValue(data); } catch (Throwable e) { settlement.reject(e); } chunkWaitingLock.release(); } settlement.resolve(file.getData()); getFileLock.release(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static byte[] m136428a(File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[((int) file.length())];\n int i = 0;\n while (i < bArr.length) {\n int read = fileInputStream.read(bArr, i, bArr.length - i);...
[ "0.6530784", "0.6274362", "0.6161624", "0.58519745", "0.58268666", "0.5810144", "0.5796792", "0.57363147", "0.5735362", "0.5733499", "0.5714032", "0.5711769", "0.57066405", "0.5680843", "0.56393", "0.56330234", "0.562002", "0.56180704", "0.5609561", "0.56008494", "0.55539143"...
0.6396269
1
points of teritory / General : The class constractor. Input : startR the start row index to init pieces , endR the end row index to init pieces, startC the start col index to init pieces, endC the end col index to init pieces , color the color of the player pieces . Output : instance of the class.
public Player(int startR ,int endR , int startC ,int endC , String color) { // constractor // startR - start row for creating the pieces , startC - start colomn for creating the pieces // endR - End row for creating the pieces , endC - END colomn for creating the pieces this.color=color; for(int i = startR; i <= endR; i++){ for(int j = startC ; j <= endC ;j++){ pieces.put(new Integer (j*Board.N+i), new Piece(i,j, color)); // new piece teritory.add(j* Board.N +i); // saving index of teritory base } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Pieces(int row, int column, PieceType piece, PieceColor color){\r\n\t\tthis.piece = piece;\r\n\t\tthis.row = row;\r\n\t\tthis.column = column;\r\n\t\tthis.color = color;\r\n\t\tthis.moved = false;\r\n\t}", "@Override\r\n public void getRange(ArrayList<Piece> pieces){\r\n this.range.clear();\r\n ...
[ "0.6255101", "0.61821204", "0.61310077", "0.61193484", "0.60608196", "0.5950894", "0.59446007", "0.5874126", "0.58459216", "0.58396703", "0.5808581", "0.5796518", "0.5795544", "0.57645535", "0.5737657", "0.57343733", "0.5720587", "0.57177156", "0.57111275", "0.5665832", "0.56...
0.79290646
0
getting the game pieces of the player
public HashMap<Integer, Piece> getPieces() { return pieces; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<GamePiece> getPlayerPieces() \n\t{\n\t\tSet<GamePiece> pieces = new HashSet<GamePiece>();\n\t\tfor(GamePiece piece: playerPieces.values())\n\t\t{\n\t\t\tpieces.add(piece);\n\t\t}\n\t\treturn pieces;\n\t}", "public List<Piece> allPieces();", "public int getPlayersPiece() {\n return playersPiec...
[ "0.7050669", "0.68401146", "0.68349886", "0.6709615", "0.66394836", "0.6587558", "0.65387416", "0.6423168", "0.64046425", "0.63961124", "0.6396", "0.6383869", "0.6349627", "0.6339064", "0.6337013", "0.6337013", "0.6299992", "0.62618124", "0.6230514", "0.6213569", "0.62070847"...
0.6701259
4
getting the player pieces color
public String getColor() { return color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Piece.color getColor() { return color; }", "public PieceColor getColor(){\r\n\t\treturn this.color;\r\n\t}", "@Override\n\tpublic Color getColor() {\n\t\treturn playerColor;\n\t}", "public GameColor getColor();", "public String getPieceColor(){\n\t\t\n\t\tif(xPosition>=ColumnNumber.firstColumn.ordin...
[ "0.78078663", "0.7643629", "0.7511635", "0.74122345", "0.7288832", "0.71557105", "0.713621", "0.7056253", "0.7034237", "0.6872518", "0.6862464", "0.68394065", "0.6824578", "0.6776612", "0.6751967", "0.6712391", "0.6712193", "0.670769", "0.67071617", "0.67054653", "0.66754127"...
0.0
-1
setting the game pieces of the player
public void setPieces(HashMap<Integer, Piece> pieces) { this.pieces = pieces; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(i...
[ "0.7569837", "0.7061554", "0.66794693", "0.6648428", "0.6619526", "0.6576087", "0.6560435", "0.65399027", "0.65347433", "0.65306693", "0.6517343", "0.64858115", "0.64762634", "0.64677864", "0.64564383", "0.64469063", "0.64003164", "0.6373833", "0.6355723", "0.6336384", "0.631...
0.6750601
2
setting the index of a single piece
public void setPiece (int oldKey ,int key, Piece value){ if(pieces.containsKey(oldKey)) pieces.remove(oldKey); pieces.put(key, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setIdx(int i);", "public void set(long index);", "public void setIndex(int index)\n/* */ {\n/* 39 */ this.index = index;\n/* */ }", "public int set(int index, int element);", "public void setIndex(int index) { this.index = index; }", "void set(int index, Object element);", "private v...
[ "0.7275147", "0.71630687", "0.69979006", "0.6911047", "0.68747914", "0.67789733", "0.6754756", "0.66975486", "0.6619405", "0.66135335", "0.65007555", "0.64729524", "0.6455763", "0.64273226", "0.6404847", "0.63833725", "0.6379256", "0.63530475", "0.6304433", "0.62862206", "0.6...
0.0
-1
getting a list of the base of the player
public List<Integer> getTeritory() { return teritory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}", "List<Player> getPlayers();", "ArrayList<Player> getAllPlayer();", "public List<Colour> getPlayerList();", "List<Player> listPlayers();", "@Override\n\tpublic List<Player> getPlayer() {\n\t\treturn ofy().load().type(Player.cla...
[ "0.6583577", "0.6556866", "0.65088886", "0.6387515", "0.6367967", "0.634431", "0.6323395", "0.6322374", "0.62540334", "0.6236384", "0.6234127", "0.622238", "0.61593205", "0.6156944", "0.6128809", "0.6112506", "0.61048114", "0.610318", "0.6075071", "0.6022351", "0.59817314", ...
0.0
-1
/ FuncName: Draw General : the function draw the game pieces of the player on the board. Input : graphics the graghics of the frame that the drawing will be on, jPanel the panel that the drawing will be on . Output : a draw of the game pieces on the board . Run Time : O(1) because the number of pieces is a constant (16)
public void Draw (Graphics graphics, MainJPanel JPanel){ // draw the player game pieces for(Piece piece : pieces.values()) piece.Draw(graphics,JPanel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void paint(Graphics graphics){\n\n\t\tsetSize(BOARD_SIZE, BOARD_SIZE);\n\n\t\tint iWidth = getWidth();\n\t\tint iHeight = getHeight();\n\n\t\t// print the cells of the game board\n\t\tfor(int i = 0; i< BOARD_LENGTH; i+=2){\n\t\t\tfor(int j = 0; j<BOARD_LENGTH; j+=2){\n\n\t\t\t\tgraphics.setColor(BOARD_FIELD...
[ "0.76537657", "0.7413877", "0.71783537", "0.7134908", "0.7051029", "0.7046917", "0.69675356", "0.69070005", "0.6798479", "0.67765003", "0.6747229", "0.67084616", "0.67069274", "0.6692883", "0.6679048", "0.6620253", "0.6613795", "0.66103494", "0.6595309", "0.64839464", "0.6481...
0.82064766
0
Attempts to obtain the credential with the providedId from the item's credential context, otherwise returns token
public static String getTokenToUse(String credentialId, Item item, String token) { String response; if (StringUtils.isEmpty(credentialId)) { response = token; } else { StringCredentials credentials = lookupCredentials(StringUtils.trim(credentialId), item); if (credentials != null) { response = credentials.getSecret().getPlainText(); } else { response = token; } } if (StringUtils.isEmpty(response)) { throw new IllegalArgumentException("the token with the provided ID could not be found and no token was specified"); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getCredentialId() {\r\n return credentialId;\r\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "pub...
[ "0.57563305", "0.5628312", "0.5628312", "0.5628312", "0.5626243", "0.5583455", "0.5575706", "0.55495113", "0.5534773", "0.54443175", "0.54226226", "0.5363292", "0.5336145", "0.5311026", "0.52953565", "0.52662176", "0.5263295", "0.5259943", "0.5237195", "0.5235839", "0.5187575...
0.73353446
0
Created by Filip on 03/03/2016.
public interface TrackingStatsHelper { void addDistanceFromNewLocationToTotalDistance(Location currentLocation); void setCurrentSessionStats(Stats stats); Stats getCurrentSessionStats(); void setLastLocation(Location location); Location getLastLocation(); void addTimeSpentWhileTrackingLastStarted(long startTime, long endTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public fina...
[ "0.6040723", "0.5828868", "0.57807714", "0.57660246", "0.5698867", "0.5698867", "0.5672173", "0.5664371", "0.56049824", "0.5602479", "0.559569", "0.5587577", "0.55623", "0.55611414", "0.5551353", "0.5542757", "0.5534909", "0.5519338", "0.5509852", "0.549246", "0.5489146", "...
0.0
-1
An Http Reactive Channel with several accessor related to HTTP flow : headers, params, URI, method, websocket...
public interface HttpChannel extends NettyChannel, HttpOutbound, HttpInbound { /** * add the passed cookie * @return this */ HttpChannel addResponseCookie(Cookie cookie); /** * * @param name * @param value * @return */ HttpChannel addResponseHeader(CharSequence name, CharSequence value); /** * * @param key * @return */ Object param(CharSequence key); /** * * @return */ Map<String, Object> params(); /** * * @param headerResolver * @return */ HttpChannel paramsResolver(Function<? super String, Map<String, Object>> headerResolver); /** * */ HttpChannel responseTransfer(boolean chunked); /** * * @param name * @param value * @return */ HttpChannel responseHeader(CharSequence name, CharSequence value); /** * * @return */ HttpChannel sse(); /** * * @param status * @return */ HttpChannel status(HttpResponseStatus status); /** * * @param status * @return */ default HttpChannel status(int status){ return status(HttpResponseStatus.valueOf(status)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handleHttpRequest(ChannelHandlerContext ctx, FullHttpRequest req) throws Exception {\n if (!req.getDecoderResult().isSuccess()) {\n sendHttpResponse(ctx, req, new DefaultFullHttpResponse(HTTP_1_1, BAD_REQUEST));\n return;\n }\n\n // Allow only GET methods.\n ...
[ "0.6302797", "0.59385985", "0.5936328", "0.5862313", "0.58127177", "0.5807018", "0.5786179", "0.5783403", "0.57593536", "0.57327217", "0.5702142", "0.5689352", "0.5688714", "0.56544137", "0.5640786", "0.56118727", "0.5599013", "0.55797684", "0.5571807", "0.5570954", "0.556875...
0.7608607
0
add the passed cookie
HttpChannel addResponseCookie(Cookie cookie);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCookie(Cookie cookie) {\n\t\t\n\t}", "@Override\n\t\tpublic void addCookie(Cookie cookie) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void addCookie(Cookie cookie) {\n\t}", "@Override\n public void addCookie(Cookie arg0) {\n\n }", "void addCookie(HttpServletResponse response, Cookie cookie);",...
[ "0.8660201", "0.8499245", "0.8345891", "0.8221618", "0.79349244", "0.7839446", "0.77797556", "0.7707236", "0.7584981", "0.70540017", "0.6991697", "0.68730927", "0.6574792", "0.64462143", "0.64081997", "0.631016", "0.61388946", "0.6068703", "0.6059516", "0.60573274", "0.595728...
0.7187289
9
Instantiates a new security question with masked answer widget.
public SecurityQuestionWithMaskedAnswerWidget() { answer1.getElement().setId("answer1TextBox"); answer2.getElement().setId("answer2TextBox"); answer3.getElement().setId("answer3TextBox"); securityQuestion1.getElement().setId("securityQuestion1ListBoxMVP"); securityQuestion2.getElement().setId("securityQuestion2ListBoxMVP"); securityQuestion3.getElement().setId("securityQuestion3ListBoxMVP"); /* FlowPanel container = new FlowPanel(); container.getElement().setId("container_FlowPanel"); FlowPanel fp = addSecurityQuestionAnsertRules(); container.add(fp); container.add(new SpacerWidget());*/ /*container.add(LabelBuilder.buildLabel(securityQuestion1, "Security Question 1")); container.add(wrap(securityQuestion1)); container.add(LabelBuilder.buildLabel(answer1, "Security Answer 1")); container.add(wrap(answer1)); answer1.setFocus(false); container.add(new SpacerWidget()); container.add(LabelBuilder.buildLabel(securityQuestion2, "Security Question 2")); container.add(wrap(securityQuestion2)); container.add(LabelBuilder.buildLabel(answer2, "Security Answer 2")); container.add(wrap(answer2)); answer2.setFocus(false); container.add(new SpacerWidget()); container.add(LabelBuilder.buildLabel(securityQuestion3, "Security Question 3")); container.add(wrap(securityQuestion3)); container.add(LabelBuilder.buildLabel(answer3, "Security Answer 3")); container.add(wrap(answer3)); answer3.setFocus(false);*/ rulesGroup.add(addSecurityQuestionAnsertRules()); FormLabel labelQns1 = new FormLabel(); labelQns1.setText("Security Question 1"); labelQns1.setTitle("Security Question 1"); labelQns1.setId("SecurityQnsLabel1"); labelQns1.setFor("securityQuestion1ListBoxMVP"); labelQns1.setShowRequiredIndicator(true); FormLabel labelQns2 = new FormLabel(); labelQns2.setText("Security Question 2"); labelQns2.setTitle("Security Question 2"); labelQns2.setId("SecurityQnsLabel2"); labelQns2.setFor("securityQuestion2ListBoxMVP"); labelQns2.setShowRequiredIndicator(true); FormLabel labelQns3 = new FormLabel(); labelQns3.setText("Security Question 3"); labelQns3.setTitle("Security Question 3"); labelQns3.setId("SecurityQnsLabel3"); labelQns3.setFor("securityQuestion3ListBoxMVP"); labelQns3.setShowRequiredIndicator(true); FormLabel labelAnswer1 = new FormLabel(); labelAnswer1.setText("Security Answer 1"); labelAnswer1.setTitle("Security Answer 1"); labelAnswer1.setId("SecurityAnswerLabel1"); labelAnswer1.setFor("answer1TextBox"); labelAnswer1.setShowRequiredIndicator(true); FormLabel labelAnswer2 = new FormLabel(); labelAnswer2.setText("Security Answer 2"); labelAnswer2.setTitle("Security Answer 2"); labelAnswer2.setId("SecurityAnswerLabel2"); labelAnswer2.setFor("answer2TextBox"); labelAnswer2.setShowRequiredIndicator(true); FormLabel labelAnswer3 = new FormLabel(); labelAnswer3.setText("Security Answer 3"); labelAnswer3.setTitle("Security Answer 3"); labelAnswer3.setId("SecurityAnswerLabel3"); labelAnswer3.setFor("answer3TextBox"); labelAnswer3.setShowRequiredIndicator(true); securityQuestion1.setWidth("320px"); securityQuestion2.setWidth("320px"); securityQuestion3.setWidth("320px"); answer1.setPlaceholder("Enter Answer 1 here."); answer1.setWidth("320px"); answer1.setMaxLength(100); answer2.setWidth("320px"); answer2.setMaxLength(100); answer2.setPlaceholder("Enter Answer 2 here."); answer3.setWidth("320px"); answer3.setMaxLength(100); answer3.setPlaceholder("Enter Answer 3 here."); Question1FormGroup.add(labelQns1); Question1FormGroup.add(securityQuestion1); labelAnswer1.setMarginTop(10.00); Ans1FormGroup.add(labelAnswer1); Ans1FormGroup.add(answer1); Question2FormGroup.add(labelQns2); Question2FormGroup.add(securityQuestion2); labelAnswer2.setMarginTop(10.00); Ans2FormGroup.add(labelAnswer2); Ans2FormGroup.add(answer2); Question3FormGroup.add(labelQns3); Question3FormGroup.add(securityQuestion3); labelAnswer3.setMarginTop(10.00); Ans3FormGroup.add(labelAnswer3); Ans3FormGroup.add(answer3); /*container.add(new SpacerWidget()); container.setStyleName("securityQuestions"); initWidget(container);*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DecideQuestion(){\n\t\tsuper(0); /** call relation -> PromptQuestion.java */\n\t}", "public Question(String text, String type, String crrAnswer)\n {\n this.type = type;\n this.text = text;\n this.textCrrAnswer = crrAnswer;\n\n this.mcCrrAnswer = -1;\n this.id = Utilit...
[ "0.57734877", "0.55654395", "0.5513602", "0.53839815", "0.53732646", "0.5355851", "0.5346428", "0.53216165", "0.5311132", "0.5247848", "0.5244645", "0.52420765", "0.5200158", "0.51961046", "0.5188813", "0.51725656", "0.51608896", "0.5157867", "0.51516175", "0.5151389", "0.511...
0.6900944
0
Sets the security question1.
public void setSecurityQuestion1(ListBoxMVP securityQuestion1) { this.securityQuestion1 = securityQuestion1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSecurity_question(String security_question);", "public void setAnswer1(String answer1) {\r\n this.answer1 = answer1;\r\n }", "public void setForgottenPasswordQuestion1(String forgottenPasswordQuestion1) {\n\t\tthis.forgottenPasswordQuestion1 = forgottenPasswordQuestion1;\n\t}", "publ...
[ "0.7492301", "0.734865", "0.6841181", "0.6808831", "0.66929024", "0.66602886", "0.6595231", "0.6242315", "0.6228239", "0.6199963", "0.6179311", "0.60861975", "0.6004494", "0.59767896", "0.5968999", "0.5940167", "0.5915046", "0.5893182", "0.5892916", "0.58756465", "0.5859934",...
0.7039467
2
Gets the security question2.
public ListBoxMVP getSecurityQuestion2() { return securityQuestion2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getQuiz2()\n\t{\n\t\treturn this.quiz2;\n\t}", "public String getSecurity_question() \r\n {\r\n return security_question;\r\n }", "public String getPollAnswer2() {\n return pollAnswer2;\n }", "public String getAnswerText2() {\r\n\t\treturn answerTe...
[ "0.70728046", "0.70387876", "0.69565934", "0.68308663", "0.68240416", "0.6762272", "0.66466475", "0.66275644", "0.6600405", "0.6422495", "0.6265956", "0.6260931", "0.62550074", "0.61796397", "0.61625916", "0.6068399", "0.6010646", "0.6007135", "0.6005774", "0.5961819", "0.595...
0.80205625
0
Sets the security question2.
public void setSecurityQuestion2(ListBoxMVP securityQuestion2) { this.securityQuestion2 = securityQuestion2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSecurity_question(String security_question);", "public ListBoxMVP getSecurityQuestion2() {\r\n\t\treturn securityQuestion2;\r\n\t}", "public boolean setQuiz2(double quiz2)\n\t{\n\t\tboolean isValid;\n\t\t\n\t\tisValid = isValidQuiz2(quiz2);\n\t\t\n\t\tif(isValid)\n\t\t{\n\t\t\tthis.quiz2 = quiz2...
[ "0.72248346", "0.6989475", "0.697066", "0.6920655", "0.68267363", "0.6589471", "0.63637745", "0.63571024", "0.6271154", "0.62220085", "0.620746", "0.6171518", "0.60840344", "0.60287976", "0.5969093", "0.59483993", "0.5920542", "0.5836807", "0.5831486", "0.5829595", "0.5825546...
0.7405542
0
Gets the security question3.
public ListBoxMVP getSecurityQuestion3() { return securityQuestion3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getQuiz3()\n\t{\n\t\treturn this.quiz3;\n\t}", "public String getAnswerText3() {\r\n\t\treturn answerText3;\r\n\t}", "public String getPollAnswer3() {\n return pollAnswer3;\n }", "public String getForgottenPasswordQuestion3() {\n\t\treturn forgottenPasswordQues...
[ "0.73706234", "0.71156746", "0.69802797", "0.68254036", "0.66043043", "0.64785326", "0.6444271", "0.63907003", "0.6299743", "0.6256544", "0.61928236", "0.61453116", "0.6137567", "0.6133004", "0.61309177", "0.6123273", "0.6104916", "0.6067187", "0.6060522", "0.60463995", "0.60...
0.80000263
0
Sets the security question3.
public void setSecurityQuestion3(ListBoxMVP securityQuestion3) { this.securityQuestion3 = securityQuestion3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean setQuiz3(double quiz3)\n\t{\n\t\tboolean isValid;\n\t\t\n\t\tisValid = isValidQuiz3(quiz3);\n\t\t\n\t\tif(isValid)\n\t\t{\n\t\t\tthis.quiz3 = quiz3;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "public void setSecurity_question(String security_question);", "public void setForgottenPasswordQuestion3(...
[ "0.7223316", "0.6964387", "0.6946363", "0.68608505", "0.6787541", "0.64344126", "0.6371984", "0.63066596", "0.6275927", "0.62273896", "0.61781347", "0.61536056", "0.6119634", "0.6084522", "0.6040219", "0.6004378", "0.5954629", "0.5938227", "0.59224963", "0.59159756", "0.58949...
0.75121784
0
Gets the answer text1.
public String getAnswerText1() { return answerText1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAnswerText2() {\r\n\t\treturn answerText2;\r\n\t}", "public void setAnswerText1(String answerText1) {\r\n\t\tthis.answerText1 = answerText1;\r\n\t}", "java.lang.String getCorrectAnswer();", "public String getAnswerText3() {\r\n\t\treturn answerText3;\r\n\t}", "public String getPollAnswer1(...
[ "0.74427366", "0.71657586", "0.6946193", "0.6934232", "0.6886666", "0.6829237", "0.67616016", "0.6643322", "0.6629256", "0.6614711", "0.64571905", "0.6452738", "0.64262927", "0.6388623", "0.637843", "0.6359896", "0.6339932", "0.63324493", "0.6327062", "0.6314603", "0.6305125"...
0.8619557
0
Sets the answer text1.
public void setAnswerText1(String answerText1) { this.answerText1 = answerText1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAnswer1(String answer1) {\r\n this.answer1 = answer1;\r\n }", "public String getAnswerText1() {\r\n\t\treturn answerText1;\r\n\t}", "public void setAnswerText2(String answerText2) {\r\n\t\tthis.answerText2 = answerText2;\r\n\t}", "public void setAnswerText3(String answerText3) {\r\n\...
[ "0.7967956", "0.7703133", "0.72550064", "0.6759519", "0.6659617", "0.6617382", "0.6564866", "0.63782567", "0.6347384", "0.6345873", "0.6300181", "0.62822044", "0.6273388", "0.6260493", "0.61775225", "0.61766005", "0.6172356", "0.6151933", "0.61472195", "0.6130555", "0.6110651...
0.8842797
0
Gets the answer text2.
public String getAnswerText2() { return answerText2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAnswerText1() {\r\n\t\treturn answerText1;\r\n\t}", "public String getText2() {\n return text2;\n }", "public void setAnswerText2(String answerText2) {\r\n\t\tthis.answerText2 = answerText2;\r\n\t}", "public String getAnswerText3() {\r\n\t\treturn answerText3;\r\n\t}", "public St...
[ "0.7736356", "0.7620959", "0.74323153", "0.70216304", "0.69632673", "0.67714286", "0.6768307", "0.6625698", "0.66237557", "0.6578214", "0.64918756", "0.64862883", "0.642297", "0.6384071", "0.6331899", "0.6309724", "0.628264", "0.6280028", "0.6187289", "0.6176747", "0.6158116"...
0.86739266
0
Sets the answer text2.
public void setAnswerText2(String answerText2) { this.answerText2 = answerText2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAnswerText1(String answerText1) {\r\n\t\tthis.answerText1 = answerText1;\r\n\t}", "public String getAnswerText2() {\r\n\t\treturn answerText2;\r\n\t}", "public String getAnswerText1() {\r\n\t\treturn answerText1;\r\n\t}", "public void setAnswer1(String answer1) {\r\n this.answer1 = answ...
[ "0.78692704", "0.7713367", "0.6963037", "0.69279015", "0.6906847", "0.68434805", "0.6832265", "0.6496084", "0.6416064", "0.6410967", "0.6274333", "0.6209412", "0.6178317", "0.6160178", "0.61099696", "0.60577023", "0.6048443", "0.59910965", "0.59891367", "0.59847635", "0.59821...
0.86311
0
Gets the answer text3.
public String getAnswerText3() { return answerText3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getText3() {\n return text3;\n }", "public void setAnswerText3(String answerText3) {\r\n\t\tthis.answerText3 = answerText3;\r\n\t}", "public String getPollAnswer3() {\n return pollAnswer3;\n }", "public String getAnswerText1() {\r\n\t\treturn answerTe...
[ "0.7891389", "0.7671387", "0.72941095", "0.6883469", "0.6859458", "0.6840314", "0.6826864", "0.67059934", "0.667235", "0.6597789", "0.6596534", "0.64981383", "0.64683867", "0.64569205", "0.63455546", "0.632635", "0.632635", "0.6240168", "0.6233222", "0.6130383", "0.6082349", ...
0.88283765
0
Sets the answer text3.
public void setAnswerText3(String answerText3) { this.answerText3 = answerText3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAnswerText3() {\r\n\t\treturn answerText3;\r\n\t}", "public void setText3(String text3) {\n this.text3 = text3 == null ? null : text3.trim();\n }", "@Click(R.id.bt_answer3)\n void clickAnswer3() {\n selectedAnswer = questionList.get(questionProgress - 1).getAnswers().get(2)...
[ "0.80302846", "0.75034076", "0.7102324", "0.69921947", "0.67021394", "0.6701131", "0.6579523", "0.65733373", "0.64908946", "0.63922644", "0.6285126", "0.6273893", "0.6238461", "0.6236281", "0.6223801", "0.6217664", "0.6203637", "0.61527395", "0.61415035", "0.6110146", "0.6090...
0.8830244
0
Creates new form calculate salary
public calsal() { initComponents(); //connect to DB con =DBconnect.connect(); //load table tableload(); tableloadfnl(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateSalary() ;", "public Salary_Calculator() {\n initComponents();\n }", "public Salary() {\n initComponents();\n }", "@Override\n public double calculateSalary(){\n return this.horas_trabajadas*EmployeeByHours.VALOR_HORA;\n }", "public abstract double sala...
[ "0.7048114", "0.68142146", "0.63574755", "0.62598026", "0.6241968", "0.61850476", "0.6161105", "0.60871243", "0.60553956", "0.6044097", "0.6032841", "0.60319287", "0.60319287", "0.6023127", "0.5984877", "0.5943494", "0.58477557", "0.58382535", "0.58164513", "0.5759452", "0.57...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jButton3 = new javax.swing.JButton(); a = new javax.swing.JTextField(); c = new javax.swing.JTextField(); d = new javax.swing.JTextField(); g = new javax.swing.JTextField(); jLabel13 = new javax.swing.JLabel(); h = new javax.swing.JTextField(); jScrollPane2 = new javax.swing.JScrollPane(); y = new javax.swing.JTable(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jScrollPane3 = new javax.swing.JScrollPane(); j = new javax.swing.JTextArea(); datebox = new com.toedter.calendar.JDateChooser(); jLabel5 = new javax.swing.JLabel(); i = new javax.swing.JTextField(); jLabel14 = new javax.swing.JLabel(); b = new javax.swing.JTextField(); jLabel16 = new javax.swing.JLabel(); jButton4 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); x = new javax.swing.JTable(); jLabel17 = new javax.swing.JLabel(); f = new javax.swing.JTextField(); jLabel15 = new javax.swing.JLabel(); reduced = new javax.swing.JTextField(); jButton2 = new javax.swing.JButton(); jLabel18 = new javax.swing.JLabel(); jLabel19 = new javax.swing.JLabel(); setMaximumSize(new java.awt.Dimension(1329, 649)); setMinimumSize(new java.awt.Dimension(1329, 649)); setPreferredSize(new java.awt.Dimension(1329, 649)); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel7.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel7.setText("ID"); getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(56, 41, -1, -1)); jLabel8.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel8.setText("Salary "); getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(56, 101, -1, -1)); jLabel9.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel9.setText("No Of Absent Days"); getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(56, 130, -1, -1)); jLabel10.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel10.setText("Loan Amount"); getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 250, -1, -1)); jButton3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jButton3.setText("Calculate to be Paid"); jButton3.setMaximumSize(new java.awt.Dimension(130, 36)); jButton3.setMinimumSize(new java.awt.Dimension(130, 36)); jButton3.setPreferredSize(new java.awt.Dimension(130, 36)); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 290, 175, -1)); getContentPane().add(a, new org.netbeans.lib.awtextra.AbsoluteConstraints(227, 41, 104, -1)); getContentPane().add(c, new org.netbeans.lib.awtextra.AbsoluteConstraints(227, 99, 104, -1)); getContentPane().add(d, new org.netbeans.lib.awtextra.AbsoluteConstraints(227, 128, 104, -1)); getContentPane().add(g, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 242, 104, 30)); jLabel13.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel13.setText("To be Paid Amount"); getContentPane().add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(59, 349, -1, -1)); getContentPane().add(h, new org.netbeans.lib.awtextra.AbsoluteConstraints(229, 347, 104, -1)); y.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null, null, null}, {null, null, null, null, null, null, null}, {null, null, null, null, null, null, null}, {null, null, null, null, null, null, null} }, new String [] { "ID", "Name", "Salary Level", "To be Paid Amount", "Finalized Salary", "Reason", "Assigned Date" } )); y.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { yMouseClicked(evt); } }); jScrollPane2.setViewportView(y); getContentPane().add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 380, 743, 180)); jLabel11.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel11.setText("Reason for Reduction"); getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 470, -1, -1)); jLabel12.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel12.setText("Finalized Amount"); getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(59, 380, -1, -1)); jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jButton1.setText("Assign"); jButton1.setMaximumSize(new java.awt.Dimension(130, 36)); jButton1.setMinimumSize(new java.awt.Dimension(130, 36)); jButton1.setPreferredSize(new java.awt.Dimension(130, 36)); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 510, 175, -1)); j.setColumns(20); j.setRows(5); jScrollPane3.setViewportView(j); getContentPane().add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 470, 162, 73)); datebox.setDateFormatString("yyyy-MM-dd"); getContentPane().add(datebox, new org.netbeans.lib.awtextra.AbsoluteConstraints(229, 415, 125, -1)); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel5.setText("Date"); getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(59, 415, -1, -1)); getContentPane().add(i, new org.netbeans.lib.awtextra.AbsoluteConstraints(229, 380, 103, -1)); jLabel14.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel14.setText("Name"); getContentPane().add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(56, 72, -1, -1)); getContentPane().add(b, new org.netbeans.lib.awtextra.AbsoluteConstraints(227, 70, 104, -1)); jLabel16.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N getContentPane().add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(49, 377, -1, -1)); jButton4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jButton4.setText("Cal_Salary"); jButton4.setMaximumSize(new java.awt.Dimension(130, 36)); jButton4.setMinimumSize(new java.awt.Dimension(130, 36)); jButton4.setPreferredSize(new java.awt.Dimension(130, 36)); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 190, 177, -1)); x.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null} }, new String [] { "ID", "Name", "Salary", "no of days", "non approved" } )); x.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { xMouseClicked(evt); } }); jScrollPane1.setViewportView(x); getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 120, 743, 163)); jLabel17.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel17.setText("Rs"); getContentPane().add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 200, -1, -1)); getContentPane().add(f, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 192, 104, 30)); jLabel15.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel15.setText("Amount Reduced"); getContentPane().add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 570, -1, -1)); getContentPane().add(reduced, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 570, 104, -1)); jButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jButton2.setText("Clear Fields"); jButton2.setMaximumSize(new java.awt.Dimension(130, 36)); jButton2.setMinimumSize(new java.awt.Dimension(130, 36)); jButton2.setPreferredSize(new java.awt.Dimension(130, 36)); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 320, 175, -1)); jLabel18.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jLabel18.setForeground(new java.awt.Color(255, 255, 255)); jLabel18.setText("Employee Final Salary"); getContentPane().add(jLabel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 30, 220, 40)); jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bill/backgrnd1.png"))); // NOI18N getContentPane().add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1350, 700)); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7319975", "0.7291426", "0.7291426", "0.7291426", "0.7286372", "0.7249133", "0.72134817", "0.7208172", "0.7196412", "0.7190365", "0.7184679", "0.71593916", "0.7147999", "0.7093026", "0.7080469", "0.7056178", "0.69875216", "0.69774026", "0.69545585", "0.69538534", "0.6945255...
0.0
-1
Converts pitches in Hertz to the requested unit.
public static List<Double> convertHertzTo(PitchUnit unit, List<Double> pitchValuesInHertz) { List<Double> convertedValues = new ArrayList<Double>(pitchValuesInHertz); switch (unit) { case ABSOLUTE_CENTS: convertHertzToAbsoluteCent(convertedValues); break; case RELATIVE_CENTS: convertHertzToRelativeCent(convertedValues); break; case MIDI_KEY: convertHertzToMidiKey(convertedValues); break; case MIDI_CENT: convertHertzToMidiCent(convertedValues); break; case HERTZ: break; default: throw new Error("Unsupported unit: " + unit.name()); } return convertedValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static float toHertz(int unit, float value) {\n \t\tswitch (unit) {\n \t\tcase CSSPrimitiveValue.CSS_HZ:\n \t\t\treturn value;\n \t\tcase CSSPrimitiveValue.CSS_KHZ:\n \t\t\treturn (value / 1000);\n \t\tdefault:\n \t\t\tthrow new DOMException(DOMException.INVALID_ACCESS_ERR, \"\");\n \t\t}\n \t}", "prot...
[ "0.6663947", "0.6158668", "0.58528066", "0.5632254", "0.5632254", "0.5632254", "0.55581933", "0.55581784", "0.5519959", "0.5455512", "0.54342306", "0.5400662", "0.53841525", "0.53720266", "0.53558284", "0.5331955", "0.5315639", "0.5279866", "0.52753234", "0.52679694", "0.5252...
0.5681717
3
Converts a list of pitches in Hertz to absolute cents.
private static void convertHertzToAbsoluteCent(List<Double> convertedValues) { for (int i = 0; i < convertedValues.size(); i++) { Double valueInHertz = convertedValues.get(i); convertedValues.set(i, PitchConverter.hertzToAbsoluteCent(valueInHertz)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void convertHertzToRelativeCent(List<Double> convertedValues) {\r\n for (int i = 0; i < convertedValues.size(); i++) {\r\n Double hertzValue = convertedValues.get(i);\r\n Double pitchValueInCentFoldedToOneOctave = PitchConverter.hertzToRelativeCent(hertzValue);\r\n ...
[ "0.65277046", "0.53424346", "0.5295586", "0.52722967", "0.5263988", "0.5115555", "0.50785255", "0.5054489", "0.5036893", "0.502775", "0.4864748", "0.4864748", "0.48059604", "0.47790754", "0.47645697", "0.47169602", "0.46847087", "0.46774295", "0.46469918", "0.4628708", "0.462...
0.66527677
0
Folds the pitch values to one octave. E.g. 1203 becomes 3 and 956 remains 956
private static void convertHertzToRelativeCent(List<Double> convertedValues) { for (int i = 0; i < convertedValues.size(); i++) { Double hertzValue = convertedValues.get(i); Double pitchValueInCentFoldedToOneOctave = PitchConverter.hertzToRelativeCent(hertzValue); convertedValues.set(i, pitchValueInCentFoldedToOneOctave); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getPitch();", "public final void addOctaves() {\n boolean cancelled = false;\n float max = 0;\n int octaves = Math.min((int) (\n Math.log(1 / (baseFreq * 2.0 * Math.PI / width))\n / Math.log(lacunarity)), octaveCap);\n noiseLoop:\n f...
[ "0.560087", "0.55399585", "0.5486663", "0.545882", "0.5409592", "0.5409592", "0.53425914", "0.528255", "0.51631045", "0.51382095", "0.51070964", "0.5084425", "0.50481987", "0.50403273", "0.5019637", "0.50010955", "0.49383444", "0.49063188", "0.48707622", "0.48657414", "0.4860...
0.0
-1
Removes all frequencies that are not in the specified band. The remaining band consists only of frequencies between minValueInHertz and maxValueInHertz (inclusive).
public static void bandwithFilter(List<Double> pitchValuesInHertz, double minValueInHertz, double maxValueInHertz) { Iterator<Double> it = pitchValuesInHertz.iterator(); while (it.hasNext()) { double value = it.next(); if (value < minValueInHertz || maxValueInHertz < value) { it.remove(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFrequencyBand(List<Double> frequencyBand) {\n this.frequencyBand = frequencyBand;\n }", "public void unsetBand1H()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(BAND1H$4, 0);\n }\n }", "void unsetFra...
[ "0.5646694", "0.5011526", "0.4963575", "0.48992446", "0.489178", "0.47980586", "0.4769619", "0.4751913", "0.47391868", "0.46687764", "0.4657233", "0.45633757", "0.45397237", "0.45370615", "0.45340565", "0.45197046", "0.4511416", "0.44735307", "0.43722746", "0.4344948", "0.434...
0.7322675
0
Calculates the median for a list of doubles. The list is sorted inplace.
public static Double median(List<Double> list) { if (list == null || list.size() == 0) { throw new Error("Mean of an empty list is undefined"); } int size = list.size(); Collections.sort(list); double median = 0.0; if (size % 2 == 0) { median = (list.get(size / 2) + list.get((size / 2) - 1)) / 2.0; } else { median = list.get(size / 2); } return median; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Double getMedian(List<Double> sortedDouble) {\n Double median;\n if (sortedDouble.size() % 2 != 0) {\n median = sortedDouble.get(sortedDouble.size() / 2);\n } else {\n median = (sortedDouble.get((sortedDouble.size() - 1) / 2) + sortedDouble.get((sortedDouble.size(...
[ "0.7992086", "0.7561925", "0.73433", "0.71643996", "0.7160708", "0.7095936", "0.705041", "0.7031747", "0.6965246", "0.69592434", "0.68834287", "0.6847956", "0.6667568", "0.66209996", "0.66136104", "0.6609416", "0.66024446", "0.6558608", "0.6489981", "0.6461748", "0.64509815",...
0.80504304
0
Applies an order n onedimensional median filter to the list to filter. The function considers the signal to be 0 beyond the end points. The output has the same length as the list to filter. Returns a new list. n must be odd! The function is defined as: f(i) = median( list(in/2) .. list(i+n/2) ) So for n = 3 and list to filter: [3 7 4] 0 [3 7 4] 0 [3 4 7]
public static List<Double> medianFilter(List<Double> listToFilter, int n) { if (n % 2 == 0) { throw new Error("Medianfilter not implemented for even n values"); } List<Double> filteredList = new ArrayList<Double>(); int numberOfZeroesToAddBefore = (n - 1) / 2; int numberOfZeroesToAddAfter = (n - 1) / 2; for (int i = 0; i < numberOfZeroesToAddBefore; i++) { listToFilter.add(0, 0.0); } for (int i = 0; i < numberOfZeroesToAddAfter; i++) { listToFilter.add(0.0); } for (int i = numberOfZeroesToAddBefore; i < listToFilter.size() - numberOfZeroesToAddAfter; i++) { double median = median(new ArrayList<Double>(listToFilter.subList(i - (n / 2), i + (n / 2) + 1))); filteredList.add(median); } for (int i = 0; i < numberOfZeroesToAddBefore; i++) { listToFilter.remove(0); } for (int i = 0; i < numberOfZeroesToAddAfter; i++) { listToFilter.remove(listToFilter.size() - 1); } return filteredList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int getMedian(ArrayList<Integer> inList) \n\t{\n\t\tCollections.sort(inList);\n\t\tint median = 0;\n\t\t\n\t\tif (inList.size()%2 == 0)\n\t\t{\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint position = inList.size()/2;\n\t\t\tmedian = inList.get(position);\n\t\t}\n\t\t\n\t\treturn median; \n\t\t\n\t\t\n\...
[ "0.6360963", "0.6090912", "0.5965322", "0.58271307", "0.5766123", "0.5678891", "0.54310006", "0.5289881", "0.5286689", "0.5256222", "0.52324843", "0.5221395", "0.51889336", "0.517423", "0.5172823", "0.51441854", "0.508405", "0.50283074", "0.4984459", "0.49717838", "0.49695525...
0.8540885
0
Smooths a list of doubles using a gaussian.
public static List<Double> getGaussianSmoothed(List<Double> listToSmooth, double standardDeviation) { if (standardDeviation < 0.0) { throw new IllegalArgumentException("standardDeviation invalid"); } else if (standardDeviation == 0.0) { return listToSmooth; } // Create a new, identical but empty Histogram. List<Double> smoothedList = new ArrayList<Double>(); // Determine the number of weights (must be odd). int numWeights = (int) (2 * 2.58 * standardDeviation + 0.5); if (numWeights % 2 == 0) { numWeights++; } // Initialize the smoothing weights. double[] weights = new double[numWeights]; int m = numWeights / 2; double var = standardDeviation * standardDeviation; double gain = 1.0 / Math.sqrt(2.0 * Math.PI * var); double exp = -1.0 / (2.0 * var); for (int i = m; i < numWeights; i++) { double del = i - m; weights[i] = gain * Math.exp(exp * del * del); weights[numWeights - 1 - i] = weights[i]; } // Clear the band total count for the smoothed histogram. double sum = 0; double originalSum = 0; double[] smoothedValues = new double[listToSmooth.size()]; for (int b = 0; b < listToSmooth.size(); b++) { // Determine clipped range. int min = Math.max(b - m, 0); int max = Math.min(b + m, listToSmooth.size()); // Calculate the offset into the weight array. int offset = m > b ? m - b : 0; // Accumulate the total for the range. double acc = 0; double weightTotal = 0; for (int i = min; i < max; i++) { double w = weights[offset++]; acc += listToSmooth.get(i) * w; weightTotal += w; } // Round the accumulated value. smoothedValues[b] = acc / weightTotal; // Accumulate total for band. sum += smoothedValues[b]; originalSum += listToSmooth.get(b); } // Rescale the counts such that the band total is approximately // the same as for the same band of the original histogram. double factor = originalSum / sum; for (int b = 0; b < listToSmooth.size(); b++) { double smoothedValue = smoothedValues[b] * factor; smoothedList.add(smoothedValue); } assert smoothedList.size() == listToSmooth.size(); return smoothedList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void gaussianSmooth(double[] img, int width, int height, double sigma) {\n\t\tint radius = (int)Math.sqrt((6.908)*(2*sigma*sigma));\n\t\t// compute coefficients of the gaussian filter\n\t\tdouble[] filter = new double[2*radius+1];\n\t\tdouble filtersum = 0;\n\n\t\tfor(int i=-radius;i<=radius;i++) {\...
[ "0.65752494", "0.64563316", "0.60189474", "0.58704454", "0.55240494", "0.55240494", "0.55099666", "0.53924257", "0.52737784", "0.52161324", "0.5173922", "0.51341194", "0.5104942", "0.5096547", "0.5059148", "0.5028562", "0.50278115", "0.50102067", "0.49979267", "0.49954793", "...
0.6805926
0
Applies a Gaussian filter to the list to filter. The parameter is arbitrary and can be 1/(2standard deviation^2).
public static List<Double> gaussianFilter(List<Double> listToFilter, double parameter) { int windowSize = 7; List<Double> filteredList = new ArrayList<Double>(); // double firstFactor = Math.pow(parameter/Math.PI, 0.5) * // Math.pow(Math.E, -1 * parameter); for (int j = 0; j < windowSize / 2; j++) { filteredList.add(0.0); } for (int i = windowSize / 2; i < listToFilter.size() - windowSize / 2; i++) { double sumValues = 0; double sumWeight = 0; for (int j = 0; j < windowSize; j++) { double weight = Math.pow(Math.E, -1 * (j - windowSize / 2) * (j - windowSize / 2) / 2 * parameter); sumWeight += weight; sumValues += weight * listToFilter.get(i); } double newValue = 1.0 / sumWeight * sumValues / sumWeight; filteredList.add(newValue); } for (int j = 0; j < windowSize / 2; j++) { filteredList.add(0.0); } return filteredList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Double> gaussianFilter(List<Double> listToFilter) {\r\n DescriptiveStatistics stats = new DescriptiveStatistics();\r\n // Add the data from the array\r\n for (Double value : listToFilter) {\r\n stats.addValue(value);\r\n }\r\n double std = stat...
[ "0.81152356", "0.67914295", "0.59041", "0.56685454", "0.56266516", "0.5427177", "0.5423228", "0.5162282", "0.5069758", "0.5063751", "0.50613505", "0.50088453", "0.48567483", "0.48330328", "0.47813758", "0.47812602", "0.47339067", "0.4702628", "0.46742815", "0.46687427", "0.46...
0.79482555
1
Applies a Gaussian filter to the list to filter. The parameter is 1/(2standard deviation^2).
public static List<Double> gaussianFilter(List<Double> listToFilter) { DescriptiveStatistics stats = new DescriptiveStatistics(); // Add the data from the array for (Double value : listToFilter) { stats.addValue(value); } double std = stats.getStandardDeviation(); double parameter = 1.0 / (std * std * 2); return gaussianFilter(listToFilter, parameter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Double> gaussianFilter(List<Double> listToFilter, double parameter) {\r\n int windowSize = 7;\r\n List<Double> filteredList = new ArrayList<Double>();\r\n \r\n // double firstFactor = Math.pow(parameter/Math.PI, 0.5) *\r\n // Math.pow(Math.E, -1 * parameter);\r\n ...
[ "0.78079313", "0.6951475", "0.5785523", "0.5649328", "0.542067", "0.5273572", "0.5270473", "0.5253467", "0.5135618", "0.5132098", "0.5054233", "0.50394005", "0.49696884", "0.48854762", "0.48115185", "0.47630113", "0.47500688", "0.47220698", "0.4709528", "0.47061944", "0.46690...
0.81546074
0
Creates a frequency table. The number of items in each class is returned. Classes are defined by the limit and resolution. E.g. for a limit of 1200 with a resolution of 400 there are 3 classes: [0400[, [400800[ and [8001200[.
public static Histogram createFrequencyTable(List<Double> values, double classWidth, double start, double stop) { Histogram histogram = new Histogram(start, stop, (int) ((stop - start) / classWidth)); for (Double value : values) { histogram.add(value); } assert histogram.getSumFreq() == values.size() : "Number of items in bins does not correspond with total number of items"; return histogram; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getFreq();", "public static ScannableTable fibonacciTableWithLimit( final long limit ) {\n return new ScannableTable() {\n @Override\n public AlgDataType getRowType( AlgDataTypeFactory typeFactory ) {\n return typeFactory.builder().add( \"N\", null, PolyType.BIGINT...
[ "0.5345603", "0.5286419", "0.5053574", "0.5015216", "0.49946636", "0.48999748", "0.48054776", "0.47508785", "0.47360462", "0.46986678", "0.468815", "0.4686846", "0.46852574", "0.46802115", "0.46319947", "0.46315908", "0.46284148", "0.45766985", "0.45635036", "0.45368052", "0....
0.5853402
0
Reads a frequency table (histogram) from disk. The source file is expected to be a CSVfile in the format: value;frequency[;other data; is discarded;...] The lowest value is on the first row, the highest on the last!
public static Histogram readFrequencyTable(String fileName) { List<String[]> data = FileUtils.readCSVFile(fileName, ";", -1); double classWidth = Double.parseDouble(data.get(1)[0]) - Double.parseDouble(data.get(0)[0]); double start = Double.parseDouble(data.get(0)[0]) - classWidth / 2.0; double stop = Double.parseDouble(data.get(data.size() - 1)[0]) + classWidth / 2.0; Histogram table = new Histogram(start, stop, (int) ((stop - start) / classWidth)); for (String[] row : data) { int frequency = (int) Double.parseDouble(row[1]); double value = Double.parseDouble(row[0]); for (int i = 0; i < frequency; i++) { table.add(value); } } return table; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadAllCountData(){\n // load from csv\n try{\n FileReader file = new FileReader(\"/home/ubuntu/user_counts_small.csv\");\n //FileReader file = new FileReader(\"/Users/YHWH/Desktop/cloud computing/team project/user_counts.csv\");\n BufferedReader buff = n...
[ "0.58359486", "0.5574478", "0.5522366", "0.53779227", "0.5355143", "0.53485155", "0.5340709", "0.5297256", "0.52102107", "0.51476604", "0.50812584", "0.5060723", "0.50390875", "0.5006523", "0.49642655", "0.49473557", "0.4911949", "0.48895633", "0.48680946", "0.4857957", "0.48...
0.7700458
0
int position = getAdapterPosition(); Log.d("position", String.valueOf(position)); Log.d("cusIDDD", String.valueOf(CusId)); Log.d("view", String.valueOf(View1)); Toast.makeText(getApplicationContext(),pos,Toast.LENGTH_LONG).show();
@Override public void onClick(View v) { Toast.makeText(getActivity(), String.valueOf(CusId),Toast.LENGTH_LONG).show(); //Intent edit = new Intent(getActivity(),CustomerEdit.class); //edit.putExtra("CUSID", String.valueOf(CusIds.get(getPosition()))); //Log.d("view11", String.valueOf(CusIds.get(getPosition()))); // startActivity(edit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n int itemPosition = position;\r\n\r\n // ListView Clicked item value\r\n String itemValue = (String) listView.getI...
[ "0.6950924", "0.69398344", "0.6939531", "0.6932984", "0.6869816", "0.68682015", "0.6853899", "0.6666118", "0.6661697", "0.66440624", "0.6615418", "0.6592794", "0.65296894", "0.6527119", "0.6517183", "0.65034086", "0.65034086", "0.65034086", "0.65034086", "0.65034086", "0.6503...
0.6957004
0
Gets integer property as Integer object and catches exceptions for wrongly formated numbers, returning null in those cases.
public Integer getPropertyAsInteger(String property) { try { return Integer.valueOf(properties.getProperty(property)); } catch (NumberFormatException e) { } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Integer getIntegerProperty(Dictionary<?, ?> properties,\n String propertyName) {\n Integer value = null;\n try {\n String s = Tools.get(properties, propertyName);\n value = isNullOrEmpty(s) ? value : Integer.parseInt(s)...
[ "0.7405823", "0.71828204", "0.692619", "0.6909834", "0.69037324", "0.685548", "0.6829627", "0.6822753", "0.6792756", "0.66616833", "0.6651103", "0.66358256", "0.6612519", "0.6608694", "0.65711117", "0.6473693", "0.64533645", "0.6452891", "0.6409025", "0.64080465", "0.64055413...
0.69708097
2
Created by me_touch on 2017/8/2.
public interface IWord2Spell { String word2spell(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.6050303", "0.5885339", "0.57776123", "0.57600373", "0.5757375", "0.5701796", "0.5701796", "0.56162894", "0.5615672", "0.5603355", "0.5590888", "0.55883104", "0.55530584", "0.5548685", "0.5542608", "0.55417615", "0.5527871", "0.55253917", "0.55253917", "0.55253917", "0.5525...
0.0
-1
interface is a fully abstract class
interface Bank { void deposit(); abstract void withdraw(); void checkBalance(); // int code; // we cant declare like this, compilation error final static int code = 204050; // we have to declare variable value, by default it is final and static }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AbstractC03680oI {\n}", "public interface AbstractC2502fH1 extends IInterface {\n}", "public interface AbstractC1953c50 {\n}", "@Override\n public boolean isInterface() { return false; }", "public interface zzo\n extends IInterface\n{\n\n public abstract void zze(AdRequestParcel a...
[ "0.7764724", "0.7627778", "0.7470661", "0.7408952", "0.72501355", "0.714235", "0.7134575", "0.71144074", "0.71096915", "0.7092002", "0.7046681", "0.7014276", "0.6989172", "0.6954114", "0.6947004", "0.6878335", "0.6878335", "0.68657947", "0.6861694", "0.68531835", "0.6834419",...
0.0
-1
end of UserLoginCredential functional interface : Java 1.8 version onwards
@FunctionalInterface interface SingleMethod { // functional interface cant have more than one abstract method void method(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CredentialValidationResult validate(UsernamePasswordCredential unpc){\r\n \r\n \r\n return null;\r\n}", "public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;", "EmployeeMaster authenticateUser(int employeeId, String password);", "public abstr...
[ "0.67135626", "0.6519868", "0.62506396", "0.6233228", "0.62299496", "0.62119126", "0.6195133", "0.6194201", "0.61475897", "0.6143534", "0.6123887", "0.61093587", "0.60863066", "0.6083354", "0.60777307", "0.60694", "0.6055206", "0.6053409", "0.6017495", "0.6003819", "0.59871",...
0.0
-1
functional interface cant have more than one abstract method
void method();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FunctionalInterface\r\ninterface SingleMethod { // functional interface cant have more than one abstract method\r\n\tvoid method();\r\n\t\r\n}", "@FunctionalInterface\npublic interface MyFunctionalInterface {\n\n // abstract method\n int addMethod(int val1, int val2);\n\n}", "public interface i\n{\n\n ...
[ "0.77757823", "0.7169262", "0.6957053", "0.69532543", "0.6952169", "0.69508076", "0.6847242", "0.6782638", "0.67695516", "0.6759991", "0.67522514", "0.6723087", "0.66877294", "0.6685124", "0.66725135", "0.66695106", "0.66395044", "0.6634122", "0.66227245", "0.66222167", "0.66...
0.0
-1
end of SingleMethod Java 1.8 new feature > default method in interface
interface DefaultMethod extends SingleMethod { default public void myMethod() { System.out.println("from Java 1.8 version can have method with a body"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface Sample {\n\tvoid method(String a);\n\t// New in Java 1.8 - default interface methods\n\tdefault void method_default() {\n\t System.out.println(\"Hello from default method!\");\n\t}\n }", "public interface A {\n default void oi(){\n System.out.println(\"Dentro do oi de A\");\n }\n}", ...
[ "0.7988087", "0.7818289", "0.7738305", "0.7734584", "0.770305", "0.7646692", "0.7607255", "0.75260717", "0.75056565", "0.7378305", "0.7358213", "0.7352611", "0.72911125", "0.7225844", "0.72007847", "0.7198496", "0.71805596", "0.7134743", "0.7116114", "0.71027976", "0.7065319"...
0.7874619
1
TODO Autogenerated method stub
@Override public void deposit() { }
{ "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 withdraw() { }
{ "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 checkBalance() { }
{ "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 4. Save data and notify changes
public void setData(List<Business> list) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "public void updateData() {}", "private void saveData() {\n }", "public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}", "@Override\n protected void onData...
[ "0.72992986", "0.7294048", "0.7285933", "0.704767", "0.6997504", "0.685868", "0.67846656", "0.67799526", "0.6742461", "0.67014974", "0.67014974", "0.6642028", "0.661001", "0.6605579", "0.6584993", "0.6559935", "0.6535524", "0.6491773", "0.6457893", "0.6447575", "0.64356023", ...
0.0
-1
TODO 2. Inflate the list item view TODO 3. Initial ViewHolder
@Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n ListItem item = this.getItem(position);\n if (convertView == null) {\n \tif (item.type == TYPE_ITEM){\n \t\tconvertView = mInflater.inflate(R.layout.search_item, null);\n ...
[ "0.75785655", "0.75785077", "0.74813646", "0.7470819", "0.7460745", "0.74201554", "0.7415927", "0.7409042", "0.74084246", "0.73955524", "0.73616743", "0.73597765", "0.7350081", "0.73461086", "0.7315082", "0.73087686", "0.7289063", "0.7288447", "0.7280073", "0.726727", "0.7259...
0.0
-1
TODO 6. Setup data into view holder
@Override public void onBindViewHolder(ViewHolder holder, int position) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void fillData(View itemView, T data);", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n\n TextView name = (TextView) view.findViewById(R.id.label3nazwa);\n TextView date = (TextView) view...
[ "0.6843712", "0.6714795", "0.6627011", "0.6624834", "0.65924156", "0.65838504", "0.65489745", "0.6531852", "0.64987946", "0.64935887", "0.6474712", "0.6458169", "0.64541304", "0.6436008", "0.6427071", "0.6413871", "0.64056826", "0.6397721", "0.63799566", "0.63663435", "0.6332...
0.0
-1
TODO 5. Setup item count based on data size
@Override public int getItemCount() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int getSize() {\n return numItems;\n }", "@Override\n public int getSize() {\n return this.numItems;\n }", "@Override\n public int getItemCount() {\n // 12. Returning 0 here will tell our Adapter not to make any Items. Let's fix that.\n ...
[ "0.6988653", "0.67661333", "0.6684519", "0.65241235", "0.64493364", "0.6369371", "0.63444006", "0.63444006", "0.6300946", "0.62987393", "0.6281332", "0.62776667", "0.62304085", "0.6219766", "0.62167317", "0.62158096", "0.6213192", "0.6206396", "0.6195377", "0.6169003", "0.616...
0.0
-1
TODO Autogenerated method stub
public String getFilePath() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public String getMapDescriptionFileName() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public String getUnitDescriptionFileName() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public String getWeightVectorFileName() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
/ / Constructors /
public Percolation(int n) { if (n < 1) throw new IllegalArgumentException("n is not positive"); virtualTopId = 0; virtualBottomId = n * n + 1; size = n; grid = new boolean[n][n]; final int componentAmount = n * n + 2; mainUnion = new WeightedQuickUnionUF(componentAmount); backwashAwareUnion = new WeightedQuickUnionUF(componentAmount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public CyanSus() {\n\n }", "public Pitonyak_09_02() {\r\n }", "private TMCourse() {\n\t}", "public _355() {\n\n }", "public CSSTidier() {\n\t}", "public PSRelation()\n {\n }", "public RngObject() {\n\t\t\n\t}", "pu...
[ "0.84202886", "0.78166115", "0.71776414", "0.7029142", "0.6997788", "0.6988559", "0.698599", "0.69655824", "0.6958574", "0.69455236", "0.69264483", "0.69235736", "0.69148237", "0.6909453", "0.6896481", "0.6896198", "0.6878102", "0.6870602", "0.68672794", "0.6842882", "0.68406...
0.0
-1
/ / API /
public void open(int row, int col) { if (isOpen(row, col)) return; grid[row - 1][col - 1] = true; ++openSites; // Transform the row and the column into an appropriate index // because the quick union class uses a one-dimensional array. final int currentSiteIndex = toIndex(row, col); // The topmost row must be connected to the virtual top. if (row == 1) { mainUnion.union(virtualTopId, currentSiteIndex); backwashAwareUnion.union(virtualTopId, currentSiteIndex); } // The bottommost row must be connected to virtual the bottom. if (row == size) mainUnion.union(virtualBottomId, currentSiteIndex); // Connect all neighbors of the current site if and only if the neighbors are open. if (row > 1 && isOpen(row - 1, col)) { final int topNeighborIndex = toIndex(row - 1, col); mainUnion.union(topNeighborIndex, currentSiteIndex); backwashAwareUnion.union(topNeighborIndex, currentSiteIndex); } if (row < size && isOpen(row + 1, col)) { final int bottomNeighborIndex = toIndex(row + 1, col); mainUnion.union(bottomNeighborIndex, currentSiteIndex); backwashAwareUnion.union(bottomNeighborIndex, currentSiteIndex); } if (col > 1 && isOpen(row, col - 1)) { final int leftNeighborIndex = toIndex(row, col - 1); mainUnion.union(leftNeighborIndex, currentSiteIndex); backwashAwareUnion.union(leftNeighborIndex, currentSiteIndex); } if (col < size && isOpen(row, col + 1)) { final int rightNeighborIndex = toIndex(row, col + 1); mainUnion.union(rightNeighborIndex, currentSiteIndex); backwashAwareUnion.union(rightNeighborIndex, currentSiteIndex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "API createAPI();", "public API() {}", "public api() {}", "public interface TvApi {\n\n /*\n 获取电视节目表\n */\n @POST(\"getProgram\")\n Call<TvShowData> getProgram(@Query(\"code\") String code, @Query(\"date\") String date, @Query(\"key\") String key);\n\n /*\n 获取频道类型列表\n */\n ...
[ "0.7671685", "0.72777003", "0.7262244", "0.6854822", "0.6814281", "0.6758555", "0.65944475", "0.6587333", "0.6585479", "0.65769225", "0.65535814", "0.65369105", "0.6508852", "0.6508194", "0.64727867", "0.64669096", "0.6463896", "0.6445774", "0.6445448", "0.6444885", "0.644447...
0.0
-1
If the top virtual site is connected to the bottom virtual site, the system percolates.
public boolean percolates() { return mainUnion.connected(virtualTopId, virtualBottomId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean percolates()\n {\n return uf.connected(topVirtualSite, bottomVirtualSite);\n }", "private void connectToVirtualSites(int currentSite) {\n // if top row, connect to virtual top site\n if (currentSite < gridSize) {\n uf.union(currentSite, topVirtualSite);\n ...
[ "0.73434705", "0.70516926", "0.6769987", "0.65127015", "0.6479789", "0.6476564", "0.6153489", "0.6075679", "0.60174114", "0.59502333", "0.53211445", "0.5232819", "0.509114", "0.5043125", "0.50324076", "0.50228155", "0.50116336", "0.50032294", "0.4991538", "0.49667484", "0.496...
0.61003137
7
/ / Helper methods /
private void validateRowAndColumn(int row, int col) { // row or column must be in range [1, N] if ((row < 1 || row > size) || (col < 1 || col > size)) { throw new IllegalArgumentException("wrong row or column"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private void strin() {\n\n\t}", "private stendhal() {\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private static void cajas() {\n\t\t\n\t}", "private void poetries() {\n\n\t}"...
[ "0.5495899", "0.5495899", "0.54505235", "0.54327035", "0.53954303", "0.53698415", "0.53669816", "0.53338206", "0.53307915", "0.5301819", "0.5288399", "0.52707165", "0.5270206", "0.5260756", "0.5258446", "0.5204558", "0.5204", "0.51774746", "0.51694417", "0.5161638", "0.515971...
0.0
-1
/ Getters and setters for the class attributes
public long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\npublic void setAttributes() {\n\t\n}", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "public static void initializeClassAttributes() {\n\t\tAboraSupport.findAboraClass(IntegerVarArray.class).setAttributes( new Set().add(\"CONCRETE\").add(\"PSEUDOCOPY\"));\n\t}", "...
[ "0.6889523", "0.6527097", "0.6497852", "0.64951426", "0.6493571", "0.6384917", "0.63816756", "0.6318411", "0.62035006", "0.6103707", "0.60877454", "0.6068718", "0.6047711", "0.59693784", "0.5954799", "0.59429246", "0.5929212", "0.5929212", "0.5882371", "0.58684707", "0.585331...
0.0
-1
/ abstract methods to implement in child classes for add and print details
public abstract void addDetails();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public void printInfo();", "@Override\n\tpublic void getDetail() {\n\t\t\n\t}", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }", "public abstract void displayInfo();", "abstra...
[ "0.7205639", "0.71651286", "0.7015168", "0.68543965", "0.6821994", "0.6743304", "0.6563363", "0.6549146", "0.6492832", "0.643395", "0.6385931", "0.6385931", "0.6383308", "0.6372627", "0.63344127", "0.63163066", "0.6311364", "0.6303371", "0.6303371", "0.6261186", "0.6253942", ...
0.7325416
0
Synchronize on LOCK to ensure that we don't end up creating two singletons.
public static synchronized CodeChatManager getInstance() { synchronized (LOCK){ if(instance == null) { CodeChatManager manager = new CodeChatManager(); instance = manager; return manager; } return instance; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Singleton doubleCheckLocking(){\n if(instance != null){\n return instance;\n }\n synchronized (key){\n if(instance == null){\n instance = new Singleton();\n }\n return instance;\n }\n }", "private SingletonSyn...
[ "0.7250501", "0.72339916", "0.69195294", "0.6823505", "0.67646664", "0.6721133", "0.65336186", "0.6396465", "0.6342491", "0.6336332", "0.63151616", "0.62931156", "0.6289697", "0.62778026", "0.6261271", "0.6252224", "0.62205034", "0.6218236", "0.61898744", "0.61898524", "0.618...
0.0
-1
Testing the checkChangeImage() function
@Test void checkChangeImage() { ImageViewModel imageModel = new ImageViewModel(); int countUp = 10; int totalTime = 70; int i = imageModel.checkChangeImage(countUp, totalTime); assertEquals(1, i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testRefreshImage()\n {\n Image orig = cover.getImage();\n cover.setType(GamePiece.O);\n cover.refreshImage();\n assertEquals(false, orig.equals(cover.getImage()));\n }", "public void testGetSetImageImage() {\n\t\tassertEquals(testNormal.getImage(), new ImageIcon(\"PA...
[ "0.71969694", "0.71115124", "0.70957047", "0.69852084", "0.6721921", "0.6666879", "0.6615813", "0.6515836", "0.64264274", "0.6391096", "0.6370214", "0.63460714", "0.62992865", "0.6266291", "0.6260678", "0.6252752", "0.6221631", "0.62197363", "0.6202694", "0.6197687", "0.61444...
0.7698335
0
Converts the given arithmetic expression into postfix.
public String convert(ArithmeticExpression expression) { String expressionString = expression.getExpression(); String convertedExpression = ""; Stack<String> OpStack = new Stack<>(); int startIndex = 0; while(startIndex < expressionString.length()) { if(isOperand(nextToken(expressionString,startIndex))) { convertedExpression += nextToken(expressionString,startIndex); convertedExpression += " "; } if(Brackets.isLeftBracket(nextToken(expressionString,startIndex))) { OpStack.push(nextToken(expressionString,startIndex)); } if(Brackets.isRightBracket(nextToken(expressionString,startIndex))) { String topOp = OpStack.pop(); while(!Brackets.isLeftBracket(topOp)) { convertedExpression += topOp; convertedExpression += " "; topOp = OpStack.pop(); } } if(Operator.isOperator(nextToken(expressionString,startIndex))) { Operator temp = Operator.of(nextToken(expressionString,startIndex)); if(OpStack.isEmpty()) { OpStack.push(nextToken(expressionString, startIndex)); } else { Operator topOp = Operator.of(OpStack.peek()); while (topOp.getRank() <= temp.getRank()) { convertedExpression += OpStack.pop(); convertedExpression += " "; topOp = Operator.of(OpStack.peek()); } OpStack.push(nextToken(expressionString, startIndex)); } } if(isOperand(nextToken(expressionString,startIndex))) startIndex += nextToken(expressionString,startIndex).length(); else startIndex++; } while(!OpStack.isEmpty()) { convertedExpression += OpStack.pop(); convertedExpression += " "; } return convertedExpression; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String infixToPostfix(String expression) {\r\n\t\tStringBuilder pf = new StringBuilder(); // the postfix expression \r\n\t\texpression = removespaces(expression); \r\n\t\texpression = CheckInputValidation(expression);\r\n\t\texpression = DummyZero(expression);\r\n\t\tString e = expression;\r\...
[ "0.76751375", "0.73644567", "0.7325168", "0.7259476", "0.72468233", "0.7172934", "0.7142685", "0.69703263", "0.6944551", "0.69337535", "0.68352497", "0.6802134", "0.67926496", "0.6760693", "0.6741181", "0.6724233", "0.6675502", "0.6672828", "0.6636893", "0.66261625", "0.66177...
0.63084906
34
This method receives a string and an index and returns the next token starting at that index.
public String nextToken(String s, int start) { TokenBuilder token = new TokenBuilder(); char[] temp = s.toCharArray(); int count = start; if(Operator.isOperator(temp[start]) || Brackets.isLeftBracket(temp[start]) || Brackets.isRightBracket(temp[start])) { return temp[start] + ""; } while(count < temp.length && isOperand(temp[count] + "")) { token.append(temp[count]); count++; } return token.build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public Token getToken(int index) {\n Token t = jj_lookingAhead ? jj_scanpos : token;\n for (int i = 0; i < index; i++) {\n if (t.next != null) t = t.next;\n else t = t.next = token_source.getNextToken();\n }\n return t;\n }", "static final public Token getToken(int index) {\n Toke...
[ "0.6916688", "0.6846811", "0.6846811", "0.6846811", "0.68012327", "0.6760207", "0.6760207", "0.6760207", "0.6760207", "0.6760207", "0.6760207", "0.6760207", "0.6760207", "0.6760207", "0.6760207", "0.6760207", "0.6760207", "0.67578804", "0.6737953", "0.6737953", "0.6737953", ...
0.6214276
39
This method checks whether the given string is a operator or a bracket, if not then it is a operand and returns true.
public boolean isOperand(String s) { return !Operator.isOperator(s) && !Brackets.isLeftBracket(s) && !Brackets.isRightBracket(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isOperator(String s) {\n\t\treturn (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\") || s.equals(\"/\") || s.equals(\"^\"));\n\t}", "private boolean isOperator(String op){\n return (op.equals(\"+\") || op.equals(\"-\") || op.equals(\"*\") || op.equals(\"/\"));\n }", "private boolean is...
[ "0.8001847", "0.7897919", "0.769988", "0.7696501", "0.7627846", "0.7625451", "0.76241404", "0.75995886", "0.74659127", "0.73755175", "0.73656064", "0.73646337", "0.7339946", "0.7328608", "0.7281696", "0.7257773", "0.72532344", "0.722705", "0.72067446", "0.7205833", "0.7191026...
0.7715141
2
Sets Replayer settings. Adjusts saveDirectory etc. and loads map.
public void setSettings(final Properties settings) { this.settings = settings; replay = new Replay(settings); for(final MenuItem item : eventMenu.getItems()) { if (item instanceof CustomMenuItem) { final String event = item.getText(); final CustomMenuItem customItem = ((CustomMenuItem) item); if (customItem.getContent() instanceof CheckBox) { final CheckBox checkBox = (CheckBox) customItem.getContent(); checkBox.setSelected(replay.notableEvents.contains(event)); } } } zoomStep = Integer.parseInt(settings.getProperty("zoom.step", "100")); daysCombo.getItems().addAll(settings.getProperty("list.delta.per.tick", "1;30;365").split(";")); daysCombo.getSelectionModel().select(settings.getProperty("delta.per.tick", "1")); try { periodCombo.getSelectionModel().select(Integer.parseInt(settings.getProperty("period.per.tick", "0"))); } catch (NumberFormatException e) { periodCombo.getSelectionModel().selectFirst(); settings.setProperty("period.per.tick", "0"); } langCombo.getSelectionModel().select(settings.getProperty("locale.language", "en")); replay.drawBorders = "true".equals(settings.getProperty("borders", "false")); focusEdit.setText(settings.getProperty("focus", "")); saveDirectory = new File(settings.getProperty("save.dir", "")); if (!saveDirectory.exists() || !saveDirectory.isDirectory()) { saveDirectory = new File(Replay.DEFAULT_SAVE_DIR); if (!saveDirectory.exists() || !saveDirectory.isDirectory()) { saveDirectory = new File(System.getProperty("user.home"), "/"); } } serDirectory = new File(settings.getProperty("ser.dir", "")); if (!serDirectory.exists() || !serDirectory.isDirectory()) { serDirectory = new File(Replay.DEFAULT_SAVE_DIR); if (!serDirectory.exists() || !serDirectory.isDirectory()) { serDirectory = new File(System.getProperty("user.home"), "/"); } } subjectsCheckMenuItem.setSelected(replay.subjectsAsOverlords); gifMenu.setVisible(!settings.getProperty("gif", "false").equals("true")); gifLoopCheckMenuItem.setSelected(settings.getProperty("gif.loop", "true").equals("true")); gifWidthEdit.setText(settings.getProperty("gif.width", "0")); gifHeightEdit.setText(settings.getProperty("gif.height", "0")); gifBreakEdit.setText(settings.getProperty("gif.new.file", "0")); gifStepEdit.setText(settings.getProperty("gif.step", "100")); gifDateCheckMenuItem.setSelected(settings.getProperty("gif.date", "true").equals("true")); gifDateColorPicker.setValue(Color.web(settings.getProperty("gif.date.color", "0x000000"))); gifDateSizeEdit.setText(settings.getProperty("gif.date.size", "12")); gifDateXEdit.setText(settings.getProperty("gif.date.x", "60")); gifDateYEdit.setText(settings.getProperty("gif.date.y", "60")); gifSubimageCheckMenuItem.setSelected(settings.getProperty("gif.subimage", "false").equals("true")); gifSubimageXEdit.setText(settings.getProperty("gif.subimage.x", "0")); gifSubimageYEdit.setText(settings.getProperty("gif.subimage.y", "0")); gifSubimageWidthEdit.setText(settings.getProperty("gif.subimage.width", "")); gifSubimageHeightEdit.setText(settings.getProperty("gif.subimage.height", "")); bordersCheckMenuItem.setSelected(settings.getProperty("borders", "false").equals("true")); disableLog = settings.getProperty("log.disable", "false").equals("true"); eu4Directory = new File(settings.getProperty("eu4.dir")); try { lock.acquire(); loadData(); } catch (InterruptedException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "public void loadMap(Player player) {\r\n\tregionChucks = RegionBuilder.findEmptyChunkBound(8, 8); \r\n\tRegionBuilder.copyAllPlanesMap(235, 667, regionChucks[0], regionChucks[1], 8);\r\n\t\r\n\t}", "public ...
[ "0.6612962", "0.6152002", "0.6029665", "0.58659613", "0.58552104", "0.58165205", "0.58145636", "0.5783099", "0.57824326", "0.5778288", "0.57619554", "0.57244956", "0.57244956", "0.56733817", "0.5593109", "0.55299497", "0.5519895", "0.5459495", "0.54286593", "0.5419571", "0.54...
0.54431367
18
Returns window of the root.
private Window getWindow() { return root.getScene().getWindow(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Window getWindow() {\n Window w = null;\n if(this instanceof Container) {\n Node root = ((Container)this).getRoot();\n Scene scene = root==null ? null : root.getScene();\n javafx.stage.Window stage = scene==null ? null : scene.getWindow();\n w = stag...
[ "0.7461939", "0.7380816", "0.7249872", "0.71494025", "0.69917905", "0.69861746", "0.68683445", "0.68341935", "0.67218876", "0.6720993", "0.6620925", "0.6558101", "0.6548144", "0.65194356", "0.6444633", "0.6382332", "0.636714", "0.636714", "0.6340236", "0.6287254", "0.6279726"...
0.75254536
0
Loads data in proper order.
private void loadData() { titleProperty.set(TITLE); imageView.setImage(null); scrollPane.setContent(null); final Task<Void> finisher = new Task<Void>() { @Override protected Void call() throws Exception { Platform.runLater(new Runnable() { @Override public void run() { buffer = replay.politicalBuffer; output = new WritableImage(replay.bufferWidth, replay.bufferHeight); output.getPixelWriter().setPixels(0, 0, replay.bufferWidth, replay.bufferHeight, PixelFormat.getIntArgbPreInstance(), buffer, 0, replay.bufferWidth); progressBar.progressProperty().unbind(); progressBar.setProgress(0); statusLabel.textProperty().unbind(); statusLabel.setText(l10n("replay.map.loaded")); scrollPane.setContent(null); imageView.setImage(output); scrollPane.setContent(imageView); int fitWidth = Integer.parseInt(settings.getProperty("map.fit.width", "0")); int fitHeight = Integer.parseInt(settings.getProperty("map.fit.height", "0")); imageView.setFitHeight(fitHeight); imageView.setFitWidth(fitWidth); lock.release(); } }); return null; } }; progressBar.progressProperty().bind(finisher.progressProperty()); statusLabel.textProperty().bind(finisher.titleProperty()); replay.loadData(finisher); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void loadData();", "protected void loadData()\n {\n }", "void loadData();", "void loadData();", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "public abstract void loadData();", "public abstract void loadData();", "public void loadData() {\n\t\tbookingReque...
[ "0.75381297", "0.7488378", "0.71281546", "0.71281546", "0.7104423", "0.7066829", "0.7066829", "0.6841431", "0.68234515", "0.6778112", "0.67460066", "0.6655093", "0.6654894", "0.66219896", "0.65734124", "0.6569659", "0.6549769", "0.6511504", "0.6438601", "0.6381108", "0.638101...
0.0
-1
Called when application is stopped to store settings and end gif if needed.
public void stop() { endGif(); final StringBuilder s = new StringBuilder(); for(String event : replay.notableEvents) { s.append(";"); s.append(event); } settings.setProperty("events", s.substring(1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void end() {\r\n isRunning = false;\r\n if( mineField.exploder.isRunning() ) mineField.exploder.stop();\r\n if( settingsOpen ) settingsFrame.dispose();\r\n }", "@Override\r\n\tpublic void onStop() {\n\t\tSharedPreferences preferences = getActivity().getSharedPreferences(\"com.dotc...
[ "0.68251675", "0.6652667", "0.65879226", "0.651806", "0.6508059", "0.6504776", "0.64488965", "0.64419", "0.64256465", "0.6410818", "0.6402325", "0.63856184", "0.6381628", "0.6367059", "0.6364149", "0.6363952", "0.6326762", "0.6323549", "0.6308532", "0.62796795", "0.6279458", ...
0.60209453
82
Updates gif for the date if possible.
public void updateGif(final Date date) { if (giffer != null) { giffer.updateGif(buffer, date); if (replay.isAtEnd()) { endGif(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void populateGifDetails() {\n // Set the rating with animation\n ObjectAnimator anim = ObjectAnimator.ofFloat(averageRatingBar, \"rating\", gif.getAverageRating());\n anim.setDuration(2000);\n anim.start();\n\n tvRatingCount.setText(String.valueOf(gif.getRat...
[ "0.6263407", "0.56667", "0.56414366", "0.56135684", "0.54923713", "0.5454781", "0.53295106", "0.5295564", "0.5275467", "0.527118", "0.5269408", "0.52624524", "0.52289546", "0.52047586", "0.51896286", "0.518583", "0.5142663", "0.51383173", "0.51310486", "0.51282793", "0.509881...
0.79021823
0
Created by john on 2017/7/22.
public interface LogPrintListener extends EventListener { public void LogPrintHandle(LogPrintEvent event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void poetries() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic vo...
[ "0.57868195", "0.57471", "0.5636152", "0.5617032", "0.5580901", "0.55065215", "0.5436729", "0.5434059", "0.54235786", "0.54207534", "0.5396065", "0.5364965", "0.53535795", "0.53535795", "0.53532743", "0.53249145", "0.5320671", "0.5317266", "0.5309001", "0.5283421", "0.5280948...
0.0
-1
Remove edit and delete menubar item.
public void removeEditAndDelete(List<MenubarItem> menubar, DocumentType documentType, Document document, PortalControllerContext portalControllerContext) throws PortletException{ if ((documentType != null) && EVENT_TYPE.equals(documentType.getName())) { Set<MenubarItem> removedItems = new HashSet<>(); for (MenubarItem menubarItem : menubar) { if (EDIT_MENUBAR_ITEM_ID.equals(menubarItem.getId()) || DELETE_MENUBAR_ITEM_ID.equals(menubarItem.getId())) { removedItems.add(menubarItem); } } menubar.removeAll(removedItems); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeMenuItem(int itemId, String itemName);", "MenuItem getMenuItemDelete();", "private void addRemoveButton() {\n\t\tremoveButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalida...
[ "0.7385493", "0.69604826", "0.6918813", "0.6680495", "0.66463387", "0.6566628", "0.65113837", "0.64717895", "0.64578974", "0.64143324", "0.6405081", "0.6376987", "0.63653934", "0.6325205", "0.6305357", "0.6294656", "0.6270647", "0.62279904", "0.61885625", "0.6179774", "0.6170...
0.6720517
3
Generate a CSV Template from a Measure
@Operation(name = "$template", idempotent=true) public Binary convert1(@IdParam IdType theMeasureId) { Measure mr = dao.getResourceDao(Measure.class).read(theMeasureId); StringBuffer rows[] = { new StringBuffer(), new StringBuffer(), new StringBuffer(), new StringBuffer() }; PrintWriter pw = null; try { pw = new PrintWriter(new File(theMeasureId.getIdPart()+".csv")); } catch (FileNotFoundException e) { e.printStackTrace(); } List<MeasureGroupComponent> grouplist = mr.getGroup(); for (MeasureGroupComponent group : grouplist) { Coding coding = group.getCode().getCoding().get(0); rows[0].append(coding.getCode()).append(","); rows[1].append('"').append(coding.getDisplay()).append("\","); rows[2].append('"').append(group.getCode().getText()).append("\","); rows[3].append('"').append(StringUtils.defaultString(group.getDescription())).append("\","); for (MeasureGroupPopulationComponent population: group.getPopulation()) { coding = population.getCode().getCoding().get(0); rows[0].append(coding.getCode()).append(","); rows[1].append('"').append(coding.getDisplay()).append("\","); rows[2].append('"').append(population.getCode().getText()).append("\","); rows[3].append('"').append(StringUtils.defaultString(population.getDescription())).append("\","); } } for (StringBuffer b: rows) { b.setCharAt(b.length()-1, '\n'); pw.write(b.toString()); } pw.close(); Binary b = new Binary(); b.setContentType("application/csv"); try { b.setData(IOUtils.toByteArray(new FileInputStream(new File(theMeasureId.getIdPart()+".csv")))); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createCSV() {\n\t\t// Need to integrate CSV calling logic\n\t}", "void createCsv(String location);", "CSV createCSV();", "private static void createCSV(String filename, ArrayList<Long> sizes, ArrayList<Long> times){\n File csv = new File(\"\"+filename);\n try {\n if(csv.c...
[ "0.58091515", "0.5680007", "0.56331396", "0.55475175", "0.55467856", "0.54663926", "0.54548764", "0.5340841", "0.52599365", "0.5207009", "0.51663697", "0.51313573", "0.5120298", "0.5077844", "0.50693846", "0.5058682", "0.50118005", "0.49969664", "0.49419653", "0.4939545", "0....
0.56575835
2
BigDecimal pointOne = new BigDecimal(0.1);
public static void main(String[] args) { BigDecimal pointOne = new BigDecimal("0.1"); BigDecimal sum = new BigDecimal(0); for (int i = 0; i < 10; i++) { sum = sum.add(pointOne); } System.out.println("ans:" + sum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DecimalConstant( BigDecimal value)\n {\n this( value, null);\n }", "public void setPoints(java.math.BigDecimal points) {\n this.points = points;\n }", "BigDecimal getFixedPointField();", "void setSingleBetMinimum(java.math.BigDecimal singleBetMinimum);", "public void setCurrency1(...
[ "0.69546455", "0.6729187", "0.6712939", "0.66368306", "0.6602798", "0.65667", "0.6519209", "0.6420612", "0.64088637", "0.6398866", "0.6397504", "0.6385385", "0.6343826", "0.63411516", "0.6236385", "0.62116575", "0.6202051", "0.6196014", "0.6184693", "0.61664534", "0.61562425"...
0.6325214
14
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.settings_main_toolbar_menu, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.72500116", "0.7204146", "0.71987385", "0.7180757", "0.71107906", "0.7043322", "0.7041613", "0.7015376", "0.7013112", "0.6982869", "0.69475657", "0.6941377", "0.6937569", "0.69213736", "0.69213736", "0.6892679", "0.6887231", "0.6877873", "0.68772626", "0.68644464", "0.68644...
0.0
-1
save settings save profile photo, details
private void saveSettings(){ // get current user from shared preferences currentUser = getUserFromSharedPreferences(); final User newUser = currentUser; Log.i("currentUser name",currentUser.getUsername()); String username = ((EditText)findViewById(R.id.usernameET)).getText().toString(); if("".equals(username)||username==null){ Toast.makeText(getApplicationContext(),"Failed to save, user name cannot be empty",Toast.LENGTH_LONG).show(); return; } newUser.setUsername(username); // update user data in firebase Firebase.setAndroidContext(this); Firebase myFirebaseRef = new Firebase(Config.FIREBASE_URL); // set value and add completion listener myFirebaseRef.child("users").child(newUser.getFireUserNodeId()).setValue(newUser,new Firebase.CompletionListener() { @Override public void onComplete(FirebaseError firebaseError, Firebase firebase) { if (firebaseError != null) { Toast.makeText(getApplicationContext(),"Data could not be saved. " + firebaseError.getMessage(),Toast.LENGTH_SHORT).show(); } else { // if user info saved successfully, then save user image uploadPhoto(); Toast.makeText(getApplicationContext(),"User data saved successfully.",Toast.LENGTH_SHORT).show(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveSettings()\n {\n try\n {\n // If remember information is true then save the ip and port\n // properties to the projects config.properties file\n if ( rememberLoginIsSet_ )\n {\n properties_.setProperty( getString( R.string...
[ "0.72174066", "0.7156655", "0.7053254", "0.6985824", "0.69576555", "0.6903248", "0.6900692", "0.6856288", "0.6761124", "0.6750085", "0.67215776", "0.66871095", "0.6673486", "0.6658079", "0.6622151", "0.6597693", "0.65960854", "0.65771574", "0.6514514", "0.64939046", "0.641328...
0.64710385
20
upload image from imageview to Firebase storage
private void uploadPhoto() { // Get the data from an ImageView as bytes ImageView imageView = (ImageView)findViewById(R.id.imgView); imageView.setDrawingCacheEnabled(true); imageView.buildDrawingCache(); Bitmap bitmap = imageView.getDrawingCache(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos); byte[] data = baos.toByteArray(); FirebaseStorage storage = FirebaseStorage.getInstance(); // Create a storage reference from our app StorageReference storageRef = storage.getReferenceFromUrl(Config.FIREBASE_STORAGE_URL); // Create a reference to 'images/profile/userNodeId.jpg' StorageReference mountainImagesRef = storageRef.child("images/profile/"+currentUser.getFireUserNodeId()+".jpg"); // set image name as userid.jpg which is unique UploadTask uploadTask = mountainImagesRef.putBytes(data); uploadTask.addOnFailureListener(new OnFailureListener() { @Override public void onFailure(Exception exception) { // Handle unsuccessful uploads Toast.makeText(getApplicationContext(),"Photo upload failed!",Toast.LENGTH_SHORT).show(); } }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() { @Override public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { // taskSnapshot.getMetadata() contains file metadata such as size, content-type, and download URL. Toast.makeText(getApplicationContext(),"Photo uploaded successfully!",Toast.LENGTH_SHORT).show(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void UploadImageToStorage(){\n final StorageReference filepath = storageRootRef.child(\"MyImages\").child(imageURIFromDevice.getLastPathSegment());\n\n filepath.putFile(imageURIFromDevice).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n ...
[ "0.79454696", "0.7926522", "0.7682931", "0.7675312", "0.7540277", "0.7510523", "0.7505393", "0.745172", "0.74422705", "0.74147004", "0.73951775", "0.7268266", "0.72515744", "0.722805", "0.71983576", "0.71843874", "0.71804005", "0.71541095", "0.71514964", "0.7135309", "0.71301...
0.8245746
0
taskSnapshot.getMetadata() contains file metadata such as size, contenttype, and download URL.
@Override public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { Toast.makeText(getApplicationContext(),"Photo uploaded successfully!",Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.cloud.compute.v1.Metadata getMetadata();", "com.google.cloud.talent.v4beta1.ResponseMetadata getMetadata();", "public ResourceContent getMetadata() throws IOException;", "@java.lang.Override\n public io.grafeas.v1.Metadata getMetadata() {\n return metadata_ == null ? io.grafeas.v1.Metadata.get...
[ "0.64935243", "0.64189297", "0.6395336", "0.6247609", "0.606587", "0.6050723", "0.6050723", "0.6014259", "0.60110515", "0.5978749", "0.5970988", "0.5959393", "0.5945599", "0.59284866", "0.588414", "0.588289", "0.5859245", "0.5853862", "0.57837296", "0.57690835", "0.5763348", ...
0.0
-1
Constructs new instance and loads configuration
public BossBar(TAB tab) { this.tab = tab; disabledWorlds = tab.getConfiguration().getConfig().getStringList("disable-features-in-"+tab.getPlatform().getSeparatorType()+"s.bossbar", Arrays.asList("disabled" + tab.getPlatform().getSeparatorType())); toggleCommand = tab.getConfiguration().getBossbarConfig().getString("bossbar-toggle-command", "/bossbar"); defaultBars = tab.getConfiguration().getBossbarConfig().getStringList("default-bars", new ArrayList<>()); permToToggle = tab.getConfiguration().getBossbarConfig().getBoolean("permission-required-to-toggle", false); hiddenByDefault = tab.getConfiguration().getBossbarConfig().getBoolean("hidden-by-default", false); perWorld = tab.getConfiguration().getBossbarConfig().getConfigurationSection("per-world"); for (Object bar : tab.getConfiguration().getBossbarConfig().getConfigurationSection("bars").keySet()){ getLines().put(bar.toString(), BossBarLine.fromConfig(bar.toString())); } for (String bar : new ArrayList<>(defaultBars)) { if (getLines().get(bar) == null) { tab.getErrorManager().startupWarn("BossBar \"&e" + bar + "&c\" is defined as default bar, but does not exist! &bIgnoring."); defaultBars.remove(bar); } } for (Entry<String, List<String>> entry : perWorld.entrySet()) { List<String> bars = entry.getValue(); for (String bar : new ArrayList<>(bars)) { if (getLines().get(bar) == null) { tab.getErrorManager().startupWarn("BossBar \"&e" + bar + "&c\" is defined as per-world bar in world &e" + entry.getKey() + "&c, but does not exist! &bIgnoring."); bars.remove(bar); } } } rememberToggleChoice = tab.getConfiguration().getBossbarConfig().getBoolean("remember-toggle-choice", false); if (isRememberToggleChoice()) { bossbarOffPlayers = tab.getConfiguration().getPlayerData("bossbar-off"); } TAB.getInstance().getPlaceholderManager().getAllUsedPlaceholderIdentifiers().add("%countdown%"); TAB.getInstance().getPlaceholderManager().registerPlaceholder(new ServerPlaceholder("%countdown%", 100) { @Override public String get() { return String.valueOf((getAnnounceEndTime() - System.currentTimeMillis()) / 1000); } }); tab.debug(String.format("Loaded Bossbar feature with parameters disabledWorlds=%s, toggleCommand=%s, defaultBars=%s, permToToggle=%s, hiddenByDefault=%s, perWorld=%s, remember_toggle_choice=%s", disabledWorlds, toggleCommand, defaultBars, isPermToToggle(), hiddenByDefault, perWorld, isRememberToggleChoice())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "private Config()\n {\n try\n {\n // Load settings from file\n load();\n }\n catch(IOException e)\n {\n ...
[ "0.7210464", "0.7115091", "0.7019286", "0.6987587", "0.6877753", "0.6842131", "0.66892254", "0.66276145", "0.65854377", "0.65282816", "0.6498849", "0.6436363", "0.6388046", "0.6381612", "0.63674015", "0.63630545", "0.63493854", "0.63446146", "0.6342706", "0.6339595", "0.63283...
0.0
-1
Clears and resends all bossbars to specified player
public void detectBossBarsAndSend(TabPlayer p) { p.getActiveBossBars().clear(); if (playersInDisabledWorlds.contains(p) || !p.hasBossbarVisible()) return; showBossBars(p, defaultBars); showBossBars(p, getAnnouncements()); showBossBars(p, perWorld.get(tab.getConfiguration().getWorldGroupOf(perWorld.keySet(), p.getWorldName()))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n for(MessageManager temp : plugin.playerBossBars.values()){\n if(temp.bossBar.getPlayers().size() > 0){\n temp.advanceBar();\n\n BossBarMessage currentMessage = temp.getCurrentMessageObject();\n temp.bossBar.setTitle...
[ "0.65392506", "0.6041375", "0.5934355", "0.5921941", "0.5689756", "0.56707096", "0.5577483", "0.55551505", "0.55225694", "0.5521384", "0.55083257", "0.5480475", "0.53885245", "0.53842086", "0.5373688", "0.5317341", "0.5312041", "0.52733505", "0.5269063", "0.52570146", "0.5247...
0.6577018
0
Shows bossbars to player if display condition is met
private void showBossBars(TabPlayer p, List<String> bars) { if (bars == null) return; for (String defaultBar : bars) { BossBarLine bar = getLines().get(defaultBar); if (bar.isConditionMet(p) && !p.getActiveBossBars().contains(bar)) { bar.create(p); p.getActiveBossBars().add(bar); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n for(MessageManager temp : plugin.playerBossBars.values()){\n if(temp.bossBar.getPlayers().size() > 0){\n temp.advanceBar();\n\n BossBarMessage currentMessage = temp.getCurrentMessageObject();\n temp.bossBar.setTitle...
[ "0.65924305", "0.6560896", "0.64090943", "0.63771784", "0.60405344", "0.6009085", "0.5976579", "0.5968275", "0.59679186", "0.59467363", "0.5908623", "0.58698434", "0.5868271", "0.5816631", "0.580829", "0.5777006", "0.5763518", "0.57600594", "0.57312757", "0.5727791", "0.57209...
0.66323465
0
Returns line from specified uuid
public BossBarLine getLine(UUID id) { for (BossBarLine line : getLines().values()) { if (line.getUuid() == id) return line; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Line getLine(String targetLine);", "LineItem getLineItemById(Integer lineItemId);", "public abstract String getLine(int lineNumber);", "public String getLine(int lineNumber) {\n if (list.size()>lineNumber)\n return list.get(lineNumber);\n else\n return null; // Request...
[ "0.6019565", "0.58068407", "0.58025116", "0.57899904", "0.57654524", "0.57311887", "0.5699747", "0.5637183", "0.5601512", "0.55803937", "0.55602384", "0.5502162", "0.5502162", "0.5502162", "0.5502162", "0.5495497", "0.54812425", "0.5457945", "0.5428027", "0.54219353", "0.5386...
0.6407595
0
/ access modifiers changed from: protected
@Override // p2189io.reactivex.Single /* renamed from: a */ public void mo129801a(SingleObserver<? super T> aaVar) { this.f110527a.subscribe(new C32104a(aaVar)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
(nonJavadoc) Method declared on Wizard.
@Override public void addPages() { this.mainPage = new SNLFilePage(this.workbench, this.selection); this.addPage(this.mainPage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IWizard getWizard();", "public interface WizardActions {\n\n /**\n * Return the options back to default\n */\n public void returnDefault();\n\n /**\n * Apply the current settings without closing the wizard page\n */\n public void apply();\n\n /**\n * Save the current settings\n */\n publ...
[ "0.7273552", "0.6726467", "0.65493", "0.64980525", "0.6445059", "0.6409468", "0.6389658", "0.6354351", "0.6339485", "0.63271356", "0.62214434", "0.62174827", "0.6204928", "0.6179019", "0.6143559", "0.6142031", "0.6110855", "0.60899925", "0.6084227", "0.6045885", "0.60166705",...
0.0
-1
(nonJavadoc) Method declared on IWorkbenchWizard
public void init(final IWorkbench workbench1, final IStructuredSelection selection1) { this.workbench = workbench1; this.selection = selection1; this.setWindowTitle("SNL File Creation Wizard"); // this.setDefaultPageImageDescriptor(ImageDescriptor.createFromFile( // NewSNLProjectWizard.class, "sheet.gif")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IWizard getWizard();", "public void setWizard(IWizard newWizard);", "public interface WizardActions {\n\n /**\n * Return the options back to default\n */\n public void returnDefault();\n\n /**\n * Apply the current settings without closing the wizard page\n */\n public void apply();\n\n /**...
[ "0.79073346", "0.7296059", "0.72020376", "0.7083467", "0.6968243", "0.6734825", "0.6731393", "0.6696619", "0.6694467", "0.6620826", "0.6457025", "0.6381162", "0.63548726", "0.632734", "0.6317391", "0.62732476", "0.6249652", "0.6246008", "0.6198684", "0.6164277", "0.6160168", ...
0.6021647
32
(nonJavadoc) Performs the finish() method of the CFilePage
@Override public boolean performFinish() { return this.mainPage.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onFinish() {\r\n\t\t//used for create end html tags\r\n\t\tendHtmlPage(fout);\r\n\r\n\t\t//used for write every thing in html file\r\n\t\tfout.flush();\r\n\t\tfout.close();\r\n\t\t\r\n\t}", "private void finish() {\n }", "protected void finish() {\n }", "public void finish() { \n\t...
[ "0.7536796", "0.72379816", "0.71765447", "0.7010793", "0.69816166", "0.68992907", "0.6894344", "0.6802313", "0.67846787", "0.6722731", "0.66588086", "0.66563576", "0.66296536", "0.66296536", "0.66296536", "0.66296536", "0.66296536", "0.6624666", "0.65926516", "0.65903825", "0...
0.62578905
31
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.72500116", "0.7204146", "0.71987385", "0.7180757", "0.71107906", "0.7043322", "0.7041613", "0.7015376", "0.7013112", "0.6982869", "0.69475657", "0.6941377", "0.6937569", "0.69213736", "0.69213736", "0.6892679", "0.6887231", "0.6877873", "0.68772626", "0.68644464", "0.68644...
0.0
-1
Helper method to set up the connection.
private void setUpConnection(final String IP_ADDR, final int portNumber) { Runnable runnable = new Runnable() { @Override public void run() { try { // Not thread safe (Destroy could be calling close at the same time) socket.connect((new InetSocketAddress( InetAddress.getByName(IP_ADDR), portNumber))); Log.d(TAG, "Connection Successfull"); } catch (UnknownHostException e) { Log.e(TAG, "Connection Failed"); e.printStackTrace(); } catch (IOException e) { Log.e(TAG, "Connection Failed"); e.printStackTrace(); } } }; connectionThread = new Thread(runnable); connectionThread.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void connect() {\n\t\treadProperties();\n\t\tif (validateProperties())\n\t\t\tjuraMqttClient = createClient();\n\t}", "private void createConnection() {\n this.callbacks = getCallbacks();\n\n Properties props = new Properties();\n props.putAll(getTestProps());\n props.putAll...
[ "0.7159299", "0.713013", "0.7116666", "0.71038574", "0.7063128", "0.6980683", "0.6972886", "0.6700624", "0.66976964", "0.6639079", "0.64688075", "0.6448742", "0.6427745", "0.6400863", "0.63525665", "0.63502127", "0.6333331", "0.6322163", "0.6308445", "0.62955356", "0.6270565"...
0.0
-1
Helper method to setup the UP, DOWN, LEFT, RIGHT buttons.
private void setUpButton(final String sendValue, int ID) { final Button button = (Button)findViewById(ID); button.setEnabled(true); button.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View arg0, MotionEvent arg1) { if (arg1.getAction() == MotionEvent.ACTION_DOWN) { button.setPressed(true); sendData(sendValue); } else if (arg1.getAction() == MotionEvent.ACTION_UP) { button.setPressed(false); } else if (button.isPressed()) { sendData(sendValue); } return true; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupButtons() {\n\n\t\tstart = (ToggleButton) findViewById(R.id.start);\n\t\tprevious = (ImageButton) findViewById(R.id.prev);\n\t\tnext = (ImageButton) findViewById(R.id.next);\n\t\tplay = (ImageButton) findViewById(R.id.play);\n\t\tpause = (ImageButton) findViewById(R.id.pause);\n\t\tstart.setOnCli...
[ "0.6861657", "0.6720127", "0.663566", "0.66304874", "0.65174615", "0.6422317", "0.63521254", "0.62752914", "0.6254942", "0.61912847", "0.61194754", "0.60766286", "0.5981597", "0.59608555", "0.59244275", "0.5919035", "0.591381", "0.5893786", "0.58828825", "0.5871448", "0.58700...
0.0
-1