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 |
|---|---|---|---|---|---|---|
/////////////////////////////////// controle de saisie | public boolean verifisTel(String text) {
if (text.matches("^[0-9]+$")&& text.length()==8) {
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void validerSaisie();",
"public void sendeSpielfeld();",
"public void sinyal();",
"private static void cajas() {\n\t\t\n\t}",
"public Salle() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"@Override\r\n public void salir() {\n }",
"public void selecao () {}",
"@Over... | [
"0.7040881",
"0.6650081",
"0.6645409",
"0.6592165",
"0.6503555",
"0.6437071",
"0.64255095",
"0.6375213",
"0.63699585",
"0.63479537",
"0.6340272",
"0.632486",
"0.6315668",
"0.62993705",
"0.6292997",
"0.624402",
"0.6180158",
"0.61452466",
"0.6129121",
"0.6116451",
"0.6110207",
... | 0.0 | -1 |
gives me the data inside each student | private static void printList(Student[] students)
{
for(int index = 0; index < students.length; index++)
{
System.out.println(students[index].toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }",
"public static List<Student> getAllStudents(){\r\n Student student1 = new Student(\"Dowlath\",2,3.6,\"male\", Arrays.asList(\"Swim\",\"BasketBall\",\"Vol... | [
"0.76163894",
"0.728239",
"0.7195866",
"0.7126184",
"0.7073696",
"0.7030212",
"0.6978974",
"0.6922225",
"0.689837",
"0.68938315",
"0.6877025",
"0.6860954",
"0.67416275",
"0.6733876",
"0.6712703",
"0.6700541",
"0.66914177",
"0.66880596",
"0.66857255",
"0.66675764",
"0.6651688"... | 0.0 | -1 |
creates a random year for the new students | private static String randomYear()
{
String year = "";
int number = ran.nextInt(4);
switch(number)
{
case 0:
year = "freshman";
break;
case 1:
year = "sophmore";
break;
case 2:
year = "junior";
break;
case 3:
year = "senior";
break;
}
return year;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Year createYear();",
"Years createYears();",
"public static String generatesRandomDate(int startYear, int endYear) {\n int day = generatesRandomIntBetween(1, 28);\n int month = generatesRandomIntBetween(1, 12);\n int year = generatesRandomIntBetween(startYear, endYear);\n return Loc... | [
"0.7579593",
"0.7373381",
"0.6707096",
"0.66485125",
"0.6529767",
"0.64818496",
"0.64690846",
"0.6355507",
"0.63268536",
"0.6324462",
"0.62961775",
"0.61772877",
"0.61528945",
"0.61387604",
"0.60931337",
"0.60747284",
"0.6061298",
"0.60437614",
"0.6024034",
"0.5989173",
"0.59... | 0.76907396 | 0 |
determins where the names text file is located | private static void findPath()
{
String temp_path = System.getProperty("user.dir");
char last = temp_path.charAt(temp_path.length() - 1);
if(last == 'g')
{
path = ".";
}
else
{
path = "./bag";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }",
"java.lang.String getFileLoc();",
"p... | [
"0.6164388",
"0.61104083",
"0.60554117",
"0.60457927",
"0.60181177",
"0.58532757",
"0.583678",
"0.5792918",
"0.5756446",
"0.575085",
"0.575085",
"0.575085",
"0.575085",
"0.575085",
"0.575085",
"0.575085",
"0.575085",
"0.575085",
"0.5720626",
"0.5708769",
"0.57082623",
"0.57... | 0.5463926 | 41 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | long countByExample(ExamineApproveResultExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.6268564",
"0.5829177",
"0.57739544",
"0.5738189",
"0.5733611",
"0.57072127",
"0.5609223",
"0.55459464",
"0.5527544",
"0.5478476",
"0.54689765",
"0.54689765",
"0.5468003",
"0.5468003",
"0.54678464",
"0.5415083",
"0.5364096",
"0.53490275",
"0.5332027",
"0.5312459",
"0.526802... | 0.5286613 | 20 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | int deleteByExample(ExamineApproveResultExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.627049",
"0.58273876",
"0.5775151",
"0.5739874",
"0.573375",
"0.57080424",
"0.56081384",
"0.5546899",
"0.5528579",
"0.54796284",
"0.54668516",
"0.54668516",
"0.5465869",
"0.5465869",
"0.5465719",
"0.541476",
"0.5365949",
"0.53479314",
"0.5329164",
"0.53141654",
"0.528606",... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | int deleteByPrimaryKey(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.62689435",
"0.5827654",
"0.5773799",
"0.5738025",
"0.5733498",
"0.57071334",
"0.5608273",
"0.5545523",
"0.55277854",
"0.54778296",
"0.5466109",
"0.5466109",
"0.5465129",
"0.5465129",
"0.54649764",
"0.54148495",
"0.5364962",
"0.53472847",
"0.5331203",
"0.53131014",
"0.52857... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | int insert(ExamineApproveResult record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.6270248",
"0.582975",
"0.5775514",
"0.57393193",
"0.5734999",
"0.570833",
"0.5607461",
"0.5528359",
"0.54763347",
"0.546608",
"0.546608",
"0.54651064",
"0.54651064",
"0.5464949",
"0.5413773",
"0.5364983",
"0.5350041",
"0.5333406",
"0.53128594",
"0.52886856",
"0.52692425",
... | 0.55465823 | 7 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | int insertSelective(ExamineApproveResult record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.6268564",
"0.5829177",
"0.57739544",
"0.5738189",
"0.5733611",
"0.5609223",
"0.55459464",
"0.5527544",
"0.5478476",
"0.54689765",
"0.54689765",
"0.5468003",
"0.5468003",
"0.54678464",
"0.5415083",
"0.5364096",
"0.53490275",
"0.5332027",
"0.5312459",
"0.5286613",
"0.5268024... | 0.57072127 | 5 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | List<ExamineApproveResult> selectByExample(ExamineApproveResultExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.627049",
"0.58273876",
"0.5775151",
"0.5739874",
"0.57080424",
"0.56081384",
"0.5546899",
"0.5528579",
"0.54796284",
"0.54668516",
"0.54668516",
"0.5465869",
"0.5465869",
"0.5465719",
"0.541476",
"0.5365949",
"0.53479314",
"0.5329164",
"0.53141654",
"0.528606",
"0.5266796"... | 0.573375 | 4 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | ExamineApproveResult selectByPrimaryKey(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n ... | [
"0.5827654",
"0.5773799",
"0.5738025",
"0.5733498",
"0.57071334",
"0.5608273",
"0.5545523",
"0.55277854",
"0.54778296",
"0.5466109",
"0.5466109",
"0.5465129",
"0.5465129",
"0.54649764",
"0.54148495",
"0.5364962",
"0.53472847",
"0.5331203",
"0.53131014",
"0.52857816",
"0.52674... | 0.62689435 | 0 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | int updateByExampleSelective(@Param("record") ExamineApproveResult record, @Param("example") ExamineApproveResultExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.6270248",
"0.582975",
"0.5775514",
"0.57393193",
"0.5734999",
"0.570833",
"0.5607461",
"0.55465823",
"0.5528359",
"0.54763347",
"0.546608",
"0.546608",
"0.54651064",
"0.54651064",
"0.5464949",
"0.5413773",
"0.5364983",
"0.5350041",
"0.5333406",
"0.53128594",
"0.52886856",
... | 0.4901908 | 51 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | int updateByExample(@Param("record") ExamineApproveResult record, @Param("example") ExamineApproveResultExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.6268564",
"0.5829177",
"0.57739544",
"0.5738189",
"0.5733611",
"0.57072127",
"0.5609223",
"0.55459464",
"0.5527544",
"0.5478476",
"0.54689765",
"0.54689765",
"0.5468003",
"0.5468003",
"0.54678464",
"0.5415083",
"0.5364096",
"0.53490275",
"0.5332027",
"0.5312459",
"0.528661... | 0.4776869 | 83 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | int updateByPrimaryKeySelective(ExamineApproveResult record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.627049",
"0.58273876",
"0.5739874",
"0.573375",
"0.57080424",
"0.56081384",
"0.5546899",
"0.5528579",
"0.54796284",
"0.54668516",
"0.54668516",
"0.5465869",
"0.5465869",
"0.5465719",
"0.541476",
"0.5365949",
"0.53479314",
"0.5329164",
"0.53141654",
"0.528606",
"0.5266796",... | 0.5775151 | 2 |
This method was generated by MyBatis Generator. This method corresponds to the database table examine_approve_result | int updateByPrimaryKey(ExamineApproveResult record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().ge... | [
"0.62689435",
"0.5827654",
"0.5773799",
"0.5733498",
"0.57071334",
"0.5608273",
"0.5545523",
"0.55277854",
"0.54778296",
"0.5466109",
"0.5466109",
"0.5465129",
"0.5465129",
"0.54649764",
"0.54148495",
"0.5364962",
"0.53472847",
"0.5331203",
"0.53131014",
"0.52857816",
"0.5267... | 0.5738025 | 3 |
Called when the activity is first created. | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Globals.myContext = this;
myStats = new Stats();
thisLocation = new MyLocationListener(this);
thisDob = new DobOrientation(this);
//textSiderealTime = (EditText) findViewById(R.id.EditTextTimeSidereal);
textAltitude = (EditText) findViewById(R.id.EditTextAlt);
textAzimuth = (EditText) findViewById(R.id.EditTextAz);
textScopeAltitude = (EditText) findViewById(R.id.EditTextScopeAlt);
textScopeAzimuth = (EditText) findViewById(R.id.EditTextScopeAz);
textRA = (EditText) findViewById(R.id.EditTextRA);
textDEC = (EditText) findViewById(R.id.EditTextDEC);
ButtonSync = (Button)findViewById(R.id.buttonSync);
mySyncClicker = new SyncClicked();
ButtonSync.setOnClickListener(mySyncClicker);
ButtonMakeClosest = (Button)findViewById(R.id.buttonSetClosest);
ButtonMakeClosest.setOnClickListener(this);
ButtonSkyView = (Button)findViewById(R.id.buttonSkyView);
ButtonSkyView.setOnClickListener(this);
objectName = (TextView)findViewById(R.id.TextView09);
counter = new MyCount(15000, 1000);
counter.start();
spinner_group= (Spinner) findViewById(R.id.Spinner02);
String myGroups[] = new String[5];
myGroups[0] = "Messier";
myGroups[1] = "Planets";
myGroups[2] = "Stars";
myGroups[3] = "User";
myGroups[4] = "Closest";
// adapterGroups = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, myGroups);
adapterGroups = new ArrayAdapter<String>(this, R.layout.myspinnerlayout, myGroups);
adapterGroups.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner_group.setAdapter(adapterGroups);
OnItemSelectedListener spinnerListener = new myOnItemSelectedListener(this,this.adapterGroups);
spinner_group.setOnItemSelectedListener(spinnerListener);
spinner = (Spinner) findViewById(R.id.Spinner01);
myMessiers = new Messier();
myPlanets = new Planets();
myStars = new Stars();
myClosestObjs = new ClosestObjs();
try {
myObjects = new UserObjects();
} catch (FileNotFoundException e1) {
Log.v("Debug", "File not found");
e1.printStackTrace();
}
objectSet = 0;
String[] someStrings;//= new String[110];
someStrings = myMessiers.GetStrings();
adapterMessier = new ArrayAdapter<String>(this, R.layout.myspinnerlayout, someStrings);
adapterMessier.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapterMessier);
spinnerListener = new myOnItemSelectedListener(this, this.adapterMessier);
spinner.setOnItemSelectedListener(spinnerListener);
String[] somePlanets = myPlanets.GetStrings();
adapterPlanets = new ArrayAdapter<String>(this, R.layout.myspinnerlayout, somePlanets);
String[] someStars = myStars.GetStrings();
adapterStars = new ArrayAdapter<String>(this, R.layout.myspinnerlayout, someStars);
String[] someClosestObjs = myClosestObjs.GetStrings();
adapterClosestObjects = new ArrayAdapter<String>(this, R.layout.myspinnerlayout, someClosestObjs);
Log.v("Debug", "Getting obj strings");
String[] someObjs;
if( myObjects != null )
{
someObjs = myObjects.GetStrings();
}
else
{
someObjs = new String[1];
someObjs[0] = ("No user objects defined");
}
Log.v("Debug", "Got obj strings");
if( someObjs != null )
adapterUserObjects = new ArrayAdapter<String>(this, R.layout.myspinnerlayout, someObjs);
Log.v("Debug", "On create finished");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}",
"@Override\n\tpublic void onActivit... | [
"0.791686",
"0.77270156",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7637394",
"0.7637394",
"0.7629958",
"0.76189965",
"0.76189965",
"0.7543775",
"0.7540053",
"0.7540053",
"0.7539505",
"0.75269467",
"0.75147736",
"0.7509639",
"0.7500879",... | 0.0 | -1 |
This method is called once the menu is selected | @Override
public boolean onOptionsItemSelected(MenuItem item) {
String str = String.format("Menu %d", item.getItemId());
Log.v("Debug", str);
switch (item.getItemId()) {
case R.id.About:
AboutDialog myAboutBox = new AboutDialog(this);
myAboutBox.show();
break;
case R.id.settings:
Log.v("Debug", "Settings dialog - creating");
SettingsDialog mySettingsBox = new SettingsDialog(this);
Log.v("Debug", "Settings dialog completed");
mySettingsBox.Init();
mySettingsBox.show();
Log.v("Debug", "Settings shown");
break;
case R.id.user:
// Log.v("Debug", "Starting file dialog");
//Intent intent = new Intent(/*getBaseContext()*/C2H.this, FileDialog.class);
// Log.v("Debug", "Starting file dialog put extra");
//intent.putExtra(FileDialog.START_PATH, "/sdcard");
// Log.v("Debug", "Starting file dialog start activity");
//startActivityForResult(intent, REQUEST_SAVE);
Log.v("Debug", "Starting file dialog done");
Intent fileIntent = new Intent(C2H.this, FileDialog.class);
Log.v("Debug", "FD - put extra");
fileIntent.putExtra(FileDialog.START_PATH, "/sdcard");
Log.v("Debug", "FD - start activity");
startActivityForResult(fileIntent, REQUEST_SAVE);
Log.v("Debug", "Starting file dialog done");
break;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t... | [
"0.7958359",
"0.78801763",
"0.78801763",
"0.76544225",
"0.75344884",
"0.75049174",
"0.7423944",
"0.7338095",
"0.7302043",
"0.70774174",
"0.706653",
"0.70264244",
"0.69746774",
"0.69483626",
"0.6912933",
"0.6892993",
"0.6876915",
"0.6826383",
"0.681823",
"0.6797833",
"0.678857... | 0.0 | -1 |
inputs like ra => 3h47.0 dec => 24 07.0 lat => 42 01.2 lon => 89 06.2 | public void coord_to_horizon( Calendar utc, String ra_in, String dec_in, double lat_in, double lon_in )
{
CoordConverter myConverter = new CoordConverter();
double ra = myConverter.RAString2Double(ra_in);
double dec = myConverter.DecString2Double(dec_in);
double lat = lat_in;//dms2real( Integer.parseInt(lat_str[0]), Double.parseDouble(lat_str[1]) );
double lon = lon_in;//dms2real( Integer.parseInt(lon_str[0]), Double.parseDouble(lon_str[1]) );
// compute hour angle in degrees
double ha = GetSiderealTime( utc, lon ) - ra;
if (ha < 0) ha = ha + 360;
// convert degrees to radians
ha = ha*Math.PI/180;
dec = dec*Math.PI/180;
lat = lat*Math.PI/180;
// compute altitude in radians
double sin_alt = Math.sin(dec)*Math.sin(lat) + Math.cos(dec)*Math.cos(lat)*Math.cos(ha);
double alt = Math.asin(sin_alt);
// compute azimuth in radians
// divide by zero error at poles or if alt = 90 deg
double cos_az = (Math.sin(dec) - Math.sin(alt)*Math.sin(lat))/(Math.cos(alt)*Math.cos(lat));
double az = Math.acos(cos_az);
// convert radians to degrees
hrz_altitude = alt*180/Math.PI;
hrz_azimuth = az*180/Math.PI;
// choose hemisphere
if (Math.sin(ha) > 0)
hrz_azimuth = 360 - hrz_azimuth;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String latitudeConversion() {\n int lat = record[1];\n if (lat >= 0) {\n lat = lat & 255;\n }\n lat = (lat << 8) + (record[0] & 255);\n float flat = Float.parseFloat((\"\" + lat + \".\" + (((record[3] & 255) << 8) + (record[2] & 255))));\n int degs = (in... | [
"0.6066618",
"0.5923294",
"0.58866435",
"0.57892627",
"0.5696503",
"0.5687761",
"0.5605201",
"0.55330604",
"0.5491223",
"0.54157907",
"0.54098916",
"0.5406378",
"0.53992397",
"0.5305911",
"0.52933216",
"0.5286363",
"0.5258395",
"0.5211024",
"0.5203866",
"0.5203747",
"0.518414... | 0.5821035 | 3 |
When the user selects an item in the spinner, this method is invoked by the callback chain. Android calls the item selected listener for the spinner, which invokes the onItemSelected method. | public void onItemSelected(AdapterView<?> parent, View v, int pos, long row) {
String str;
if( parent==spinner ){
str = String.format("Parent = (spinner), Objectset (%d), pos (%d), row *%d)", objectSet, pos, row);
Log.v("Debug", str);
globalPos = pos;
if( objectSet==0 ){
textRA.setText(myMessiers.GetRA(pos));
textDEC.setText(myMessiers.GetDEC(pos));
objectName.setText(myMessiers.GetName(pos));
}
if( objectSet==1 ){
Calendar now = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
myPlanets.UpdateRADEC((Calendar)now.clone(), pos);
textRA.setText(myPlanets.GetRA(pos));
textDEC.setText(myPlanets.GetDEC(pos));
objectName.setText(myPlanets.GetName(pos));
}
if( objectSet==2 ){
textRA.setText(myStars.GetRA(pos));
textDEC.setText(myStars.GetDEC(pos));
objectName.setText(myStars.GetName(pos));
}
if( objectSet==3 ){
if( myObjects == null )
{
textRA.setText("0h0");
textDEC.setText("0");
objectName.setText("None");
}
else
{
textRA.setText(myObjects.GetRA(pos));
textDEC.setText(myObjects.GetDEC(pos));
objectName.setText(myObjects.GetName(pos));
}
}
if( objectSet==4 ){
textRA.setText(myClosestObjs.GetRA(pos));
textDEC.setText(myClosestObjs.GetDEC(pos));
objectName.setText(myClosestObjs.GetName(pos));
}
}
if( parent==spinner_group ){
str = String.format("Parent = (spinner_group), Objectset (%d), pos (%d), row *%d)", objectSet, pos, row);
Log.v("Debug", str);
if( pos == 0 ){
adapterMessier.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapterMessier);
objectSet = 0;
}
if( pos == 1 ){
adapterPlanets.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapterPlanets);
objectSet = 1;
}
if( pos == 2 ){
adapterStars.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapterStars);
objectSet = 2;
}
if( pos == 3 ){
adapterUserObjects.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapterUserObjects);
objectSet = 3;
}
if( pos == 4 ){
adapterClosestObjects.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapterClosestObjects);
objectSet = 4;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\n\t}",
"@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int... | [
"0.78628355",
"0.7828422",
"0.7828422",
"0.78194904",
"0.77946705",
"0.7791902",
"0.77466995",
"0.77435",
"0.77405006",
"0.7719894",
"0.7689473",
"0.7684118",
"0.7675561",
"0.7672268",
"0.7672268",
"0.764863",
"0.7624386",
"0.7622231",
"0.7616864",
"0.7610979",
"0.7598095",
... | 0.0 | -1 |
The definition of OnItemSelectedListener requires an override of onNothingSelected(), even though this implementation does not use it. | public void onNothingSelected(AdapterView<?> parent) {
// do nothing
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n }",
"@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\n\t}",
"@Override\n\tpublic void onItemS... | [
"0.8063929",
"0.80173117",
"0.80173117",
"0.801277",
"0.79792273",
"0.7960603",
"0.7960089",
"0.79546744",
"0.79463965",
"0.79183203",
"0.7887913",
"0.7887913",
"0.7843319",
"0.7803931",
"0.7794661",
"0.7793044",
"0.7793044",
"0.7789063",
"0.7777863",
"0.7724553",
"0.7724553"... | 0.0 | -1 |
When OK Button is clicked, dismiss the dialog | public void onClick(View v) {
if (v == okButton)
dismiss();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void CloseOkDialog();",
"@Override\n public void onBtnClick() {\n dialog.dismiss();\n }",
"@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}",
"void dismissAlertDialog();",
"protected void closeDialogOk() {\n ... | [
"0.82063025",
"0.77744865",
"0.7717395",
"0.771683",
"0.771596",
"0.76693696",
"0.75819445",
"0.757859",
"0.75322396",
"0.75224483",
"0.75224483",
"0.7509434",
"0.7509434",
"0.75054777",
"0.75054777",
"0.74746084",
"0.74746084",
"0.74746084",
"0.74746084",
"0.7474115",
"0.746... | 0.7382843 | 55 |
TODO Autogenerated method stub | public void onClick(DialogInterface arg0, int arg1) {
} | {
"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 |
Function to setup Gesture listener | private void setupListener(){
/*
Listener to scrool video preview timeline when video timeline
more than layout width
*/
videoTimeline.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, final MotionEvent event) {
switch (event.getAction()){
// Detect Touch Down
case MotionEvent.ACTION_DOWN:
move1 = (int)event.getX();
break;
// Detect when gesture move
case MotionEvent.ACTION_MOVE:
// Detect if video preview timeline posision equal than layout start
if(videoTimeline.getCanvasWidthStart() == 0){
// Detect when scroll to left
if((int)event.getX() <= move1){
final Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if(isScrollRight && !isScrollLeft){
move4 = 0;
}
move2 = (int)event.getX();
if(Math.abs((move1 - move2) - move4) < (videoTimeline.getCanvasWidth() - usedWidth)){
move3 = move1 - move2;
move5 = move5 + (move3 - move4);
videoTimeline.setXPos(-Math.abs(move5));
canvasSeekPos = (move5 * duration) / (videoTimeline.getCanvasWidth() + Math.abs(videoTimeline.getCanvasWidthStart()));
// videoPlayerControl.setStartPos(rangeSeekPos + canvasSeekPos);
// videoPlayerControl.setEndPos(rangeSeekEndPos+canvasSeekPos);
WritableMap event = Arguments.createMap();
event.putInt(Events.START_POS, rangeSeekPos + canvasSeekPos);
WritableMap event2 = Arguments.createMap();
event2.putInt(Events.END_POS, rangeSeekEndPos+canvasSeekPos);
eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_START_POS.toString(), event);
eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_END_POS.toString(), event2);
move4 = move3;
isScrollRight = false;
isScrollLeft = true;
}
}
});
thread.run();
}
}else
// Detect if video preview timeline posision less than layout start
if(videoTimeline.getCanvasWidthStart() < 0){
// Detect when scroll to left
if((int)event.getX() <= move1){
final Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if(isScrollRight && !isScrollLeft){
move4 = 0;
}
move2 = (int)event.getX();
if(Math.abs((move1 - move2) - move4) < (videoTimeline.getCanvasWidth() - usedWidth)){
move3 = move1 - move2;
move5 = move5 + (move3 - move4);
videoTimeline.setXPos(-Math.abs(move5));
canvasSeekPos = (move5 * duration) / (videoTimeline.getCanvasWidth() + Math.abs(videoTimeline.getCanvasWidthStart()));
// videoPlayerControl.setStartPos(rangeSeekPos + canvasSeekPos);
// videoPlayerControl.setEndPos(rangeSeekEndPos+canvasSeekPos);
WritableMap event = Arguments.createMap();
event.putInt(Events.START_POS, rangeSeekPos + canvasSeekPos);
WritableMap event2 = Arguments.createMap();
event2.putInt(Events.END_POS, rangeSeekEndPos+canvasSeekPos);
eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_START_POS.toString(), event);
eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_END_POS.toString(), event2);
move4 = move3;
isScrollRight = false;
isScrollLeft = true;
}
}
});
thread.run();
}else
// Detect when scroll to right
if((int)event.getX() > move1){
final Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if(!isScrollRight && isScrollLeft){
move4 = 0;
}
move2 = (int) event.getX();
if (Math.abs((move5 - ((move2 - move1) - move4))) < Math.abs(videoTimeline.getCanvasWidthStart())) {
move3 = move2 - move1;
move5 = move5 - (move3 - move4);
videoTimeline.setXPos(-Math.abs(move5));
canvasSeekPos = (move5 * duration) / (videoTimeline.getCanvasWidth() + Math.abs(videoTimeline.getCanvasWidthStart()));
// videoPlayerControl.setStartPos(rangeSeekPos + canvasSeekPos);
// videoPlayerControl.setEndPos(rangeSeekEndPos+canvasSeekPos);
WritableMap event = Arguments.createMap();
event.putInt(Events.START_POS, rangeSeekPos + canvasSeekPos);
WritableMap event2 = Arguments.createMap();
event2.putInt(Events.END_POS, rangeSeekEndPos+canvasSeekPos);
eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_START_POS.toString(), event);
eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_END_POS.toString(), event2);
move4 = move3;
isScrollRight = true;
isScrollLeft = false;
}
}
});
thread.start();
}
}
break;
case MotionEvent.ACTION_UP:
move4 = 0;
break;
default:
break;
}
return true;
}
});
/*
Listener for seekbar control (Seekbar button left and right)
index (0) = button seek left
index (1) = button seek right
value = value of seekButton (0 - 100)
*/
seekbar.addOnRangeSeekBarListener(new OnRangeSeekBarListener() {
@Override
public void onCreate(CustomRangeSeekBarView customRangeSeekBarView, int index, float value) {
}
@Override
public void onSeek(CustomRangeSeekBarView customRangeSeekBarView, int index, float value) {
if(index == 0){
rangeSeekPos = (int)((value/100) * maxDuration);
canvasSeekPos = (move5 * duration) / (videoTimeline.getCanvasWidth() + Math.abs(videoTimeline.getCanvasWidthStart()));
// videoPlayerControl.setStartPos(rangeSeekPos + canvasSeekPos);
WritableMap event = Arguments.createMap();
event.putInt(Events.START_POS, rangeSeekPos + canvasSeekPos);
eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_START_POS.toString(), event);
}else{
rangeSeekEndPos = (int)(maxDuration * (value/100));
// videoPlayerControl.setEndPos(rangeSeekEndPos+canvasSeekPos);
WritableMap event = Arguments.createMap();
event.putInt(Events.END_POS, rangeSeekEndPos+canvasSeekPos);
eventEmitter.receiveEvent(getId(), EventsEnum.EVENT_GET_END_POS.toString(), event);
}
}
@Override
public void onSeekStart(CustomRangeSeekBarView customRangeSeekBarView, int index, float value) {
}
@Override
public void onSeekStop(CustomRangeSeekBarView customRangeSeekBarView, int index, float value) {
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addGestureHandler(GestureEventListener listener);",
"public void setupGestures() {\n mGestureDetector = new GestureDetector(\n new GestureDetector.SimpleOnGestureListener() {\n @Override\n public boolean onFling(MotionEvent e1, MotionEvent e2,\n float velocityX, floa... | [
"0.80649745",
"0.6898546",
"0.6831044",
"0.67778313",
"0.66429675",
"0.6532532",
"0.64617914",
"0.6456257",
"0.63516897",
"0.6312525",
"0.62682223",
"0.62232625",
"0.6148041",
"0.6145596",
"0.61444056",
"0.60613805",
"0.60071474",
"0.6006736",
"0.5988019",
"0.59423304",
"0.59... | 0.0 | -1 |
Function to set Video Path to create Video Preview Timeline | public void setSource(String path){
videoTimeline.setTrim(path);
getVideoInfo(path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default void setVideoPath(@Nullable String path) {\n setVideoUri(TextUtils.isEmpty(path) ? null : Uri.parse(path));\n }",
"private void initVideoPath() {\n File file = new File(Environment.getExternalStorageDirectory(),\n \"/Pictures/QQ/pandavideo_cut.mp4\");\n String video... | [
"0.70608056",
"0.64640594",
"0.63433236",
"0.62452656",
"0.60228693",
"0.5968336",
"0.5932293",
"0.59311754",
"0.59138286",
"0.58641195",
"0.58580667",
"0.57629347",
"0.5757891",
"0.57064193",
"0.5641322",
"0.5610523",
"0.5599887",
"0.5589756",
"0.5521407",
"0.5508698",
"0.54... | 0.7079469 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column account_invoice_refund.id | public Integer getId() {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getRefundId() {\n return refundId;\n }",
"public String getRefundId() {\n return refundId;\n }",
"public void setRefundId(int value) {\n this.refundId = value;\n }",
"@Override\n\tpublic int getRefund(Refund refund) {\n\t\treturn paydao.doRefund(refund);\n\t}",
"Lon... | [
"0.71255505",
"0.69291437",
"0.6533899",
"0.6517231",
"0.62249696",
"0.62158805",
"0.6020841",
"0.5954972",
"0.5936418",
"0.577991",
"0.57740706",
"0.5772013",
"0.57057476",
"0.56812274",
"0.5571045",
"0.55661064",
"0.55484396",
"0.55004555",
"0.54623264",
"0.54585487",
"0.54... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column account_invoice_refund.id | public void setId(Integer id) {
this.id = id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRefundId(int value) {\n this.refundId = value;\n }",
"public void setRefund(Integer refund) {\n this.refund = refund;\n }",
"public int getRefundId() {\n return refundId;\n }",
"public String getRefundId() {\n return refundId;\n }",
"public void setRef... | [
"0.7551222",
"0.6736276",
"0.6546896",
"0.64253557",
"0.63648146",
"0.6295072",
"0.60965765",
"0.5781846",
"0.57684916",
"0.57563967",
"0.57420826",
"0.5690977",
"0.56011033",
"0.55803293",
"0.5560433",
"0.5479326",
"0.546487",
"0.54585415",
"0.54451513",
"0.5443728",
"0.5440... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method returns the value of the database column account_invoice_refund.create_uid | public Integer getCreateUid() {
return createUid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getUID() throws UidGenerateException;",
"public Integer getCreateUserId() {\n return createUserId;\n }",
"public String getCreateUserId() {\r\n return createUserId;\r\n }",
"public Long getCreateUserid() {\r\n\t\treturn createUserid;\r\n\t}",
"long getToUid();",
"public void setC... | [
"0.60665315",
"0.60316426",
"0.59534407",
"0.5894279",
"0.5825283",
"0.5821755",
"0.5821755",
"0.5821755",
"0.5821755",
"0.5821755",
"0.577545",
"0.5680765",
"0.5680765",
"0.56583387",
"0.56471235",
"0.56471235",
"0.56471235",
"0.5644171",
"0.5644171",
"0.56267333",
"0.562313... | 0.6688078 | 4 |
This method was generated by MyBatis Generator. This method sets the value of the database column account_invoice_refund.create_uid | public void setCreateUid(Integer createUid) {
this.createUid = createUid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getCreateUid() {\n return createUid;\n }",
"public Integer getCreateUid() {\n return createUid;\n }",
"public Integer getCreateUid() {\n return createUid;\n }",
"public Integer getCreateUid() {\n return createUid;\n }",
"public Integer getCreateUid() {... | [
"0.5826079",
"0.5826079",
"0.5826079",
"0.5826079",
"0.5826079",
"0.5690098",
"0.5626223",
"0.56044495",
"0.5602375",
"0.5591687",
"0.5591687",
"0.5591687",
"0.5591687",
"0.5591687",
"0.5591687",
"0.5591687",
"0.5507402",
"0.5452825",
"0.5424085",
"0.5384682",
"0.53659093",
... | 0.6543285 | 4 |
This method was generated by MyBatis Generator. This method returns the value of the database column account_invoice_refund.write_uid | public Integer getWriteUid() {
return writeUid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setWriteUid(Integer writeUid) {\n this.writeUid = writeUid;\n }",
"public void setWriteUid(Integer writeUid) {\n this.writeUid = writeUid;\n }",
"public void setWriteUid(Integer writeUid) {\n this.writeUid = writeUid;\n }",
"public void setWriteUid(Integer writeUid) ... | [
"0.5951859",
"0.5951859",
"0.5951859",
"0.5951859",
"0.5951859",
"0.5817586",
"0.57610893",
"0.57610893",
"0.57610893",
"0.57610893",
"0.57610893",
"0.57610893",
"0.57610893",
"0.5757677",
"0.5740856",
"0.5730341",
"0.5709046",
"0.5708808",
"0.5708808",
"0.5708808",
"0.569524... | 0.65993744 | 4 |
This method was generated by MyBatis Generator. This method sets the value of the database column account_invoice_refund.write_uid | public void setWriteUid(Integer writeUid) {
this.writeUid = writeUid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getWriteUid() {\n return writeUid;\n }",
"public Integer getWriteUid() {\n return writeUid;\n }",
"public Integer getWriteUid() {\n return writeUid;\n }",
"public Integer getWriteUid() {\n return writeUid;\n }",
"public Integer getWriteUid() {\n ... | [
"0.5713792",
"0.5713792",
"0.5713792",
"0.5713792",
"0.5713792",
"0.5644578",
"0.5554917",
"0.55521876",
"0.5496285",
"0.5463061",
"0.5463061",
"0.5463061",
"0.5463061",
"0.5463061",
"0.5463061",
"0.5463061",
"0.53513676",
"0.53513676",
"0.53513676",
"0.53513676",
"0.53513676... | 0.67189354 | 4 |
This method was generated by MyBatis Generator. This method returns the value of the database column account_invoice_refund.date_invoice | public Date getDateInvoice() {
return dateInvoice;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.Date getInvoiceDate () {\n\t\treturn invoiceDate;\n\t}",
"public void setRefundDate( Date refundDate ) {\n this.refundDate = refundDate;\n }",
"public LocalDate GetFechaActual() throws RemoteException;",
"public LocalDate GetFechaUltimoCambio() throws RemoteException;",
"public v... | [
"0.63478494",
"0.5958412",
"0.58207065",
"0.57081515",
"0.56698245",
"0.56402975",
"0.5599696",
"0.559848",
"0.5595551",
"0.55682904",
"0.5528948",
"0.54973704",
"0.54915947",
"0.5469198",
"0.5463559",
"0.54623026",
"0.54451483",
"0.54384255",
"0.54065895",
"0.5397656",
"0.53... | 0.6707364 | 0 |
This method was generated by MyBatis Generator. This method sets the value of the database column account_invoice_refund.date_invoice | public void setDateInvoice(Date dateInvoice) {
this.dateInvoice = dateInvoice;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRefundDate( Date refundDate ) {\n this.refundDate = refundDate;\n }",
"public void setInvoiceDate (java.util.Date invoiceDate) {\n\t\tthis.invoiceDate = invoiceDate;\n\t}",
"public IDataExporter<CRBBase> setInvoiceDate(LocalDate invoiceDate);",
"public Date getDateInvoice() {\n ... | [
"0.6859494",
"0.685261",
"0.66710585",
"0.62436223",
"0.620341",
"0.61326325",
"0.5858062",
"0.5855622",
"0.58354455",
"0.5603156",
"0.5522879",
"0.5506024",
"0.54987496",
"0.5442824",
"0.5412928",
"0.5391315",
"0.5361584",
"0.5361584",
"0.53430265",
"0.53293055",
"0.5306958"... | 0.7158883 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column account_invoice_refund.write_date | public Date getWriteDate() {
return writeDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setWriteDate(Date writeDate) {\n this.writeDate = writeDate;\n }",
"public void setWriteDate(Date writeDate) {\n this.writeDate = writeDate;\n }",
"public void setWriteDate(Date writeDate) {\n this.writeDate = writeDate;\n }",
"public void setWriteDate(Date writeDate... | [
"0.5829255",
"0.5829255",
"0.5829255",
"0.5829255",
"0.5829255",
"0.5754952",
"0.57291484",
"0.57247585",
"0.57037437",
"0.5695802",
"0.5673385",
"0.566207",
"0.5635635",
"0.56282496",
"0.5622946",
"0.5605652",
"0.5598376",
"0.5591931",
"0.55880433",
"0.5580862",
"0.55603683"... | 0.6503087 | 4 |
This method was generated by MyBatis Generator. This method sets the value of the database column account_invoice_refund.write_date | public void setWriteDate(Date writeDate) {
this.writeDate = writeDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRefundDate( Date refundDate ) {\n this.refundDate = refundDate;\n }",
"public IDataExporter<CRBBase> setInvoiceDate(LocalDate invoiceDate);",
"public Date getWriteDate() {\n return writeDate;\n }",
"public Date getWriteDate() {\n return writeDate;\n }",
"public ... | [
"0.6413462",
"0.60143644",
"0.5867136",
"0.5867136",
"0.5867136",
"0.5867136",
"0.5867136",
"0.5832945",
"0.5807439",
"0.57759845",
"0.5695562",
"0.56624323",
"0.5651948",
"0.5604035",
"0.56017536",
"0.5541506",
"0.5520927",
"0.55072796",
"0.54907197",
"0.5413163",
"0.5411570... | 0.68140507 | 4 |
This method was generated by MyBatis Generator. This method returns the value of the database column account_invoice_refund.date | public Date getDate() {
return date;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRefundDate( Date refundDate ) {\n this.refundDate = refundDate;\n }",
"public Date getDateInvoice() {\n return dateInvoice;\n }",
"public LocalDate GetFechaActual() throws RemoteException;",
"public Date getBudgetDate() {\n return (Date) getAttributeInternal(BUDGETDA... | [
"0.67460763",
"0.60222",
"0.5917619",
"0.5915415",
"0.59120214",
"0.59117454",
"0.58161485",
"0.5807813",
"0.57901496",
"0.57591903",
"0.57326794",
"0.5728658",
"0.5720376",
"0.567423",
"0.56059176",
"0.55972",
"0.55714476",
"0.55465984",
"0.55462146",
"0.5542345",
"0.5528354... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method sets the value of the database column account_invoice_refund.date | public void setDate(Date date) {
this.date = date;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRefundDate( Date refundDate ) {\n this.refundDate = refundDate;\n }",
"public void setDateFinContrat(Date dateFinContrat) {\r\n this.dateFinContrat = dateFinContrat;\r\n }",
"public void setDateInvoice(Date dateInvoice) {\n this.dateInvoice = dateInvoice;\n }",
"@... | [
"0.75818515",
"0.65385664",
"0.6503039",
"0.62354314",
"0.6234008",
"0.6203877",
"0.5958604",
"0.5939826",
"0.5936085",
"0.59344554",
"0.58785975",
"0.5846123",
"0.5809375",
"0.576799",
"0.57629937",
"0.5697564",
"0.56883377",
"0.5682368",
"0.5670165",
"0.5665243",
"0.5656533... | 0.54780716 | 45 |
This method was generated by MyBatis Generator. This method returns the value of the database column account_invoice_refund.create_date | public Date getCreateDate() {
return createDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Basic( optional = true )\r\n\t@Column( name = \"create_date\" )\r\n\tpublic Date getCreateDate() {\r\n\t\treturn this.createDate;\r\n\t\t\r\n\t}",
"public Date getCreateDate() { return this.createDate; }",
"public Date getCreateDate()\r\n/* */ {\r\n/* 158 */ return this.createDate;\r\n/* */ }... | [
"0.63680995",
"0.6347765",
"0.63121974",
"0.62568384",
"0.6253021",
"0.6253021",
"0.6195371",
"0.61950076",
"0.6177746",
"0.6177746",
"0.6177746",
"0.6095195",
"0.6095195",
"0.6088294",
"0.6088294",
"0.6088294",
"0.60753345",
"0.60440475",
"0.6033155",
"0.6025734",
"0.6025467... | 0.61055803 | 31 |
This method was generated by MyBatis Generator. This method sets the value of the database column account_invoice_refund.create_date | public void setCreateDate(Date createDate) {
this.createDate = createDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRefundDate( Date refundDate ) {\n this.refundDate = refundDate;\n }",
"public void setCreateDate(Date createDate) { this.createDate = createDate; }",
"public void setCreateDate(Date createDate)\r\n/* */ {\r\n/* 165 */ this.createDate = createDate;\r\n/* */ }",
"public... | [
"0.6916522",
"0.67117554",
"0.66448396",
"0.6587316",
"0.65471166",
"0.65363216",
"0.65363216",
"0.65363216",
"0.64999735",
"0.64999735",
"0.645229",
"0.6411863",
"0.6411863",
"0.64069575",
"0.64069575",
"0.63998306",
"0.63850397",
"0.6365232",
"0.6303797",
"0.6294023",
"0.62... | 0.64860535 | 28 |
Returns (already cast to the type T) the data (if any) with the given key. | @SuppressWarnings("unchecked")
public <T> T getData(String key) {
return (T) data.get(key);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"<T> T getValue(DataKey<T> key);",
"public <T> T get(String key) {\n return (T) data.get(key);\n }",
"@Nullable\n public Object getData(final @NotNull String key) {\n return data.get(key);\n }",
"public T get(K key);",
"public abstract T get(String key);",
"T get(String key);",
"@Override... | [
"0.82788944",
"0.80032593",
"0.74900883",
"0.7337959",
"0.7110672",
"0.7052178",
"0.7013601",
"0.7009909",
"0.6965786",
"0.6934528",
"0.68536776",
"0.68536776",
"0.68217",
"0.6821307",
"0.6800793",
"0.6782174",
"0.67790043",
"0.6775049",
"0.6754791",
"0.67540056",
"0.67362493... | 0.82219845 | 1 |
Checks if there is data with the given key. | public boolean hasData(String key) {
return data.containsKey(key);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasKey(String key) {\n return data.containsKey(key);\n }",
"public boolean containsKey(K key)\r\n\t{\r\n\t\treturn data.contains(new Entry(key,null));\r\n\t}",
"public boolean exists(String key) {\n\t\treturn fileData.containsKey(key);\n\t}",
"public boolean has(String key)\n {\n ... | [
"0.7788398",
"0.73930544",
"0.73781174",
"0.7216325",
"0.7175998",
"0.71642685",
"0.7087211",
"0.70778346",
"0.70645475",
"0.70562726",
"0.70422053",
"0.70282036",
"0.6983143",
"0.69615555",
"0.6928873",
"0.69239724",
"0.6917844",
"0.6909225",
"0.68819916",
"0.6870307",
"0.68... | 0.82519287 | 0 |
If the titles of books are same, no need to update the cell, onBindViewHolder() will not be called. | @Override
public boolean areContentsTheSame(Comment newItem) {
return getItem().getName().equals(newItem.getName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n Book tmp = mDataset.get(position);\n\n if (tmp != null) {\n\n holder.mTextView.setText(tmp.getTitle());\n holder.mDescView.setText(tmp.getDescription());\n holder.bookId.setText(tmp.getIs... | [
"0.6180056",
"0.6051516",
"0.5970466",
"0.59471226",
"0.57185286",
"0.5674194",
"0.56637573",
"0.55911946",
"0.55504376",
"0.5545757",
"0.55305487",
"0.55138123",
"0.5501143",
"0.54743624",
"0.5459989",
"0.5407472",
"0.5383239",
"0.5380456",
"0.5361472",
"0.5355053",
"0.53485... | 0.5088519 | 74 |
If getItem() is the same as newItem (i.e. their return value of getItemId() are the same) and areContentsTheSame() return false, then the cell need to be updated, onBindViewHolder() will be called with this payload object. | @Override
public Object getChangePayload(Comment newItem) {
Bundle bundle = new Bundle();
bundle.putString(KEY_TITLE, newItem.getName());
return bundle;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {\n return DiffRecyclerAdapter.this.areContentsTheSame(backupList.get(oldItemPosition), displayList.get(newItemPosition));\n }",
"@Override\n public boolean areItemsTheSame(@NonNull Note oldIte... | [
"0.6173576",
"0.61676973",
"0.61149293",
"0.60440123",
"0.6036396",
"0.5925758",
"0.5910707",
"0.5880041",
"0.5876684",
"0.56472886",
"0.56472886",
"0.56472886",
"0.55508584",
"0.5534677",
"0.55198705",
"0.54770756",
"0.5421357",
"0.53922546",
"0.5352852",
"0.5325891",
"0.530... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public float getX() {
return this.x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setX(float x) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public float getY() {
return this.y;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setY(float y) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public float getWidth() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setWidth(float width) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public float getHeight() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setHeight(float height) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int getId() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int getTexture() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setTexture(int texID) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public float getHitCircleRadius() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void damage(float f) {
} | {
"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 |
Creates a new game | public Game() {
users = new ArrayList<>();
tmpTeam = new UserTeam();
core = new Core();
market = new Market(core);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Game createGame();",
"public void createGame();",
"void createNewGame() {\n _gameList.add(new GameObject());\n Log.i(\"createGame\", \"Created New Game\");\n }",
"void createNewGame(Player player);",
"public void createGame()\n {\n //call Client Controller's setState metho... | [
"0.79286337",
"0.78404224",
"0.76136935",
"0.7579567",
"0.7505941",
"0.74647856",
"0.73769903",
"0.73734635",
"0.73438567",
"0.73380613",
"0.71153915",
"0.7105616",
"0.7034729",
"0.7026153",
"0.7023848",
"0.7023848",
"0.7023848",
"0.7021599",
"0.6973264",
"0.6924295",
"0.6920... | 0.0 | -1 |
Creates a new user | public void addNewUser(String userName) {
User newUser = new User(userName, this);
users.add(newUser);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createUser(User user) {\n\n\t}",
"public void createUser(User user);",
"UserCreateResponse createUser(UserCreateRequest request);",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(user... | [
"0.8285556",
"0.8226307",
"0.81556773",
"0.8057081",
"0.785873",
"0.78227836",
"0.7706839",
"0.76914215",
"0.7667593",
"0.7642965",
"0.7590664",
"0.7561163",
"0.7551333",
"0.7538725",
"0.75092685",
"0.746668",
"0.74647075",
"0.7434978",
"0.74146515",
"0.74129474",
"0.74102664... | 0.0 | -1 |
Sets the team the user has selected for the next round | public void updateUserTeam() {
User user = users.get(userTurn);
System.out.println(user.getName());
System.out.println(tmpTeam.size());
UserTeam roundTeam = new UserTeam();
roundTeam.putAll(tmpTeam.getPlayers());
System.out.println(roundNumber);
System.out.println(roundTeam.size());
System.out.println("dfdfdfd");
user.setUserTeam(roundTeam, roundNumber);
System.out.println("dfdfdfd");
tmpTeam = new UserTeam();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void pickTeam() {\n voteTeamState = pickTeamState.pickTeam(teamSelection);\n state = State.VOTE_TEAM;\n playerVotes = new HashMap<>();\n }",
"public void setTeam(Team team) {\r\n\t\tthis.team = team;\r\n\t}",
"public Builder setTeam(int value) {\n bitField0_ |... | [
"0.7002916",
"0.69282687",
"0.68993866",
"0.6873398",
"0.67233396",
"0.6705573",
"0.6650908",
"0.6554106",
"0.6549989",
"0.6511462",
"0.6433773",
"0.6278744",
"0.62118804",
"0.61826426",
"0.6171059",
"0.6094209",
"0.606101",
"0.60143745",
"0.6009239",
"0.60063857",
"0.5999145... | 0.6179109 | 14 |
Adds a new player to the team the user is selecting for the next round | public int addPlayer(String name) {
User user = users.get(userTurn);
FootballPlayer player = market.findPlayer(name);
double marketValue = player.getMarketValue();
System.out.println("budget before buy" + user.getBudget());
if(tmpTeam.containsPlayer(name)) {
return 1;
}
else if(user.hasEnoughBudget(marketValue)) {
tmpTeam.addPlayer(name, player);
user.updateBudget(marketValue, "-");
System.out.println("budget " + user.getBudget());
System.out.println("marketvalue " +marketValue);
System.out.println("budget after buy" + user.getBudget());
return 0;
}
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addPlayer(Player newPlayer);",
"public void addPlayer(String name) {\n if (nrOfPlayers() < 4) {\n players.add(new Player(name, nrOfPlayers() + 1));\n this.status = \"Initiated\";\n } else {\n throw new NoRoomForMorePlayersException();\n }\n }",
"pub... | [
"0.7390876",
"0.722771",
"0.7161743",
"0.7093475",
"0.6935754",
"0.6910038",
"0.69004446",
"0.6897781",
"0.68941325",
"0.68729013",
"0.68640214",
"0.68612033",
"0.68597937",
"0.68578154",
"0.6809944",
"0.6793767",
"0.67816865",
"0.6778458",
"0.6765812",
"0.6748616",
"0.673736... | 0.6122476 | 75 |
Removes a player from the team the user is selecting for the next round | public void removePlayer(String name) {
User user = users.get(userTurn);
FootballPlayer player = market.findPlayer(name);
double marketValue = player.getMarketValue();
if (tmpTeam.size() > 0) {
user.updateBudget(marketValue, "+");
tmpTeam.removePlayer(name);
}
System.out.println("budget after sell" + user.getBudget());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removePlayer(Player player) {\n String entry = player.getName();\n Team currentTeam = null;\n\n // Find player team.\n for (Team team : scoreboard.getTeams()) if (team.hasEntry(entry)) currentTeam = team;\n\n // If no team is found, do not continue.\n if (curre... | [
"0.7613248",
"0.7557517",
"0.7515374",
"0.74278015",
"0.7349823",
"0.7323965",
"0.7294236",
"0.71741635",
"0.7143327",
"0.7135664",
"0.7103452",
"0.7040611",
"0.7029558",
"0.6992621",
"0.69763035",
"0.6944548",
"0.69368064",
"0.69334394",
"0.6895826",
"0.6879446",
"0.6852491"... | 0.7064491 | 11 |
Returns all the users | public List<User> getUsers() {
return users;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List getAllUsers();",
"public List<User> getAllUsers();",
"public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public List<Users> getAllUsers() {\r\n\t\t... | [
"0.8718843",
"0.8595796",
"0.8475508",
"0.8465708",
"0.84419453",
"0.84382284",
"0.84275913",
"0.84275913",
"0.8423913",
"0.8420947",
"0.84201133",
"0.84108937",
"0.8392223",
"0.8380085",
"0.8379692",
"0.8366463",
"0.8334727",
"0.8332088",
"0.83029294",
"0.830154",
"0.8293521... | 0.0 | -1 |
Returns the current user | public User getCurrentUser() {
return users.get(userTurn);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public User getCurrentUser() {\n\t\tString id = contextHolder.getUserId();\r\n\t\treturn userRepository.get(id);\r\n\t}",
"public static User getCurrentUser() {\n\t\treturn ApplicationContext.getInstance().getCurrentUser();\n\t}",
"User getCurrentLoggedInUser();",
"public static User getCurrentUser() {\n ... | [
"0.8495159",
"0.83254373",
"0.8297517",
"0.82656145",
"0.8238582",
"0.8209197",
"0.8173451",
"0.81203777",
"0.8114984",
"0.8072755",
"0.80624276",
"0.80590045",
"0.80368376",
"0.7949122",
"0.79221016",
"0.7897237",
"0.78726757",
"0.78069717",
"0.78046733",
"0.78034455",
"0.77... | 0.7736666 | 26 |
Sets the current user | public void setCurrentUser(int userNum) {
userTurn = userNum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCurrentUser(String username) {\n currentUser = username;\n }",
"void setCurrentUser(@Nullable User newCurrentUser) {\n currentUser = newCurrentUser;\n }",
"public void setCurrentUser(AVUser aVUser) {\n this.currentUser = aVUser;\n }",
"public void assignCurrentAdm... | [
"0.76262474",
"0.745369",
"0.7310187",
"0.705917",
"0.7008701",
"0.6999122",
"0.6998756",
"0.6898501",
"0.6842941",
"0.6831713",
"0.6826018",
"0.68130034",
"0.6798217",
"0.6798217",
"0.6798147",
"0.67802685",
"0.67802685",
"0.67470217",
"0.67470217",
"0.67470217",
"0.67470217... | 0.66742504 | 31 |
Ends the current round and starts a new one | public void endRound() {
if (roundNumber>maxRounds) {
System.out.println("hae �etta er MAX ROUNDS! LEIKUR �TTI A� VERA B�INN");
endGame();
} else {
System.out.println("�ETTA er r�tt leikur er ekki b�inn round: "+ getCurrentRound());
matchResults = core.simulateNextRound();
System.out.println("B�INN A� SIMULATA ROUND ");
FootballPlayer[] players = core.getAllFootballPlayers();
for (int i = 0; i<players.length; i++) {
Statistics[] stats = players[i].getStats();
System.out.println(players[i].getName() + " " + stats[1].getGoals());
}
calculatePoints();
roundNumber++;
}
users.get(0).setTransferFinished(false);
users.get(1).setTransferFinished(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void beginRound() {\r\n\t\tnewRound();\r\n\t}",
"public void newRound(){\r\n clearRandomDirections();\r\n this.currentAmountToPutIn++;\r\n initializeNewRound();\r\n //reset timer;\r\n }",
"abstract void startRound();",
"public void beginNextRound() {\n\t\tsetBeginNextRou... | [
"0.766683",
"0.7286056",
"0.707066",
"0.7055518",
"0.69990283",
"0.6784767",
"0.67418647",
"0.67053723",
"0.66488004",
"0.662915",
"0.6424875",
"0.64173913",
"0.63992316",
"0.6383974",
"0.6334077",
"0.6322687",
"0.630725",
"0.63051677",
"0.62445307",
"0.6219133",
"0.6201134",... | 0.6573578 | 10 |
Ends game, checks who won and displays dialog | private void endGame() {
PlayRound.endGame();
int score1 = users.get(0).getPoints();
int score2 = users.get(1).getPoints();
String winnerString;
if(score1 > score2){
winnerString = users.get(0).getName() + " " + "won!";
}
else if (score2 > score1) {
winnerString = users.get(1).getName() + " " + "won!";;
}
else {
winnerString = "there was a tie!";
}
JFrame frame = new JFrame();
ImageIcon icon = new ImageIcon(Game.class.getResource("/resources/cup.png"));
JOptionPane.showMessageDialog(null, winnerString, "Congratulations", JOptionPane.OK_OPTION, icon);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void endGame() {\n Player player = playerManager.getWinner();\n MainActivity mainActivity = (MainActivity) this.getContext();\n updateLiveComment(\"Winner : \" + player.getName());\n mainActivity.setAlertDialog(player.getName()+\" Wins !\", \"Congratulations\", true);\n }",
... | [
"0.8393305",
"0.7970627",
"0.79364395",
"0.7871003",
"0.7787364",
"0.7771699",
"0.774277",
"0.76358354",
"0.750903",
"0.74881756",
"0.7476795",
"0.74556243",
"0.7438571",
"0.7432171",
"0.73759943",
"0.73437554",
"0.7300802",
"0.7283641",
"0.72380644",
"0.7212832",
"0.72120935... | 0.7520839 | 8 |
Returns the number of the current user | public int getUserTurn() {
return userTurn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getUserNumber() throws AdminPersistenceException {\n return getCount(\"ST_User\", \"id\", \"accessLevel <> ?\", \"R\");\n }",
"public static int getNumberLoggedUser() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_LOGGED_USER_NUMBER;\n\t\t\trp.para... | [
"0.7717375",
"0.7665036",
"0.7523497",
"0.74241537",
"0.7347484",
"0.73081374",
"0.72894245",
"0.72278035",
"0.7224995",
"0.7205619",
"0.7205576",
"0.7201226",
"0.7201226",
"0.7201226",
"0.7201226",
"0.71830744",
"0.71830744",
"0.717915",
"0.7154091",
"0.7146403",
"0.7133078"... | 0.0 | -1 |
Returns the current round | public int getCurrentRound() {
return roundNumber;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getCurrentRound()\n\t{\n \treturn currentRound;\n\t}",
"public synchronized int getCurrentRoundNumber()\r\n {\r\n return currentRoundNumber;\r\n }",
"public int getRound()\r\n\t{\r\n\t\treturn this.round;\r\n\t}",
"public int getRound() {\n return round;\n }",
"public i... | [
"0.86578494",
"0.8045076",
"0.79072213",
"0.78805435",
"0.77939385",
"0.7767904",
"0.72405005",
"0.7167907",
"0.7139172",
"0.70011634",
"0.679961",
"0.67665327",
"0.6737876",
"0.66820824",
"0.6567385",
"0.6433896",
"0.63765407",
"0.6367948",
"0.6363406",
"0.63504237",
"0.6333... | 0.849958 | 1 |
Returns the game player market | public Market getMarket(){
return market;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMarket() {\r\n return market;\r\n }",
"public WebMarket getMarket() {\r\n return market;\r\n }",
"public Market getMarket() {\n return market;\n }",
"public String getMarketName() {\r\n return marketName;\r\n }",
"public JButton getMarketButton() {\n... | [
"0.7080597",
"0.6862638",
"0.6825719",
"0.6453449",
"0.6101331",
"0.6049927",
"0.60499",
"0.60111624",
"0.5949668",
"0.5931969",
"0.5921619",
"0.59201276",
"0.5903134",
"0.58890253",
"0.5884032",
"0.58712816",
"0.58574903",
"0.58483493",
"0.5839083",
"0.58056337",
"0.57786363... | 0.68145144 | 3 |
Sets the team the current user has selected for the next round | public void setTmpTeam(UserTeam tmpTeam) {
this.tmpTeam = tmpTeam;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void pickTeam() {\n voteTeamState = pickTeamState.pickTeam(teamSelection);\n state = State.VOTE_TEAM;\n playerVotes = new HashMap<>();\n }",
"void setWinningTeam(TeamId winner) {\n winningTeam.set(winner);\n }",
"public void setTeam(Team team) {\r\n\t\tthis... | [
"0.6890938",
"0.68576485",
"0.67768264",
"0.6721345",
"0.6668847",
"0.65593016",
"0.64370656",
"0.64187366",
"0.63323385",
"0.630567",
"0.62741184",
"0.62728834",
"0.6188851",
"0.6108028",
"0.6024357",
"0.5983627",
"0.5972023",
"0.59596145",
"0.5952305",
"0.5882419",
"0.58639... | 0.5624167 | 35 |
Returns the number of players the current user has selected for the next round | public int getNumberOfSelectedPlayers() {
return tmpTeam.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}",
"public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}",
"public int... | [
"0.7235571",
"0.7112189",
"0.70413697",
"0.6984186",
"0.696559",
"0.6952575",
"0.68620473",
"0.684266",
"0.6832605",
"0.67944735",
"0.6783183",
"0.67773277",
"0.6755476",
"0.6738838",
"0.673151",
"0.67282873",
"0.6638498",
"0.66334516",
"0.6629711",
"0.66196895",
"0.6572545",... | 0.7179389 | 1 |
Ends the currents users turn and sets his team for the next round | public void endUserTurn() {
updateUserTeam();
users.get(userTurn).setTransferFinished(true);
PlayRound.endUserTurn();
MainGui.showCardLayout("panelPlayRound");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void endTurn() {\n currentTurn = getNextPlayer();\n }",
"public void endTurn() {\n\t\tturnEnd = false;\n\t\tmadeMove = false;\n\t\tcurrentPlayer.resetUndos();\n\t\tif (currentPlayer == player1) {\n\t\t\tcurrentPlayer = player2;\n\t\t} else {\n\t\t\tcurrentPlayer = player1;\n\t\t}\n\t\t//printBo... | [
"0.74919784",
"0.73004824",
"0.70060515",
"0.69746786",
"0.69542426",
"0.68179023",
"0.67790604",
"0.6749589",
"0.67409354",
"0.6725093",
"0.6710199",
"0.66999316",
"0.6661225",
"0.6648724",
"0.66425455",
"0.66090244",
"0.66085905",
"0.65800774",
"0.6568142",
"0.652526",
"0.6... | 0.7295813 | 2 |
Returns all the football players in the market | public List <FootballPlayer> getAllPlayers() {
return market.getAllPlayers();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TennisPlayer[] getAllPlayers() throws TennisDatabaseRuntimeException {\n\t\t \t\n\t\tTennisPlayerContainerIterator iterator = this.iterator();\n\t\t\n iterator.setInorder();\n \t\n TennisPlayer[] outputArray = new TennisPlayer[playerCount];\n \n int index = 0;\n \n... | [
"0.7110502",
"0.6842064",
"0.6805894",
"0.67975706",
"0.6690115",
"0.6683628",
"0.663076",
"0.6538126",
"0.6502832",
"0.649249",
"0.64382225",
"0.6425519",
"0.64189506",
"0.6380346",
"0.63624007",
"0.63498175",
"0.63409895",
"0.633687",
"0.631243",
"0.62884086",
"0.62704265",... | 0.8027012 | 0 |
Returns all the football players in the market that play for a given team | public List <FootballPlayer> getAllPlayersByTeamName(String name) {
return market.getAllPlayersByTeamName(name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List <FootballPlayer> getAllPlayers() {\n\t\treturn market.getAllPlayers();\n\t}",
"public static List<Player> getRankedPlayersInTeam(List<Player> players, Player.PlayerTeam team) {\n List<Player> choosenTeam = players.stream()\n .filter(player -> player.getTeam() == team)\n ... | [
"0.71928227",
"0.6654596",
"0.6476931",
"0.6351377",
"0.61279553",
"0.6042278",
"0.6040738",
"0.60400367",
"0.60367066",
"0.6033229",
"0.6031332",
"0.6002824",
"0.59985685",
"0.59782016",
"0.59779036",
"0.59677035",
"0.59580296",
"0.59187675",
"0.5911709",
"0.59102756",
"0.58... | 0.679196 | 1 |
Returns all the football players in the market that play a given position | public List <FootballPlayer> getAllPlayersByPosition(String position) {
return market.getAllPlayersByPosition(position);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List <FootballPlayer> getAllPlayers() {\n\t\treturn market.getAllPlayers();\n\t}",
"@Override\n\tpublic List<Player> getPlayersByPosition(String position) throws BusinessException {\n\t\tList<Player> playersByPosition = new ArrayList<>();\n\t\ttry {\n\t\t\tConnection connection = PostgresqlConnection.getC... | [
"0.70764697",
"0.6893583",
"0.64105856",
"0.6408584",
"0.6133182",
"0.61080915",
"0.6080221",
"0.5986813",
"0.5937886",
"0.5933161",
"0.5900904",
"0.58293366",
"0.582588",
"0.58047146",
"0.5800142",
"0.5799371",
"0.5797967",
"0.5773625",
"0.576842",
"0.572246",
"0.5710971",
... | 0.7701717 | 0 |
Returns the maximum number of rounds for the game | public int getMaxRounds() {
return maxRounds;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMaxRound() {\n return maxRound;\n }",
"public int getMaxRoundsPerBattle() {\n return maxRoundsPerBattle;\n }",
"public int getLargestRoundNumber() {\n\t\tint result = -1;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT MAX(drawCnt) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next... | [
"0.7902967",
"0.7883401",
"0.77104104",
"0.6929718",
"0.6791594",
"0.6774771",
"0.6729701",
"0.66965",
"0.6692534",
"0.66752326",
"0.6645116",
"0.66287285",
"0.65231496",
"0.6514851",
"0.64984065",
"0.64961433",
"0.6495204",
"0.64936596",
"0.64934385",
"0.64934367",
"0.649343... | 0.76130956 | 3 |
Returns the distance between p1 and p2 | static double distance(Point p1, Point p2) {
return Math.sqrt((p2.x - p1.x)*(p2.x - p1.x) + (p2.y - p1.y)*(p2.y - p1.y));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected double getDistance(Point p1, Point p2) {\n\t\treturn Math.sqrt((p1.getX()-p2.getX())*(p1.getX()-p2.getX()) + (p1.getY()-p2.getY())*(p1.getY()-p2.getY())); \n\t}",
"double distance(Point p1,Point p2){\n\t\tdouble dx = p1.x - p2.x;\n\t\tdouble dy = p1.y - p2.y;\n\t\treturn Math.sqrt(dx*dx+dy*dy);\n\t}",
... | [
"0.83341765",
"0.823514",
"0.8193788",
"0.80250037",
"0.7874621",
"0.7815043",
"0.7770693",
"0.7609555",
"0.75574744",
"0.74879384",
"0.74697566",
"0.7465934",
"0.7461819",
"0.7460515",
"0.7444128",
"0.74408805",
"0.7417298",
"0.7416451",
"0.73901826",
"0.73789316",
"0.734164... | 0.83090186 | 1 |
Returns whether p1 = p2 with characteristic distance d (to account for calculation errors) | static boolean isEqual(Point p1, Point p2, double d) {
return (distance(p1, p2) < 0.1 * d);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean arePointsDifferent(double dLat0, double dLon0, double dLat1, double dLon1){\n\t\tif(fuzzyEquals(dLat0,dLat1,0.0000000000001) && fuzzyEquals(dLon0,dLon1,0.0000000000001)){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}",
"boolean hasDistance();",
"public static boolean d... | [
"0.6444397",
"0.643919",
"0.60948575",
"0.60609996",
"0.60576606",
"0.58976305",
"0.5863028",
"0.5831641",
"0.58139783",
"0.57474476",
"0.5723425",
"0.57128584",
"0.5706858",
"0.570498",
"0.567625",
"0.5663376",
"0.5660188",
"0.5631915",
"0.5621714",
"0.56178325",
"0.5609768"... | 0.7589997 | 0 |
Returns whether p belong to al (in the sense of isEqual) | static boolean isInArray(Point p, ArrayList<Point> al, double d) {
for (Point pa : al) {
if (isEqual(p, pa, d)) {
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean equals(Object p) {\r\n return this.id == ((Point) p).id;\r\n }",
"boolean hasIsEquivalent();",
"public boolean equals(Person p) {\n if (this.name == p.getName() && this.surname == p.getSurname())\n return true;\n else\n return false;\n }",
"public boolean contain(Poi... | [
"0.67341405",
"0.6508577",
"0.6301112",
"0.6266029",
"0.6252084",
"0.6213731",
"0.618129",
"0.6165256",
"0.61391556",
"0.6127623",
"0.61036575",
"0.6081833",
"0.6077313",
"0.60771614",
"0.6006193",
"0.5990546",
"0.5981649",
"0.5971997",
"0.5969269",
"0.5912874",
"0.58918965",... | 0.6210608 | 6 |
Returns coordinates as integers | public int xint() {
return (int) x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getCoordinates();",
"long getCoordinates();",
"public abstract int[] getCoords();",
"public int[] getCoordinates() {\n\t\t\n\t\tint[] a=new int[2];\n\t\ta[0]=xCoord;\n\t\ta[1]=yCoord;\n\t\t\n\t\treturn a;\n\t\t\n\t}",
"public int[] getCoords() {\n return coords;\n }",
"public int getXY(int... | [
"0.735982",
"0.735982",
"0.6800262",
"0.66169804",
"0.6547367",
"0.6523772",
"0.6476847",
"0.6394062",
"0.6338513",
"0.63378745",
"0.633706",
"0.63232785",
"0.6308323",
"0.62571454",
"0.6246915",
"0.6212795",
"0.6153046",
"0.6116429",
"0.61135113",
"0.60904807",
"0.6086757",
... | 0.5578165 | 83 |
Mark unavailable positions in the board. Marking valid position & copying boards in each recursive call slows down execution. | public static void markInvalidPositions(int queenRowIdx, int queenColIdx, List<int[]> board) {
board.get(queenRowIdx)[queenColIdx] = -1;
// It is sufficient to mark rows after queenRowIdx row.
int offset, leftColIdx, rightColIdx;
for (int rowIdx = queenRowIdx + 1; rowIdx < N; rowIdx++) {
board.get(rowIdx)[queenColIdx] = -1;
offset = rowIdx - queenRowIdx;
leftColIdx = queenColIdx - offset;
rightColIdx = queenColIdx + offset;
if (leftColIdx >= 0) { board.get(rowIdx)[leftColIdx] = -1; }
if (rightColIdx < N ) { board.get(rowIdx)[rightColIdx] = -1; }
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n ... | [
"0.6203383",
"0.60055786",
"0.5992003",
"0.59525573",
"0.5939514",
"0.58223957",
"0.575024",
"0.5739756",
"0.5651835",
"0.5598226",
"0.55973333",
"0.55948365",
"0.55799073",
"0.55415845",
"0.5533188",
"0.5527029",
"0.5525185",
"0.5522224",
"0.5512288",
"0.55039585",
"0.547180... | 0.6362315 | 0 |
Function format for Leetcode online judge. | public List<List<String>> solveNQueens(int n) {
N = n;
results = new ArrayList<List<String>>();
putQueenInRow(0, null, null);
return results;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String algorithm();",
"public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\tTest01 t = new Test01();\r\n\t\t\r\n\t\t//String st = \"1927\";\r\n\t\t//int in\t= 2;\t// n 개 제거\r\n\r\n\t\tString st = \"1231234\";\r\n\t\tint in\t= 3;\t\r\n... | [
"0.70034784",
"0.6254246",
"0.623857",
"0.6229331",
"0.60575014",
"0.60100716",
"0.5947113",
"0.59438556",
"0.59407884",
"0.5934889",
"0.59218824",
"0.59122545",
"0.58982396",
"0.5883472",
"0.5873167",
"0.58639026",
"0.58269846",
"0.58199483",
"0.5811999",
"0.58107984",
"0.58... | 0.0 | -1 |
public FileWrap(File file, String rootName, ) | public java.sql.Timestamp getLastModified() {
return new java.sql.Timestamp(file.lastModified());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@NonNull\n\t\tBuilder withRoot(@NonNull File root);",
"public TarFile(File file) {\n this.file = file;\n }",
"public interface FilesContainer {\n\n\t/**\n\t * Returns a {@link FileWrapper} that point the relative path.\n\t * \n\t * @param fileRelativePath\n\t * @return\n\t */\n\tpublic FileWrapper ne... | [
"0.63522065",
"0.61517584",
"0.6060787",
"0.6052313",
"0.6044728",
"0.59911335",
"0.5947685",
"0.58688414",
"0.5836364",
"0.5780853",
"0.5758471",
"0.57136834",
"0.57045555",
"0.56787723",
"0.56566185",
"0.56290233",
"0.5620406",
"0.5583135",
"0.5583135",
"0.55777234",
"0.557... | 0.0 | -1 |
Constructor takes property file that contains email server details and user name Also, initialize the Scanner object with current Input Stream (System.in) | public CheckingMails(String proportyFile) {
this.propertyFile = proportyFile;
loadProperties(this.propertyFile);
sc = new Scanner(System.in);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init()\n {\n try\n {\n userPasswordsProperties = new Properties();\n userPasswordsProperties.load(new FileInputStream(userPasswordsPropertiesFileName));\n log.info(\"Successfully initialized. UsersPasswords property file is: \" + userPasswordsProperties... | [
"0.6268003",
"0.6245927",
"0.60698676",
"0.57867986",
"0.57650477",
"0.57328874",
"0.56772065",
"0.56714773",
"0.5663931",
"0.565371",
"0.5648353",
"0.5643128",
"0.5637285",
"0.5606371",
"0.55898845",
"0.5564218",
"0.5562464",
"0.55581564",
"0.55271804",
"0.55110174",
"0.5495... | 0.6983398 | 0 |
Send an email to an user. User provides following details: 1. TO Recipient ID 2. Subject Email Subject 3. Content Email content | public void sendEmail() {
System.out.println("Loading session and Authenticating");
final Session session = Session.getInstance(getProtocolProporties(PROTOCOL_SEND), new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(getProperty("username"), getPassword());
}
});
if(null == session) {
System.err.println("Session is null, cann't proceed");
return ;
}
System.out.println("Authenticated, will try to send an email");
try {
final Message message = new MimeMessage(session) {
//Print the message to console
@Override
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
try {
stringBuilder.append("\n").append("From : ").append("\n");
for (Address address : this.getFrom())
stringBuilder.append(address).append("\n");
stringBuilder.append("\n").append("To : ").append("\n");
for (Address address : this.getRecipients(Message.RecipientType.TO))
stringBuilder.append(address).append("\n");
stringBuilder.append("Subject : ").append("\n").append(this.getSubject());
stringBuilder.append("\n").append("Sent Date : ").append(this.getSentDate());
} catch (MessagingException e) {
e.printStackTrace();
}
return stringBuilder.toString();
}
};
//Get Mail field details
message.setFrom(new InternetAddress(getProperty("username")));
message.setRecipient(Message.RecipientType.TO, new InternetAddress(getUserInput("to")));
message.setSubject(getUserInput("subject"));
message.setText(getUserInput("messageContent"));
message.setSentDate(new Date());
System.out.println("Sending the mail as details below :");
System.out.println(message);
//Send email here, this throws exception if fails
Transport.send(message);
System.out.println("Email Sent");
} catch (final MessagingException ex) {
System.err.println("Error: " + ex.getMessage());
ex.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sendMail(String to, String subject, String text);",
"public void sendMail(String to, String cc, String bcc, String subject, String text);",
"public void sendMail(String to, String cc, String subject, String text);",
"public void sendEmail(String recipient,String password);",
"void sendCommonMai... | [
"0.7592175",
"0.75897694",
"0.7546647",
"0.7280971",
"0.71108603",
"0.7096636",
"0.70208883",
"0.69309556",
"0.68991774",
"0.6898145",
"0.6874368",
"0.6836658",
"0.6796777",
"0.6781832",
"0.67706984",
"0.67627114",
"0.67602915",
"0.67162955",
"0.6712585",
"0.6706946",
"0.6683... | 0.64752936 | 34 |
Print the message to console | @Override
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
try {
stringBuilder.append("\n").append("From : ").append("\n");
for (Address address : this.getFrom())
stringBuilder.append(address).append("\n");
stringBuilder.append("\n").append("To : ").append("\n");
for (Address address : this.getRecipients(Message.RecipientType.TO))
stringBuilder.append(address).append("\n");
stringBuilder.append("Subject : ").append("\n").append(this.getSubject());
stringBuilder.append("\n").append("Sent Date : ").append(this.getSentDate());
} catch (MessagingException e) {
e.printStackTrace();
}
return stringBuilder.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void print(String message)\n {\n System.out.println(message);\n }",
"public void printMessage() {\n printMessage(System.out::print);\n }",
"private void print(String message) {\n\n //System.out.println(LocalDateTime.now() + \" \" + message);\n System.out.println(messag... | [
"0.8009816",
"0.800197",
"0.7862081",
"0.77791387",
"0.77771926",
"0.7751557",
"0.7751557",
"0.77298176",
"0.76681936",
"0.76176786",
"0.75608754",
"0.7516935",
"0.7475318",
"0.74493366",
"0.74483776",
"0.7432988",
"0.74283093",
"0.7382962",
"0.73567486",
"0.7356204",
"0.7340... | 0.0 | -1 |
Return user input as String for the given text message | public String getUserInput(String userMessage) {
System.out.println(userMessage);
return sc.nextLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createMessage()\n {\n System.out.println( user + \", type the message you want to send:\" );\n String userInput = sysin.nextLine();\n if( userInput.length() <= MAXLEN )\n msg = userInput;\n else\n msg = userInput.substring( 0, MAXLEN );\n\n }",
"private static String inputStri... | [
"0.7298383",
"0.7241034",
"0.7168096",
"0.7132983",
"0.7067113",
"0.7053988",
"0.6989221",
"0.6937312",
"0.6904989",
"0.69008344",
"0.6866862",
"0.6851577",
"0.6827784",
"0.68019253",
"0.67775255",
"0.6641696",
"0.6591662",
"0.6563456",
"0.6556445",
"0.65532595",
"0.6540189",... | 0.7050632 | 6 |
Fetch all mails from the given folder and print first 30 of them | public void checkMails(String folderName) {
try {
Store store = getStore();
if (folderName.isBlank() || folderName.isEmpty())
folderName = "INBOX";
// create the folder object and open it
Folder emailFolder = store.getFolder(folderName);
emailFolder.open(Folder.READ_ONLY);
// retrieve the messages from the folder in an array and print it
Message[] messages = emailFolder.getMessages();
System.out.println("messages.length---" + messages.length);
for (int i = 0, n = messages.length; i < n && i < 30; i++) {
Message message = messages[i];
System.out.println("---------------------------------");
System.out.println("Email Number " + (i + 1));
System.out.println("Subject: " + message.getSubject());
System.out.println(
"From: " + ((message.getFrom() != null && message.getFrom().length != 0) ? message.getFrom()[0]
: "NULL"));
System.out.println("Text: " + message.getContent().toString());
}
// close the store and folder objects
emailFolder.close(false);
store.close();
} catch (Exception e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LinkedList<Message> getAllEmails() {\r\n\t\t// Iterate over all folders in the IMAP account\r\n\t\ttry {\r\n\t\t\tf = store.getDefaultFolder().list();\r\n\t\t} catch (MessagingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tLinkedList<Message> messages = new LinkedList<Message>();\r\n\t\tfor (F... | [
"0.6193701",
"0.6142947",
"0.59115624",
"0.5844683",
"0.5742718",
"0.56708956",
"0.5643371",
"0.56135446",
"0.55486125",
"0.5430377",
"0.5362858",
"0.5362009",
"0.5360944",
"0.5332744",
"0.5295104",
"0.52905303",
"0.5241488",
"0.52289236",
"0.5205708",
"0.51594865",
"0.514523... | 0.6340529 | 0 |
Create a Store Object for Mail Recieve. Following steps are followed 1. Fetch all Receive protocol details and construct a properties object 2. Create a new Session with the properties 3. Return the created Store object from Session | private Store getStore() throws MessagingException {
// create properties field
Properties properties = getProtocolProporties(PROTOCOL_RECEIVE);
Session emailSession = Session.getDefaultInstance(properties);
return connectSessionStore(emailSession);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createStore() {\n\n try {\n\n MailboxProtocolEnum curMbPrtcl = this.loginData.getMailboxProtocol();\n\n // Get a Properties and Session object\n Properties props = JavamailUtils.getProperties();\n\n // Trustmanager needed?\n if(curMbPrtcl.isUseOfSsl()) {\n\n MailSSLS... | [
"0.7459535",
"0.67554706",
"0.65287113",
"0.6226424",
"0.6176375",
"0.6078378",
"0.5911816",
"0.5833285",
"0.5810588",
"0.55712944",
"0.5568024",
"0.5317507",
"0.52381766",
"0.5218047",
"0.51828134",
"0.51604736",
"0.51246464",
"0.51151156",
"0.50985616",
"0.50626",
"0.503482... | 0.692451 | 1 |
Create store object from the Session object and connect with user credentials. Only POP3 and IMAP can be provided as Receive protocol in proporties file, otherwise it would return null. | private Store connectSessionStore(Session emailSession) throws MessagingException {
Store store = null;
switch (getProperty(PROTOCOL_RECEIVE)) {
case POP3:
// create the POP3 store object and connect with the pop server
store = emailSession.getStore(POP3);
// Connect to the store
store.connect(getProperty("POP3_HOST"), getProperty("username"), getPassword());
break;
case IMAP:
// create the IMAP store object and connect with the imap server
store = emailSession.getStore(IMAP);
// Connect to the store
store.connect(getProperty("IMAP4_HOST"), getProperty("username"), getPassword());
break;
default:
return null;
}
return store;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Session setUpEmailSession() throws MessagingException {\n Authenticator auth = new SimpleAuthenticator(mailUsername, mailPassword);\r\n Properties props = System.getProperties();\r\n props.put(\"mail.smtp.host\", mailHost);\r\n Session session = Session.getDefaultInstance(props, auth);\... | [
"0.66487545",
"0.6641761",
"0.6448269",
"0.62887084",
"0.6248965",
"0.6216161",
"0.61957306",
"0.609092",
"0.58287907",
"0.5721639",
"0.56789386",
"0.5643985",
"0.55301696",
"0.551323",
"0.54589236",
"0.53953415",
"0.51360554",
"0.5077169",
"0.50761706",
"0.5059801",
"0.50154... | 0.76087236 | 0 |
Create Properties object for the requested protocol from initialized properties files. Only POP3, IMAP and SMTP can be provided as protocol, otherwise it would return null. | private Properties getProtocolProporties(String protocol) {
Properties properties = new Properties();
switch (getProperty(protocol)) {
case POP3:
properties.put("mail.pop3.host", getProperty("POP3_HOST"));
properties.put("mail.pop3.port", getProperty("POP3_PORT"));
properties.put("mail.pop3.starttls.enable", "true");
break;
case SMTP:
properties.put("mail.smtp.port", getProperty("SMTP_PORT"));
properties.put("mail.smtp.host", getProperty("SMTP_HOST"));
// properties.put("mail.smtp.ssl.enable", "true");
properties.put("mail.smtp.auth", "true");
properties.put("mail.smtp.starttls.enable", "true");
break;
case IMAP:
properties.put("mail.imap.user", getProperty("username"));
properties.put("mail.imap.host", getProperty("IMAP4_HOST"));
properties.put("mail.imap.port", getProperty("IMAP4_PORT"));
properties.put("mail.imap.ssl.enable", "true");
break;
default:
return null;
}
return properties;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Properties init(){\n // Get a Properties object\n Properties props = System.getProperties();\n props.setProperty(\"mail.smtp.host\", \"smtp.gmail.com\");\n props.setProperty(\"mail.smtp.socketFactory.class\", SSL_FACTORY);\n props.setProperty(\"mail.smtp.socketFact... | [
"0.6809727",
"0.60852665",
"0.55829096",
"0.55299455",
"0.54593915",
"0.5427633",
"0.5375354",
"0.52471054",
"0.52209806",
"0.5214913",
"0.5214114",
"0.5161434",
"0.51563925",
"0.51430994",
"0.5099237",
"0.50905865",
"0.50858164",
"0.50705874",
"0.5044307",
"0.5030809",
"0.50... | 0.78310865 | 0 |
Populate properties object by loading properties from the given property file. | private Properties loadProperties(String propertyFile) {
oAuthProperties = new Properties();
try {
oAuthProperties.load(App.class.getResourceAsStream(propertyFile));
} catch (IOException e) {
System.err.println("Unable to read " + propertyFile
+ " configuration. Make sure you have a properly formatted " + propertyFile + " file.");
return null;
}
return oAuthProperties;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n ... | [
"0.7751273",
"0.7727962",
"0.7387092",
"0.7372421",
"0.7203197",
"0.71836615",
"0.7164355",
"0.71261203",
"0.7092607",
"0.70622295",
"0.6996845",
"0.69842297",
"0.6967695",
"0.69589114",
"0.68629974",
"0.68605363",
"0.6796691",
"0.67738414",
"0.6765722",
"0.6761533",
"0.67561... | 0.64160407 | 45 |
Get a specific property from the properties object. | public String getProperty(String propertyName) {
System.out.println(propertyName + " - " + oAuthProperties.getProperty(propertyName));
return oAuthProperties.getProperty(propertyName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Property getProperty();",
"Property getProperty();",
"String getProperty(String property);",
"Object getProperty(String name);",
"Object getProperty(String requestedProperty) {\n return properties.getProperty(requestedProperty);\n }",
"public Object getProperty(String propertyName){\n re... | [
"0.79103047",
"0.79103047",
"0.7822006",
"0.7576198",
"0.7521309",
"0.7460845",
"0.74571294",
"0.7412629",
"0.7388244",
"0.7332546",
"0.7300305",
"0.7288803",
"0.72884744",
"0.726652",
"0.72020096",
"0.72020096",
"0.72020096",
"0.7191794",
"0.7191794",
"0.7191794",
"0.7154978... | 0.0 | -1 |
This is supposed to ask user to type in password. Console object must be available for this to success. Otherwise, it looks for password from the property file | private String getPassword() {
if (null == password || password.isBlank() || password.isEmpty()) {
Console cons;
char[] passwd = null;
if ((cons = System.console()) != null) {
passwd = cons.readPassword("[%s]", "Password : ");
password = Arrays.toString(passwd);
} else {
System.err.println("Console not found");
password = getProperty("password");
}
}
return password;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String readPassword() {\n\t\treturn consoleInput.nextLine();\r\n\t}",
"private static void task42() {\n char[] pass = null;\n Console con = System.console();\n if(con != null){\n try {\n pass = con.readPassword(\"Enter your password:\");\n ... | [
"0.7986573",
"0.75550056",
"0.6986077",
"0.6972304",
"0.6776694",
"0.6651265",
"0.66084784",
"0.65844953",
"0.656112",
"0.6448133",
"0.6441792",
"0.6419367",
"0.64062643",
"0.6384861",
"0.63648397",
"0.63420475",
"0.62038463",
"0.61926156",
"0.61926156",
"0.61926156",
"0.6192... | 0.6734484 | 5 |
Just loop through 3 choices that user have 1. Read Email from a folder (default Inbox) 2. Send an Email to an user 3. Close the program | private void userInteraction() {
System.out.println("Starting user Interaction");
while (true) {
int input = Integer.parseInt(getUserInput("1 - Read, 2 - Send Email, Any other number - Exit..."));
switch (input) {
case 1:
checkMails(getUserInput("Type Folder Name to view details : "));
break;
case 2:
sendEmail();
break;
default:
System.exit(0);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main (String args[]) throws Exception {\n\n String host = \"triggeremails.com\";\n String username = \"test\";\n String password = \"tr1ggertr1gger\";\n\n // Get session\n Session session = Session.getInstance(System.getProperties(), null);\n\n // Get the store\n Store store... | [
"0.6711862",
"0.6158451",
"0.61487097",
"0.608667",
"0.593718",
"0.58610505",
"0.58351135",
"0.57647884",
"0.5624125",
"0.5493502",
"0.5477828",
"0.54661167",
"0.5452993",
"0.54454225",
"0.54413474",
"0.5434539",
"0.5434167",
"0.5433344",
"0.54280937",
"0.54186803",
"0.538645... | 0.7291974 | 0 |
Variable que guarda el marcador Funcion que ejecuta el mapa cuando la aplicacion se abre | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
this.inflater = getLayoutInflater();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setupMapa(final String idCliente) {\n\n // Tag used to cancel the request\n String tag_string_req = \"req_login\";\n\n\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.URL_MAPA_UBICACION, new Response.Listener<String>() {\n\n @O... | [
"0.5769212",
"0.57227653",
"0.57048845",
"0.57048",
"0.56985396",
"0.56916517",
"0.5675551",
"0.55740535",
"0.5483383",
"0.5482621",
"0.5471247",
"0.54278296",
"0.5419314",
"0.5403139",
"0.5390046",
"0.53823847",
"0.5375194",
"0.53696066",
"0.5357733",
"0.535375",
"0.53422475... | 0.0 | -1 |
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to install it inside the SupportMapFragment. This method will only be triggered once the user has installed Google Play services and returned to the app. Se ejecuta cuando el mapa esta listo | @Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap; //Cargamos el mapa
miUbicacion(); //Cargamos nuestra ubicacion
mMap.setInfoWindowAdapter(this);
//START INTENT
mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {
@Override
public void onInfoWindowClick(Marker marker) {
Meteo meteo = (Meteo) marker.getTag();
Intent secondActivity = new Intent(MapsActivity.this,segAct.class);
secondActivity.putExtra("name",meteo.getName());
secondActivity.putExtra("temp",meteo.getMain().getTemp());
secondActivity.putExtra("tempMax",meteo.getMain().getTemp_max());
secondActivity.putExtra("tempMin",meteo.getMain().getTemp_min());
secondActivity.putExtra("icon",meteo.getWeather().get(0).getIcon());
startActivity(secondActivity);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n ... | [
"0.8263892",
"0.80562526",
"0.79924846",
"0.79453886",
"0.7934444",
"0.7928846",
"0.7925973",
"0.79120976",
"0.79024684",
"0.78996825",
"0.7899437",
"0.7881781",
"0.7880441",
"0.7876604",
"0.78666055",
"0.78649724",
"0.78555626",
"0.7822515",
"0.77908075",
"0.77903044",
"0.77... | 0.0 | -1 |
Clase que agrega el marcador | private void agregarMarcador(double lat, double lon, Meteo maMeteo) {
if(mMap != null){
if(marker != null){
marker.setPosition(new LatLng(lat, lon));
marker.setTag(maMeteo);
}else{
marker = mMap.addMarker(new MarkerOptions().position(new LatLng(lat,lon)));
marker.setTag(maMeteo);
}
mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(lat, lon)));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Marinator() {\n }",
"private Marinator() {\n }",
"public FiltroMicrorregiao() {\r\n }",
"public DarAyudaAcceso() {\r\n }",
"public ControladorCoche() {\n\t}",
"private Mgr(){\r\n\t}",
"private ControleurAcceuil(){ }",
"public Unidadmedida() {\r\n\t}",
"public MPaciente() {\r\n\t... | [
"0.6267831",
"0.6267831",
"0.6246712",
"0.61906713",
"0.61732095",
"0.6125016",
"0.61215615",
"0.60992527",
"0.6063809",
"0.60508287",
"0.6045583",
"0.59996814",
"0.5996882",
"0.59821695",
"0.5967791",
"0.5942489",
"0.59371734",
"0.5927277",
"0.590969",
"0.5880425",
"0.587568... | 0.0 | -1 |
Clase que busca nuestra posicion | public void miUbicacion() { //Funcion que recupera la ubicacion
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
return;
}
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); //Se accede al sistema para el servicio de locatizacion
Location location = locationManager.getLastKnownLocation(GPS_PROVIDER); //Se recupera la ultima localizacion conocida
if(location != null) {
new DownloadWebPageTask(location).execute("http://api.openweathermap.org/data/2.5/weather?lat=" + location.getLatitude() + "&lon=" + location.getLongitude() +
"&units=metric&lang=fr&appid=5bdfb081811a28abc515bc673fc0d20f");
}
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 20000,0,locListenner); //Esto se hace cada 10s
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Position_ordonnee createPosition_ordonnee();",
"Vaisseau_positionner createVaisseau_positionner();",
"Position_changerOrdonnee createPosition_changerOrdonnee();",
"Negacion createNegacion();",
"Position_abscisse createPosition_abscisse();",
"Position_changerAbscisse createPosition_changerAbscisse();",
... | [
"0.7406169",
"0.6928704",
"0.68151015",
"0.6747484",
"0.6725877",
"0.6576269",
"0.6436119",
"0.6370246",
"0.6336626",
"0.6336626",
"0.63272625",
"0.63259226",
"0.6290285",
"0.6239038",
"0.6235272",
"0.62278664",
"0.6204389",
"0.61685705",
"0.6164385",
"0.6138979",
"0.61321235... | 0.0 | -1 |
Se crea una variable que escucha nuestra ubicacion cuando: | @Override
public void onLocationChanged(Location location) {
//Aqui creamos la funcion DownloadWebPageTask para poder descargar los archivos desde la pagina del api
DownloadWebPageTask task = new DownloadWebPageTask(location);
task.execute(new String[] { "http://api.openweathermap.org/data/2.5/weather?lat="+location.getLatitude()+
"&lon="+location.getLongitude()+"&units=metric&lang=fr&appid=5bdfb081811a28abc515bc673fc0d20f" });
Log.d("DEBUGGGGGGGGGGGGGGGGGG", String.valueOf(location.getLatitude()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void crearImagenes() {\n try {\n fondoJuego1 = new Imagenes(\"/fondoJuego1.png\",39,-150,-151);\n fondoJuego2 = new Imagenes(\"/fondoJuego2.png\",40,150,149);\n regresar = new Imagenes(\"/regresar.png\",43,90,80);\n highLight = new Imagenes(\"/cursorSubmenu... | [
"0.5988537",
"0.59462",
"0.5865674",
"0.57898307",
"0.57586485",
"0.5651397",
"0.5627655",
"0.5568716",
"0.5532822",
"0.55203515",
"0.54756534",
"0.5464288",
"0.5423958",
"0.54142845",
"0.54126066",
"0.54112935",
"0.5404458",
"0.53930116",
"0.5369485",
"0.5360179",
"0.5358891... | 0.0 | -1 |
DIBUJO DE LA PANTALLA | @Override
public View getInfoContents(Marker marker) {
//PARAMS GENERALES
int size = 18;
//DIBUJAMOS dentro de los elementos que tenemos
View popupView = inflater.inflate(R.layout.popupmap, null);
Meteo meteo = (Meteo) marker.getTag();
TextView ttvTitle = (TextView) popupView.findViewById(R.id.title);
TextView txtDesc = (TextView) popupView.findViewById(R.id.desc);
TextView txtTemp = (TextView) popupView.findViewById(R.id.temp);
TextView txtTempMin = (TextView) popupView.findViewById(R.id.tempMin);
TextView txtTempMax = (TextView) popupView.findViewById(R.id.tempMax);
ImageView imageView = (ImageView) popupView.findViewById(R.id.imageView);
TextView txtWind = (TextView) popupView.findViewById(R.id.wind);
//TITLE and PARAMS
ttvTitle.setText(meteo.getName());
ttvTitle.setTextSize(25);
ttvTitle.setTextColor(Color.WHITE);
ttvTitle.setBackgroundColor(Color.BLUE);
//IMAGE
imageView.setImageDrawable(getDrawable(getResources().getIdentifier("_" + meteo.getWeather().get(0).getIcon(), "drawable", getPackageName())));
//TEXT VIEWS
txtDesc.setText("Description: " + meteo.getWeather().get(0).getDescription());
txtTemp.setText("Température: " + meteo.getMain().getTemp() + "°C");
txtTempMax.setText("MAX: " + meteo.getMain().getTemp_max() + "°C");
txtTempMin.setText("MIN: " + meteo.getMain().getTemp_min() + "°C");
txtWind.setText("Force du vent: " + meteo.getWind().getSpeed() + " Deg: " + meteo.getWind().getDeg());
//PARAMS TEXT VIEWS
txtDesc.setTextSize(size);
txtTemp.setTextSize(size);
txtTempMax.setTextSize(size);
txtTempMin.setTextSize(size);
txtWind.setTextSize(size);
return popupView ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}",
"public void tipoDatos() {\n\t\tint num = 10;\n\t\t// Texto STring\n\t\tString cadena = \"cadena\";\n\n\t\t// Decimale O flotante\n\t\tdouble decimal = 12.16;\n\t\tfl... | [
"0.6472401",
"0.63609755",
"0.6357936",
"0.6330003",
"0.6310159",
"0.62482274",
"0.62398535",
"0.62291396",
"0.6222348",
"0.6202957",
"0.61873436",
"0.61800486",
"0.61617744",
"0.61418605",
"0.61370367",
"0.6130127",
"0.6121649",
"0.6120053",
"0.6116944",
"0.6113533",
"0.6111... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.