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 |
|---|---|---|---|---|---|---|
TODO Autogenerated method stub | @Override
public boolean canInteractWith(EntityPlayer playerIn) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
System.out.println("Slot clicked:" + slotId); | @Override
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player)
{
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void click(int slot, ClickType type);",
"public void selectSlot() {\n\t\t\r\n\t}",
"@Override\n public void e_on_mouse_click(EMouseClick e){\n NE_GUI_QuickslotBar.active_slot = id;\n Player.get_player_ent().set_active_item(item); //set player item and update data\n }",
"pu... | [
"0.7076547",
"0.68751264",
"0.65290654",
"0.65074325",
"0.65074325",
"0.64680415",
"0.6424643",
"0.63460326",
"0.63346654",
"0.63314444",
"0.6303013",
"0.6190447",
"0.6181392",
"0.6103679",
"0.6092632",
"0.6011367",
"0.59798217",
"0.5969911",
"0.59383327",
"0.59079",
"0.58977... | 0.5939367 | 18 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_gallery, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.7905683",
"0.7805918",
"0.7766949",
"0.77280927",
"0.76328415",
"0.76229936",
"0.7585238",
"0.75312966",
"0.7488599",
"0.7458191",
"0.7458191",
"0.74387765",
"0.74228644",
"0.7403772",
"0.7392029",
"0.7387223",
"0.73796284",
"0.73707056",
"0.7362735",
"0.7356231",
"0.73459... | 0.0 | -1 |
Open your local db as the input stream | private void copyDataBase() throws IOException {
InputStream myInput = myContext.getAssets().open("db/" + DB_NAME);
// Path to the just created empty db
String outFileName = DB_PATH + DB_NAME;
// Open the empty db as the output stream
OutputStream myOutput = new FileOutputStream(outFileName);
// transfer bytes from the inputfile to the outputfile
byte[] buffer = new byte[1024];
int length;
while ((length = myInput.read(buffer)) > 0) {
myOutput.write(buffer, 0, length);
}
// Close the streams
myOutput.flush();
myOutput.close();
myInput.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public File getInputDb();",
"private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\n... | [
"0.6653542",
"0.6627006",
"0.6245373",
"0.61839867",
"0.6142275",
"0.6101584",
"0.60835016",
"0.6078054",
"0.6069067",
"0.6023752",
"0.59847206",
"0.5955093",
"0.5949633",
"0.59181404",
"0.5912812",
"0.5895137",
"0.5891108",
"0.5891108",
"0.5891108",
"0.5891108",
"0.5891108",... | 0.5747978 | 28 |
This interface defines the behavior of a request. | public interface Request {
/**
* This method executes the request.
* @return a responseEntity containing the reponse (status and body).
*/
ResponseEntity execute();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Request {\n}",
"public interface IRequest {\n\t/**\n\t * This method creates request based on operationType and parameter object.\n\t * @param opType operation type of the request to be created.\n\t * @param params List of parameters to be sent along with the request.\n\t */\n\tvoid createReques... | [
"0.7582979",
"0.7453104",
"0.73237133",
"0.7310739",
"0.7184987",
"0.7171724",
"0.7169671",
"0.7140607",
"0.7140131",
"0.699627",
"0.69751287",
"0.69429946",
"0.69412017",
"0.69257766",
"0.6877153",
"0.68151015",
"0.68151015",
"0.68014574",
"0.67875123",
"0.67664397",
"0.6764... | 0.712688 | 9 |
This method executes the request. | ResponseEntity execute(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Api(1.1)\n public Response execute() throws HaloNetException {\n return mBuilder.mClient.request(mRequest);\n }",
"public void execute() {\n //this.$context.$Request.initialize();\n this.$context.$Request.extractAllVars();\n\n this.$context.$Response.writeHeader(\"Content-type\... | [
"0.73354125",
"0.712409",
"0.71179986",
"0.6925789",
"0.6707965",
"0.6675402",
"0.66216755",
"0.65860784",
"0.6576619",
"0.6572785",
"0.6511495",
"0.64992404",
"0.6438124",
"0.6434313",
"0.6430254",
"0.64111304",
"0.64111304",
"0.6399396",
"0.63909453",
"0.6386148",
"0.635574... | 0.62279344 | 29 |
Walk over android_project records checking if the folder exists in the most updated version. | public static void main(String[] args) throws IOException, SQLException {
// boilerplate
sourceDB = AndroidDBManager.getProductionInstance();
analysisDB = AndroidDBManager.getAnalysisInstance();
BufferedWriter resFile = new BufferedWriter(new FileWriter(new File("commits.csv")));
// get the list of committers first
List<AnalysisPeople> committers = analysisDB.getPeopleForTheTag("change");
System.out.println("will process " + committers.size() + " people records");
for (AnalysisPeople p : committers) {
System.out.println(p.getEmail() + " start: " + p.getActivity_begin() + ", end: "
+ p.getActivity_end());
List<Change> changes = sourceDB.getAuthorChanges(p.getId(), p.getActivity_begin(),
p.getActivity_end());
System.out.println(" .. " + changes.size() + " change(s) found.");
for (Change c : changes) {
StringBuilder csvLine = new StringBuilder();
StringBuilder sbTemp = new StringBuilder();
// date/author/project/target/commits
sbTemp.append(c.getAuthor_date()).append(COMMA);
sbTemp.append("\"").append(p.getEmail()).append("\"").append(COMMA);
sbTemp.append(sourceDB.getProject(c.getProject_id()).getName()).append(COMMA);
for (ChangeTarget target : sourceDB.getTargets(c.getId())) {
csvLine.append(sbTemp.toString()).append("\"").append(target.getTarget()).append("\"")
.append(COMMA);
csvLine.append(target.isAdded()).append(COMMA);
csvLine.append(target.isEdited()).append(COMMA);
csvLine.append(target.isDeleted()).append(COMMA).append(CR);
resFile.write(csvLine.toString());
}
}
resFile.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean updateToNewestPlayableFolder() {\n if (context == null || context.get() == null)\n return false;\n\n int newestLocalFolderID = 0;\n\n File baseFolder = context.get().getFilesDir();\n\n // Check if it actually exist ... and is a directory\n if (baseFolder... | [
"0.6087425",
"0.5755045",
"0.53029656",
"0.5158274",
"0.51322085",
"0.51203537",
"0.50675327",
"0.49836674",
"0.49417755",
"0.48874664",
"0.48687524",
"0.48671827",
"0.48516887",
"0.4844617",
"0.4812545",
"0.4793373",
"0.47908172",
"0.4790713",
"0.4751506",
"0.47253817",
"0.4... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
if user pressed "yes", then he is allowed to exit from application | @Override
public void onClick(DialogInterface dialog, int which) {
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void toExit() {\n int sure=JOptionPane.showConfirmDialog(rootPane,\"Are you sure to Exit?\");\n if(sure==JOptionPane.YES_OPTION)\n { \n System.exit(0);\n } \n }",
"public void handleExit(){\n if(JOptionPane.showConfirmDialog(null,\"Do you re... | [
"0.7914904",
"0.7714544",
"0.7712094",
"0.75580984",
"0.7497774",
"0.745401",
"0.74384165",
"0.74268115",
"0.74041486",
"0.72698885",
"0.7252469",
"0.7225219",
"0.7222492",
"0.7204468",
"0.7185231",
"0.7166033",
"0.71588975",
"0.71574736",
"0.7131493",
"0.7116581",
"0.7109669... | 0.0 | -1 |
if user select "No", just cancel this dialog and continue with app | @Override
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void onClick(View v) {\r\n\t\tif (v == okButton){\r\n\t\t\tif(dontShow.isChecked()){\r\n\t\t\tAlertDialog builder2 = new AlertDialog.Builder(this.parentcontext)\r\n .setTitle(\"Confirmation\")\r\n .setMessage(\"Are you sure about disabling instruction from next use\")\r\... | [
"0.7229107",
"0.71484065",
"0.71165067",
"0.70617473",
"0.6946947",
"0.6871789",
"0.68129647",
"0.6806153",
"0.6745536",
"0.6737131",
"0.67354494",
"0.6727054",
"0.6691791",
"0.6674181",
"0.66584647",
"0.6656473",
"0.6652007",
"0.66472435",
"0.66457283",
"0.6642379",
"0.66329... | 0.64921904 | 47 |
Adds the given document to the inMemoryIndex. | public void addDocument(IDocument document) {
if (indexedFile == null) {
indexedFile= index.addDocument(document);
} else {
throw new IllegalStateException(); } } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void add(Document document) {\n document.setIsAllocated();\n documents.add(document);\n }",
"public void addDocument(TokenizedDocument document) {\n\t\t\n\t\ttry {\n\t\t\tindexWriter.addDocument(createDocument(document),myAnalyzer);\n\t\t} catch (CorruptIndexException e) {\n\t\t\t// TODO Auto-gener... | [
"0.70805234",
"0.6852206",
"0.6481011",
"0.61398065",
"0.60922873",
"0.6081849",
"0.602486",
"0.59921134",
"0.59417915",
"0.59306496",
"0.59217274",
"0.58825904",
"0.5869263",
"0.58684295",
"0.5854235",
"0.5854235",
"0.5854235",
"0.5854235",
"0.5854235",
"0.5854235",
"0.58304... | 0.7333622 | 0 |
Adds a reference to the given word to the inMemoryIndex. | public void addRef(char[] word) {
if (indexedFile == null) {
throw new IllegalStateException(); }
index.addRef(indexedFile, word); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addRef(String word) {\n addRef(word.toCharArray()); }",
"public void add(String word) {\n if (hashTable.contains(word)) {\n hashTable.put(word, hashTable.get(word) + 1);\n }\n else {\n hashTable.put(word,1);\n }\n }",
"public void add... | [
"0.7530692",
"0.6776861",
"0.66748405",
"0.64100444",
"0.6404593",
"0.62773633",
"0.61695486",
"0.6124147",
"0.6001889",
"0.59881115",
"0.59714067",
"0.5971194",
"0.59468955",
"0.5936284",
"0.59347075",
"0.59260786",
"0.5925181",
"0.59191316",
"0.58969194",
"0.5888828",
"0.58... | 0.8181881 | 0 |
Adds a reference to the given word to the inMemoryIndex. | public void addRef(String word) {
addRef(word.toCharArray()); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addRef(char[] word) {\n if (indexedFile == null) {\n throw new IllegalStateException(); }\n index.addRef(indexedFile, word); }",
"public void add(String word) {\n if (hashTable.contains(word)) {\n hashTable.put(word, hashTable.get(word) + 1);... | [
"0.8181881",
"0.6776861",
"0.66748405",
"0.64100444",
"0.6404593",
"0.62773633",
"0.61695486",
"0.6124147",
"0.6001889",
"0.59881115",
"0.59714067",
"0.5971194",
"0.59468955",
"0.5936284",
"0.59347075",
"0.59260786",
"0.5925181",
"0.59191316",
"0.58969194",
"0.5888828",
"0.58... | 0.7530692 | 1 |
after login make user onlion | private void MakemeOnlion() {
progressDialog.setMessage("Checking user....");
Map<String,Object>map=new HashMap<>();
map.put("onlion","true");
//update value to db
DatabaseReference databaseReference= FirebaseDatabase.getInstance().getReference("Users");
databaseReference.child(firebaseAuth.getCurrentUser().getUid()).updateChildren(map).addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
CheckuserType();
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
progressDialog.dismiss();
Toast.makeText(Login_Activity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void makeLogin() {\n if (enableLoginActivity && mAuth.getCurrentUser() == null) {\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\n finish();\n }\n else if (!enableLoginActivity) {\n user = new User(\"johnDoe\", \"johnDoe@gmail.com\... | [
"0.6986644",
"0.6762349",
"0.6675799",
"0.66083467",
"0.659999",
"0.6590564",
"0.65050745",
"0.64693606",
"0.6458959",
"0.6456059",
"0.6442215",
"0.6403571",
"0.63922775",
"0.63847995",
"0.635678",
"0.63240457",
"0.6303032",
"0.62910277",
"0.62836546",
"0.62798333",
"0.626823... | 0.0 | -1 |
if user is seller start seller main activity if user is buyer start buyer main activity | private void CheckuserType() {
DatabaseReference databaseReference=FirebaseDatabase.getInstance().getReference("Users");
databaseReference.orderByChild("uuid").equalTo(firebaseAuth.getCurrentUser().getUid())
.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot ds:dataSnapshot.getChildren()){
String accountType=""+ds.child("accountType").getValue();
if (accountType.equals("Seller")){
progressDialog.dismiss();
// user is seller
Intent intent=new Intent(Login_Activity.this,MainSeller_Activity.class);
startActivity(intent);
finish();
}else{
if (accountType.equals("User")){
progressDialog.dismiss();
// user is buyer
Intent intent=new Intent(Login_Activity.this,MainUser_Activity.class);
startActivity(intent);
finish();
}
}
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.buyer_role) {\n\n Intent intent = new Intent(Home_buyer.this, Home_buyer.class);\n startActivity(intent);\n ... | [
"0.6856206",
"0.62837327",
"0.60645264",
"0.6039911",
"0.6030392",
"0.60088044",
"0.5988026",
"0.5970927",
"0.59500825",
"0.59081274",
"0.5837043",
"0.58058935",
"0.5804391",
"0.5798641",
"0.5790425",
"0.5772333",
"0.57688475",
"0.5764892",
"0.57422256",
"0.5706174",
"0.57027... | 0.55842215 | 39 |
Creates new form FormPrincipal | public FormPrincipal(String privilegio) {
initComponents();
// jTextFieldPreco.setText("0.0");
// System.out.println(Float.valueOf(""));
if (privilegio.equals("administrador") == false) {
jButtonNovoUsuario.setEnabled(false);
jButtonRemover.setEnabled(false);
}
atualizarLinhas();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public formPrincipal() {\n initComponents();\n }",
"public frmPrincipal() {\n initComponents(); \n inicializar();\n \n }",
"public frmPrincipal() {\n initComponents();\n }",
"public JfrmPrincipal() {\n initComponents();\n }",
"@Override\n\tpublic Pane g... | [
"0.670041",
"0.66526353",
"0.6361644",
"0.62750965",
"0.6229217",
"0.6096396",
"0.6068351",
"0.6065766",
"0.59746057",
"0.59393835",
"0.59147257",
"0.59107363",
"0.5837075",
"0.58362895",
"0.58176535",
"0.5810036",
"0.5807721",
"0.5805552",
"0.5796943",
"0.57821804",
"0.57549... | 0.506571 | 95 |
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() {
jTextFieldID = new javax.swing.JTextField();
jTextFieldNome = new javax.swing.JTextField();
jButtonCadastrar = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jButtonListar = new javax.swing.JButton();
jButtonRemover = new javax.swing.JButton();
jButtonNovoUsuario = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jTextFieldDescricao = new javax.swing.JTextField();
jLabeID = new javax.swing.JLabel();
jTextFieldPreco = new javax.swing.JTextField();
jButtonConsultar = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
jButtonAuditoria = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Controle De Estoque - Copyright © ®");
setLocation(new java.awt.Point(300, 50));
jTextFieldID.setEnabled(false);
jTextFieldNome.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
jTextFieldNomeFocusLost(evt);
}
});
jTextFieldNome.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
jTextFieldNomeKeyPressed(evt);
}
});
jButtonCadastrar.setText("Cadastrar");
jButtonCadastrar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonCadastrarActionPerformed(evt);
}
});
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"ID", "Nome", "Preço", "Quantidade", "Descrição"
}
) {
boolean[] canEdit = new boolean [] {
false, false, false, false, false
};
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jTable1MouseClicked(evt);
}
});
jScrollPane1.setViewportView(jTable1);
jButtonListar.setText("Limpar");
jButtonListar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonLimparActionPerformed(evt);
}
});
jButtonRemover.setText("Remover");
jButtonRemover.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonRemoverActionPerformed(evt);
}
});
jButtonNovoUsuario.setText("Novo usuário");
jButtonNovoUsuario.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonNovoUsuarioActionPerformed(evt);
}
});
jLabel1.setText("Preço:");
jLabel2.setText("Nome:");
jLabel3.setText("Descrição:");
jTextFieldDescricao.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
jTextFieldDescricaoFocusLost(evt);
}
});
jTextFieldDescricao.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
jTextFieldDescricaoKeyPressed(evt);
}
});
jLabeID.setText("ID:");
jTextFieldPreco.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextFieldPrecoActionPerformed(evt);
}
});
jTextFieldPreco.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
jTextFieldPrecoKeyPressed(evt);
}
});
jButtonConsultar.setText("Consultar");
jButtonConsultar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonConsultarActionPerformed(evt);
}
});
jButton1.setText("Logoff");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButtonAuditoria.setText("Auditoria");
jButtonAuditoria.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonAuditoriaActionPerformed(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()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jButtonAuditoria)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButtonNovoUsuario)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jLabel2)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabeID)
.addGap(35, 35, 35))
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)))
.addGap(14, 14, 14)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jTextFieldID, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextFieldNome)
.addComponent(jTextFieldDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextFieldPreco, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButtonConsultar))
.addGroup(layout.createSequentialGroup()
.addComponent(jButtonCadastrar)
.addGap(222, 222, 222)
.addComponent(jButtonRemover)))
.addGap(224, 224, 224)
.addComponent(jButtonListar, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(26, 26, 26)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabeID)
.addComponent(jTextFieldID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextFieldNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2)
.addComponent(jButtonConsultar))
.addGap(6, 6, 6)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(jTextFieldDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(jTextFieldPreco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButtonCadastrar)
.addComponent(jButtonListar)
.addComponent(jButtonRemover))
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(24, 24, 24)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButtonNovoUsuario)
.addComponent(jButton1)
.addComponent(jButtonAuditoria))
.addContainerGap())
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73185146",
"0.7290127",
"0.7290127",
"0.7290127",
"0.7285798",
"0.7247533",
"0.7214021",
"0.720785",
"0.71952385",
"0.71891224",
"0.7184117",
"0.7158779",
"0.7147133",
"0.70921415",
"0.70792264",
"0.7055538",
"0.6986984",
"0.6976409",
"0.6955238",
"0.69525516",
"0.69452786... | 0.0 | -1 |
End of variables declaration//GENEND:variables | private void clearFields() {
jTextFieldID.setText("");
jTextFieldNome.setText("");
jTextFieldPreco.setText("");
jTextFieldDescricao.setText("");
} | {
"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 |
Log.i("FRIEND", " " + friend.getId()); | @Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:" + friend.getPhoneNo()));
context.startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getFriendId();",
"java.lang.String getFriendId();",
"public java.lang.String getFriendId() {\n java.lang.Object ref = friendId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ... | [
"0.74669397",
"0.74669397",
"0.66174734",
"0.6588821",
"0.65200835",
"0.6506951",
"0.61023426",
"0.6074095",
"0.59484094",
"0.57880807",
"0.57880807",
"0.5759644",
"0.5759644",
"0.57530713",
"0.5725795",
"0.5724413",
"0.5693303",
"0.56796986",
"0.56796986",
"0.56694245",
"0.5... | 0.0 | -1 |
reading characters data from char_data.txt | public static void main(String[] args) {
try {
File file = new File("char_data.txt");
Scanner sc = new Scanner(file, "UTF-8");
System.out.println(sc.delimiter());
char ch1 = sc.next().charAt(0);
int int1 = sc.nextInt();
String str1 = sc.next();
String str2 = "sound\\" + sc.next() + ".mp3";
String str3 = sc.next();
//while (sc.next() == "\t") {}
String str4 = sc.nextLine();
//sc.nextLine();
System.out.print("The character is: " + ch1 + " at position: " + int1);
System.out.println(" with the pinyin: " + str1);
System.out.println("The sound is in file: " + str2);
System.out.println("The construction of the character is: " + str3);
System.out.println("The meaning of the character is: " + str4);
System.out.println();
ch1 = sc.next().charAt(0);
int1 = sc.nextInt();
str1 = sc.next();
str2 = "sound\\" + sc.next() + ".mp3";
str3 = sc.next();
str4 = sc.nextLine();
sc.nextLine();
System.out.print("The character is: " + ch1 + " at position: " + int1);
System.out.println(" with the pinyin: " + str1);
System.out.println("The sound is in file: " + str2);
System.out.println("The construction of the character is: " + str3);
System.out.println("The meaning of the character is: " + str4);
sc.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"char[] getCharContent() throws IOException;",
"protected void readCharacters() {\n try {\r\n File f = new File(filePath);\r\n FileInputStream fis = new FileInputStream(f);\r\n ObjectInputStream in = new ObjectInputStream(fis);\r\n characters = (List<character>) ... | [
"0.7007156",
"0.6856414",
"0.6571162",
"0.64306355",
"0.6403722",
"0.63693297",
"0.6336649",
"0.6220007",
"0.62000644",
"0.6104999",
"0.6007087",
"0.5918034",
"0.5904066",
"0.58835095",
"0.5871001",
"0.58535755",
"0.585056",
"0.5815769",
"0.5815494",
"0.5776071",
"0.57654756"... | 0.5999321 | 11 |
/ Options section If set to false, will prevent the uidraggable class from being added. This may be desired as a performance optimization when calling .draggable() init on many hundreds of elements. | public DraggableBehavior setAddClasses(boolean addClasses)
{
this.options.put("addClasses", addClasses);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void setNotDraging(){isDraging=false;}",
"public void setDraggable( boolean tof ) {\n\t\tthis.draggable = tof;\n\t}",
"@Override\r\n public boolean isResizable() {\r\n return false;\r\n }",
"public void setDropEnabled(boolean enabled) { this.dropEnabled = enabled; }",
"@Override\r\n\tpu... | [
"0.6257473",
"0.590534",
"0.5471022",
"0.5411423",
"0.5405658",
"0.53048927",
"0.53048927",
"0.51751834",
"0.5164757",
"0.51503986",
"0.51337355",
"0.51267284",
"0.5121773",
"0.5079683",
"0.5047496",
"0.5044126",
"0.5033908",
"0.5014814",
"0.5002629",
"0.500015",
"0.49968088"... | 0.47190678 | 58 |
The element passed to or selected by the appendTo option will be used as the draggable helper's container during dragging. By default, the helper is appended to the same container as the draggable. | public DraggableBehavior setAppendTo(String appendTo)
{
this.options.putLiteral("appendTo", appendTo);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DraggableBehavior setHelper(DraggableHelper helper)\n\t{\n\t\tthis.options.put(\"helper\", helper);\n\t\treturn this;\n\t}",
"private void dragDownToAdd() {\n ItemTouchHelper.SimpleCallback itemTouchHelperCallback =\n new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.DOWN) {\n\n ... | [
"0.53312665",
"0.5253219",
"0.5104268",
"0.5083214",
"0.49723396",
"0.47647607",
"0.47463462",
"0.4701392",
"0.46202958",
"0.45656258",
"0.45304388",
"0.45164698",
"0.44965747",
"0.44788668",
"0.44722134",
"0.44624203",
"0.4402192",
"0.43968898",
"0.4373359",
"0.4366905",
"0.... | 0.5593846 | 0 |
Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: 'x', 'y'. | public DraggableBehavior setAxis(AxisEnum axis)
{
this.options.putLiteral("axis", axis.toString().toLowerCase());
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void drag(int x, int y)\n {\n }",
"public void setDragged(double x, double y) {\n if (Math.abs(draggedX - x) >= 0.00001d || Math.abs(draggedY - y) >= 0.00001d) {\n draggedX = x < 0 ? 0 : x;\n draggedY = y < 0 ? 0 : y;\n xOffset = draggedX - pres... | [
"0.66418326",
"0.5968513",
"0.5797387",
"0.57749623",
"0.5740042",
"0.5712375",
"0.5681604",
"0.5656038",
"0.5609712",
"0.56057125",
"0.5571003",
"0.55592924",
"0.5555086",
"0.55534756",
"0.55527174",
"0.554876",
"0.554224",
"0.5511737",
"0.5503801",
"0.5503169",
"0.5498082",... | 0.0 | -1 |
Set's the prevent selecting if you start on elements matching the selector | public DraggableBehavior setCancel(String cancel)
{
this.options.putLiteral("cancel", cancel);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void assertNotSelectedIndex(final String selectLocator, final String indexPattern);",
"public void selectAllAccessibleSelection() {\n // To be fully implemented in a future release\n }",
"@Override\r\n\tpublic boolean forceSelection() {\r\n\t\treturn false;\r\n\t}",
"private Sel... | [
"0.5673107",
"0.5584078",
"0.5571111",
"0.5489904",
"0.54094005",
"0.5382834",
"0.53295714",
"0.5311989",
"0.5234704",
"0.5188508",
"0.5179682",
"0.5176519",
"0.5155556",
"0.5149598",
"0.51482564",
"0.51416945",
"0.50487834",
"0.5037194",
"0.5037194",
"0.50311357",
"0.4993154... | 0.0 | -1 |
Allows the draggable to be dropped onto the specified sortables. If this option is used (helper must be set to 'clone' in order to work flawlessly), a draggable can be dropped onto a sortable list and then becomes part of it. | public DraggableBehavior setConnectToSortable(String connectToSortable)
{
this.options.putLiteral("connectToSortable", connectToSortable);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean dragFromSubComponents();",
"public static void main(String[] args) {\n\t\n\t\tChromeDriver driver = new ChromeDriver();\n\t\t//System.setProperty(\"webdriver.chrome.driver\", ./drivers/chromedriver.exe)\n\t\tdriver.get(\"http://jqueryui.com/sortable\");\n\t\tdriver.manage().window().maximize();\n\... | [
"0.53817606",
"0.5203152",
"0.499594",
"0.49201894",
"0.4830717",
"0.48030946",
"0.47446308",
"0.4733108",
"0.4709956",
"0.46864378",
"0.46619788",
"0.4649033",
"0.46426642",
"0.46399903",
"0.45984063",
"0.45928702",
"0.4582508",
"0.45167133",
"0.44959217",
"0.44922552",
"0.4... | 0.520947 | 1 |
Set's the constrains dragging to within the bounds of the specified element or region. Possible string values: 'parent', 'document', 'window', [x1, y1, x2, y2] | public DraggableBehavior setContainment(DraggableContainment containment)
{
this.options.put("containment", containment);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBounds(Rectangle b);",
"void setBounds(Rectangle rectangle);",
"public void setBounds(Rectangle2D aRect)\n{\n setBounds(aRect.getX(), aRect.getY(), aRect.getWidth(), aRect.getHeight());\n}",
"public void setBounds(double anX, double aY, double aW, double aH) { setX(anX); setY(aY); setWidth(... | [
"0.6666595",
"0.66643715",
"0.652124",
"0.6414993",
"0.6208592",
"0.6201588",
"0.61016643",
"0.6083647",
"0.6058334",
"0.5814093",
"0.5781067",
"0.57671064",
"0.5765205",
"0.57470894",
"0.5700898",
"0.56825024",
"0.5676626",
"0.56220305",
"0.561363",
"0.56019354",
"0.55918586... | 0.0 | -1 |
Set the css cursor during the drag operation. | public DraggableBehavior setCursor(String cursor)
{
this.options.putLiteral("cursor", cursor);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCursorFlecha() {\r\n\t\tshell.setCursor(new Cursor(display, SWT.CURSOR_ARROW));\r\n\t}",
"public synchronized void setCursor(Cursor cursor) {\n if (cursor == null) {\n cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);\n }\n super.setCursor(cursor);\n }"... | [
"0.73799884",
"0.7323876",
"0.70924854",
"0.6927192",
"0.6901713",
"0.6898848",
"0.68927294",
"0.6882679",
"0.6831841",
"0.67705077",
"0.6758344",
"0.6569102",
"0.64903533",
"0.64704144",
"0.643063",
"0.63574505",
"0.63408315",
"0.6305369",
"0.62865186",
"0.6229317",
"0.62267... | 0.7326702 | 1 |
Time in milliseconds after mousedown until dragging should start. This option can be used to prevent unwanted drags when clicking on an element. | public DraggableBehavior setDelay(int delay)
{
this.options.put("delay", delay);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void setNotDraging(){isDraging=false;}",
"int getTapToFocusHoldTimeMillis();",
"@Override\n public void nativeMouseDragged(NativeMouseEvent nme) {\n if (Var.timerStart) {\n txtMouse.setText(\"Mouse Dragged: \" + nme.getX() + \", \" + nme.getY());\n Var.mDrags++;\n ... | [
"0.597371",
"0.5742382",
"0.57359844",
"0.56653",
"0.559871",
"0.5518217",
"0.5384921",
"0.5366626",
"0.5320767",
"0.5315811",
"0.53133583",
"0.5292778",
"0.5292724",
"0.52911407",
"0.526516",
"0.5261979",
"0.52610356",
"0.5260888",
"0.52456766",
"0.5239992",
"0.52395976",
... | 0.0 | -1 |
Disables (true) or enables (false) the draggable. Can be set when initialising (first creating) the draggable. | public DraggableBehavior setDisabled(boolean disabled)
{
this.options.put("disabled", disabled);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void setNotDraging(){isDraging=false;}",
"public JsStatement disable()\n\t{\n\t\treturn new JsQuery(getComponent()).$().chain(\"draggable\", \"'disable'\");\n\t}",
"public void setDragEnabled(boolean enabled) { \n \tthis.dragEnabled = enabled; \n \t}",
"public void setDraggable( boolean tof ) {\... | [
"0.7431679",
"0.72453034",
"0.7137029",
"0.70759827",
"0.6785503",
"0.67391175",
"0.6500663",
"0.6423268",
"0.6406594",
"0.62841755",
"0.6262395",
"0.6075119",
"0.60564494",
"0.6049297",
"0.6028034",
"0.6020349",
"0.5986769",
"0.59299517",
"0.591086",
"0.5886622",
"0.58782357... | 0.6487743 | 7 |
Set's the distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element. | public DraggableBehavior setDistance(int distance)
{
this.options.put("distance", distance);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDistance( float distance )\n {\n distance = Math.abs(distance);\n if ( distance == 0 )\n distance = 1;\n distance_slider.setValue( (int)(DISTANCE_SCALE_FACTOR * distance) );\n }",
"private void draggedWay(MouseEvent e) {\r\n if (e.getModifiers() >= MouseEvent.BUTTON1_MASK) {... | [
"0.59415656",
"0.5867534",
"0.5829418",
"0.5779255",
"0.57204825",
"0.5650699",
"0.56451666",
"0.55592704",
"0.55425555",
"0.553071",
"0.551256",
"0.54827327",
"0.5473482",
"0.5470792",
"0.54692423",
"0.54545206",
"0.5449812",
"0.5444192",
"0.54232717",
"0.54026884",
"0.53883... | 0.5995366 | 0 |
Snaps the dragging helper to a grid, every x and y pixels. Array values: [x, y] | public DraggableBehavior setGrid(int x, int y)
{
ArrayItemOptions<IntegerItemOptions> grids = new ArrayItemOptions<IntegerItemOptions>();
grids.add(new IntegerItemOptions(x));
grids.add(new IntegerItemOptions(y));
this.options.put("grid", grids);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PuzzleState drag(int startRow, int startColumn, int endRow, int endColumn);",
"public boolean onGrid(int xValue, int yValue);",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tint clickX = e.getX();\n\t\tint clickY = e.getY();\n\t\tint row = clickX/cellSize;\n\t\tint col = clickY/cellSize;\n... | [
"0.63950175",
"0.6230108",
"0.60779893",
"0.5944441",
"0.5928511",
"0.5918068",
"0.5894412",
"0.58540034",
"0.57928133",
"0.57248163",
"0.5535083",
"0.5514409",
"0.5495171",
"0.54433304",
"0.5438508",
"0.5376694",
"0.5373105",
"0.535283",
"0.5316217",
"0.5310994",
"0.5309647"... | 0.5485622 | 13 |
Restricts sort start click to the specified element. | public DraggableBehavior setHandle(String handle)
{
this.options.putLiteral("handle", handle);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void beforeClickOn(WebElement element, WebDriver driver) {\n\t\t\r\n\t}",
"@Override\n\tpublic void beforeClickOn(WebElement element, WebDriver driver) {\n\t\t\n\t}",
"public void setClickSort(boolean b) {\r\n\t\t_clickSort = b;\r\n\t}",
"public void beforeClickOn(WebElement element, WebDriver driver)... | [
"0.56497496",
"0.56178176",
"0.5347412",
"0.53422344",
"0.5286884",
"0.52694356",
"0.5217969",
"0.5170346",
"0.5150742",
"0.5100691",
"0.4981744",
"0.49351853",
"0.49090964",
"0.49027306",
"0.48860183",
"0.4884346",
"0.486843",
"0.4847146",
"0.48071194",
"0.47817737",
"0.4771... | 0.0 | -1 |
Allows for a helper element to be used for dragging display. Possible values: 'original', 'clone', Function. If a function is specified, it must return a DOMElement. | public DraggableBehavior setHelper(DraggableHelper helper)
{
this.options.put("helper", helper);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"HTMLElement createHTMLElement();",
"Element createElement();",
"Div createDiv();",
"E createDefaultElement();",
"public static native Element createDom(DomConfig config) /*-{\r\n\t\tvar configJS = config.@com.ait.toolkit.sencha.shared.client.dom.DomConfig::getJsObject()();\r\n\t\treturn $wnd.Ext.DomHelper.... | [
"0.5613216",
"0.54046834",
"0.50387734",
"0.5020634",
"0.4936991",
"0.48624668",
"0.48535442",
"0.48188764",
"0.47722518",
"0.47694722",
"0.4714382",
"0.47120228",
"0.4681642",
"0.46717942",
"0.46540877",
"0.4652979",
"0.46465605",
"0.46321487",
"0.4581862",
"0.45632604",
"0.... | 0.5020822 | 3 |
Prevent iframes from capturing the mousemove events during a drag. Useful in combination with cursorAt, or in any case, if the mouse cursor is not over the helper. If set to true, transparent overlays will be placed over all iframes on the page. If a selector is supplied, the matched iframes will have an overlay placed over them. | public DraggableBehavior setIframeFix(DraggableIframeFix iframeFix)
{
this.options.put("iframeFix", iframeFix);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void mouseMoved(MouseEvent e) {\n if (DocumentController.getCurrentPage() != null && MainPanelController.getOverlays() != null) {\n MainPanelController.getOverlays().stream().filter(o -> o.getBounds().contains(e.getX(), e.getY()))\n .findFirst()\n ... | [
"0.52407014",
"0.5120742",
"0.5067511",
"0.4961133",
"0.486994",
"0.47836307",
"0.47163758",
"0.46050757",
"0.45956293",
"0.45522633",
"0.45333412",
"0.45070055",
"0.44699234",
"0.44463843",
"0.44463843",
"0.44241765",
"0.43902826",
"0.43512797",
"0.43487415",
"0.43300837",
"... | 0.0 | -1 |
Set's the opacity for the helper while being dragged. | public DraggableBehavior setOpacity(float opacity)
{
this.options.put("opacity", opacity);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public native void setOpacity(int opacity);",
"public void setOpacity(float aValue)\n{\n if(getOpacity()==aValue) return; // If value already set, just return\n repaint(); // Register repaint\n Object oldValue = getOpacity(); // Cache old value, set new value and fire PropertyChange\n put(\"Opacity\"... | [
"0.6415027",
"0.63214195",
"0.61925304",
"0.6014032",
"0.5947694",
"0.5927634",
"0.58534575",
"0.57763994",
"0.577288",
"0.5767966",
"0.5713529",
"0.5685734",
"0.56352663",
"0.56297016",
"0.562244",
"0.56085885",
"0.55924404",
"0.5559708",
"0.5556012",
"0.5549156",
"0.5540997... | 0.67827964 | 0 |
If set to true, all droppable positions are calculated on every mousemove. Caution: This solves issues on highly dynamic pages, but dramatically decreases performance. | public DraggableBehavior setRefreshPositions(boolean refreshPositions)
{
this.options.put("refreshPositions", refreshPositions);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\tmouseMoved(e);\n\t\t\tint moveX= (int) e.getPoint().getX();//abscisse actuelle de ma souris \n\t\t\tint moveY= (int) e.getPoint().getY();//ordonnee actuelle de ma souris \n\t\t\tif (avantX>moveX){//l'abscisse est plus grand qu'avant ca veut dire qu'on... | [
"0.6578651",
"0.6299481",
"0.61611146",
"0.61204153",
"0.6072759",
"0.5933292",
"0.59290725",
"0.5894366",
"0.5893749",
"0.5893529",
"0.58567166",
"0.58462906",
"0.5810345",
"0.5802414",
"0.57756627",
"0.5767963",
"0.57556283",
"0.5744252",
"0.5710176",
"0.57070076",
"0.56700... | 0.0 | -1 |
If set to true, the element will return to its start position when dragging stops. Possible string values: 'valid', 'invalid'. If set to invalid, revert will only occur if the draggable has not been dropped on a droppable. For valid, it's the other way around. | public DraggableBehavior setRevert(DraggableRevert revert)
{
this.options.put("revert", revert);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract boolean dragged();",
"public boolean resetToPreviousPosition()\n {\n return setPosition( previousPosition);\n }",
"public boolean canStartDrag()\n\t{\n\t\treturn !isDragging();\n\t}",
"public boolean onDragStarted();",
"public PuzzleState drag(int startRow, int startColumn, ... | [
"0.5732588",
"0.5634763",
"0.5610456",
"0.5444294",
"0.5318195",
"0.52927357",
"0.52828425",
"0.52193475",
"0.5154211",
"0.51432025",
"0.5142999",
"0.51392734",
"0.5114156",
"0.51140106",
"0.5105088",
"0.5099345",
"0.5099345",
"0.5099345",
"0.5099345",
"0.50992984",
"0.509875... | 0.52890706 | 6 |
Set's the duration of the revert animation, in milliseconds. Ignored if revert is false. | public DraggableBehavior setRevertDuration(int revertDuration)
{
this.options.put("revertDuration", revertDuration);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DraggableBehavior setRevert(DraggableRevert revert)\n\t{\n\t\tthis.options.put(\"revert\", revert);\n\t\treturn this;\n\t}",
"public void setRevertTime(final long revertTime) {\r\n\t\tif (revertTime <= 0 || state instanceof Container) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (this.inRevertQueue) {\r\... | [
"0.60483634",
"0.5786407",
"0.55921096",
"0.55779433",
"0.5521242",
"0.5486094",
"0.53589684",
"0.5351114",
"0.53067887",
"0.5277306",
"0.51889586",
"0.5143963",
"0.5143963",
"0.5143963",
"0.51092696",
"0.5100138",
"0.50864065",
"0.5063076",
"0.50216943",
"0.49958986",
"0.495... | 0.7538574 | 0 |
Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable. | public DraggableBehavior setScope(String scope)
{
this.options.putLiteral("scope", scope);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addToGroup(Movable movable){\n things.add(movable);\n }",
"public void groupShape() {\n\t\tif(currentShape != null && !(groupedShapes.contains(currentShape))) {\n\t\t\tgroupedShapes.add(currentShape);\n\t\t\tnotifyObservers();\n\t\t}\n\t}",
"public void addGroup(String groupHeader, List<O... | [
"0.5499189",
"0.5349248",
"0.52545285",
"0.49223277",
"0.48494914",
"0.48469892",
"0.48189715",
"0.4776993",
"0.4736156",
"0.47309417",
"0.47304863",
"0.4700141",
"0.46942058",
"0.46750057",
"0.46699336",
"0.46539474",
"0.46528748",
"0.46361777",
"0.45846415",
"0.4572677",
"0... | 0.0 | -1 |
If set to true, container autoscrolls while dragging. | public DraggableBehavior setScroll(boolean scroll)
{
this.options.put("scroll", scroll);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAutoScroll(boolean b) {\r\n\t\t_autoScroll = b;\r\n\t}",
"public void setContainerScroll ( Boolean containerScroll ) {\r\n\t\tgetStateHelper().put(PropertyKeys.containerScroll, containerScroll);\r\n\t\thandleAttribute(\"containerScroll\", containerScroll);\r\n\t}",
"public Boolean getContainer... | [
"0.6917802",
"0.6725997",
"0.6698288",
"0.668835",
"0.6637066",
"0.65104717",
"0.6501338",
"0.6493896",
"0.648656",
"0.62094",
"0.6203266",
"0.62000185",
"0.61290544",
"0.6039758",
"0.59981716",
"0.5966345",
"0.5917964",
"0.59152967",
"0.59145886",
"0.59145886",
"0.59104437",... | 0.55228716 | 83 |
Set's the distance in pixels from the edge of the viewport after which the viewport should scroll. Distance is relative to pointer, not the draggable. | public DraggableBehavior setScrollSensitivity(int scrollSensitivity)
{
this.options.put("scrollSensitivity", scrollSensitivity);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setViewDistance(float distance) { viewDistance = distance; }",
"public void setDistance( float distance )\n {\n distance = Math.abs(distance);\n if ( distance == 0 )\n distance = 1;\n distance_slider.setValue( (int)(DISTANCE_SCALE_FACTOR * distance) );\n }",
"public void updateScrol... | [
"0.63426346",
"0.5695461",
"0.5684123",
"0.5500798",
"0.54676133",
"0.54236597",
"0.5416605",
"0.5414488",
"0.5367034",
"0.53526485",
"0.5327204",
"0.5324352",
"0.5280464",
"0.5272587",
"0.5264461",
"0.5249585",
"0.5166531",
"0.5106378",
"0.51003885",
"0.5084364",
"0.5065009"... | 0.0 | -1 |
Set's speed at which the window should scroll once the mouse pointer gets within the scrollSensitivity distance. | public DraggableBehavior setScrollSpeed(int scrollSpeed)
{
this.options.put("scrollSpeed", scrollSpeed);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DraggableBehavior setScrollSensitivity(int scrollSensitivity)\n\t{\n\t\tthis.options.put(\"scrollSensitivity\", scrollSensitivity);\n\t\treturn this;\n\t}",
"@Override // com.oculus.modules.codegen.PreferencesStoreModule\n public void setMouseSensitivityImpl(double value) {\n Log.i(TAG, \"SETTIN... | [
"0.7145975",
"0.6103889",
"0.6032374",
"0.600609",
"0.59622335",
"0.59239197",
"0.5923464",
"0.589709",
"0.5895644",
"0.58697927",
"0.58626336",
"0.58471835",
"0.5839721",
"0.58360064",
"0.5817828",
"0.578257",
"0.57616645",
"0.5751335",
"0.57471204",
"0.5734595",
"0.5734595"... | 0.6279737 | 1 |
If set to a selector or to true (equivalent to '.uidraggable'), the draggable will snap to the edges of the selected elements when near an edge of the element. | public DraggableBehavior setSnap(DraggableSnap snap)
{
this.options.put("snap", snap);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean dragFromSubComponents();",
"protected abstract boolean dragged();",
"public void setDraggable( boolean tof ) {\n\t\tthis.draggable = tof;\n\t}",
"abstract boolean getIsDragging();",
"@Override\n public void drag(int x, int y)\n {\n }",
"public PuzzleState drag(int startRow, int st... | [
"0.56703866",
"0.5574302",
"0.519963",
"0.49390882",
"0.4930571",
"0.4853381",
"0.48081976",
"0.47978446",
"0.47766587",
"0.47654155",
"0.4761228",
"0.47438437",
"0.4719431",
"0.4719431",
"0.47176906",
"0.4702071",
"0.46940374",
"0.46940374",
"0.468566",
"0.4676589",
"0.46699... | 0.45255688 | 47 |
Sets the edges of snap elements the draggable will snap to. Ignored if snap is false. Possible values: 'inner', 'outer', 'both' | public DraggableBehavior setSnapMode(SnapModeEnum snapMode)
{
options.putLiteral("snapMode", snapMode.name().toLowerCase());
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DraggableBehavior setSnap(DraggableSnap snap)\n\t{\n\t\tthis.options.put(\"snap\", snap);\n\t\treturn this;\n\t}",
"public void setSnapSize(Dimension snapSize)\n\t{\n\t\tif (snapSize.width < 1\n\t\t|| snapSize.height < 1)\n\t\t\tthrow new IllegalArgumentException(\"Snap sizes must be greater than 0\");\n... | [
"0.57563454",
"0.55703485",
"0.5560446",
"0.5328603",
"0.5261821",
"0.49704942",
"0.4915645",
"0.48489353",
"0.48348033",
"0.48198295",
"0.4818551",
"0.47485265",
"0.47454444",
"0.47331935",
"0.47275347",
"0.46527654",
"0.46478108",
"0.45500788",
"0.4535597",
"0.45148933",
"0... | 0.5134392 | 5 |
Returns the snapMode option | public SnapModeEnum getSnapMode()
{
String literal = options.getLiteral("snapMode");
return literal == null ? SnapModeEnum.BOTH : SnapModeEnum.valueOf(literal.toUpperCase());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DraggableBehavior setSnapMode(SnapModeEnum snapMode)\n\t{\n\t\toptions.putLiteral(\"snapMode\", snapMode.name().toLowerCase());\n\t\treturn this;\n\t}",
"java.lang.String getMode();",
"public String getMode()\n {\n return mode.toString();\n }",
"public int getScreenModeValue() {\n return scree... | [
"0.6928349",
"0.64702296",
"0.6257318",
"0.62556267",
"0.6254911",
"0.6215243",
"0.6215243",
"0.61530006",
"0.61514336",
"0.6124979",
"0.612014",
"0.6078394",
"0.605414",
"0.6010568",
"0.59962624",
"0.5962477",
"0.59499055",
"0.593738",
"0.5925669",
"0.59040886",
"0.5901956",... | 0.85258967 | 0 |
Set's distance in pixels from the snap element edges at which snapping should occur. Ignored if snap is false. | public DraggableBehavior setSnapTolerance(int snapTolerance)
{
this.options.put("snapTolerance", snapTolerance);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSnapSize(Dimension snapSize)\n\t{\n\t\tif (snapSize.width < 1\n\t\t|| snapSize.height < 1)\n\t\t\tthrow new IllegalArgumentException(\"Snap sizes must be greater than 0\");\n\n\t\tthis.snapSize = snapSize;\n\t}",
"public DraggableBehavior setSnap(DraggableSnap snap)\n\t{\n\t\tthis.options.put(\"s... | [
"0.6466239",
"0.5965947",
"0.58791304",
"0.57421666",
"0.5493536",
"0.5373174",
"0.53308886",
"0.52439487",
"0.5074934",
"0.5062523",
"0.5039362",
"0.4984261",
"0.49054193",
"0.48909461",
"0.48852828",
"0.4852876",
"0.48237035",
"0.47730488",
"0.47710463",
"0.47556764",
"0.47... | 0.60906297 | 1 |
Controls the zIndex of the defined group (key 'group' in the hash, accepts jQuery selector) automatically, always brings to front the dragged item. Very useful in things like window managers. Optionally, a 'min' key can be set, so the zIndex cannot go below that value. | public DraggableBehavior setStack(String stack)
{
this.options.putLiteral("stack", stack);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void toFront() {\n internalGroup.toFront();\n dataTrait.zIndex = internalGroup.getZIndex();\n }",
"public void setZIndex(int index) {\n internalGroup.setZIndex(index);\n dataTrait.zIndex = index;\n }",
"public int getZIndex() {\n return internalGroup.getZIndex();... | [
"0.5910522",
"0.56620187",
"0.54330033",
"0.5383621",
"0.5323701",
"0.5175962",
"0.5166963",
"0.51364726",
"0.5134258",
"0.51320475",
"0.5119752",
"0.51154286",
"0.5101603",
"0.50841147",
"0.50841147",
"0.5052415",
"0.5038372",
"0.50225264",
"0.500723",
"0.4984445",
"0.497886... | 0.0 | -1 |
Set's the starting zindex | public DraggableBehavior setZIndex(int zIndex)
{
this.options.put("zIndex", zIndex);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void setZIndex(int index) {\n\t\t\r\n\t}",
"public void setZIndex(int newZIndex)\n {\n zIndex = newZIndex;\n \n if (parent != null)\n {\n parent.onZIndexChanged(this);\n }\n }",
"public void setFixedZdepth(int expectedZIndex);",
"publi... | [
"0.7176581",
"0.6544528",
"0.64259046",
"0.63567203",
"0.62400687",
"0.60098356",
"0.58696723",
"0.58636165",
"0.58287245",
"0.57309926",
"0.570836",
"0.56887853",
"0.5629898",
"0.5570326",
"0.5549827",
"0.55236405",
"0.54797876",
"0.5465855",
"0.5463683",
"0.5422851",
"0.540... | 0.54100657 | 20 |
/ Events section Set's the callback when the mouse is moved during the dragging | public DraggableBehavior setDragEvent(JsScopeUiEvent drag)
{
this.options.put("drag", drag);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mouseMoved(MouseEvent event) {\n }",
"public void mouseDragged (MouseEvent e) {}",
"public void mouseDragged(MouseEvent e) {}",
"public void mouseMoved(MouseEvent e) {}",
"public void mouseMoved(MouseEvent e) {}",
"public void mouseDragged(MouseEvent e){}",
"public abstra... | [
"0.75603426",
"0.7517084",
"0.74922705",
"0.7478841",
"0.7478841",
"0.74570465",
"0.7419606",
"0.7416451",
"0.74131143",
"0.740761",
"0.74028164",
"0.7387755",
"0.73738533",
"0.7368007",
"0.7316373",
"0.7314586",
"0.73134667",
"0.7312289",
"0.7305392",
"0.7305392",
"0.7305392... | 0.0 | -1 |
Set's the callback when the user starts dragging. | public DraggableBehavior setStartEvent(JsScopeUiEvent start)
{
this.options.put("start", start);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean onDragStarted();",
"@Override\n public void onDragStarted(int position) {\n }",
"void onDragStart(View view);",
"@DISPID(-2147412077)\n @PropGet\n java.lang.Object ondragstart();",
"void onStartTrackingTouch() {\n mIsDragging = true;\n }",
"void onStartTra... | [
"0.71298534",
"0.64496636",
"0.64436513",
"0.626972",
"0.62183607",
"0.62183607",
"0.6107542",
"0.605855",
"0.6058351",
"0.60553855",
"0.6023381",
"0.5904435",
"0.5848257",
"0.58033305",
"0.5766765",
"0.57522255",
"0.57372516",
"0.57372516",
"0.5709069",
"0.5704829",
"0.56936... | 0.55607754 | 26 |
Set's the callback when the user stops dragging. | public DraggableBehavior setStopEvent(JsScopeUiEvent stop)
{
this.options.put("stop", stop);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onDragEnded();",
"private void stopDragging() {\n setDragging(false);\n mouseX = mouseY = prevX = prevY = 0;\n }",
"private synchronized void endDrag() {\n this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n beingDragged = false;\n }",
"void onStopTracking... | [
"0.6493314",
"0.6408992",
"0.6241022",
"0.60798025",
"0.60798025",
"0.60735023",
"0.59445935",
"0.5942079",
"0.5918306",
"0.5906873",
"0.590228",
"0.58853424",
"0.58781356",
"0.58428895",
"0.5793477",
"0.5774622",
"0.5772165",
"0.5745079",
"0.57272214",
"0.569944",
"0.5677569... | 0.55951893 | 25 |
/ Methods section Method to destroy the draggable This will return the element back to its preinit state. | public JsStatement destroy()
{
return new JsQuery(getComponent()).$().chain("draggable", "'destroy'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void destroy() {\n\t\tgone = true;\n\t}",
"public void destroy() {\n destroying = true;\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tmovingArea = null;\r\n\t}",
"public void destroy() {\r\n\t\thide();\r\n\t\tmenuButtonTouchListener_.unregister();\r\n\t}",... | [
"0.595477",
"0.59322274",
"0.59021276",
"0.58402884",
"0.5796494",
"0.57525206",
"0.57234657",
"0.56964207",
"0.5677081",
"0.56675625",
"0.5656224",
"0.5656224",
"0.5656224",
"0.5656224",
"0.5654961",
"0.5622563",
"0.56158704",
"0.55917513",
"0.5589684",
"0.55864257",
"0.5559... | 0.7211146 | 0 |
Method to destroy the draggable within the ajax request | public void destroy(AjaxRequestTarget ajaxRequestTarget)
{
ajaxRequestTarget.appendJavaScript(this.destroy().render().toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JsStatement destroy()\n\t{\n\t\treturn new JsQuery(getComponent()).$().chain(\"draggable\", \"'destroy'\");\n\t}",
"public void destory(){\n \n }",
"public void destroy() {\n \t\n }",
"public void destroy() {\n destroying = true;\n }",
"protected void destroy() {\n ... | [
"0.6596022",
"0.5555593",
"0.5532884",
"0.553114",
"0.5480255",
"0.5480005",
"0.5480005",
"0.5480005",
"0.5480005",
"0.5474205",
"0.5473087",
"0.54301333",
"0.541308",
"0.53940123",
"0.53885454",
"0.53883314",
"0.53883314",
"0.53883314",
"0.53883314",
"0.53883314",
"0.5388331... | 0.61014664 | 1 |
Method to disable the draggable | public JsStatement disable()
{
return new JsQuery(getComponent()).$().chain("draggable", "'disable'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void disable() {\n \t\t\tsetEnabled(false);\n \t\t}",
"public void disable();",
"protected abstract void disable();",
"void disableDraggableEvent(String folderLevel, String folderObjectType);",
"public void disable()\n {\n // Disable all the buttons one by one\n for (int col = 0; col < COLUMN... | [
"0.7384677",
"0.71532375",
"0.70314705",
"0.7026379",
"0.70217025",
"0.6980704",
"0.69253874",
"0.6881063",
"0.6871157",
"0.6838491",
"0.6824257",
"0.6824257",
"0.68116766",
"0.6770118",
"0.67223674",
"0.6692427",
"0.6672494",
"0.66688496",
"0.6588247",
"0.65751046",
"0.65427... | 0.80364096 | 0 |
Method to disable the draggable within the ajax request | public void disable(AjaxRequestTarget ajaxRequestTarget)
{
ajaxRequestTarget.appendJavaScript(this.disable().render().toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JsStatement disable()\n\t{\n\t\treturn new JsQuery(getComponent()).$().chain(\"draggable\", \"'disable'\");\n\t}",
"void disableDraggableEvent(String folderLevel, String folderObjectType);",
"static void setNotDraging(){isDraging=false;}",
"public JsStatement enable()\n\t{\n\t\treturn new JsQuery(getC... | [
"0.7248597",
"0.65310806",
"0.6282622",
"0.60418296",
"0.6029813",
"0.5990621",
"0.59831965",
"0.5957663",
"0.5780641",
"0.57794505",
"0.57273555",
"0.57273555",
"0.568117",
"0.56732523",
"0.56709015",
"0.56590736",
"0.5656559",
"0.56360555",
"0.5625387",
"0.5598346",
"0.5557... | 0.6363924 | 2 |
Method to enable the draggable | public JsStatement enable()
{
return new JsQuery(getComponent()).$().chain("draggable", "'enable'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDragEnabled(boolean enabled) { \n \tthis.dragEnabled = enabled; \n \t}",
"private void enableDrag() {\n final Delta dragDelta = new Delta();\n setOnMousePressed((MouseEvent mouseEvent) -> {\n // record a delta distance for the drag and drop operation.\n ... | [
"0.7497444",
"0.73905236",
"0.7085922",
"0.6762706",
"0.6690139",
"0.6680829",
"0.661319",
"0.65659666",
"0.6461594",
"0.6427107",
"0.63749397",
"0.6345695",
"0.63311183",
"0.6322577",
"0.62883186",
"0.627954",
"0.62613314",
"0.6245612",
"0.62211585",
"0.62191",
"0.6183923",
... | 0.77926415 | 0 |
Method to enable the draggable within the ajax request | public void enable(AjaxRequestTarget ajaxRequestTarget)
{
ajaxRequestTarget.appendJavaScript(this.enable().render().toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JsStatement enable()\n\t{\n\t\treturn new JsQuery(getComponent()).$().chain(\"draggable\", \"'enable'\");\n\t}",
"public void setDragEnabled(boolean enabled) { \n \tthis.dragEnabled = enabled; \n \t}",
"private void enableDrag() {\n final Delta dragDelta = new Delta();\n setO... | [
"0.7029295",
"0.6181069",
"0.61251795",
"0.56933534",
"0.5675469",
"0.5655675",
"0.559523",
"0.55572253",
"0.55044127",
"0.5467646",
"0.54226375",
"0.54196423",
"0.540239",
"0.5397582",
"0.53790087",
"0.5377794",
"0.5356338",
"0.53037614",
"0.5302439",
"0.5263771",
"0.5249522... | 0.59144443 | 3 |
Method to returns the .uidraggable element | public JsStatement widget()
{
return new JsQuery(getComponent()).$().chain("draggable", "'widget'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"UmlElement getUmlElement();",
"public OidDt getUidElement() { \n\t\tif (myUid == null) {\n\t\t\tmyUid = new OidDt();\n\t\t}\n\t\treturn myUid;\n\t}",
"public OidDt getUidElement() { \n\t\tif (myUid == null) {\n\t\t\tmyUid = new OidDt();\n\t\t}\n\t\treturn myUid;\n\t}",
"public OidDt getUidElement() { \n\t... | [
"0.6612748",
"0.6048737",
"0.6048737",
"0.6048737",
"0.5762465",
"0.55868614",
"0.55623096",
"0.5491136",
"0.54792035",
"0.5443925",
"0.5422274",
"0.53414005",
"0.5307566",
"0.53072566",
"0.53072566",
"0.52530986",
"0.5248175",
"0.52414197",
"0.5214667",
"0.52111286",
"0.5205... | 0.5676916 | 5 |
Method to returns the .uidraggable element within the ajax request | public void widget(AjaxRequestTarget ajaxRequestTarget)
{
ajaxRequestTarget.appendJavaScript(this.widget().render().toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TdiResponseBuilder ajaxResponse() {\n\t\treturn new TdiResponseBuilder(this);\n\t}",
"public RibbonGalleryUI getUI() {\n return (RibbonGalleryUI) ui;\n }",
"public JsStatement widget()\n\t{\n\t\treturn new JsQuery(getComponent()).$().chain(\"draggable\", \"'widget'\");\n\t}",
"public HTMLDiv... | [
"0.5319515",
"0.49384913",
"0.4857331",
"0.47409794",
"0.47338572",
"0.47042334",
"0.4646685",
"0.4481543",
"0.44502375",
"0.44062263",
"0.44062263",
"0.44062263",
"0.43909836",
"0.43384278",
"0.42982116",
"0.42802107",
"0.42660934",
"0.4230853",
"0.42101598",
"0.4209466",
"0... | 0.45926976 | 7 |
TODO created on 2018/2/26 15:49 | public interface UserService {
List<User> findAll();
LoginUser findByUserId(Long userId);
User findDepartLeader(Long departId);
User getById(Long id);
List<UserVo> findVoAll();
void bindUserPro(Long userId, String proCode);
List<UserProVo> findUserProList();
void delUserPro(Long id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void t... | [
"0.5622328",
"0.56094927",
"0.54322666",
"0.53868175",
"0.5364714",
"0.527897",
"0.5267368",
"0.52321434",
"0.52309096",
"0.520346",
"0.51938635",
"0.51904476",
"0.51904476",
"0.5189469",
"0.51869214",
"0.51682067",
"0.51610106",
"0.5120524",
"0.51157075",
"0.51074916",
"0.51... | 0.0 | -1 |
Method to display all song info as specified in the header of abc File. Prints information to screen | public void displaySongInfo() {
System.out.println("Track number: " + this.trackNumber + "\n");
System.out.println("Title: " + this.songTitle + "\n");
System.out.println("Composer_Name: " + this.composerName + "\n");
System.out.println("Voices: " + this.voiceMap.keySet() + "\n");
System.out.println("Meter: " + this.meter + "\n");
System.out.println("Default note length: " + this.Length_Default + "\n");
System.out.println("Tempo: " + this.tempo + "\n");
System.out.println("Key signature: " + this.key + "\n");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void displaySongs(String binaryFile){\r\n //Create a new SongBinaryFileProcessor because need to use instance methods\r\n SongBinaryFileProcessor songBinaryFileProcessor = new SongBinaryFileProcessor();\r\n \r\n //Create Song array formed by return Song[] of readSong()\r\n... | [
"0.6822617",
"0.6694136",
"0.66299725",
"0.66064",
"0.657759",
"0.6571725",
"0.6482899",
"0.6457177",
"0.63244927",
"0.63225955",
"0.6322204",
"0.6319565",
"0.6246144",
"0.6241318",
"0.62328243",
"0.62009054",
"0.6173031",
"0.6106434",
"0.61016864",
"0.60987896",
"0.6059287",... | 0.79247445 | 0 |
Method to synchronise the base ticks for each note based on the input noteLength given. Ensures all notes have proportional amounts of ticks to each other | public void syncTicks(int noteLength){
this.ticksForNote = Mathematics.lcm(noteLength,this.ticksForNote);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTicksForNote(int ticks) {\n\t\tthis.ticksForNote = ticks;\n\t}",
"@Override\n public void mutate(Song song, int noteIndex) {\n if (Math.random() < this.getProbability()) {\n if (noteIndex > 0) {\n MidiUtil mu = new MidiUtil();\n int nbrOfTotalReve... | [
"0.5410086",
"0.50337136",
"0.500512",
"0.49039003",
"0.48531184",
"0.48343796",
"0.47887215",
"0.47227094",
"0.47016993",
"0.46996582",
"0.46471667",
"0.46343267",
"0.45891505",
"0.44852325",
"0.44359863",
"0.4422694",
"0.44189847",
"0.44068804",
"0.44029528",
"0.4398528",
"... | 0.8489514 | 0 |
Sets the ticks for each note explicitly. | public void setTicksForNote(int ticks) {
this.ticksForNote = ticks;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTicks(final int t) {\r\n ticks = t;\r\n }",
"public void setFireTicks ( int ticks ) {\n\t\texecute ( handle -> handle.setFireTicks ( ticks ) );\n\t}",
"public void syncTicks(int noteLength){\n\t\tthis.ticksForNote = Mathematics.lcm(noteLength,this.ticksForNote); \n\t}"... | [
"0.6284011",
"0.6160717",
"0.6113361",
"0.6026168",
"0.5934368",
"0.5863766",
"0.57000095",
"0.56097513",
"0.5581604",
"0.55460304",
"0.5482077",
"0.54269373",
"0.53232014",
"0.531487",
"0.52923876",
"0.5186968",
"0.5186968",
"0.51796746",
"0.5178122",
"0.51327616",
"0.512569... | 0.796737 | 0 |
Adds specified chord to the specified voice, if this voice exists. If the voice has not been specified, throws IllegalArgumentException | public void addChord(String voice, Chord chord) {
if(voiceMap.containsKey(voice))
{
voiceMap.get(voice).addChord(chord);
if (length.compareTo(voiceMap.get(voice).getLength()) < 0) {
length = voiceMap.get(voice).getLength(); //song length is as long as the longest voice
}
}
else {
throw new IllegalArgumentException("Voice: " + voice +", does not exist in header");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setVoice (Voice voice)\r\n {\r\n // Already done?\r\n if (this.voice == null) {\r\n final String contextString = getContextString();\r\n logger.debug(\"{} Ch#{} setVoice {}\",\r\n contextString, id, voice.getId());\r\n\r\n this.voice ... | [
"0.62532216",
"0.54851454",
"0.5324371",
"0.52517885",
"0.5197102",
"0.51191086",
"0.4962319",
"0.4952856",
"0.49431744",
"0.49290228",
"0.492756",
"0.48840427",
"0.48787296",
"0.4869691",
"0.4821654",
"0.4805878",
"0.48021936",
"0.4737713",
"0.47195226",
"0.47154272",
"0.469... | 0.7960211 | 0 |
Created by sylar on 15/6/3. | public interface OpenAuthCallback extends Callback<OpenUser> {
void onCancel();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r... | [
"0.61852974",
"0.60321176",
"0.6028262",
"0.59939486",
"0.584489",
"0.583775",
"0.583775",
"0.58319956",
"0.58097273",
"0.57856786",
"0.5777595",
"0.5777572",
"0.5754188",
"0.57464737",
"0.5744115",
"0.5734681",
"0.5730425",
"0.5710728",
"0.5710678",
"0.57090944",
"0.5704781"... | 0.0 | -1 |
This method renders the entire canvas along with the drawings inside it. | private void render() {
StringBuilder builder = new StringBuilder();
builder.append(horizontalEdge).append("\n");
for (int i = 0; i < this.height; i++) {
builder.append(VERTICAL_CHAR);
for (int j = 0; j < this.width; j++) {
builder.append(pixels[i][j]);
}
builder.append(VERTICAL_CHAR);
builder.append("\n");
}
builder.append(horizontalEdge);
System.out.printf(builder.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void render() {\n this.canvas.repaint();\n }",
"private void draw() {\n\t\tCanvas c = null;\n\t\ttry {\n\t\t\t// NOTE: in the LunarLander they don't have any synchronization here,\n\t\t\t// so I guess this is OK. It will return null if the holder is not ready\n\t\t\tc = mHolder.lockCanvas();\n\t... | [
"0.7573652",
"0.718519",
"0.717438",
"0.7151782",
"0.71385145",
"0.711881",
"0.711881",
"0.7118657",
"0.711135",
"0.7092757",
"0.7089508",
"0.70501",
"0.69844",
"0.69688547",
"0.6896011",
"0.6875426",
"0.6866015",
"0.68323225",
"0.6819021",
"0.678308",
"0.6770497",
"0.67692... | 0.0 | -1 |
Method to mark a line on the canvas. This method could be used to draw horizontal and vertical lines. Same method could used in case rectangles are drawn. | public void markLine(int x1, int y1, int x2, int y2) {
for (int row = y1 - 1; row <= y2 - 1 && row < height; row++) {
for (int col = x1 - 1; col <= x2 - 1 && col < width; col++) {
pixels[row][col] = DRAWING_CHAR;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void markLine() {\n lineMark = cursor;\n }",
"private void drawLine(GraphicsContext canvas, Point start, Point end) {\n canvas.strokeLine(\n start.X, start.Y,\n end.X, end.Y\n );\n }",
"public void markLine(Line line, Player player) {\n // The logic p... | [
"0.7517529",
"0.73301536",
"0.7325677",
"0.716438",
"0.70743847",
"0.7073041",
"0.6843768",
"0.6815142",
"0.6810927",
"0.67934924",
"0.6770286",
"0.67398995",
"0.66957426",
"0.6660779",
"0.66527987",
"0.66419256",
"0.6602653",
"0.65691376",
"0.6513529",
"0.6478418",
"0.646180... | 0.69719785 | 6 |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object)
{
if (!(object instanceof DocumentosTareasPK))
{
return false;
}
DocumentosTareasPK other = (DocumentosTareasPK) object;
if (this.tareId != other.tareId)
{
return false;
}
if (this.docuId != other.docuId)
{
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void se... | [
"0.6896886",
"0.6838461",
"0.67056817",
"0.66419715",
"0.66419715",
"0.6592331",
"0.6579151",
"0.6579151",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.65624106",
"0.65624106",
"0.65441847",
"0.65243006",
"0.65154546",
"0.6487427",
"0.64778... | 0.0 | -1 |
Author: lev.novikov Date: 20/11/17. | public interface UserRepository {
Single<Boolean> isUserLoggedIn();
Single<UserProfile> updateUserProfile();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n public void func_104112_b() {\n \n }",
"private stendhal() {\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tp... | [
"0.5923446",
"0.59121215",
"0.5865428",
"0.5830494",
"0.58230865",
"0.58109564",
"0.57971436",
"0.5758851",
"0.5758851",
"0.5753038",
"0.5752605",
"0.57299817",
"0.56817746",
"0.5673139",
"0.5667283",
"0.5667059",
"0.56595296",
"0.56589323",
"0.5643213",
"0.5642039",
"0.56330... | 0.0 | -1 |
Validation of parameters values in subscriptions objects. Throws SubscriptionValidationException if validation of a parameter fails due to wrong format of parameter. | public void validateSubscription(Subscription subscription) throws SubscriptionValidationException {
LOGGER.debug("Validation of subscription " + subscription.getSubscriptionName() + " Started.");
this.validateSubscriptionName(subscription.getSubscriptionName());
this.validateNotificationMessageKeyValues(subscription.getNotificationMessageKeyValues(),
subscription.getRestPostBodyMediaType());
this.validateNotificationMeta(subscription.getNotificationMeta());
this.validateNotificationType(subscription.getNotificationType());
if (subscription.getNotificationType().equals("REST_POST")) {
this.RestPostMediaType(subscription.getRestPostBodyMediaType());
}
LOGGER.debug("Validating of subscription " + subscription.getSubscriptionName() + " finished successfully.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}",
"private void validateSubscriptionName(String subscriptionName) throws SubscriptionValidationException {\n String regex = \"^[A-Za-z0-9_]+$\";\n if (subscriptionName == null) {\n throw new SubscriptionValidationExceptio... | [
"0.62584674",
"0.61418414",
"0.5746448",
"0.5620144",
"0.5587418",
"0.55798805",
"0.5525474",
"0.5442326",
"0.53902113",
"0.53322434",
"0.52941144",
"0.52896243",
"0.52703935",
"0.52300996",
"0.52222985",
"0.5144664",
"0.514129",
"0.5127786",
"0.5108857",
"0.5103994",
"0.5101... | 0.65731865 | 0 |
Validation of subscriptionName parameter Throws SubscriptionValidationException if validation of the parameter fails due to wrong format of parameter. | private void validateSubscriptionName(String subscriptionName) throws SubscriptionValidationException {
String regex = "^[A-Za-z0-9_]+$";
if (subscriptionName == null) {
throw new SubscriptionValidationException("Required field SubscriptionName has not been set");
} else if (!Pattern.matches(regex, subscriptionName)) {
throw new SubscriptionValidationException("Wrong format of SubscriptionName: " + subscriptionName);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSubscriptionName(String subscriptionName) {\n this.subscriptionName = subscriptionName;\n }",
"public void validateSubscription(Subscription subscription) throws SubscriptionValidationException {\n LOGGER.debug(\"Validation of subscription \" + subscription.getSubscriptionName() +... | [
"0.6924288",
"0.65099406",
"0.5579793",
"0.55489624",
"0.5495359",
"0.5272701",
"0.5270216",
"0.52596444",
"0.52545327",
"0.523512",
"0.5202907",
"0.5130777",
"0.5085386",
"0.5056345",
"0.5027063",
"0.49601483",
"0.4949305",
"0.49229664",
"0.49030584",
"0.49018785",
"0.489469... | 0.8557155 | 0 |
Validation of NotificationMessageKeyValues parameters (key/values) Throws SubscriptionValidationException if validation of the parameter fails due to wrong format of parameter. | private void validateNotificationMessageKeyValues(List<NotificationMessageKeyValue> notificationMessage,
String restPostBodyMediaType) throws SubscriptionValidationException {
for (NotificationMessageKeyValue item : notificationMessage) {
String testKey = item.getFormkey();
String testValue = item.getFormvalue();
if (restPostBodyMediaType != null
&& restPostBodyMediaType.equals(MediaType.APPLICATION_FORM_URLENCODED.toString())) { // FORM/POST
// PARAMETERS
if (StringUtils.isBlank(testKey) || StringUtils.isBlank(testValue)) {
throw new SubscriptionValidationException(
"Value & Key in notificationMessage must have a values: " + notificationMessage);
}
} else {
if (notificationMessage.size() != 1) {
throw new SubscriptionValidationException(
"Only one array is allowed for notificationMessage when NOT using key/value pairs: "
+ notificationMessage);
} else if (testKey != null && !testKey.isEmpty()) {
throw new SubscriptionValidationException(
"Key in notificationMessage must be empty when NOT using key/value pairs: "
+ notificationMessage);
} else if (StringUtils.isBlank(testValue)) {
throw new SubscriptionValidationException(
"Value in notificationMessage must have a value when NOT using key/value pairs: "
+ notificationMessage);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}",
"private void validateNotificationType(String notificationType) throws SubscriptionValidationException {\n String regexMail = \"[\\\\s]*MAIL[\\\\\\\\s]*\";\n String regexRestPost = \"[\\\\s]*REST_POST[\\\\\\\\s]*\";\n if (n... | [
"0.5697812",
"0.53792256",
"0.5342553",
"0.52404267",
"0.51061165",
"0.4943811",
"0.49185878",
"0.49101287",
"0.49017197",
"0.48581758",
"0.4857471",
"0.485202",
"0.48491904",
"0.47846025",
"0.4774057",
"0.47674266",
"0.47179008",
"0.4681749",
"0.46523908",
"0.46384773",
"0.4... | 0.8043252 | 0 |
Validation of notificationMeta parameter Throws SubscriptionValidationException if validation of the parameter fails due to wrong format of parameter. | private void validateNotificationMeta(String notificationMeta) throws SubscriptionValidationException {
String regex = ".*[\\s].*";
if (notificationMeta == null) {
throw new SubscriptionValidationException("Required field NotificationMeta has not been set");
} else if (Pattern.matches(regex, notificationMeta)) {
throw new SubscriptionValidationException("Wrong format of NotificationMeta: " + notificationMeta);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void validateNotificationType(String notificationType) throws SubscriptionValidationException {\n String regexMail = \"[\\\\s]*MAIL[\\\\\\\\s]*\";\n String regexRestPost = \"[\\\\s]*REST_POST[\\\\\\\\s]*\";\n if (notificationType == null) {\n throw new SubscriptionValidation... | [
"0.64323187",
"0.6293726",
"0.57443357",
"0.5530664",
"0.5502184",
"0.54883945",
"0.5468198",
"0.51081276",
"0.5094664",
"0.50529456",
"0.5026443",
"0.4983682",
"0.4983682",
"0.4983682",
"0.49552146",
"0.49265674",
"0.48427752",
"0.48248136",
"0.4814523",
"0.48045725",
"0.479... | 0.7682149 | 0 |
Validation of notificationType parameter Throws SubscriptionValidationException if validation of the parameter fails due to wrong format of parameter. | private void validateNotificationType(String notificationType) throws SubscriptionValidationException {
String regexMail = "[\\s]*MAIL[\\\\s]*";
String regexRestPost = "[\\s]*REST_POST[\\\\s]*";
if (notificationType == null) {
throw new SubscriptionValidationException("Required field NotificationType has not been set");
} else if (!(Pattern.matches(regexMail, notificationType) || Pattern.matches(regexRestPost, notificationType))) {
throw new SubscriptionValidationException("Wrong format of NotificationType: " + notificationType);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void validateNotificationMessageKeyValues(List<NotificationMessageKeyValue> notificationMessage,\n String restPostBodyMediaType) throws SubscriptionValidationException {\n for (NotificationMessageKeyValue item : notificationMessage) {\n ... | [
"0.58321464",
"0.5682884",
"0.5598611",
"0.55980986",
"0.54853445",
"0.5324128",
"0.5144717",
"0.5033456",
"0.5029525",
"0.49592605",
"0.49310747",
"0.49229276",
"0.4920761",
"0.4879701",
"0.47925678",
"0.4722719",
"0.47158793",
"0.4713193",
"0.47089636",
"0.4698579",
"0.4691... | 0.7975092 | 0 |
Validation of email address Throws SubscriptionValidationException if validation of the parameter fails due to wrong format of parameter. | public void validateEmail(String email) throws SubscriptionValidationException {
final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$",
Pattern.CASE_INSENSITIVE);
Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(email);
if (!(matcher.matches())) {
throw new SubscriptionValidationException("Wrong email address: " + email);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void emailValidation(String email) throws Exception {\n Pattern pattern_email = Pattern.compile(\"^[a-z0-9._-]+@[a-z0-9._-]{2,}\\\\.[a-z]{2,4}$\");\n if (email != null) {\n if (!pattern_email.matcher(email).find()) {\n throw new Exception(\"The value is not a valid em... | [
"0.68853337",
"0.68673366",
"0.6716705",
"0.66992384",
"0.66383004",
"0.65384954",
"0.64817303",
"0.6422487",
"0.6412618",
"0.6362371",
"0.6361508",
"0.6322906",
"0.631826",
"0.6300979",
"0.6256362",
"0.62314487",
"0.62282485",
"0.62282485",
"0.62282485",
"0.62282485",
"0.619... | 0.7778275 | 0 |
position in x axis | public BarPoints(int amplitude) {
this.amplitude = amplitude;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getXPosition();",
"public float getxPosition() {\n return xPosition;\n }",
"public int getXPosition(){\n\t\treturn xPosition;\n\t}",
"double getPositionX();",
"double getPositionX();",
"double getPositionX();",
"public int getX()\n {\n return xaxis;\n }",
"public double getPosit... | [
"0.73729223",
"0.733773",
"0.7333336",
"0.73319894",
"0.73319894",
"0.73319894",
"0.72962624",
"0.72833747",
"0.72831166",
"0.72831166",
"0.7265196",
"0.72594684",
"0.72550935",
"0.7244515",
"0.7244515",
"0.724371",
"0.7240165",
"0.7224945",
"0.7205317",
"0.72038877",
"0.7203... | 0.0 | -1 |
Gets a parameter as a string. | public static String getParameter( HttpServletRequest request, String paramName ) {
return getParameter( request, paramName, false );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getParamAsString(String paramName);",
"String toParameter();",
"java.lang.String getParameterValue();",
"String getParamsAsString();",
"public java.lang.String getParameterValue() {\n java.lang.Object ref = parameterValue_;\n if (ref instanceof java.lang.String) ... | [
"0.74358916",
"0.7367759",
"0.72383803",
"0.7231555",
"0.69888705",
"0.6978145",
"0.6952233",
"0.6881899",
"0.6853556",
"0.68520266",
"0.6790726",
"0.6712124",
"0.66958266",
"0.6622021",
"0.65476596",
"0.65405077",
"0.65325814",
"0.65325814",
"0.6463749",
"0.64563555",
"0.645... | 0.0 | -1 |
Gets a parameter as a string. | public static String getParameter( HttpServletRequest request, String paramName, boolean emptyStringsOK ) {
String temp = request.getParameter(paramName);
if( temp != null ) {
if( temp.equals("") && !emptyStringsOK ) {
return null;
}
else {
return temp;
}
}
else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getParamAsString(String paramName);",
"String toParameter();",
"java.lang.String getParameterValue();",
"String getParamsAsString();",
"public java.lang.String getParameterValue() {\n java.lang.Object ref = parameterValue_;\n if (ref instanceof java.lang.String) ... | [
"0.74358916",
"0.7367759",
"0.72383803",
"0.7231555",
"0.69888705",
"0.6978145",
"0.6952233",
"0.6881899",
"0.6853556",
"0.68520266",
"0.6790726",
"0.6712124",
"0.66958266",
"0.6622021",
"0.65476596",
"0.65405077",
"0.65325814",
"0.65325814",
"0.6463749",
"0.64563555",
"0.645... | 0.0 | -1 |
Gets a parameter as a boolean. | public static boolean getBooleanParameter( HttpServletRequest request, String paramName ) {
String temp = request.getParameter(paramName);
if( temp != null && temp.equals("true") ) {
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasParameterValue();",
"public boolean getBooleanParam(String theAlias) {\n String name = getAlias(theAlias);\n\n if (!allParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter hasn't been added...\");\... | [
"0.7555501",
"0.75173485",
"0.7328577",
"0.7247233",
"0.71317625",
"0.71317625",
"0.7012333",
"0.68834525",
"0.68772966",
"0.68654567",
"0.68654567",
"0.68279016",
"0.6816085",
"0.6813897",
"0.6793151",
"0.67627895",
"0.67321473",
"0.6708763",
"0.667042",
"0.6661466",
"0.6644... | 0.6754925 | 17 |
Gets a parameter as a int. | public static int getIntParameter( HttpServletRequest request, String paramName, int defaultNum ) {
String temp = request.getParameter(paramName);
if( temp != null && !temp.equals("") ) {
int num = defaultNum;
try {
num = Integer.parseInt(temp);
}
catch( Exception ignored ) {}
return num;
} else {
return defaultNum;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getParamAsInt(String paramName);",
"public Integer getParaToInt(String name) {\n\t\treturn toInt(request.getParameter(name), null);\n\t}",
"public int getParameterAsInt(String name)\n\t{\n\t\tassert name != null;\n\n\t\tConverter c = ConvertUtils.lookup(java.lang.Integer.class);\n\n\t\treturn ((Inte... | [
"0.72282904",
"0.7178857",
"0.7130664",
"0.71254575",
"0.69929135",
"0.69269663",
"0.6918645",
"0.6913139",
"0.6913139",
"0.68765306",
"0.68281126",
"0.6715252",
"0.667336",
"0.66720176",
"0.66720176",
"0.66207474",
"0.65940565",
"0.65519863",
"0.65420526",
"0.6491441",
"0.64... | 0.6180987 | 51 |
Gets a checkbox parameter value as a boolean. | public static boolean getCheckboxParameter( HttpServletRequest request, String paramName ) {
String temp = request.getParameter(paramName);
if( temp != null && temp.equals("on") ) {
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean getBoolValue();",
"boolean getBoolValue();",
"boolean getIsChecked();",
"public Boolean getCheckBox() {\n return (Boolean) getAttributeInternal(CHECKBOX);\n }",
"public static boolean getBooleanFromCheckbox(Request request, String parameterName){\n\t\tboolean result = false;\n\t\tString p... | [
"0.74916255",
"0.74916255",
"0.73603356",
"0.7232357",
"0.7135299",
"0.698895",
"0.68809223",
"0.6872132",
"0.6775407",
"0.6775407",
"0.6766272",
"0.6766272",
"0.67327946",
"0.6732095",
"0.67274725",
"0.6722427",
"0.6705922",
"0.66939694",
"0.6670474",
"0.66309136",
"0.657292... | 0.72438055 | 3 |
Gets a parameter as a string. | public static String getAttribute( HttpServletRequest request, String attribName ) {
return getAttribute( request, attribName, false );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getParamAsString(String paramName);",
"String toParameter();",
"java.lang.String getParameterValue();",
"String getParamsAsString();",
"public java.lang.String getParameterValue() {\n java.lang.Object ref = parameterValue_;\n if (ref instanceof java.lang.String) ... | [
"0.74358916",
"0.7367759",
"0.72383803",
"0.7231555",
"0.69888705",
"0.6978145",
"0.6952233",
"0.6881899",
"0.6853556",
"0.68520266",
"0.6790726",
"0.6712124",
"0.66958266",
"0.6622021",
"0.65476596",
"0.65405077",
"0.65325814",
"0.65325814",
"0.6463749",
"0.64563555",
"0.645... | 0.0 | -1 |
Gets a parameter as a string. | public static String getAttribute( HttpServletRequest request, String attribName, boolean emptyStringsOK ) {
String temp = (String)request.getAttribute(attribName);
if( temp != null ) {
if( temp.equals("") && !emptyStringsOK ) {
return null;
}
else {
return temp;
}
}
else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getParamAsString(String paramName);",
"String toParameter();",
"java.lang.String getParameterValue();",
"String getParamsAsString();",
"public java.lang.String getParameterValue() {\n java.lang.Object ref = parameterValue_;\n if (ref instanceof java.lang.String) ... | [
"0.74358916",
"0.7367759",
"0.72383803",
"0.7231555",
"0.69888705",
"0.6978145",
"0.6952233",
"0.6881899",
"0.6853556",
"0.68520266",
"0.6790726",
"0.6712124",
"0.66958266",
"0.6622021",
"0.65476596",
"0.65405077",
"0.65325814",
"0.65325814",
"0.6463749",
"0.64563555",
"0.645... | 0.0 | -1 |
Gets an attribute as a boolean. | public static boolean getBooleanAttribute( HttpServletRequest request, String attribName ) {
String temp = (String)request.getAttribute(attribName);
if( temp != null && temp.equals("true") ) {
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Boolean getBooleanAttribute();",
"boolean isAttribute();",
"public Boolean getBoolean(String attr) {\n return (Boolean) super.get(attr);\n }",
"String booleanAttributeToGetter(String arg0);",
"private boolean getBooleanAttribute(Element element, String attributeName)\n {\n String value... | [
"0.8012639",
"0.771098",
"0.76971966",
"0.7266303",
"0.72497225",
"0.71992046",
"0.71210295",
"0.7012839",
"0.6841479",
"0.6737898",
"0.6728627",
"0.6728627",
"0.6701904",
"0.6625269",
"0.65718824",
"0.65686655",
"0.6517567",
"0.6489932",
"0.6483599",
"0.64526814",
"0.6450271... | 0.64226097 | 23 |
Gets an attribute as a int. | public static int getIntAttribute( HttpServletRequest request, String attribName, int defaultNum ) {
String temp = (String)request.getAttribute(attribName);
if( temp != null && !temp.equals("") ) {
int num = defaultNum;
try {
num = Integer.parseInt(temp);
}
catch( Exception ignored ) {}
return num;
} else {
return defaultNum;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getIntegerAttribute();",
"public Integer getInt(String attr) {\n return (Integer) super.get(attr);\n }",
"private int getIntAttribute(Element element, String attributeName)\n {\n try\n {\n return Integer.parseInt(getAttribute(element,attributeName));\n }\n catch (Numb... | [
"0.8134853",
"0.7786876",
"0.74895054",
"0.7260403",
"0.7174908",
"0.7149092",
"0.71483064",
"0.70317715",
"0.69982445",
"0.69185895",
"0.68514293",
"0.68395114",
"0.6824363",
"0.67706674",
"0.65998805",
"0.6589862",
"0.65552515",
"0.6549462",
"0.654366",
"0.6531099",
"0.6463... | 0.61855334 | 42 |
Declared the Method as Final , so It cannot be overridden | public final void Display() {
//Displaying the Total Leave count
System.out.println("Employee leave count per year : " + myLeaveCount);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n boolean isFinal() {\n return false;\n }",
"@Override\n protected void prot() {\n }",
"@Override\n\tvoid methodabstract() {\n\t\t\n\t}",
"final void finalMethod() { // this can not be overridden\n\t\tSystem.out.println(\"This is final method\");\n\t}",
"@O... | [
"0.7409703",
"0.7105886",
"0.7076879",
"0.7030785",
"0.7002597",
"0.69845843",
"0.6959664",
"0.6848674",
"0.6790103",
"0.67885536",
"0.67885536",
"0.6746633",
"0.6736451",
"0.67155534",
"0.6693348",
"0.6661832",
"0.66604006",
"0.6635462",
"0.6631512",
"0.6624031",
"0.6619489"... | 0.0 | -1 |
Create a new CssTextEmphasisStyle | public CssTextEmphasisStyle() {
value = initial;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Emphasis() {\n super(null);\n }",
"public void setEmphasis(double emphasisLevel);",
"@Override\n\tprotected TextAttribute createTextAttribute(String[] stylePrefs) {\n\t\tint fontModifier = SWT.NORMAL;\n\t\tif (Boolean.valueOf(stylePrefs[2]).booleanValue()) { // bold\n\t\t\tfontModifier |= SWT.... | [
"0.6502912",
"0.6492309",
"0.6160769",
"0.61192715",
"0.60267186",
"0.5988283",
"0.5930947",
"0.5891417",
"0.58760285",
"0.5758972",
"0.5688202",
"0.5634363",
"0.5617608",
"0.5576898",
"0.552674",
"0.54802114",
"0.5420308",
"0.5411479",
"0.54027575",
"0.53702813",
"0.5367776"... | 0.8411388 | 0 |
Creates a new CssTextEmphasisStyle | public CssTextEmphasisStyle(ApplContext ac, CssExpression expression, boolean check)
throws InvalidParamException {
if (check && expression.getCount() > 2) {
throw new InvalidParamException("unrecognize", ac);
}
setByUser();
CssValue val;
char op;
CssValue styleValue = null;
CssValue formValue = null;
val = expression.getValue();
op = expression.getOperator();
switch (val.getType()) {
case CssTypes.CSS_STRING:
CssString s = val.getString();
// limit of 1 character + two surrounding quotes
// TODO might be a warning only
if (s.toString().length() != 3) {
throw new InvalidParamException("value",
s, getPropertyName(), ac);
}
if (check && expression.getCount() != 1) {
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
value = val;
break;
case CssTypes.CSS_IDENT:
CssIdent ident = val.getIdent();
if (CssIdent.isCssWide(ident)) {
value = val;
if (check && expression.getCount() != 1) {
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
} else if (none.equals(ident)) {
value = val;
if (check && expression.getCount() != 1) {
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
} else {
boolean match = false;
int nbgot = 0;
do {
match = false;
if (styleValue == null) {
match = (getShapeStyle(ident) != null);
if (match) {
styleValue = val;
}
}
if (!match && formValue == null) {
match = (getShapeForm(ident) != null);
if (match) {
formValue = val;
}
}
if (!match) {
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
nbgot++;
if (expression.getRemainingCount() == 1 || (nbgot == 2)) {
// if we have both, exit
// (needed only if check == false...
break;
}
if (op != CssOperator.SPACE) {
throw new InvalidParamException("operator",
Character.toString(op), ac);
}
expression.next();
val = expression.getValue();
op = expression.getOperator();
if (val.getType() != CssTypes.CSS_IDENT) {
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
ident = val.getIdent();
} while (!expression.end());
// now construct the value
if (formValue != null && styleValue != null) {
ArrayList<CssValue> v = new ArrayList<CssValue>(2);
v.add(styleValue);
v.add(formValue);
value = new CssValueList(v);
} else {
value = (formValue == null) ? styleValue : formValue;
}
}
break;
default:
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
expression.next();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CssTextEmphasisStyle() {\n value = initial;\n }",
"public Emphasis() {\n super(null);\n }",
"public void setEmphasis(double emphasisLevel);",
"@Override\n\tprotected TextAttribute createTextAttribute(String[] stylePrefs) {\n\t\tint fontModifier = SWT.NORMAL;\n\t\tif (Boolean.valueO... | [
"0.84163797",
"0.65813965",
"0.64763504",
"0.60052073",
"0.5996446",
"0.58658236",
"0.5753067",
"0.57344157",
"0.5681239",
"0.56437534",
"0.5600564",
"0.5580281",
"0.556176",
"0.54797155",
"0.5459858",
"0.5301995",
"0.5282783",
"0.5240001",
"0.5211758",
"0.5203743",
"0.519338... | 0.5485455 | 13 |
1 Type code to create a list of names. Use ArrayList. | public static void main(String[] args) {
List<String> nome = new ArrayList<>();
nome.add("Rafael");
nome.add("Ze");
nome.add("Bruno");
nome.add("Manoel");
//2 - Call print method to print the list passed as its parameter.
print(nome);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract List toNameValueList();",
"public MyList(String name) {\n nameList = name;\n }",
"@Nonnull List<String> getNameList();",
"public void addNames() {}",
"public void addNames() {}",
"public void addList(String name){\n }",
"StringList createStringList();",
"Collection<String... | [
"0.7480065",
"0.7135159",
"0.69895387",
"0.6961326",
"0.6961326",
"0.6953441",
"0.6932143",
"0.68349755",
"0.6814714",
"0.6797501",
"0.6699277",
"0.66393065",
"0.6607175",
"0.6495391",
"0.64926136",
"0.64673",
"0.646479",
"0.64551985",
"0.63452655",
"0.62984544",
"0.6293677",... | 0.0 | -1 |
3 Type code to print this list Notice the order in which elements get printed. | static void print(List list)
{
for(int i= 0; i < list.size(); i++){
System.out.println(list.get(i));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }",
"void printList();",
"public static void listToPrint() {\r\n for (int i = 0; i < ListeElem.size(); i++) {\r\n ListeElem.get(i).toPrint();\r\n }\r\n\r\n }",... | [
"0.7454117",
"0.72018224",
"0.71469563",
"0.7027548",
"0.70057243",
"0.70019937",
"0.69158846",
"0.6864388",
"0.68457574",
"0.68218744",
"0.6816348",
"0.6783979",
"0.677647",
"0.6754005",
"0.67513776",
"0.6735838",
"0.67235816",
"0.6705376",
"0.6700308",
"0.6697215",
"0.66798... | 0.71212465 | 3 |
Construct a fraction with numerator 0 and denominator 1. | public Fraction() {
this.numerator = 0;
this.denominator = 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fraction(){\n numerator = 0;\n denominator = 1;\n }",
"public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }",
"public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }",
"public Fraction(int num... | [
"0.73419213",
"0.729374",
"0.71447426",
"0.7126944",
"0.7072726",
"0.70722294",
"0.7027578",
"0.68173444",
"0.6612372",
"0.6585001",
"0.64510006",
"0.64381844",
"0.6404969",
"0.6403607",
"0.6401081",
"0.6372926",
"0.63633144",
"0.63466847",
"0.6328239",
"0.63279337",
"0.62829... | 0.7337059 | 1 |
Construct a fraction with the given numerator and a denominator of 1. | public Fraction(int numerator) {
this.numerator = numerator;
this.denominator = 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }",
"public Fraction(){\n numerator = 0;\n denominator = 1;\n }",
"private static Expression reduceFraction(int numerator, int denominator)\r\n\t{\r\n\t\tif(denominator == 0)\r\n\t\t{\r\n\t... | [
"0.7608738",
"0.7257748",
"0.7206333",
"0.71882033",
"0.7162856",
"0.7055204",
"0.7054266",
"0.7033834",
"0.69758576",
"0.6950562",
"0.69252545",
"0.6817358",
"0.676338",
"0.6744618",
"0.6742868",
"0.6700066",
"0.669753",
"0.6684311",
"0.65964663",
"0.6584169",
"0.6561275",
... | 0.76905686 | 0 |
Construct a fraction with the given numerator and denominator. The fraction is reduced if necessary, per the reduction rule described in the class comment. If the demoninator is less than 1, the constructor throws an IllegalArgumentException. | public Fraction(int numerator, int denominator) {
if(denominator < 1)
throw new IllegalArgumentException();
this.numerator = numerator;
this.denominator = denominator;
this.reduce();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fraction(int numerator, int denominator) {\n\n //won't allow you to set the denominator equal to 0 because dividing by a 0 gives you an error\n if (denominator == 0) {\n throw new PizzaException(\"denominator can't be 0\");\n } else {\n //finding the GCD value depe... | [
"0.769147",
"0.76506054",
"0.7640758",
"0.7631136",
"0.75896424",
"0.7551716",
"0.7487856",
"0.7403842",
"0.7388683",
"0.7357759",
"0.7324771",
"0.71866673",
"0.71263415",
"0.71221817",
"0.6971707",
"0.69655466",
"0.6925429",
"0.67677367",
"0.66884756",
"0.66829264",
"0.66658... | 0.79222566 | 0 |
Add the given fraction to this fraction and return the result as a third new fraction. | public Fraction add(Fraction f) {
/** Equal denominators */
if( f.getDenominator() == this.denominator )
return new Fraction( f.getNumerator() + this.numerator, this.denominator);
/** Unlike denominators */
/** The least common multiple found between both denominators. */
int lcd = getLCD(this.denominator, f.getDenominator());
/** Common algorithm to find new numerator with least common denominator(lcd): lcd / denominator * numerator */
return new Fraction( (lcd / this.denominator * this.numerator) + (lcd / f.getDenominator() * f.getNumerator()), lcd);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fraction add(Fraction f){\n return new Fraction(this.numerator * f.denominator + f.numerator * this.denominator, this.denominator * f.denominator);\n }",
"public Fraction add(Fraction newFraction) {\n\t\tint newNumerator = numerator * newFraction.getDenominator() + newFraction.getNumerator() * d... | [
"0.7376459",
"0.70241046",
"0.6546437",
"0.64846224",
"0.62908334",
"0.61997306",
"0.59962136",
"0.5933006",
"0.59307724",
"0.5911679",
"0.58060384",
"0.5757529",
"0.56663185",
"0.5644573",
"0.55458254",
"0.5495983",
"0.5467118",
"0.5458842",
"0.54575694",
"0.5440055",
"0.542... | 0.6636181 | 2 |
Divide this fraction by the given fraction and return the result as a third new fraction. | public Fraction div(Fraction f) {
/** Accounts for the input of a negative fraction */
if(f.getNumerator() < 0)
return new Fraction( (-1) * (this.numerator * f.getDenominator()), Math.abs(this.denominator * f.getNumerator()));
return new Fraction( (this.numerator * f.getDenominator()), (this.denominator * f.getNumerator()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fraction divide(Fraction divisor)\n {\n Fraction flipDivisor = divisor.reciprocal();\n Fraction newFraction = new Fraction();\n newFraction = this.multiply(flipDivisor);\n return newFraction;\n }",
"public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f... | [
"0.71590275",
"0.7053965",
"0.66585225",
"0.64648134",
"0.64310044",
"0.64051455",
"0.63264626",
"0.6141372",
"0.598685",
"0.5981499",
"0.59505033",
"0.59236974",
"0.58719033",
"0.5858945",
"0.58462375",
"0.58205426",
"0.58089477",
"0.5793595",
"0.5731946",
"0.56850994",
"0.5... | 0.62483656 | 7 |
Return true if this fraction equals the given fraction, i.e, the numerator and denominator of the two fractions are equal. | public boolean equals(Fraction f) {
return (this.numerator == f.getNumerator()) && (this.denominator == f.getDenominator());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean equals(Fraction other) {\n if (numerator == other.numerator && denominator == other.denominator) {\n return true;\n }\n if (((double) denominator / other.denominator) * other.numerator == numerator) {\n return true;\n }\n return false;\n }"... | [
"0.816099",
"0.7680238",
"0.76329887",
"0.7545471",
"0.6900889",
"0.6574146",
"0.6249046",
"0.6130762",
"0.6052914",
"0.5623474",
"0.557177",
"0.5444373",
"0.5338487",
"0.52917093",
"0.5260674",
"0.5249004",
"0.51824474",
"0.5163737",
"0.5154962",
"0.51028657",
"0.5045884",
... | 0.77341217 | 1 |
Return the value of this fraction's denominator. | public int getDenominator() {
return this.denominator;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double value() {\n return ((double) this.numerator / this.denominator);\n }",
"public double getValue(){\n return (double) numerator / (double) denominator;\n }",
"public int getDenominator()\n {\n return this.denominator;\n }",
"public double getDoubleValue() {\n\t\tretur... | [
"0.8344972",
"0.80996764",
"0.78470117",
"0.7832457",
"0.7719006",
"0.7650796",
"0.74817955",
"0.7319272",
"0.7309314",
"0.7209958",
"0.7174125",
"0.70961523",
"0.69687223",
"0.68913347",
"0.6827705",
"0.67610013",
"0.66602844",
"0.6647819",
"0.6614602",
"0.65952015",
"0.6573... | 0.7851254 | 2 |
Return the value of this fraction's numerator. | public int getNumerator() {
return this.numerator;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getNumeratorValue() {\n return numeratorValue;\n }",
"public double value() {\n return ((double) this.numerator / this.denominator);\n }",
"public int getNumerator() {\n return numerator;\n }",
"public int getNumerator() {\n return numerator; \n }",
"public int ... | [
"0.7747401",
"0.766439",
"0.73225456",
"0.725295",
"0.7202507",
"0.7188848",
"0.7188451",
"0.71743435",
"0.71258783",
"0.71172714",
"0.6769066",
"0.6629849",
"0.65996134",
"0.65874064",
"0.65803486",
"0.65081704",
"0.65019536",
"0.6428446",
"0.64235234",
"0.64158493",
"0.6393... | 0.72515035 | 4 |
Multiply this fraction by the given fraction and return the result as a third new fraction. | public Fraction mul(Fraction f) {
return new Fraction(this.numerator * f.getNumerator(), this.denominator * f.getDenominator());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fraction multiply(Fraction f){\n return new Fraction(this.numerator * f.numerator, this.denominator * f.denominator);\n }",
"public Fraction mul(Fraction newFraction) {\n\t\tint newNumerator = numerator * newFraction.getNumerator();\n\t\tint newDenominator = denominator * newFraction.getDenomina... | [
"0.6944287",
"0.66991925",
"0.66254336",
"0.66023874",
"0.6303425",
"0.62595797",
"0.6116578",
"0.60822695",
"0.6028309",
"0.58956623",
"0.58063895",
"0.5771488",
"0.57515544",
"0.5751225",
"0.57321686",
"0.5685446",
"0.5655192",
"0.56270164",
"0.55916244",
"0.5579885",
"0.55... | 0.64740545 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.