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
Converts the byte array to an integer value.
public int b2i(byte[] b, int offset) { return (b[offset + 3] & 0xFF) | ((b[offset + 2] & 0xFF) << 8) | ((b[offset + 1] & 0xFF) << 16) | ((b[offset] & 0xFF) << 24); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int bytesToInt(byte[] bytes) {\n\t\tByteBuffer buffer = ByteBuffer.allocate(Integer.BYTES);\n\t\tbuffer.put(bytes);\n\t\tbuffer.flip();//need flip \n\t\treturn buffer.getInt();\n\t}", "public static int toInt(byte[] bytes) {\n return toInt(bytes, 0, SIZEOF_INT);\n }", "public static int bytesT...
[ "0.7801084", "0.7711935", "0.75238043", "0.7422982", "0.7407294", "0.7369565", "0.7353913", "0.73056364", "0.73038375", "0.71837556", "0.71692234", "0.71651065", "0.7140769", "0.7135033", "0.71291316", "0.70935947", "0.70437056", "0.69864297", "0.6982481", "0.69801855", "0.69...
0.6367971
39
Converts an integer to a byte array.
public byte[] i2b(int value) { byte[] data = new byte[4]; data[0] = (byte) ((value >> 24) & 0xFF); data[1] = (byte) ((value >> 16) & 0xFF); data[2] = (byte) ((value >> 8) & 0xFF); data[3] = (byte) (value & 0xFF); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] intToBytes(int i) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_INT);\n byteBuffer.putInt(i);\n return byteBuffer.array();\n\n }", "private static byte[] intToBytes(Integer integer) {\n\t\treturn BigInteger.valueOf(integer).toByteArray();\n\t}", "pu...
[ "0.8207556", "0.79320586", "0.78882784", "0.78662467", "0.77960414", "0.7759286", "0.77181596", "0.76991236", "0.76638824", "0.7529154", "0.7500729", "0.74098283", "0.74034745", "0.7375364", "0.73263067", "0.73152375", "0.7312256", "0.72947633", "0.7100104", "0.7093468", "0.7...
0.67700434
26
Converts the byte array to a long integer value.
public long b2l(byte[] b, int offset) { return (b[offset + 7] & 0xFF) | ((b[offset + 6] & 0xFF) << 8) | ((b[offset + 5] & 0xFF) << 16) | ((b[offset + 4] & 0xFF) << 24) | ((b[offset + 3] & 0xFF) << 32) | ((b[offset + 2] & 0xFF) << 40) | ((b[offset + 1] & 0xFF) << 48) | ((b[offset] & 0xFF) << 56); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long toLong()\n\t{\n\t\t// holds the int to return\n\t\tlong result = 0;\n\t\t\n\t\t// for every byte value\n\t\tfor (int i = 0; i < bytes.length; i++)\n\t\t{\n\t\t\t// Extract the bits out of the array by \"and\"ing them with the\n\t\t\t// maximum value of\n\t\t\t// a byte. This is done because java does n...
[ "0.829732", "0.76841277", "0.74620056", "0.7423944", "0.7398077", "0.73839754", "0.7373932", "0.730917", "0.7294149", "0.7185547", "0.71502775", "0.7087527", "0.7069155", "0.70416445", "0.6990911", "0.6935505", "0.6906566", "0.68380713", "0.6742797", "0.6699237", "0.66951823"...
0.6954259
15
Converts a long integer to a byte array.
public byte[] l2b(long value) { byte[] data = new byte[8]; data[0] = (byte) ((value >> 56) & 0xFF); data[1] = (byte) ((value >> 48) & 0xFF); data[2] = (byte) ((value >> 40) & 0xFF); data[3] = (byte) ((value >> 32) & 0xFF); data[4] = (byte) ((value >> 24) & 0xFF); data[5] = (byte) ((value >> 16) & 0xFF); data[6] = (byte) ((value >> 8) & 0xFF); data[7] = (byte) (value & 0xFF); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] longToBytes(long l) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_LONG);\n byteBuffer.putLong(l);\n return byteBuffer.array();\n\n }", "public static byte[] longToBytes(long x) {\n\t ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);\n\t buffe...
[ "0.8085281", "0.78264666", "0.77294445", "0.7700713", "0.7423659", "0.7374437", "0.7339649", "0.72341275", "0.72064936", "0.7119535", "0.68993396", "0.68569374", "0.66885835", "0.6672539", "0.6598407", "0.65580523", "0.64981323", "0.64743465", "0.62605476", "0.62140614", "0.6...
0.7223292
8
A CipherAlgorithm is an algorithm used for encryption and decryption. An example would be RSA, or a symmetric encryption algorithm. An example of a KeyAlgorithm that is not a CipherAlgorithm would be DSA it only signs and verifies.
public interface CipherAlgorithm< Self extends CipherAlgorithm<Self> > extends CryptoAlgorithm { String name(); Cipher<Self> defaultCipherAlgorithm(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cryptor(int algorithm, int xcryptMode) {\n //Checks if the algorithm supplied is valid\n ALGORITHM = algorithm;\n MODE = xcryptMode;\n if (algorithm != DES_ALGORITHM && algorithm != T3DES_ALGORITHM & algorithm != AUTO_DETECT_ALGORITHM) {\n throw new RuntimeException(\"...
[ "0.67145926", "0.6656235", "0.63113636", "0.6305683", "0.62704736", "0.62691396", "0.6264045", "0.6243185", "0.6196199", "0.61630446", "0.61027586", "0.6044321", "0.6024313", "0.5988072", "0.5988072", "0.59735584", "0.5944608", "0.594308", "0.59005827", "0.58970493", "0.58667...
0.55322623
42
Handle the loan amount. In the event that the agent cannot handle the request, they should redirect the request to the next agent in the chain.
abstract public LoanApplicationResponse handleLoanRequest(LoanApplicationRequest loanRequest);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateLoan(View view){\n Intent intent = new Intent(this, ResultActivity.class);\n\n //TODO: calculate monthly payment and determine\n double carPrice;\n double downPayment;\n double loadPeriod;\n double interestRate;\n\n \n\n //loan applicatio...
[ "0.59531", "0.5877681", "0.57431304", "0.5702589", "0.5502467", "0.54900527", "0.5473349", "0.5459849", "0.54465836", "0.5360575", "0.53540874", "0.5345292", "0.53013325", "0.5283912", "0.5272563", "0.52574664", "0.52555686", "0.5183357", "0.5169756", "0.5164082", "0.5138846"...
0.6843378
0
Approve the loan request and return it to the customer.
public LoanApplicationResponse approveLoanRequest() { return new LoanApplicationResponse(this, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\"/agent/enrollment/approve\")\n public String approve(@RequestParam(\"id\") long id, ApprovalDTO dto) {\n String signature = \"EnrollmentController#approve(long id, ApprovalDTO dto)\";\n LogUtil.traceEntry(getLog(), signature, new String[] { \"id\", \"dto\" }, new Object[] { id, d...
[ "0.6553858", "0.6545241", "0.6533095", "0.64934945", "0.64791584", "0.64231783", "0.636274", "0.63428324", "0.6272952", "0.62054795", "0.5936366", "0.59212613", "0.58978117", "0.5897734", "0.5867154", "0.58477616", "0.58436555", "0.5832532", "0.5821864", "0.58171815", "0.5812...
0.76055735
0
Approve the loan request and return it to the customer.
public LoanApplicationResponse rejectLoanRequest() { return new LoanApplicationResponse(this, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LoanApplicationResponse approveLoanRequest() {\n return new LoanApplicationResponse(this, true);\n }", "@RequestMapping(\"/agent/enrollment/approve\")\n public String approve(@RequestParam(\"id\") long id, ApprovalDTO dto) {\n String signature = \"EnrollmentController#approve(long id, ...
[ "0.76055735", "0.6553858", "0.6545241", "0.6533095", "0.64934945", "0.64791584", "0.64231783", "0.636274", "0.63428324", "0.6272952", "0.62054795", "0.5936366", "0.59212613", "0.58978117", "0.5897734", "0.5867154", "0.58477616", "0.58436555", "0.5832532", "0.5821864", "0.5817...
0.0
-1
fails the double checking , assuming sorted
static boolean checkInFlightPossibility(int[] movies, int movieLen) { ArrayList<Integer> possibleMatches = new ArrayList<>(); HashSet originalPossibleMovies = new HashSet(); for (int movie : movies) { if (movie >= movieLen) break; possibleMatches.add(movieLen - movie); originalPossibleMovies.add(movie); } System.out.println(Arrays.toString(Arrays.copyOf(movies, possibleMatches.size()))); System.out.println(Arrays.toString(possibleMatches.toArray())); for (int elem : possibleMatches) { if (originalPossibleMovies.contains(elem)) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validateSortedData() {\n Preconditions.checkArgument(\n indices.length == values.length,\n \"Indices size and values size should be the same.\");\n if (this.indices.length > 0) {\n Preconditions.checkArgument(\n this.indices[0] ...
[ "0.6531668", "0.6461373", "0.64534956", "0.6329047", "0.63270503", "0.62967074", "0.62743413", "0.62350863", "0.6197997", "0.6186083", "0.61810124", "0.61614823", "0.6148205", "0.6134124", "0.6127778", "0.60578", "0.6043199", "0.60256", "0.6013329", "0.6011225", "0.6009387", ...
0.0
-1
official we are checking the solution
static boolean checkInFlightPossibilityHashSet(int[] movies, int movieLen) { HashSet<Integer> mostWanted = new HashSet<>(); for (int movie : movies) { if (movie >= movieLen) continue; if (mostWanted.contains(movie)) return true; mostWanted.add((movieLen - movie)); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}", "public void findSolution() {\n\n\t\t// TODO\n\t}", "@Override\n\t\tpublic boolean isValidSolution() {\n\t\t\treturn super.isValidSolution();\n\t\t}", "public void solution() {\n\t\t\n\t}", "private void checkIsBetterSolution() {\...
[ "0.782319", "0.6830437", "0.6713884", "0.6653544", "0.6447354", "0.6368534", "0.6180988", "0.61724263", "0.6138638", "0.6096519", "0.6096519", "0.602338", "0.5993505", "0.59757316", "0.59573793", "0.59250647", "0.59250647", "0.58899057", "0.5851824", "0.5820212", "0.5809776",...
0.0
-1
Runs the climber ladder motors at the given speed
public void runLadder(final double speed) { if (speed < -1 || speed > 1) { throw new IllegalArgumentException("To High/Low a value passed in runLadder(double)"); } climberMotors.set(speed); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ldrive(double speed){\n left1.set(ControlMode.PercentOutput, speedRamp(speed));\n left2.set(ControlMode.PercentOutput, speedRamp(speed));\n }", "@Override\n public void execute() {\n climber.moveShoulder(climb.getAsDouble()); // set speed of soulder motors based on climb speed\...
[ "0.6702484", "0.6365792", "0.60322285", "0.5974879", "0.5966735", "0.5949963", "0.5932979", "0.59301466", "0.5916132", "0.5902377", "0.5883019", "0.5865052", "0.58429974", "0.58363694", "0.58345", "0.58328146", "0.5830134", "0.58290774", "0.5814236", "0.5807253", "0.5793586",...
0.73578393
0
Stops the climber ladder motors
public void stop() { climberMotors.stopMotor(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {\n\t\tmotor1.set( Constants.CLAW_MOTOR_STOPPED );\n\t\t}", "public void stopMotors(){\n\t\tsynchStop(MMXCOMMAND_BRAKE);\n\t}", "public void stopMotors() {\n\t\tRobotMap.frontLeft.set(0);\n\t\tRobotMap.backLeft.set(0);\n\t\tRobotMap.frontRight.set(0);\n\t\tRobotMap.backRight.set(0);\n\t}", ...
[ "0.7932937", "0.77695197", "0.75260216", "0.74097496", "0.73656684", "0.7354037", "0.7328937", "0.7231766", "0.7199386", "0.71789265", "0.7178612", "0.70684844", "0.7045263", "0.7040989", "0.7040989", "0.7040989", "0.7040989", "0.7040989", "0.7040989", "0.7040989", "0.7040989...
0.8134192
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jFrame1 = new javax.swing.JFrame(); jPanel2 = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane()); jFrame1.getContentPane().setLayout(jFrame1Layout); jFrame1Layout.setHorizontalGroup( jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE) ); jFrame1Layout.setVerticalGroup( jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 300, Short.MAX_VALUE) ); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); jPanel1.setAlignmentX(1.5F); jPanel1.setAlignmentY(1.5F); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 694, Short.MAX_VALUE) ); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(1000, 1000, 1000) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7321342", "0.7292121", "0.7292121", "0.7292121", "0.72863305", "0.7249828", "0.7213628", "0.7209084", "0.7197292", "0.71912086", "0.7185135", "0.7159969", "0.7148876", "0.70944786", "0.70817256", "0.7057678", "0.69884527", "0.69786763", "0.69555986", "0.69548863", "0.69453...
0.0
-1
End of variables declaration//GENEND:variables
public static void main(String[] args) { SalaryTable frame = new SalaryTable(); frame.setDefaultCloseOperation( EXIT_ON_CLOSE ); frame.pack(); frame.setVisible(true); //frame.setLocation(350, 150); frame.setMinimumSize(new Dimension(1000, 6200)); frame.setSize(1200,720); frame.setPreferredSize(new Dimension(1000, 6200)); JPanel panel = new JPanel(); panel.setPreferredSize(new Dimension(1000, 6200)); frame.add(panel); frame.pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n pu...
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.5881482...
0.0
-1
TODO Autogenerated method stub
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doPost(req,resp);; }
{ "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 protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setCharacterEncoding("UTF-8"); resp.setContentType("text/html;charset=UTF-8"); String option=req.getParameter("option"); if("1".equals(option)) { createOrder(req,resp); }else if("2".equals(option)) { findAll(req,resp); } else if("3".equals(option)){ finaALL2(req,resp); } }
{ "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 EasyUIDataGridResult itemList(int pageNum, int pageSize) { PageHelper.startPage(pageNum, pageSize); List<TbItem>list=tbItemMapper.selectByExample(new TbItemExample()); PageInfo<TbItem> info=new PageInfo<TbItem>(list); EasyUIDataGridResult dataGridResult=new EasyUIDataGridResult(); dataGridResult.setRows(list); dataGridResult.setTotal((int)info.getTotal()); return dataGridResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
These lines would not work. "name" was always initialized to the string "main" String name = Thread.currentThread().getName(); System.out.println(name);
public synchronized void run() { System.out.print(charToPrint); notifyAll(); try { Thread.sleep(500); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run(){\n String threadName = Thread.currentThread().getName();\n System.out.println(\"Hello \" + threadName);\n }", "public static void main(String[] args) {\n Thread thread = new Thread(\"New Thread\") {\n public void run(){\n ...
[ "0.70426375", "0.6949126", "0.68013006", "0.6727201", "0.66265905", "0.64746827", "0.64536613", "0.6409079", "0.63719225", "0.622343", "0.621093", "0.6206584", "0.6195304", "0.6191983", "0.6184794", "0.617009", "0.61161345", "0.60922515", "0.6040696", "0.60259444", "0.5996825...
0.0
-1
Can alternatively manually assign a thread name Thread printA = new Thread(new multiThread("a"),"a"); Thread printB = new Thread(new multiThread("b"),"b"); Thread printC = new Thread(new multiThread("c"),"c");
public static void main(String [] args) { Thread printA = new Thread(new multiThread("a")); Thread printB = new Thread(new multiThread("b")); Thread printC = new Thread(new multiThread("c")); names[0] = printA.getName(); names[1] = printB.getName(); names[2] = printC.getName(); for(int i = 0; ; i++) { printA.run(); printB.run(); printC.run(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tMyThread mt = new MyThread();\n\t\t// We can assign a name\n\t\tmt.setName(\"Thread 1\");\n\t\tmt.start();\n\t\t\n\t\tMyThreads2 mt2 = new MyThreads2();\n\t\tThread t = new Thread(mt2);\n\t\t\n\t\t//New Thread\n\t\tThread t2 = new Thread(mt2);\n\t\tThread t3 = new Thre...
[ "0.6575224", "0.6515562", "0.64857954", "0.6459294", "0.6421202", "0.64173025", "0.6378395", "0.6359826", "0.6325985", "0.6295213", "0.625851", "0.6253926", "0.62337524", "0.61955357", "0.6181759", "0.61772627", "0.61195934", "0.6106842", "0.6060606", "0.60392094", "0.6026717...
0.7843351
0
do stuff with the result or error Log.d("result", result.toString());
@Override public void onCompleted(Exception e, JsonObject result) { if(e != null){ e.printStackTrace(); Toast.makeText(MainActivity.this, "erreur service", Toast.LENGTH_SHORT).show(); }else{ JsonObject main = result.get("main").getAsJsonObject(); double temp = main.get("temp").getAsDouble(); tvTemp.setText(temp+"°C"); JsonObject sys = result.get("sys").getAsJsonObject(); String country = sys.get("country").getAsString(); tvCity.setText(city+", "+country); JsonArray weather = result.get("weather").getAsJsonArray(); String icon = weather.get(0).getAsJsonObject().get("icon").getAsString(); loadIcon(icon); JsonObject coord = result.get("coord").getAsJsonObject(); double lon = coord.get("lon").getAsDouble(); double lat = coord.get("lat").getAsDouble(); loadDailyForcast(lon, lat); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void result(String result) {\n\t\t\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t\t\t}", "...
[ "0.7578612", "0.7578612", "0.7492718", "0.7492718", "0.7450547", "0.7450547", "0.7450547", "0.7450547", "0.7450547", "0.7450547", "0.7450547", "0.7450547", "0.723742", "0.723742", "0.6915548", "0.69087905", "0.67833614", "0.67733496", "0.676258", "0.66778636", "0.6674346", ...
0.0
-1
do stuff with the result or error Log.d("result", result.toString());
@Override public void onCompleted(Exception e, JsonObject result) { if(e != null){ e.printStackTrace(); Toast.makeText(MainActivity.this, "erreur service", Toast.LENGTH_SHORT).show(); }else{ List<Weather> weatherList = new ArrayList<>(); String timeZone = result.get("timezone").getAsString(); JsonArray daily =result.get("daily").getAsJsonArray(); for(int i=1; i<daily.size(); i++){ Long date = daily.get(i).getAsJsonObject().get("dt").getAsLong(); Double temp = daily.get(i).getAsJsonObject().get("temp").getAsJsonObject().get("day").getAsDouble(); String icon = daily.get(i).getAsJsonObject().get("weather").getAsJsonArray().get(0).getAsJsonObject().get("icon").getAsString(); weatherList.add(new Weather(date,timeZone,temp,icon)); } DailyWeatherAdapter dailyWeatherAdapter = new DailyWeatherAdapter(MainActivity.this, weatherList); lvDaillyweather.setAdapter(dailyWeatherAdapter); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void result(String result) {\n\t\t\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t\t\t}", "...
[ "0.7578277", "0.7578277", "0.7492364", "0.7492364", "0.745021", "0.745021", "0.745021", "0.745021", "0.745021", "0.745021", "0.745021", "0.745021", "0.7238167", "0.7238167", "0.69155276", "0.69089955", "0.6784066", "0.6773164", "0.676368", "0.66777", "0.66744226", "0.664238...
0.0
-1
Use the application context, which will ensure that you don't accidentally leak an Activity's context. See this article for more information:
public static synchronized DatabaseHandler getInstance(Context context) { if (sInstance == null) { sInstance = new DatabaseHandler(context.getApplicationContext()); } return sInstance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Activity getContext() {\n return contextWeakReference.get();\n }", "public static Context getAppContext() {\n return mContext;\n }", "private Context getContext() {\n return mContext;\n }", "private Context getContext() {\n return mContext;\n }", "public st...
[ "0.7452975", "0.7265942", "0.7244933", "0.7244933", "0.71942604", "0.7189404", "0.7170825", "0.71339846", "0.71339846", "0.70865333", "0.70437497", "0.69627416", "0.69427544", "0.6940481", "0.68883324", "0.6834661", "0.68315005", "0.6795484", "0.6730484", "0.672173", "0.66445...
0.0
-1
All CRUD(Create, Read, Update, Delete) Operations Adding new card
public void addCard(Card card) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(COL_ACCOUNT, card.getAccount()); values.put(COL_USERNAME, card.getUsername()); values.put(COL_PASSWORD, card.getPassword()); values.put(COL_URL, card.getUrl()); values.put(COL_DELETED, card.getDeleted()); values.put(COL_HIDE_PWD, card.getHidePwd()); values.put(COL_REMIND_ME, card.getRemindMe()); values.put(COL_UPDATED_ON, card.getUpdatedOn()); values.put(COL_COLOR, String.valueOf(card.getColor())); values.put(COL_REMIND_ME_DAYS, card.getRemindMeDays()); db.insert(TABLE_CARDS, null, values); db.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostMapping(\"/cards\")\n StarbucksCard newCard() {\n StarbucksCard newcard = new StarbucksCard();\n\n Random random = new Random();\n int num = random.nextInt(900000000) + 100000000;\n int code = random.nextInt(900) + 100;\n\n newcard.setCardNumber(String.valueOf(num));\n ...
[ "0.69798326", "0.6751006", "0.6748943", "0.65821826", "0.64986306", "0.644025", "0.6372254", "0.6274224", "0.6253977", "0.619435", "0.6173985", "0.61308706", "0.6016423", "0.600453", "0.5985794", "0.5958746", "0.5907914", "0.58766246", "0.5868696", "0.5847959", "0.5785216", ...
0.6901996
1
Saving new master key
public void saveMasterKeyAndEmail(String masterKey, String resetCode) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(COL_MASTER_KEY, masterKey); values.put(COL_RESET_CODE, resetCode); db.insert(TABLE_MAIN, null, values); db.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createKeyStore(String master_key) throws AEADBadTagException {\n SharedPreferences.Editor editor = getEncryptedSharedPreferences(master_key).edit();\n editor.putString(MASTER_KEY, master_key);\n editor.apply();\n\n Log.d(TAG, \"Encrypted SharedPreferences created...\");\n ...
[ "0.69920266", "0.62634724", "0.6251297", "0.6191273", "0.61286265", "0.6094444", "0.60454303", "0.59619737", "0.59585685", "0.5917449", "0.5902276", "0.58558506", "0.5737223", "0.5730989", "0.5730507", "0.5721618", "0.56625044", "0.5650304", "0.56396294", "0.5636648", "0.5578...
0.6778115
1
Getting master reset code
public String getMasterResetCode() { String key = ""; String selectQuery = "SELECT * FROM " + TABLE_MAIN; SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.rawQuery(selectQuery, null); if (cursor.moveToFirst()) { do { key = cursor.getString(1); } while (cursor.moveToNext()); } cursor.close(); db.close(); return key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String generateResetCode() {\n return RandomStringUtils.randomNumeric(RESET_CODE_DIGIT_COUNT);\n }", "public String getResetToken() {\n return resetToken;\n }", "public static\n void reset() {\n try {\n Ansi.out.write(AnsiOutputStream.RESET_CODE);\n ...
[ "0.6207424", "0.59778035", "0.59324807", "0.5899955", "0.586059", "0.580208", "0.5694886", "0.5683062", "0.5665119", "0.56453615", "0.56016916", "0.55932313", "0.55627227", "0.5561536", "0.555351", "0.5516458", "0.5510351", "0.55057603", "0.5503752", "0.5483551", "0.5444937",...
0.66820216
0
Updating Master reset code
public int updateMasterResetCode(String masterKey, String newCode) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(COL_RESET_CODE, newCode); int result = db.update(TABLE_MAIN, values, COL_MASTER_KEY + " = ?", new String[] { String.valueOf(masterKey) }); db.close(); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void external_reset()\n {\n // Set EXTRF bit in MCUSR\n try { set_ioreg(MCUSR,get_ioreg(MCUSR) | 0x02); }\n catch (RuntimeException e) { }\n\n // TO DO: Handle an external reset\n // This happens when the RESET pin of the atmel is se...
[ "0.69597137", "0.68797", "0.6648191", "0.6630993", "0.65376145", "0.65367186", "0.65341103", "0.6497285", "0.64542544", "0.6454157", "0.6441197", "0.64400566", "0.64298713", "0.63895607", "0.63670444", "0.6362808", "0.6355042", "0.63004094", "0.62810415", "0.6280064", "0.6280...
0.0
-1
/ My second solution. Second pass, only one small error! No duplicate list at all. We shall notice that candidate elements are from 1 ~ n and without any duplicate!
public ArrayList<ArrayList<Integer>> combine(int n, int k) { ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>(); // Key: constraints of recursion if (n < 1 || n < k || k < 1) return result; if (k == 1) { for (int i = 1; i <= n; i++) { ArrayList<Integer> aList = new ArrayList<Integer>(); aList.add(i); result.add(aList); } return result; } for (int i = n; i > 0; i--) { ArrayList<ArrayList<Integer>> temp = combine(i - 1, k - 1); for (ArrayList<Integer> aList : temp) { aList.add(i); } result.addAll(temp); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Integer> findDuplicates(List<Integer> numbers) {\n Integer[] cloneArray = new Integer[numbers.size()];\n Integer[] repeatNums = new Integer[numbers.size()-1];\n\n\n for (int i = 0; i < numbers.size(); i++){\n cloneArray[i] = numbers.get(i);\n }\n\n ...
[ "0.64031655", "0.630097", "0.6199406", "0.61460775", "0.6065193", "0.6030533", "0.6024157", "0.5986377", "0.59683335", "0.5961501", "0.5891623", "0.5890053", "0.58784443", "0.58484197", "0.58288515", "0.58181924", "0.57956016", "0.5789953", "0.578556", "0.575955", "0.57560766...
0.0
-1
/ First try. recursion.
public static ArrayList<ArrayList<Integer>> combine1(int n, int k) { ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>(); if (n < 1 || k < 1) { return result; } if (n < k) { return result; } if (k == 1) { for (int i = 1; i <= n; i++) { ArrayList<Integer> aResult = new ArrayList<Integer>(); aResult.add(i); result.add(aResult); } return result; } for (int i = n; i > 0; i--) { ArrayList<ArrayList<Integer>> temp = combine1(i - 1, k - 1); for (ArrayList<Integer> aResult : temp) { aResult.add(i); } result.addAll(temp); } // get rid of duplicate sets LinkedHashSet<ArrayList<Integer>> finalResult = new LinkedHashSet<ArrayList<Integer>>(); for (ArrayList<Integer> aResult : result) { Collections.sort(aResult); finalResult.add(aResult); } result = new ArrayList<ArrayList<Integer>>(finalResult); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void p(){\n System.out.println(\"My recursion example 1\");\n p();\n }", "@Test\n\t\tpublic void applyRecursivelyGoal() {\n\t\t\tassertSuccess(\" ;H; ;S; s ⊆ ℤ |- r∈s ↔ s\",\n\t\t\t\t\trm(\"\", ri(\"\", rm(\"2.1\", empty))));\n\t\t}", "boolean isRecursive();", "static void recursive(S...
[ "0.5971519", "0.59656703", "0.5773581", "0.57656765", "0.56886286", "0.5663111", "0.56500024", "0.55950475", "0.55567414", "0.5554347", "0.55061394", "0.54970884", "0.54563665", "0.543598", "0.54356253", "0.5407361", "0.53521144", "0.53472394", "0.5342608", "0.5322067", "0.53...
0.0
-1
shapes.forEach(s>s.draw(this)); shapes.add(0, new Circle()); //wrong
public void drawAll(List<? extends Shape> shapes) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void add(Shape aShape);", "public void add(Shape s)\n {\n shapes.add(s);\n }", "public void add(Shape shapes) {\n\t\tshapesList.add(shapes);\n\t}", "void drawShape(Shape s) {\n }", "public Paint() {\n shapes = new ArrayList<>();\n }", "ShapeGroup(){\n children = n...
[ "0.7270528", "0.69397044", "0.6787441", "0.6769951", "0.670287", "0.66671485", "0.66288465", "0.6576028", "0.65357804", "0.6503285", "0.6493606", "0.64604044", "0.6436973", "0.6408194", "0.6386848", "0.6386848", "0.6386848", "0.6385728", "0.6378396", "0.6357351", "0.6354815",...
0.66731405
5
Called when the database is created for the first time. This is where the creation of tables and the initial population of the tables should happen.
@Override public void onCreate(SQLiteDatabase db) { String sql = "CREATE TABLE IF NOT EXISTS "+TABLE_PLAYERS+" ("+COL_PLAYER_ID+" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," + ""+COL_NAME+" TEXT NOT NULL,"+COL_COMMANDER+" TEXT NOT NULL,"+COL_PLAYED+" INTEGER)"; db.execSQL(sql); sql = "CREATE TABLE IF NOT EXISTS "+TABLE_COMMANDERS+" ("+COL_COMMANDER_ID+" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," + ""+COL_COMMANDER+" TEXT NOT NULL," + ""+COL_COST+" TEXT NOT NULL,"+COL_IMAGE+" TEXT)"; db.execSQL(sql); initTables(db); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setupDB()\r\n\t{\n\tjdbcTemplateObject.execute(\"DROP TABLE IF EXISTS employee1 \");\r\n\r\n\tjdbcTemplateObject.\r\n\texecute(\"CREATE TABLE employee1\"\r\n\t+ \"(\" + \"name VARCHAR(255), id SERIAL)\");\r\n\t}", "public void initDb() {\n String createVac = \"create table if not exists vacanc...
[ "0.769045", "0.7478457", "0.74183893", "0.7317523", "0.7280455", "0.727844", "0.72588336", "0.7243045", "0.723998", "0.7219534", "0.71882147", "0.71731895", "0.7158259", "0.70844376", "0.70779943", "0.70615256", "0.7021818", "0.7014383", "0.6995425", "0.6974936", "0.6972034",...
0.0
-1
Called when the database needs to be upgraded. The implementation should use this method to drop tables, add tables, or do anything else it needs to upgrade to the new schema version. The SQLite ALTER TABLE documentation can be found This method executes within a transaction. If an exception is thrown, all changes will automatically be rolled back.
@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS "+TABLE_PLAYERS); db.execSQL("DROP TABLE IF EXISTS "+TABLE_COMMANDERS); onCreate(db); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doUpgrade() {\n // implement the database upgrade here.\n }", "public void upgrade() {\n\t\t\tLog.w(\"\" + this, \"Upgrading database \"+ db.getPath() + \" from version \" + db.getVersion() + \" to \"\n\t + DATABASE_VERSION + \", which will destroy all old data\");\n\t ...
[ "0.75007", "0.745845", "0.7430778", "0.73865575", "0.7322902", "0.72165036", "0.720459", "0.7156422", "0.7147413", "0.71412134", "0.709229", "0.7087462", "0.70865774", "0.70771444", "0.7069004", "0.7057889", "0.70470905", "0.7032843", "0.70315135", "0.701447", "0.7000805", ...
0.0
-1
slanje obicne tekstualne poruke
void sendTemplateMessage (EmailObject object) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String dohvatiKontakt();", "public void tulostaKomennot() {\n this.io.tulostaTeksti(\"Komennot: \");\n for (int i = 1; i <= this.komennot.keySet().size(); i++) {\n this.io.tulostaTeksti(this.komennot.get(i).toString());\n }\n this.io.tulostaTeksti(\"\");\n ...
[ "0.69023865", "0.6822972", "0.66528094", "0.6512834", "0.64692295", "0.636709", "0.63293993", "0.6322326", "0.63118106", "0.62741864", "0.6272893", "0.61715937", "0.61465794", "0.613849", "0.61214507", "0.60909426", "0.6076348", "0.6075875", "0.6050527", "0.60488015", "0.6044...
0.0
-1
slanje poruke i html sadrzaja
void sendMessageWithAttachment (EmailObject object, String pathToAttachment) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }", "@GET\r\n @Produces(\"text/html\")\r\n public String getHtml() {\r\n return \"<html><body>the solution is :</body></html> \";\r\n }", "S...
[ "0.6155096", "0.61360425", "0.6079765", "0.59029186", "0.5876489", "0.58683777", "0.57771957", "0.57701874", "0.5692928", "0.5671451", "0.567019", "0.56152225", "0.5590044", "0.5588682", "0.5577215", "0.55628234", "0.55459493", "0.55363685", "0.5523661", "0.551695", "0.550011...
0.0
-1
Force the column auto resize to apply at the Sheet.
public final void overrideAutoResizeColumn(final boolean isAutoResize) { overrideAutoResizeColumn = isAutoResize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final void applyColumnWidthToSheet() {\n\t\tif (!autoResizeColumn) {\n\t\t\tfor (Map.Entry<Integer, Integer> column : columnWidthMap.entrySet()) {\n\t\t\t\tgetSheet().setColumnWidth(column.getKey(), column.getValue() * 256);\n\t\t\t}\n\t\t}\n\t}", "public void resizeColumns() {\n }", "public void ...
[ "0.8049652", "0.73934954", "0.71978366", "0.66341037", "0.6523818", "0.63861585", "0.6358308", "0.6156525", "0.6019955", "0.59705377", "0.596323", "0.5784073", "0.57640487", "0.57522327", "0.57279366", "0.5719214", "0.5715891", "0.5691572", "0.5689168", "0.56736004", "0.56420...
0.70506203
3
Apply to sheet the column width defined.
protected final void applyColumnWidthToSheet() { if (!autoResizeColumn) { for (Map.Entry<Integer, Integer> column : columnWidthMap.entrySet()) { getSheet().setColumnWidth(column.getKey(), column.getValue() * 256); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void adjustColumnsWidth() {\r\n // Add a listener to resize the column to the full width of the table\r\n ControlAdapter resizer = new ControlAdapter() {\r\n @Override\r\n public void controlResized(ControlEvent e) {\r\n Rectangle r = mTablePackages.getCli...
[ "0.68662035", "0.63642067", "0.6158931", "0.61485267", "0.61118555", "0.6058138", "0.6039226", "0.5935751", "0.59344286", "0.5924598", "0.5876676", "0.5865143", "0.5808219", "0.57654923", "0.5755827", "0.57126737", "0.5709932", "0.56978095", "0.5685548", "0.56732273", "0.5651...
0.846466
0
Get the file name.
protected String getFileName() { return fileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String ge...
[ "0.8685491", "0.8685491", "0.8685491", "0.8685491", "0.8685491", "0.8685491", "0.8685491", "0.8685491", "0.8685491", "0.844532", "0.844532", "0.8351135", "0.82764524", "0.82612365", "0.8251949", "0.8187199", "0.81658113", "0.81652737", "0.8149414", "0.8148824", "0.8140136", ...
0.76240575
69
Set the file name.
public void setFileName(final String fileName) { this.fileName = fileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileName( String name ) {\n\tfilename = name;\n }", "void setFileName( String fileName );", "public void setName(String filename) {\n\t\tthis.filename = filename;\n\t}", "public void setFileName(String name) {\r\n this.fileName = name == null ? null : name.substring(name.lastIndexOf(...
[ "0.796483", "0.7897966", "0.7832712", "0.78130186", "0.76756537", "0.7601827", "0.75872993", "0.7467072", "0.74020225", "0.73793834", "0.73565584", "0.73388165", "0.7318386", "0.7310038", "0.73018533", "0.728177", "0.7231792", "0.7213239", "0.7145186", "0.712119", "0.712119",...
0.67685527
49
Generate a key to identify the cell style.
protected String generateCellStyleKey(final String cellDecoratorType, final String maskDecoratorType) { String decorator = StringUtils.isNotBlank(element.decorator()) ? element.decorator() : cellDecoratorType; String mask = StringUtils.isNotBlank(element.transformMask()) ? element.transformMask() : (StringUtils.isNotBlank(element.formatMask()) ? element.formatMask() : maskDecoratorType); return mask.concat(decorator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String get_cell_style_id(){\r\n\t\t_cell_style_id ++;\r\n\t\treturn \"cond_ce\" + _cell_style_id;\r\n\t}", "private String getKey(int houseNo, int colorNo) {\n return houseNo + \"_\" + colorNo;\n }", "private int genKey()\n {\n return (nameValue.getData() + scopeDefine...
[ "0.6900571", "0.6371225", "0.61331916", "0.586366", "0.5679988", "0.5607951", "0.5591607", "0.5591207", "0.5524335", "0.5501616", "0.5445716", "0.5440293", "0.54379475", "0.54122853", "0.53981155", "0.5367347", "0.53624225", "0.5321881", "0.5320904", "0.53059566", "0.53033507...
0.67839754
1
Basic treatment of the decorators.
private void treatmentBasicDecorator() throws ConfigurationException { /* treat all default styles non-declared */ treatmentHeaderDecorator(); treatmentGenericDecorator(); treatmentNumericDecorator(); treatmentDateDecorator(); treatmentBooleanDecorator(); treatmentEnumDecorator(); /* treat all the styles non-default override via XConfigCriteria */ for (Map.Entry<String, CellDecorator> object : cellDecoratorMap.entrySet()) { stylesMap.put(object.getKey(), CellStyleHandler.initializeCellStyleByCellDecorator(workbook, object.getValue())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getDecoratorInfo();", "void decorate(IDecoratedSource decoratedSource);", "public final PythonParser.decorators_return decorators() throws RecognitionException {\n PythonParser.decorators_return retval = new PythonParser.decorators_return();\n retval.start = input.LT(1);\n\...
[ "0.58746934", "0.58336085", "0.5801752", "0.566975", "0.56221086", "0.56150466", "0.5586697", "0.5485503", "0.54152006", "0.54046303", "0.5355693", "0.532686", "0.5324007", "0.531677", "0.52938116", "0.52260065", "0.52250415", "0.52182317", "0.52110773", "0.52106136", "0.5140...
0.6046444
0
Treatment of the decorators using unique decorator declared via criteria. If the unique decorator is activated, will override all others decorators by the unique decorator.
private void treatUniqueDecoratorViaCriteria() throws ConfigurationException { if (uniqueCellStyle) { /* treat all the styles declared via annotation */ for (Map.Entry<String, CellStyle> object : stylesMap.entrySet()) { stylesMap.put(object.getKey(), CellStyleHandler.initializeCellStyleByCellDecorator(workbook, cellDecoratorUnique)); } } /* treat all default styles non-declared */ treatmentHeaderDecorator(); treatmentGenericDecorator(); treatmentNumericDecorator(); treatmentDateDecorator(); treatmentBooleanDecorator(); treatmentEnumDecorator(); /* treat all the styles non-default override via XConfigCriteria */ treatmentSpecificDecorator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void treatmentSpecificDecorator() throws ConfigurationException {\n\t\tfor (Map.Entry<String, CellDecorator> object : cellDecoratorMap.entrySet()) {\n\t\t\tif (uniqueCellStyle) {\n\t\t\t\t/*\n\t\t\t\t * when activate unique style, set all styles with the declared\n\t\t\t\t * style\n\t\t\t\t */\n\t\t\t\tsty...
[ "0.6135098", "0.5010086", "0.49301863", "0.4705664", "0.46653143", "0.4659662", "0.46550122", "0.46029985", "0.447184", "0.4463738", "0.44223157", "0.43842548", "0.42965323", "0.42851543", "0.42801398", "0.42198533", "0.4215516", "0.4205783", "0.41985002", "0.41943863", "0.41...
0.74349594
0
Set the header decorator by default if not declared via annotation.
private void treatmentHeaderDecorator() throws ConfigurationException { if (stylesMap.get(CellStyleHandler.CELL_DECORATOR_HEADER) == null) { stylesMap.put(CellStyleHandler.CELL_DECORATOR_HEADER, cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_HEADER) ? CellStyleHandler.initializeCellStyleByCellDecorator(workbook, cellDecoratorMap.get(CellStyleHandler.CELL_DECORATOR_HEADER)) : CellStyleHandler.initializeHeaderCellDecorator(workbook)); cellDecoratorMap.remove(cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_HEADER)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setHeader(String arg0, String arg1) {\n\n }", "public void setHeader(String header) {\n\t\tthis.header = header;\n\t\tthis.handleConfig(\"header\", header);\n\t}", "void setHeader(java.lang.String header);", "public void setHeaderFlag(boolean flag) {\n configuration.put(ConfigTag...
[ "0.619255", "0.6015486", "0.5965419", "0.5862763", "0.5718692", "0.5659235", "0.5640693", "0.5636441", "0.5588507", "0.55425173", "0.55328435", "0.5523334", "0.5523318", "0.5516298", "0.5455047", "0.5451324", "0.5441693", "0.5430191", "0.54109675", "0.53997725", "0.5387918", ...
0.5861994
4
Set the generic decorator by default if not declared via annotation.
private void treatmentGenericDecorator() throws ConfigurationException { if (stylesMap.get(CellStyleHandler.CELL_DECORATOR_GENERIC) == null) { stylesMap.put(CellStyleHandler.CELL_DECORATOR_GENERIC, cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_GENERIC) ? CellStyleHandler.initializeCellStyleByCellDecorator(workbook, cellDecoratorMap.get(CellStyleHandler.CELL_DECORATOR_GENERIC)) : CellStyleHandler.initializeGenericCellDecorator(workbook)); cellDecoratorMap.remove(cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_GENERIC)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Form addDefaultDecoratorForElementClass(Class<? extends Element> clazz, Decorator decorator);", "Form setDefaultDecoratorsForElementClass(Class<? extends Element> clazz, List<Decorator> decorators);", "public void setGeneric(java.lang.String generic) {\r\n this.generic = generic;\r\n }", "public vo...
[ "0.5576015", "0.5358036", "0.533877", "0.5324552", "0.5010879", "0.49688926", "0.47807336", "0.47358745", "0.46768498", "0.46614882", "0.46506897", "0.46090126", "0.4603588", "0.45440352", "0.45365506", "0.4512856", "0.45021757", "0.45021114", "0.44895577", "0.4459681", "0.44...
0.5469052
1
Set the numeric decorator by default if not declared via annotation.
private void treatmentNumericDecorator() throws ConfigurationException { if (stylesMap.get(CellStyleHandler.CELL_DECORATOR_NUMERIC) == null) { stylesMap.put(CellStyleHandler.CELL_DECORATOR_NUMERIC, cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_NUMERIC) ? CellStyleHandler.initializeCellStyleByCellDecorator(workbook, cellDecoratorMap.get(CellStyleHandler.CELL_DECORATOR_NUMERIC)) : CellStyleHandler.initializeNumericCellDecorator(workbook)); cellDecoratorMap.remove(cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_NUMERIC)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default T handleNumber(double val) {\n throw new UnsupportedOperationException();\n }", "public double getDefault(){\n return number;\n }", "NumericalAttribute(String name, int valueType) {\n\t\tsuper(name, valueType);\n\t\tregisterStatistics(new NumericalStatistics());\n\t\tregiste...
[ "0.57023984", "0.55538726", "0.5299485", "0.5257124", "0.517415", "0.5151641", "0.51387054", "0.505678", "0.5046441", "0.50387895", "0.50257653", "0.5019857", "0.4926213", "0.49117088", "0.49083808", "0.4905677", "0.48969427", "0.4862385", "0.4859484", "0.48421505", "0.481042...
0.61188734
0
Set the date decorator by default if not declared via annotation.
private void treatmentDateDecorator() throws ConfigurationException { if (stylesMap.get(CellStyleHandler.CELL_DECORATOR_DATE) == null) { stylesMap.put(CellStyleHandler.CELL_DECORATOR_DATE, cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_DATE) ? CellStyleHandler.initializeCellStyleByCellDecorator(workbook, cellDecoratorMap.get(CellStyleHandler.CELL_DECORATOR_DATE)) : CellStyleHandler.initializeDateCellDecorator(workbook)); cellDecoratorMap.remove(cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_DATE)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void setDate() {\n\n\t}", "public DefaultImpl() {\n this(DEFAULT_DATE_FORMAT);\n }", "protected DateFieldMetadata() {\r\n\r\n\t}", "public void SetDate(Date date);", "abstract Date getDefault();", "public void setDate() {\n this.date = new Date();\n }", ...
[ "0.64224917", "0.61059403", "0.6097086", "0.60750777", "0.60061353", "0.59854996", "0.5970162", "0.59407973", "0.59328574", "0.5893147", "0.5843494", "0.58401984", "0.58206475", "0.58206475", "0.58206475", "0.58206475", "0.58206475", "0.58206475", "0.58206475", "0.58206475", ...
0.6281901
1
Set the boolean decorator by default if not declared via annotation.
private void treatmentBooleanDecorator() throws ConfigurationException { if (stylesMap.get(CellStyleHandler.CELL_DECORATOR_BOOLEAN) == null) { stylesMap.put(CellStyleHandler.CELL_DECORATOR_BOOLEAN, cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_BOOLEAN) ? CellStyleHandler.initializeCellStyleByCellDecorator(workbook, cellDecoratorMap.get(CellStyleHandler.CELL_DECORATOR_BOOLEAN)) : CellStyleHandler.initializeBooleanCellDecorator(workbook)); cellDecoratorMap.remove(cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_BOOLEAN)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setBoolean(boolean value);", "void set(boolean value);", "public void setTallied(java.lang.Boolean value);", "public void setIsModifier(java.lang.Boolean value);", "void setNullable(boolean nullable);", "public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }", "public voi...
[ "0.66637444", "0.6500837", "0.6491164", "0.6410353", "0.6248796", "0.61685157", "0.61309236", "0.6096352", "0.60659546", "0.605272", "0.60453933", "0.60007083", "0.59999555", "0.59953344", "0.5969191", "0.59618855", "0.59555906", "0.59442693", "0.59167546", "0.59129614", "0.5...
0.59403175
18
Set the enumeration decorator by default if not declared via annotation.
private void treatmentEnumDecorator() throws ConfigurationException { if (stylesMap.get(CellStyleHandler.CELL_DECORATOR_ENUM) == null) { stylesMap.put(CellStyleHandler.CELL_DECORATOR_ENUM, cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_ENUM) ? CellStyleHandler.initializeCellStyleByCellDecorator(workbook, cellDecoratorMap.get(CellStyleHandler.CELL_DECORATOR_ENUM)) : CellStyleHandler.initializeGenericCellDecorator(workbook)); cellDecoratorMap.remove(cellDecoratorMap.containsKey(CellStyleHandler.CELL_DECORATOR_ENUM)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEnumerated(boolean value) {\r\n this.enumerated = value;\r\n }", "public void setEnumerated(boolean value) {\n this.enumerated = value;\n }", "@com.exedio.cope.instrument.Generated // customize with @WrapperType(constructor=...) and @WrapperInitial\n\t@java.lang.SuppressWarni...
[ "0.5909447", "0.5872474", "0.5726942", "0.5652186", "0.55164516", "0.5499968", "0.5498837", "0.54968333", "0.54636157", "0.545721", "0.5177794", "0.51589596", "0.511908", "0.5029502", "0.5002483", "0.49996778", "0.49934345", "0.49707666", "0.49674705", "0.49393398", "0.493097...
0.5557852
4
Set the all nondefault decorators declared via annotation. If the unique decorator is activated, will override all others decorators by the unique decorator.
private void treatmentSpecificDecorator() throws ConfigurationException { for (Map.Entry<String, CellDecorator> object : cellDecoratorMap.entrySet()) { if (uniqueCellStyle) { /* * when activate unique style, set all styles with the declared * style */ stylesMap.put(object.getKey(), CellStyleHandler.initializeCellStyleByCellDecorator(workbook, cellDecoratorUnique)); } else { stylesMap.put(object.getKey(), CellStyleHandler.initializeCellStyleByCellDecorator(workbook, object.getValue())); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Form setDefaultDecoratorsForElementClass(Class<? extends Element> clazz, List<Decorator> decorators);", "private void treatUniqueDecoratorViaCriteria() throws ConfigurationException {\n\t\tif (uniqueCellStyle) {\n\t\t\t/* treat all the styles declared via annotation */\n\t\t\tfor (Map.Entry<String, CellStyle> ob...
[ "0.57288724", "0.53687483", "0.5077088", "0.50603944", "0.48692945", "0.47329345", "0.46995017", "0.46633714", "0.46241546", "0.45988545", "0.4578289", "0.45278093", "0.45251366", "0.45217898", "0.45076573", "0.44830948", "0.44580218", "0.44431424", "0.43957767", "0.439024", ...
0.54328525
1
/ access modifiers changed from: 0000
public void GetListaTjWomenResponseBean() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Member mo23408O();", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n protected void prot() {\n }", "public void m23075a() {\n }", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "public void m...
[ "0.65168345", "0.6417889", "0.6403412", "0.6346675", "0.6299906", "0.62951195", "0.6244629", "0.6228537", "0.620437", "0.6192846", "0.6189669", "0.61808765", "0.6173851", "0.6169742", "0.616948", "0.6162881", "0.6150504", "0.6149917", "0.61402553", "0.6134384", "0.6133215", ...
0.0
-1
each time agent check fails count increses and when count is 4 agent is disconnected
public String getAgentConfig() { return agentConfig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resetCount(){\r\n\t\t\tactiveAgent = 0;\r\n\t\t\tjailedAgent = 0;\r\n\t\t\tquietAgent = 0;\r\n\t\t}", "private void countAgents(){\r\n\t\t\tfor(Agent agent : agents){\r\n\t\t\t\tif(agent.isActive()) activeAgent ++;\r\n\t\t\t\telse if(agent.getJailTerm() > 0) jailedAgent ++;\r\n\t\t\t\telse quietAgen...
[ "0.6720606", "0.62569386", "0.62342644", "0.57732415", "0.5649688", "0.5644036", "0.559276", "0.5564212", "0.5557913", "0.55405456", "0.5503192", "0.549559", "0.54873335", "0.5472435", "0.5461717", "0.54518324", "0.5425421", "0.5425253", "0.5422307", "0.5418722", "0.5395395",...
0.0
-1
/ User clicked cancel so do some stuff
public void onClick(DialogInterface dialog, int whichButton) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onCancelClicked();", "public void cancel() { Common.exitWindow(cancelBtn); }", "public void onCancelClick()\r\n {\r\n\r\n }", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public ab...
[ "0.813386", "0.8038097", "0.78671783", "0.7824543", "0.7824543", "0.7824543", "0.7824543", "0.7824543", "0.7824543", "0.77766436", "0.7750306", "0.7745657", "0.77434987", "0.7735942", "0.7733378", "0.7725916", "0.7707398", "0.7697548", "0.76816523", "0.76741374", "0.76499736"...
0.0
-1
Creates a new instance of Recognizer
public CommandLineFSRecognizer() { init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ICharacterRecognizer create (ReceiptClass receiptClass) {\n return CharacterRecognizerFactory.dispatch(receiptClass);\n }", "com.google.cloud.speech.v2.Recognizer getRecognizer();", "public MyNLP()\n\t{\n\t\t//create StanfordNLP\n\t\tsnlp = new StanfordNLP();\n\t\t//create Recognizer\n\...
[ "0.6085506", "0.60848266", "0.6048725", "0.57988584", "0.5709433", "0.56745243", "0.55067563", "0.54741174", "0.54366386", "0.5422798", "0.53859615", "0.53849685", "0.5368146", "0.53512704", "0.5308702", "0.5261718", "0.5255612", "0.52520615", "0.52112913", "0.5202836", "0.51...
0.6465914
0
Create an empty customizable filesystem info. That is intended for creating of new filesystem information, that were not recognized automatically.
public FSInfo createFSInfo() { return new CommandLineVcsFileSystemInfo(FileUtil.normalizeFile(new File("")), null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n private HsmFileSystemInfo() {\n this((String) null);\n }", "@Model \r\n\tprivate static String getDefaultName() {\r\n\t\treturn \"new_fileSystem\";\r\n\t}", "protected FileSystem createFileSystem()\n throws SmartFrogException, RemoteException {\n M...
[ "0.63097674", "0.6230897", "0.56374514", "0.5547513", "0.55274034", "0.55001414", "0.54425985", "0.54294854", "0.5384043", "0.5368414", "0.5300327", "0.5280303", "0.5244527", "0.52372724", "0.5220759", "0.52146477", "0.5207151", "0.5206734", "0.51928633", "0.51846707", "0.514...
0.71823704
0
This method gets called when ProfilesFactory property is changed.
public void propertyChange(PropertyChangeEvent evt) { if (ProfilesFactory.PROP_PROFILE_ADDED.equals(evt.getPropertyName())) { String profileName = (String) evt.getNewValue(); Profile profile = ProfilesFactory.getDefault().getProfile(profileName); if (ProfilesFactory.getDefault().isOSCompatibleProfile(profileName)) { registerProfile(profile); } } else if (ProfilesFactory.PROP_PROFILE_REMOVED.equals(evt.getPropertyName())) { String profileName = (String) evt.getOldValue(); variablesByProfileNames.remove(profileName); displayTypesByProfileNames.remove(profileName); commandsToFillByProfileNames.remove(profileName); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onPROChange() {\n if (selectPROC != null) {\n CommunicationBridge communicationBridge = findCommunicationById(selectPROC.toString());\n parameterPROC = communicationBridge.getNumParameter();\n } else {\n parameterPROC = 0;\n }\n }", "private vo...
[ "0.5692902", "0.55035776", "0.5485446", "0.54065704", "0.53268355", "0.52921546", "0.5274232", "0.5269958", "0.5231475", "0.52213764", "0.5218239", "0.5206439", "0.5189836", "0.5145174", "0.5135895", "0.5130495", "0.51275194", "0.51229286", "0.5114236", "0.5085378", "0.508071...
0.6274024
0
onCreate() > onStart() > onResume() > Actividad
@Override protected void onResume() { super.onResume(); // Verifica la orientación checkOrientation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onResume() {\n super.onResume();\n Log.i(\"LOG:\", \"ESTOY EN RESUME\");\n activarSensores();\n }", "public void onResume();", "@Override\n public void onResume() {\n }", "public void onResume() {\n }", "@Override\n\tpro...
[ "0.7861917", "0.76330656", "0.76152873", "0.76062423", "0.7605676", "0.75480527", "0.7538176", "0.7529", "0.74813634", "0.7471492", "0.7471492", "0.7471492", "0.7471492", "0.7450162", "0.7447176", "0.74464923", "0.74464923", "0.7443883", "0.74285275", "0.74285275", "0.7418302...
0.0
-1
Actividad > onPause() > onStop() > onDestroy()
@Override protected void onDestroy() { super.onDestroy(); // Si se sale de la APP libera la búsqueda // y desconecta la bd buscador.liberar_busqueda(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"deprecation\")\n @Override\n protected void onDestroy() {\n super.onDestroy();\n isPaused = true;\n }", "public void onPause();", "void onDestroy();", "void onDestroy();", "void onDestroy();", "void onDestroy();", "@Override\n public void onPause(Activity a...
[ "0.79187524", "0.77874696", "0.7623684", "0.7623684", "0.7623684", "0.7623684", "0.75949275", "0.7590761", "0.75857943", "0.7577745", "0.7577745", "0.75248814", "0.7503445", "0.7467946", "0.7465853", "0.7457633", "0.74456215", "0.74444497", "0.743178", "0.7417594", "0.7415295...
0.0
-1
Reacciona a los eventos de click
@Override public void onClick(View view) { int btn = view.getId(); switch (btn) { case R.id.B_buscar: // Se ha pulsado buscar... activa la búsqueda wi_search.setQuery(wi_search.getQuery(), true); break; case R.id.B_weather: goToWeather(); break; case R.id.B_suge1: wi_search.setQuery(b_sugerencias[0].getText(), true); break; case R.id.B_suge2: wi_search.setQuery(b_sugerencias[1].getText(), true); break; case R.id.B_suge3: wi_search.setQuery(b_sugerencias[2].getText(), true); break; case R.id.B_suge4: wi_search.setQuery(b_sugerencias[3].getText(), true); break; case R.id.B_suge5: wi_search.setQuery(b_sugerencias[4].getText(), true); break; case R.id.B_suge6: wi_search.setQuery(b_sugerencias[5].getText(), true); break; case R.id.B_cancelar: cancelarBusqueda(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount()==1) {\n this.datos();\n }\n if (e.getClickCount()==2) {\n this.eliminar(); \n } \n \n }", "public void eventos() {\n btnAbrir.addActionListener(new ActionLi...
[ "0.71901083", "0.7088907", "0.6869325", "0.6747775", "0.66549593", "0.66373223", "0.6627715", "0.6615328", "0.66131943", "0.66125244", "0.658998", "0.65611255", "0.65526754", "0.65383136", "0.6525839", "0.65118384", "0.6506244", "0.65042275", "0.6503269", "0.64901483", "0.648...
0.0
-1
Activa el item menu_borrar_busquedas
@Override public boolean onCreateOptionsMenu(Menu menu) { // Primero configura el menu de MenuActivity super.onCreateOptionsMenu(menu); // Activa el item MenuItem item = menu.findItem(R.id.menu_borrar_busquedas); if (item !=null) { item.setEnabled(true); item.setVisible(true); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.menu_borrar_busquedas:\n\t\t\tdo_limpiar_sugerencias();\n\t\t\treturn true;\n\t\t\t\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "public static void Regresar() {\n ...
[ "0.71524614", "0.6569903", "0.6430212", "0.638915", "0.6359194", "0.6271822", "0.62659365", "0.6218385", "0.6144064", "0.613996", "0.61176604", "0.6117556", "0.6101572", "0.60638016", "0.6018297", "0.59767544", "0.59743863", "0.5973816", "0.5966471", "0.5965044", "0.5963887",...
0.71015567
1
Configura el click en menu_borrar_busquedas
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_borrar_busquedas: do_limpiar_sugerencias(); return true; default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clicarAlterarDadosCadastrais() {\n\t\thomePage.getButtonMenu().click();\n\t\thomePage.getButtonAlterarDadosCadastrais().click();\t\t\n\t}", "public void barraprincipal(){\n setJMenuBar(barra);\n //Menu archivo\n archivo.add(\"Salir del Programa\").addActionListener(this);\n ba...
[ "0.641147", "0.6319682", "0.61982864", "0.6186804", "0.61734384", "0.60464734", "0.6018182", "0.6013938", "0.60055673", "0.5971183", "0.5942499", "0.5940272", "0.59275025", "0.5924853", "0.5906173", "0.5891711", "0.5883396", "0.58504987", "0.5846852", "0.5845353", "0.58113956...
0.6306403
2
Devuelve un intent para cambiar al presentador que corresponda: PresenV > PresenH PresenH > PresenV
protected Intent getIntentForChangePresenter() { // Destino: Presentador H Intent intent = new Intent(PresentadorV_main.this, PresentadorH_main.class); intent.setAction(INTENT_ACTION); // Guarda en el intent el contenido de la searchview // ojo: es tipo CharSequence intent.putExtra(INTENT_CONTENT_WISEARCH, wi_search.getQuery()); return intent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(MainActivity.this, PartNoList.class);\n\t\t\t\tintent.putExtra(\"motortype\", \"vcmpartno\");\n\t\t\t\tstartActivity(intent);\t\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent cambioVentana...
[ "0.57824904", "0.568164", "0.5661087", "0.56236875", "0.5595401", "0.5591518", "0.5496658", "0.54863435", "0.54570866", "0.5450434", "0.54213935", "0.5407629", "0.53870785", "0.5370112", "0.53475636", "0.5343468", "0.53431123", "0.53408515", "0.5331768", "0.5313453", "0.52893...
0.6955415
0
/ Gestiona el intent que se recibe en el arranque o la llamada a onNewIntent de la actividad
private void gestionaIntent(Intent intent) { if (Intent.ACTION_VIEW.equals(intent.getAction())) { /*** Click en una sugerencia de searchview... (no soportado aún) ***/ } else if (Intent.ACTION_SEARCH.equals(intent.getAction())) { /*** Ejecutar una búsqueda ***/ // Extrae la cadena desde el Intent String query_string = intent.getStringExtra(SearchManager.QUERY); // Si la cadena tiene menos de MIN_TAM... caracteres no se hace nada if ( (query_string == null) || (query_string.length() < MIN_TAM_BUSQUEDA) ) { return; } // Ejecuta la búsqueda en segundo plano busqueda = new TareaBusqueda(buscador, this); if (busqueda !=null) { busqueda.execute(query_string); } // Actualiza los botones de sugerencias actualizaSugerencias(); } else if (INTENT_ACTION.equals(intent.getAction())) { /*** Cambio de orientación ***/ // Mantiene el contenido de la searchview wi_search.setQuery( intent.getCharSequenceExtra(INTENT_CONTENT_WISEARCH), false); } else { /*** No se hace nada ***/ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onNewIntent(Intent intent){\n handleIntent(intent);\n }", "@Override\n public void onNewIntent(Intent intent) {\n }", "public void onNewIntent(Intent intent) {\n }", "@Override\n protected void onNewIntent(Intent intent) {\n }", "@Override\n public ...
[ "0.80656695", "0.80070055", "0.7978103", "0.793693", "0.7863076", "0.78514785", "0.77954036", "0.77954036", "0.7791385", "0.76564246", "0.76212555", "0.760227", "0.74675167", "0.7320793", "0.7283157", "0.7257268", "0.71212363", "0.71101594", "0.70264477", "0.70149773", "0.696...
0.59321034
80
Cambia a la actividad que muestra el widget del tiempo
private void goToWeather(){ Intent intent = new Intent(PresentadorV_main.this, Presentador_weather.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setWidget(Object arg0)\n {\n \n }", "public TemporizadorPanel() {\n initComponents();\n }", "public ttussntpt() {\n initComponents();\n }", "private GUIAltaHabitacion() {\r\n\t initComponents();\r\n\t }", "public TImerPanel ()\r\n\t{\r\n\t\t...
[ "0.6252361", "0.61273396", "0.6123733", "0.6105113", "0.60061955", "0.60005885", "0.5939863", "0.59341884", "0.592569", "0.5918013", "0.59138536", "0.5912027", "0.58714163", "0.58614194", "0.58481485", "0.58459127", "0.5828363", "0.5817516", "0.5796344", "0.57896703", "0.5786...
0.0
-1
Actualiza los botones de sugerencias
private void actualizaSugerencias() { // Pide un vector con las últimas N_SUGERENCIAS búsquedas // get_historial siempre devuelve un vector tamaño N_SUGERENCIAS // relleno con null si no las hay String[] historial = buscador.get_historial(N_SUGERENCIAS); // Establece el texto para cada botón... for(int k=0; k < historial.length; k++) { String texto = historial[k]; // Si la entrada k está vacía.. if ( texto == null) { // Rellena el botón con el valor por defecto texto = DEF_SUGERENCIAS[k]; // Y lo añade al historial para que haya concordancia buscador.add_to_historial(texto); } b_sugerencias[k].setText(texto); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void inicializarBotones() {\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'login'\n\t\tthis.controladorLogin = new ControladorLogin(vista, modelo);\n\t\tthis.controladorLogin.addListeners();\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'registro'\n\t\tthis.controladorRegistro = new Co...
[ "0.686721", "0.61611784", "0.61369944", "0.6085598", "0.59344214", "0.5815085", "0.5798482", "0.57466406", "0.57456595", "0.5695468", "0.56839424", "0.5645788", "0.56391263", "0.5636234", "0.5635666", "0.56349003", "0.55843866", "0.55815804", "0.5579463", "0.5568103", "0.5559...
0.5484971
36
Activa/desactiva la progress bar
private void startProgressBar() { b_buscar.setVisibility(View.GONE); // wi_progreso.setVisibility(View.VISIBLE); ly_progreso.setVisibility(View.VISIBLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void toggleProgress() {\n if (progWheel.getVisibility() == View.VISIBLE) {\n // Needs its own thread for timing control\n Handler handler = new Handler();\n final Runnable r = new Runnable() {\n public void run() {\n if (progWheel.ge...
[ "0.7294199", "0.70519036", "0.70519036", "0.69984245", "0.6925512", "0.6865719", "0.67764103", "0.6691122", "0.66070265", "0.6582781", "0.6578709", "0.64251053", "0.6378557", "0.6335183", "0.63333434", "0.6328232", "0.6316412", "0.62870246", "0.6268346", "0.62528783", "0.6239...
0.6823658
6
if the thread is not running return null
public Results doQuery(String[] settings) { if (queryThread != null) { // create the query object and to hand to the thread QueryObject query = new QueryObject(settings); synchronized (query) { synchronized (this) { // hand the query object to the thread queries.add(query); // wake up the thread notify(); } try { // wait until we know we have the result query.wait(); } catch (InterruptedException e) { } } // return the results return query.results; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Thread getThread();", "boolean hasThreadId();", "private synchronized WorkerThread getThread() {\n\t\tfor (int i = 0; i < this.threadPool.size(); ++i) {\n\t\t\tif (this.threadPool.get(i).available()) {\n\t\t\t\tthis.threadPool.get(i).setAvailable(false);\n\t\t\t\treturn this.threadPool.get(i);\n\t\t\t}\...
[ "0.67936", "0.6670531", "0.653881", "0.64459246", "0.64318997", "0.6421152", "0.6365477", "0.6346325", "0.6346325", "0.6346325", "0.6346325", "0.6346325", "0.63128066", "0.63128066", "0.63128066", "0.63128066", "0.63128066", "0.63128066", "0.62442905", "0.61872244", "0.618110...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc=new Scanner(System.in); String str=sc.next(); File f=new File(str); System.out.println(f.exists()); System.out.println(f.canRead()); System.out.println(f.canWrite()); System.out.println(f.length()); System.out.println(f.getClass()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
/ Setup various view contents for Notification
public static void buildDemoNotification(Context context) { int eventId = 0; String eventTitle = "Demo title"; String eventLocation = "Mountain View"; int notificationId = 001; // Build intent for notification content Intent viewIntent = new Intent(context, ViewEventActivity.class); viewIntent.putExtra(EXTRA_EVENT_ID, eventId); PendingIntent viewPendingIntent = PendingIntent.getActivity(context, 0, viewIntent, 0); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle(eventTitle) .setContentText(eventLocation) .setContentIntent(viewPendingIntent); // Get an instance of the NotificationManager service NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); // Build the notification and issues it with notification manager. notificationManager.notify(notificationId, notificationBuilder.build()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupNotificationLayout() {\n //Setup notification area to begin date-set process on click.\n notificationLayout.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n showTimerPickerDialog(...
[ "0.68857235", "0.6703152", "0.658162", "0.6522237", "0.64789957", "0.64147776", "0.64128304", "0.6364058", "0.6277586", "0.6242749", "0.6233615", "0.62311226", "0.6216626", "0.6207008", "0.6207008", "0.6203179", "0.61907417", "0.6190058", "0.61602277", "0.61602277", "0.615800...
0.0
-1
/ (nonJavadoc) Returning null when not found based on spec.
@Override public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { return namespaceMap.getOrDefault(namespaceUri, suggestion); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract E get(S spec);", "org.hl7.fhir.String getDocumentation();", "private UriRef getRenderingSpecification(Resource renderletDef) {\n\t\tIterator<Triple> renderSpecIter = configGraph.filter(\n\t\t\t\t(NonLiteral) renderletDef, TYPERENDERING.renderingSpecification, null);\n\t\tif (renderSpecIter.h...
[ "0.58111334", "0.57374656", "0.556775", "0.5511232", "0.5470468", "0.5470468", "0.5409579", "0.5384861", "0.5384861", "0.5375555", "0.5375555", "0.5375555", "0.5333116", "0.5313751", "0.5237744", "0.5210257", "0.51741946", "0.51285654", "0.51263326", "0.51186264", "0.5109919"...
0.0
-1
TODO Autogenerated method stub
@Override public ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward forward=null; int order_num=Integer.parseInt(request.getParameter("order_num")); OrderDetailSvc orderDetailSvc=new OrderDetailSvc(); Pro_order order = orderDetailSvc.getOrder(order_num); ArrayList<OrderView> orderItemList = orderDetailSvc.getItemList(order_num); request.setAttribute("order", order); request.setAttribute("itemList", orderItemList); forward = new ActionForward("/order/myOrderDetail.jsp",false); return forward; }
{ "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
entry point for FX projects
public void start(Stage primaryStage) throws Exception { DependencyGraph dg = DependencyGraph.getGraph(); //Validate out arguments and make sure they are correct _argumentsParser = new KernelParser(this); validateArguments(); _maxThreads = _argumentsParser.getMaxThreads(); //Parse the graph so that our data is ready for use in any point post this line. dg.setFilePath(_argumentsParser.getFilePath()); dg.parse(); //set up statistics ChartModel cModel = new ChartModel(_argumentsParser.getProcessorNo()); _sModel = new StatisticsModel(cModel, _argumentsParser.getFilePath()); _sModel.setStartTime(System.nanoTime()); // run the algorithm Task task = new Task<Void>() { @Override public Void call() { InitialiseScheduling(_sModel); return null; } }; new Thread(task).start(); // renders the visualisation if nessasary if (_argumentsParser.displayVisuals()) { MainScreen mainScreen = new MainScreen(primaryStage, _sModel, this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JFXHelper() {}", "public static void main(String[] args){\n try {\n //wait to initialize toolkit\n final CountDownLatch latch = new CountDownLatch(1);\n SwingUtilities.invokeLater(() -> {\n new JFXPanel(); // initializes JavaFX environment\n ...
[ "0.70533836", "0.6907414", "0.6881334", "0.6725185", "0.6590205", "0.6539847", "0.6531958", "0.6504623", "0.6437745", "0.64285713", "0.6395811", "0.6341422", "0.6301711", "0.6258701", "0.6257357", "0.62425315", "0.62001157", "0.61999434", "0.6199202", "0.6194165", "0.6173718"...
0.0
-1
Starts the seraching part scheduling search of the program and runs the greedy algorithm
public void InitialiseScheduling(StatisticsModel model) { DependencyGraph dg = DependencyGraph.getGraph(); dg.setFilePath(_argumentsParser.getFilePath()); dg.parse(); System.out.println("Calculating schedule, Please wait ..."); // initialise store and thread pool RecursionStore.constructRecursionStoreSingleton(model, _argumentsParser.getProcessorNo(), dg.remainingCosts(), dg.getNodes().size(), _argumentsParser.getMaxThreads()); _pool = Executors.newFixedThreadPool(_argumentsParser.getMaxThreads()); //start greedy search GreedyState greedyState = new GreedyState(dg, this); _pool.execute(greedyState); RecursionStore.setMaxThreads(_maxThreads); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startSearch() {\n if (solving) {\n Alg.Dijkstra();\n }\n pause(); //pause state\n }", "public void pathwayScan() {\n ScanPathwayBasedAssocSwingWorker worker = new ScanPathwayBasedAssocSwingWorker();\n // buildTask = buildTask.create(buildingThread); //...
[ "0.6934275", "0.6712353", "0.66178197", "0.6345083", "0.63307995", "0.6255263", "0.62450826", "0.6202732", "0.61789024", "0.60804904", "0.60699886", "0.6038906", "0.6030994", "0.60247195", "0.5991792", "0.59772485", "0.5942371", "0.5924824", "0.5921419", "0.5881335", "0.58599...
0.6088261
9
method used to generate the entry nodes inside the search
private static State generateInitialState(double initialHeuristic) { ArrayList<List<Job>> jobList = new ArrayList<>(RecursionStore.getNumberOfProcessors()); for (int i = 0; i < RecursionStore.getNumberOfProcessors(); i++) { jobList.add(new ArrayList<>()); } int[] procDur = new int[RecursionStore.getNumberOfProcessors()]; java.util.Arrays.fill(procDur, 0); return new State(jobList, procDur, initialHeuristic, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getEntryNode();", "public void create(Set<Entry<Integer,String>> entries) {\n\t\t//System.out.printf(\"entriesSize %d pageSize %d and entries %s\\n\",entries.size(), pageSize, entries);\n\t\tassert(entries.size() > this.pageSize);\n\t\t\n\t\tMap<Integer,String> entries_map = new TreeMap<Integer,...
[ "0.6505875", "0.6080799", "0.5619027", "0.5496153", "0.5484276", "0.546105", "0.5334312", "0.5328861", "0.5324175", "0.5314083", "0.5296915", "0.5282827", "0.5249363", "0.5241071", "0.5216117", "0.5213232", "0.51951015", "0.5184382", "0.5166576", "0.5161079", "0.51569104", ...
0.0
-1
gets notified when the greedy search is done to start the BFS search
@Override public void handleGreedySearchHasCompleted(State greedyState) { // set up the results from the greedy search to be used for the optimal search List<TaskDependencyNode> freeTasks = DependencyGraph.getGraph().getFreeTasks(null); RecursionStore.processPotentialBestState(greedyState); RecursionStore.pushStateTreeQueue(new StateTreeBranch(generateInitialState(RecursionStore.getBestStateHeuristic()), freeTasks, 0)); PilotRecursiveWorker pilot = new PilotRecursiveWorker(_argumentsParser.getBoostMultiplier(), this); _pool.submit(pilot); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void DFSearch(BFSNode n){\n\t\tn.discovered=true;\r\n\t\tSystem.out.print(\" discovered\");\r\n\t\tn.preProcessNode();\r\n\t\tfor( Integer edg: n.edges){\r\n\t\t\tn.processEdge(edg);\r\n\t\t\tif(!nodes[edg].discovered){\r\n\t\t\t\tnodes[edg].parent = n; \r\n\t\t\t\tnodes[edg].depth = n.depth +1;\r\n\t\t\t\t\r\n\t\...
[ "0.6710282", "0.660853", "0.6584118", "0.6390812", "0.6386616", "0.6314876", "0.6169695", "0.61501795", "0.6129371", "0.61201274", "0.60853386", "0.6072546", "0.6052434", "0.6035116", "0.60273594", "0.59892905", "0.5964245", "0.59449977", "0.5942052", "0.59193826", "0.5913282...
0.6244344
6
Method used to start the parallelisation search after the BFS pilot search is done
@Override public void handlePilotRunHasCompleted() { RecursionStore.publishTotalBranches(); if (RecursionStore.getTaskQueueSize() < _argumentsParser.getBoostMultiplier() * _argumentsParser.getMaxThreads()) { generateOutputAndClose(); return; } this._totalNumberOfStateTreeBranches = RecursionStore.getTaskQueueSize(); while (RecursionStore.getTaskQueueSize() > 0) { _pool.submit(new RecursiveWorker(RecursionStore.pollStateTreeQueue(), this)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startSearch() {\n if (solving) {\n Alg.Dijkstra();\n }\n pause(); //pause state\n }", "@Override\n\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\tif (!verifyStartEndVerticesExist(true, false)) {\n\t\t\t\t\tsetRunning(false);\n\t\t\t\t\treturn null;...
[ "0.70666814", "0.65043414", "0.6439701", "0.6411158", "0.627106", "0.61912984", "0.60644096", "0.59346825", "0.58799505", "0.5831418", "0.5824226", "0.5813188", "0.5730165", "0.5727972", "0.5711247", "0.57037127", "0.5686518", "0.5672986", "0.5672969", "0.5659105", "0.5659105...
0.0
-1
when a thread i finished with a runnable it calls here which waits until all tasks are finished before moving on
@Override public synchronized void handleThreadRecursionHasCompleted() { //ensure that all branches have been explored before writing output this.numberOfBranchesCompleted++; RecursionStore.updateBranchesComplete(this.numberOfBranchesCompleted); if (this.numberOfBranchesCompleted != this._totalNumberOfStateTreeBranches) { return; } // write output file generateOutputAndClose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void taskComplete() {\n mTasksLeft--;\n if ((mTasksLeft==0) & mHasCloRequest){\n onAllTasksCompleted();\n }\n }", "@Override\r\n public void tasksFinished()\r\n {\n }", "private void waitUntilAllThreadsAreFinished() {\n int index...
[ "0.6820668", "0.6724902", "0.6699213", "0.66037637", "0.6515412", "0.6507344", "0.64565456", "0.6453525", "0.6421847", "0.6380551", "0.6358266", "0.6332197", "0.6311128", "0.62931377", "0.6241298", "0.6234097", "0.61857635", "0.61604637", "0.61474895", "0.6139187", "0.6117816...
0.0
-1
used to write and output file and close the program
public void generateOutputAndClose() { try{ Thread.sleep(1000); }catch(Exception e){ } RecursionStore.finishGuiProcessing(); DependencyGraph dg = DependencyGraph.getGraph(); String outputName = _argumentsParser.getOutputFileName(); try { dg.generateOutput(RecursionStore.getBestState(), outputName); System.out.println("Finished"); if(!_argumentsParser.displayVisuals()){ System.exit(0); } } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void close(){\n\t\ttry {\n\t\t\tout.close();\n\t\t\tout = null;\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Problem closing file.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n ...
[ "0.7302034", "0.68853456", "0.6682515", "0.6669816", "0.6619072", "0.6590357", "0.65852153", "0.6539819", "0.6534165", "0.6524611", "0.6478357", "0.64697796", "0.64608544", "0.6457988", "0.6424848", "0.6387869", "0.6355583", "0.6352093", "0.63505495", "0.6315489", "0.63115484...
0.63431096
19
User can pass in any object that needs to be accessed once the NonBlocking Web service call is finished and appropriate method of this CallBack is called.
public ApplicationManagementServiceCallbackHandler(Object clientData){ this.clientData = clientData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}", "public WebserviceCallbackHandler(){\n this.clientData = null;\n }", "public UrbrWSServiceCallbackHandler(){\r\n this.clientData = null;\r\n }", "public ApplicationManagementServiceCallbackHandler(){\n this.clientData = null;...
[ "0.64293367", "0.6402706", "0.61141264", "0.60991734", "0.5992274", "0.5961651", "0.5958644", "0.59452814", "0.5887623", "0.5850609", "0.5829126", "0.57515115", "0.5735806", "0.57271636", "0.5722943", "0.5720711", "0.5714392", "0.5691786", "0.5663979", "0.56305665", "0.563056...
0.55700076
25
Please use this constructor if you don't want to set any clientData
public ApplicationManagementServiceCallbackHandler(){ this.clientData = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cliente() {\n\t\tsuper();\n\t}", "public ClientInformation(){\n clientList = new ArrayList<>();\n\n }", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "private CorrelationClient() { }"...
[ "0.72735673", "0.7223414", "0.7121049", "0.7111579", "0.69877034", "0.6964163", "0.6948256", "0.6853564", "0.6813052", "0.6755133", "0.6686205", "0.66802096", "0.66605365", "0.6640358", "0.66086304", "0.6602788", "0.660179", "0.65879667", "0.6579539", "0.6572639", "0.6559567"...
0.0
-1
Get the client data
public Object getClientData() { return clientData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\n return clientData;\n }", "public Objec...
[ "0.8409291", "0.8409291", "0.8409291", "0.8323055", "0.8323055", "0.8323055", "0.8323055", "0.82401776", "0.81847", "0.74992526", "0.69628304", "0.680502", "0.6677934", "0.6615067", "0.6538602", "0.6524495", "0.64575994", "0.6441616", "0.64179564", "0.63876045", "0.6369232", ...
0.8388037
9
auto generated Axis2 call back method for updateRolesOfUserForApplication method override this method for handling normal response from updateRolesOfUserForApplication operation
public void receiveResultupdateRolesOfUserForApplication( boolean result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void receiveResultchangeUserRoleToAlumni(\r\n net.agef.jobexchange.webservice.tests.util.UserWSStub.ChangeUserRoleToAlumniResponse result\r\n ) {\r\n }", "private void updatesRoles(final UserFormData formData, final Boolean checkAccess) {\n\t\tfinal Acce...
[ "0.6621039", "0.6359524", "0.6253263", "0.6222112", "0.61641985", "0.61042184", "0.60941976", "0.59981287", "0.59886837", "0.59846294", "0.596745", "0.5933401", "0.5884627", "0.5881832", "0.58502066", "0.58097094", "0.5778361", "0.57652944", "0.5736159", "0.5717509", "0.57159...
0.7517459
0
No methods generated for meps other than inout auto generated Axis2 call back method for isApplicationIdAvailable method override this method for handling normal response from isApplicationIdAvailable operation
public void receiveResultisApplicationIdAvailable( boolean result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasUserAppId();", "boolean hasUserAppId();", "boolean hasMachineId();", "public abstract String getApplicationId();", "boolean hasReceiverid();", "boolean hasReceiverID();", "public boolean isSetApplicationInterfaceId() {\n return this.applicationInterfaceId != null;\n }", "public interfa...
[ "0.61283135", "0.61283135", "0.60048056", "0.59695953", "0.59411746", "0.58912694", "0.5836444", "0.5779368", "0.5760786", "0.5748846", "0.5745783", "0.57049537", "0.57007825", "0.57004905", "0.56490713", "0.56490713", "0.56490713", "0.5618914", "0.55997694", "0.5549633", "0....
0.74415475
0
auto generated Axis2 call back method for getUsersOfApplication method override this method for handling normal response from getUsersOfApplication operation
public void receiveResultgetUsersOfApplication( java.lang.String[] result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(path=\"/users\")\r\n\tpublic MappingJacksonValue getAllUsers() {\r\n\t\t\r\n\t\tList<AppUser> appUserList = appUserDaoService.getAllUsers();\r\n\t\t\r\n \t\tMappingJacksonValue mapping = new MappingJacksonValue(appUserList);\r\n \t\tmapping.setFilters(this.filters);\r\n\t\t\r\n\t\treturn mapping;\r\n\t...
[ "0.7020216", "0.68882585", "0.6886287", "0.68119127", "0.6685045", "0.6654859", "0.66070884", "0.65937537", "0.6547971", "0.65090644", "0.6503996", "0.64851165", "0.6468641", "0.6452221", "0.64378893", "0.6436341", "0.640815", "0.63883394", "0.6383617", "0.63767445", "0.63748...
0.66262895
6
auto generated Axis2 call back method for removeUserFromApplication method override this method for handling normal response from removeUserFromApplication operation
public void receiveResultremoveUserFromApplication( boolean result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeUser(\r\n registry.ClientRegistryStub.RemoveUser removeUser2\r\n\r\n ) throws java.rmi.RemoteException\r\n \r\n \r\n {\r\n org.apache.axis2.context.MessageContext _messageContext = null;\r\n\r\n ...
[ "0.71787226", "0.6861053", "0.6691883", "0.6670206", "0.66194415", "0.65360093", "0.65017074", "0.64594924", "0.64548105", "0.6450232", "0.64461434", "0.6385713", "0.6299317", "0.62950474", "0.62596", "0.6237515", "0.62166464", "0.62079215", "0.62074155", "0.6200248", "0.6180...
0.74559563
0
auto generated Axis2 call back method for getUserInfoBean method override this method for handling normal response from getUserInfoBean operation
public void receiveResultgetUserInfoBean( org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void receiveResultgetUserInfo(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean[] result\n ) {\n }", "public abstract void retrieveUserInfo(Call serviceCall, Response serviceResponse, CallContext messageContext);", "public User get...
[ "0.7474514", "0.7191338", "0.68041503", "0.6719458", "0.66366583", "0.65787977", "0.6397098", "0.6288297", "0.6273467", "0.62166595", "0.61874443", "0.61698574", "0.6159541", "0.6158251", "0.61497885", "0.613223", "0.61259204", "0.6125167", "0.61248213", "0.6105546", "0.60873...
0.76970315
0
auto generated Axis2 call back method for addUserToApplication method override this method for handling normal response from addUserToApplication operation
public void receiveResultaddUserToApplication( boolean result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ResponseMessage addUser(User user);", "public registry.ClientRegistryStub.AddUserResponse addUser(\r\n\r\n registry.ClientRegistryStub.AddUser addUser4)\r\n \r\n\r\n throws java.rmi.RemoteException\r\n \r\n ...
[ "0.6913729", "0.6741313", "0.6601715", "0.6597518", "0.65712035", "0.6524673", "0.6523746", "0.6497743", "0.63365346", "0.6320545", "0.62902844", "0.62418354", "0.6236004", "0.6181963", "0.61812824", "0.61458296", "0.6108935", "0.60738236", "0.6067333", "0.6056691", "0.604017...
0.66223127
2
auto generated Axis2 call back method for revokeApplication method override this method for handling normal response from revokeApplication operation
public void receiveResultrevokeApplication( boolean result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void revoke();", "public void unregisterApplication(String internalAppId){\n\t\tString webServiceUrl = serviceProfile.getServiceApiUrl()+\"/\"+internalAppId;\n\t\tlogger.info(\"unregistering application \"+ webServiceUrl);\n\t\t\n\t\tResponseEntity<Void> response = restTemplate.exchange(webServiceUrl, Htt...
[ "0.63364875", "0.6315036", "0.5933555", "0.5933555", "0.58193266", "0.5788248", "0.5725027", "0.5663411", "0.5585721", "0.5471804", "0.541385", "0.53974193", "0.53628427", "0.5293989", "0.5280218", "0.5275415", "0.5271749", "0.5247997", "0.5222019", "0.51849526", "0.5159552",...
0.7532598
0
No methods generated for meps other than inout auto generated Axis2 call back method for getUserInfo method override this method for handling normal response from getUserInfo operation
public void receiveResultgetUserInfo( org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean[] result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void retrieveUserInfo(Call serviceCall, Response serviceResponse, CallContext messageContext);", "private void getUserInfo() {\n\t}", "public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ...
[ "0.74189", "0.72006816", "0.7159104", "0.7090944", "0.6857232", "0.66970164", "0.65660256", "0.6561986", "0.65452456", "0.65054244", "0.6457347", "0.63852185", "0.63780785", "0.63683254", "0.63313735", "0.63309777", "0.63153577", "0.63013214", "0.62838197", "0.6277421", "0.62...
0.7169502
2
auto generated Axis2 call back method for getAllApplications method override this method for handling normal response from getAllApplications operation
public void receiveResultgetAllApplications( java.lang.String[] result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GetApplicationListResponse getApplicationList() {\n\n Iterable<ApplicationEntity> result = applicationRepository.findAll();\n\n GetApplicationListResponse response = new GetApplicationListResponse();\n\n for (Iterator<ApplicationEntity> iterator = result.iterator(); iterator.hasNext(); ...
[ "0.7318431", "0.654997", "0.6504146", "0.6483494", "0.6448689", "0.64410055", "0.6366315", "0.63588953", "0.6278425", "0.62170565", "0.61827755", "0.6182205", "0.6156821", "0.6101345", "0.60493374", "0.6048689", "0.60118234", "0.6009837", "0.5997051", "0.5995029", "0.593075",...
0.6678776
1
auto generated Axis2 call back method for getRolesOfUserPerApplication method override this method for handling normal response from getRolesOfUserPerApplication operation
public void receiveResultgetRolesOfUserPerApplication( java.lang.String[] result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<SysRole> getUserRoles(int userId);", "public abstract Collection getRoles();", "@RequestMapping(value = \"/admin/getRoles\", method = RequestMethod.GET)\n\tpublic @ResponseBody Response getRoles() {\n\t \tResponse response = new Response();\n\t\tresponse.addCommand(new ClientCommand(ClientCommandType.PROP...
[ "0.7241956", "0.7134134", "0.7076446", "0.7000447", "0.6978888", "0.6977522", "0.6886283", "0.6873245", "0.68604195", "0.6852287", "0.6834932", "0.68121547", "0.67946523", "0.6786913", "0.67003435", "0.6696075", "0.6657384", "0.66557604", "0.6648654", "0.6648654", "0.6642276"...
0.7213912
1
nomor 02 au sg ku = aku sayang kamu
public static void Print02(){ Scanner input = new Scanner(System.in); System.out.println("2. MASUKKAN KALIMAT/KATA : "); String inputString = input.nextLine(); String[] inputArray = inputString.split( " "); for(String text : inputArray) { char[] charArray = text.toCharArray(); for (int i = 0; i < charArray.length; i++) { if(i == 0 || i == text.length() - 1 ) { System.out.print(charArray[i]); } else if (i == text.length() / 2) { System.out.print("***"); } else { System.out.print(""); } } System.out.print(" "); } System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase...
[ "0.6360104", "0.62655544", "0.62453884", "0.62290865", "0.6207467", "0.6078845", "0.60677695", "0.60533905", "0.6029665", "0.60179764", "0.59841514", "0.5982478", "0.5961811", "0.59303296", "0.5908573", "0.58899516", "0.58770686", "0.5834924", "0.58335817", "0.58146906", "0.5...
0.0
-1
nomor 03 ua gs uk = aku sayang kamu string di java menggunaka equals()
public static void Print03(){ Scanner input = new Scanner(System.in); String resultt; System.out.println("3. MASUKKAN KALIMAT/KATA : "); String inputString = input.nextLine(); String[] inputArray = inputString.split( " "); for(String text : inputArray) { char[] charArray = text.toCharArray(); //resultt = charArray[charArray.length - 1] + "*" + charArray[0]; for (int i = 0; i < charArray.length ; i++) { if(i == 0){ System.out.print(charArray[charArray.length - 1]); } else if (i == text.length() - 1) { System.out.print(charArray[0]); } else if (i == text.length() / 2){ System.out.print("*"); } else { System.out.print(""); } } System.out.print(" "); } System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean equals(String that);", "public boolean equals(Object anObject) {\n/* 205 */ return this.m_str.equals(anObject);\n/* */ }", "public boolean equals(String obj2) {\n/* 168 */ return this.m_str.equals(obj2);\n/* */ }", "String getEqual();", "private static boolean equalityTes...
[ "0.7412281", "0.7091073", "0.69584084", "0.6954984", "0.69121486", "0.6902599", "0.67455864", "0.6742425", "0.6724186", "0.66883075", "0.66879046", "0.66711766", "0.66343576", "0.66252846", "0.65993774", "0.65952605", "0.659484", "0.65945435", "0.65878266", "0.65743893", "0.6...
0.0
-1
nomor 04 au aag km = aku sayang kamu
public static void Print04(){ Scanner input = new Scanner(System.in); System.out.println(" 4 . MASUKKAN KALIMAT/KATA : "); String inputString = input.nextLine(); String[] inputArray = inputString.split( " "); for (int i = 0; i < inputArray.length; i++) { char[] charArray = inputArray[i].toCharArray(); if(i % 2 == 0 ){ for (int j = 0; j < charArray.length; j++) { if( j % 2 == 0) { System.out.print(charArray[j]); } else { System.out.print("*"); } } } else { for (int j = 0; j < charArray.length; j++) { if(j % 2 == 0) { System.out.print("*"); } else { System.out.print(charArray[j]); } } } System.out.print(" "); } System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "bdm mo1784a(akh akh);", "dkj mo4367a(dkk dkk);", "private static int num_konsonan(String word) {\n int i;\n int jumlah_konsonan = 0;\n\n for (i = 0; i < word.length(); i++) {\n if (word.charAt(i) != 'a' &&\n word.charAt(i) != 'i' &&\n word.c...
[ "0.6399964", "0.6343343", "0.6190698", "0.6112435", "0.6066146", "0.6043292", "0.6033035", "0.59747916", "0.5953352", "0.5917735", "0.5887479", "0.58400434", "0.5838251", "0.583793", "0.5834732", "0.5825054", "0.5821506", "0.5811415", "0.58079624", "0.5807657", "0.58012044", ...
0.0
-1
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { this.mc.getTextureManager().bindTexture(FURNACE_GUI_TEXTURES); int i = this.guiLeft; int j = this.guiTop; this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize); int cookProgressScaled = this.getCookProgressScaled(17); this.drawTexturedModalRect(i + 79, j + 34+1, 176, 0, 24, cookProgressScaled); boolean isBurning = TileEntityCoalGrinder.isBurning(this.tileInventory); int burnTime = tileInventory.getField(0); int currentItemBurnTime = tileInventory.getField(1); ((BurnComponent)getComponent(0)).update(isBurning,burnTime,currentItemBurnTime); super.drawGuiContainerBackgroundLayer(partialTicks,mouseX,mouseY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void render() {\n Gdx.gl.glClearColor(0f, 0f, 0f, 1f);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n Gdx.gl.glDisable(GL20.GL_BLEND);\n }", "public void initialize()\r\n\t{\r\n\t\tgl.glClearColor(0.0F, 0.0F, 0.0F, 1.0F);\r\n\t\t// initialize blending for transparency...
[ "0.6695245", "0.65368754", "0.6480789", "0.6468939", "0.6412345", "0.6399731", "0.6343636", "0.6302319", "0.629676", "0.62611383", "0.6240732", "0.6229227", "0.62147856", "0.6149092", "0.6133413", "0.6127505", "0.61145735", "0.6108527", "0.6078809", "0.6076648", "0.60631174",...
0.0
-1
Called when the mouse is clicked over a slot or outside the gui.
protected void handleMouseClick(Slot slotIn, int slotId, int mouseButton, ClickType type) { super.handleMouseClick(slotIn, slotId, mouseButton, type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent event){}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(M...
[ "0.73446083", "0.73446083", "0.73446083", "0.73446083", "0.732395", "0.7265259", "0.7265259", "0.7265259", "0.7264983", "0.72622776", "0.725898", "0.725898", "0.7258599", "0.72580844", "0.72580844", "0.7241013", "0.7239811", "0.7239811", "0.7239025", "0.7239025", "0.72382724"...
0.7129217
90
Called when the screen is unloaded. Used to disable keyboard repeat events
public void onGuiClosed() { super.onGuiClosed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onGuiClosed()\n {\n Keyboard.enableRepeatEvents(false);\n }", "@Override\r\n\tpublic void windowDeiconified(WindowEvent e) {\n\t\tsetFocusableWindowState(false);\r\n\t}", "public void onGuiClosed()\n {\n Keyboard.enableRepeatEvents(false);\n mc.ingameGUI.func_50014_d()...
[ "0.74616814", "0.6707875", "0.66940415", "0.6691831", "0.66381574", "0.6630021", "0.6630021", "0.6630021", "0.6630021", "0.6630021", "0.6630021", "0.6630021", "0.6630021", "0.66163933", "0.66163933", "0.6597845", "0.65846044", "0.6582994", "0.6582994", "0.6582994", "0.6582994...
0.0
-1
Creates new form CONTACT
public CONTACT() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void AddContact(View view){\n Utils.Route_Start(ListContact.this,Contato.class);\n // Notificar, para atualizar a lista.\n\n }", "@GetMapping(\"/add-contact\")\n\tpublic String openAddContactForm(Model model) {\n\t\tmodel.addAttribute(\"title\",\"Add Contact\");\n\t\tmodel.addAttribute(\"...
[ "0.645839", "0.6285514", "0.6096024", "0.6073635", "0.6023769", "0.59552425", "0.58283144", "0.57625884", "0.568371", "0.5668501", "0.56421804", "0.56119686", "0.56084514", "0.5590929", "0.5581542", "0.55486786", "0.55475724", "0.55403715", "0.5537982", "0.55370486", "0.55238...
0.68127173
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); s = new javax.swing.JButton(); s1 = new javax.swing.JButton(); s2 = new javax.swing.JButton(); s3 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setFont(new java.awt.Font("Algerian", 1, 30)); // NOI18N jLabel1.setForeground(new java.awt.Color(51, 9, 38)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("HAPPY-TO-GO CABS"); jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel2.setText("HANDMADE BY:"); jLabel7.setIcon(new javax.swing.ImageIcon("E:\\L Logo_full.jpeg")); // NOI18N s.setBackground(new java.awt.Color(204, 204, 204)); s.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N s.setText("Suvansh Bhargava"); s.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sActionPerformed(evt); } }); s1.setBackground(new java.awt.Color(204, 204, 204)); s1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N s1.setText("Shrey Bhargava"); s1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { s1ActionPerformed(evt); } }); s2.setBackground(new java.awt.Color(204, 204, 204)); s2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N s2.setText("Roll no 44"); s2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { s2ActionPerformed(evt); } }); s3.setBackground(new java.awt.Color(204, 204, 204)); s3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N s3.setText("Roll no 39"); s3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { s3ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(69, 69, 69) .addComponent(jLabel2)) .addGroup(layout.createSequentialGroup() .addGap(99, 99, 99) .addComponent(jLabel7)) .addGroup(layout.createSequentialGroup() .addGap(144, 144, 144) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(s, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(s1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(129, 129, 129) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(s2) .addComponent(s3)))))) .addContainerGap(84, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jLabel2) .addGap(17, 17, 17) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(s) .addComponent(s2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(s1) .addComponent(s3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 366, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(45, 45, 45)) ); 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.73206544", "0.7291311", "0.7291311", "0.7291311", "0.7286492", "0.7249181", "0.7213362", "0.72085494", "0.71965617", "0.7190475", "0.7184897", "0.7159234", "0.71483016", "0.7094075", "0.7081491", "0.70579433", "0.6987627", "0.69776064", "0.69552463", "0.69549114", "0.69453...
0.0
-1
Given two integers a and b, which can be positive or negative,find the sum of all the numbers between including them too and return it. If the two numbers are equal return //a or b. sumInBetween(1, 0) == 1 // 1 + 0 = 1 sumInBetween(1, 2) == 3 // 1 + 2 = 3 sumInBetween(0, 1) == 1 // 0 + 1 = 1 sumInBetween(1, 1) == 1 // 1 Since both are same sumInBetween(1, 0) == 1 // 1 + 0 = 1 sumInBetween(1, 2) == 2 // 1 + 0 + 1 + 2 = 2
public static void main(String[] args) { System.out.println(sumInBetween(-4, 4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int sumBetween(int a, int b) {\n // find the larger and the smaller of a and b\n// int max = (a > b) ? a : b;\n// int min = (a < b) ? a : b;\n int max;\n int min;\n if (a < b) {\n max = b;\n min = a;\n } else {\n min = ...
[ "0.8495143", "0.7939661", "0.75125587", "0.7495433", "0.7210866", "0.6883402", "0.6631101", "0.6622922", "0.66164505", "0.6604103", "0.6591505", "0.65839064", "0.6567943", "0.65572625", "0.6506436", "0.64337057", "0.63715595", "0.637131", "0.6352123", "0.635092", "0.632247", ...
0.5205021
88
Create role permissions table.
private void createRolePermissionsTableIfNotExist() { Connection conn = null; PreparedStatement ps = null; String query = null; try { conn = getConnection(); conn.setAutoCommit(false); query = queryManager.getQuery(conn, QueryManager.CREATE_ROLE_PERMISSIONS_TABLE_QUERY); ps = conn.prepareStatement(query); ps.executeUpdate(); conn.commit(); } catch (SQLException e) { log.debug("Failed to execute SQL query {}", query); throw new PermissionException("Unable to create the '" + QueryManager.ROLE_PERMISSIONS_TABLE + "' table.", e); } finally { closeConnection(conn, ps, null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createTableRoles() {\n try (Statement statement = connection.createStatement()) {\n statement.executeUpdate(\"CREATE TABLE roles ( \" +\n \"id INT NOT NULL PRIMARY KEY,\"\n + \"roleName VARCHAR(256) NOT NULL)\");\n statement.executeUpd...
[ "0.7058806", "0.66056204", "0.6069788", "0.596008", "0.58126265", "0.5732703", "0.57211643", "0.5665538", "0.5648487", "0.5615635", "0.55145735", "0.54855394", "0.54620343", "0.5400088", "0.5390452", "0.53819865", "0.53775537", "0.53465724", "0.529608", "0.52748907", "0.52744...
0.76440316
0
Method for checking whether or not the given table (which reflects the current event table instance) exists.
private boolean tableExists(String tableName) { Connection conn = null; PreparedStatement stmt = null; String query = null; ResultSet rs = null; try { conn = getConnection(); query = queryManager.getQuery(conn, QueryManager.TABLE_CHECK_QUERY); stmt = conn.prepareStatement(query.replace(QueryManager.TABLE_NAME_PLACEHOLDER, tableName)); rs = stmt.executeQuery(); return true; } catch (SQLException e) { log.debug("Table '{}' assumed to not exist since its existence check query {} resulted " + "in exception {}.", tableName, query, e.getMessage()); return false; } finally { closeConnection(conn, stmt, rs); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean tableExists(String pTableName)\n {\n \t// Busca en el esquema la existencia de la tabla.\n \treturn true;\n }", "private boolean tableExists(String table) throws SQLException {\n if (HAVE_DB) {\n Connection con = DriverManager.getConnection(dbConnection, dbUser, dbPass);\n ...
[ "0.73365533", "0.720593", "0.7185578", "0.71139085", "0.7083092", "0.7020358", "0.7009506", "0.69878584", "0.69465315", "0.6911897", "0.68261564", "0.66867185", "0.6684499", "0.66025996", "0.6523332", "0.6454062", "0.6443161", "0.64394253", "0.64342785", "0.6406797", "0.63774...
0.72229415
1
Check Permission already there.
public boolean isPermissionExists(Permission permission) { boolean hasPermission = false; Connection conn = null; PreparedStatement ps = null; ResultSet resultSet = null; String query = null; try { conn = getConnection(); query = queryManager.getQuery(conn, QueryManager.CHECK_PERMISSION_EXISTS_QUERY); ps = conn.prepareStatement(query); ps.setString(1, permission.getAppName()); ps.setString(2, permission.getPermissionString()); resultSet = ps.executeQuery(); while (resultSet.next()) { hasPermission = true; } } catch (SQLException e) { log.debug("Failed to execute SQL query {}", query); throw new PermissionException("Unable to execute check permissions.", e); } finally { closeConnection(conn, ps, resultSet); } return hasPermission; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkPermission(Permission permission);", "@Test\n public void testCheckExistsPermission() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExi...
[ "0.7692452", "0.76228774", "0.7537249", "0.74503344", "0.7403689", "0.73525274", "0.7318532", "0.72506285", "0.7237546", "0.72272104", "0.7207047", "0.7146865", "0.71310425", "0.7111127", "0.71055603", "0.70817965", "0.7069999", "0.70643574", "0.70521456", "0.7035114", "0.701...
0.0
-1