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
/ access modifiers changed from: protected
public void reportWarning(int i, String str, String str2, Object obj, String str3) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
public void loadLibrary(String str) { _lancet.com_ss_android_ugc_aweme_lancet_launch_LoadSoLancet_loadLibrary(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375959", "0.70425177", "0.69218665", "0.6908857", "0.68462455", "0.68293995", "0.6805953", "0.6583417", "0.65397364", "0.65014184", "0.6491877", "0.6491877", "0.6472813", "0.64386034", "0.6432003", "0.6432003", "0.64291835", "0.6425716", "0.6419082", "0.6409203", "0.64066...
0.0
-1
Use a Factory to inject dependencies into the ViewModel
@NonNull private static MoviesViewModel obtainViewModelMovies(AppCompatActivity activity) { ViewModelFactory factory = ViewModelFactory.getInstance(activity.getApplication()); return ViewModelProviders.of(activity, factory).get(MoviesViewModel.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n ...
[ "0.67104053", "0.64117134", "0.6267387", "0.6148617", "0.6074435", "0.6034059", "0.5956218", "0.58935964", "0.5889535", "0.58716047", "0.58518606", "0.58419424", "0.5785589", "0.5752367", "0.5731374", "0.5713218", "0.5709199", "0.57055515", "0.5684043", "0.5606752", "0.560070...
0.0
-1
Use a Factory to inject dependencies into the ViewModel
@NonNull private static TVShowsViewModel obtainViewModelTvShow(AppCompatActivity activity) { ViewModelFactory factory = ViewModelFactory.getInstance(activity.getApplication()); return ViewModelProviders.of(activity, factory).get(TVShowsViewModel.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n ...
[ "0.6709745", "0.6411613", "0.6266754", "0.6148994", "0.6073419", "0.60323507", "0.5953765", "0.589583", "0.5888859", "0.5870754", "0.5851906", "0.5841233", "0.57855046", "0.5751284", "0.5730843", "0.5712434", "0.57095635", "0.5705259", "0.56835824", "0.56062555", "0.5599735",...
0.0
-1
Empty list for the new items
@Override public void onDataChange(DataSnapshot dataSnapshot) { trackDataList.clear(); for (DataSnapshot snapshot : dataSnapshot.getChildren()) { if (snapshot != null) { TrackData trackData = snapshot.getValue(TrackData.class); if (permissionUtil.isReadStoragePermissionGranted(context)) { FileStorageUtil.TrackDataChanged dataChanged = FileStorageUtil.checkForNewPathData(trackData, context); if (dataChanged.updated) { fireBaseManager.deleteTrack(trackData.getKey()); trackData = dataChanged.trackData; fireBaseManager.pushTrackData(dataChanged.trackData); } } trackDataList.add(trackData); if (callBack != null) { callBack.onDataChanged(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void emptyList() {\n coursesTaken = new ArrayList<CourseTaken>();\r\n }", "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "public void EmptyList(){\n BusStopSearcherPresenter.setListview(initLi...
[ "0.7220098", "0.71312094", "0.6964285", "0.68545866", "0.68266386", "0.6823389", "0.6719754", "0.66836643", "0.6593611", "0.6578347", "0.65747106", "0.6570031", "0.65676105", "0.6546387", "0.6539775", "0.64642596", "0.6447192", "0.64346", "0.6418276", "0.6413188", "0.6410743"...
0.0
-1
Write a return method that can concat two arrays
public static int[] array(int[] arr1, int[] arr2) { int[] arr3 = new int[arr1.length + arr2.length]; //now the length = 5 int j = 0;//will represent indexes of 3rd array for (int each : arr1) { //1, 2, 3 arr3[j++] = each; } for (int each : arr2) { arr3[j++] = each; } return arr3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer[] concatArrays(Integer[] array1, Integer[] array2);", "private Cell[] concatArray(Cell[] arr1, Cell[] arr2) {\r\n\t\tCell[] concat = new Cell[arr1.length + arr2.length];\r\n\t\tfor (int k = 0; k < concat.length; k++) {\r\n\t\t\tif (k < arr1.length) {\r\n\t\t\t\tconcat[k] = arr1[k];\r\n\t\t\t} else {\r\n\...
[ "0.7991122", "0.7838436", "0.771636", "0.77121806", "0.7674839", "0.7555348", "0.75366783", "0.7405205", "0.7245919", "0.7204713", "0.7137506", "0.70546687", "0.69600755", "0.69274074", "0.68346494", "0.68012244", "0.6704679", "0.6628356", "0.6618179", "0.661547", "0.6561272"...
0.57770586
72
/Cookie [] getOrders(int idprincipal, String [] cookiesval, String [] cookiesname);
Cookie deleteOrder(int id, String [] cookiesval, String [] cookiesname);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Cookie[] getCookies();", "public abstract Cookie[] getResponseCookies();", "@Override\r\n public void getCookie(String name)\r\n {\n\r\n }", "public JSONArray getOrders() throws Exception;", "void getOrders();", "@Override\r\n public void getAllCookies()\r\n {\n\r\n }", "public JSONOb...
[ "0.6929124", "0.6475093", "0.5825973", "0.56758595", "0.5596224", "0.55652916", "0.5533742", "0.5526373", "0.5436602", "0.542011", "0.54172695", "0.5399433", "0.53972536", "0.5363861", "0.53630745", "0.53320205", "0.5325192", "0.5311433", "0.53098166", "0.52997607", "0.527520...
0.7095939
0
/ Initializes material attributes from the material in the given / model at the given index. / \param[in] pModel Pointer to the source model that contains the / material definitions. / \param[in] materialIndex Index of the material to get properties from / \return True if the material could be initialized from the requested / model and material index. False if there was a problem and / the material could not be initialized.
boolean InitFromMaterial(NvModelExt pModel, int materialIndex){ if (null == pModel) return false; Material pMaterial = pModel.GetMaterial(materialIndex); if (null == pMaterial) return false; m_ambient = pMaterial.m_ambient; m_diffuse = pMaterial.m_diffuse; m_emissive = pMaterial.m_emissive; m_specular = pMaterial.m_specular; m_shininess = pMaterial.m_shininess; m_alpha = pMaterial.m_alpha; if (pMaterial.m_diffuseTextures.isEmpty()) { m_diffuseTexture = -1; } else { m_diffuseTexture = pMaterial.m_diffuseTextures.get(0).m_textureIndex; } if (pMaterial.m_bumpMapTextures.isEmpty()) { m_bumpMapTexture = -1; } else { m_bumpMapTexture = pMaterial.m_bumpMapTextures.get(0).m_textureIndex; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean setMaterial(int index) {\n if (isValidIndex(index, MATERIALS)) {\n material = index;\n return true;\n } else {\n return false;\n }\n }", "public void setMaterialInstanceAt(@EntityInstance int i, @IntRange(from = 0) int primitiveIndex,\n ...
[ "0.61882466", "0.5529436", "0.54451185", "0.53304636", "0.52719015", "0.52245003", "0.51520836", "0.4991756", "0.48208445", "0.47811013", "0.46373674", "0.4567105", "0.45367974", "0.45209804", "0.44731662", "0.44241542", "0.44124782", "0.44064292", "0.43975908", "0.43954983", ...
0.8002071
0
First: create an inflater service in order to inflate the current row in the layout
@Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); // Second: get the id for the item text in order to change ot to the appropriate text according to the position View rowView = inflater.inflate(R.layout.list_todo_item, parent, false); TextView itemText = (TextView) rowView.findViewById(R.id.txtTodoTitle); TextView itemDate = (TextView) rowView.findViewById(R.id.txtTodoDueDate); // Third: change the text according to the position SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy"); itemText.setText(mObjects.get(position).GetText()); if(mObjects.get(position).GetDate()!= null) { itemDate.setText(formatter.format(mObjects.get(position).GetDate())); // Forth: change color for the overdue items Calendar c = Calendar.getInstance(); Date currentDate = c.getTime(); if (currentDate.after(mObjects.get(position).GetDate())) { itemText.setTextColor(Color.RED); itemDate.setTextColor(Color.RED); } } else { itemDate.setText(NO_DUE_DATE); } return rowView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\tView row = (View) inflater.inflate(R.layout.list_row, arg2, false);\n\t\treturn row;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceS...
[ "0.6714927", "0.6581738", "0.64539236", "0.64100194", "0.6397395", "0.6396718", "0.63878167", "0.636506", "0.63287723", "0.6326578", "0.63137406", "0.6305936", "0.6283191", "0.62617683", "0.62489635", "0.6245635", "0.623668", "0.6231466", "0.6214171", "0.6190557", "0.61805475...
0.0
-1
Creates a new instance of SessionResource
public SessionResource() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SessionsResource() {\n\t\tsuper();\n\t\tLOG.trace(\"Start SessionsResource#SessionsResource()\");\n\t\tsetValidator(new SessionResourceValidator(this));\n\t\tLOG.trace(\"Complete SessionsResource#SessionsResource()\");\n\t}", "public Session createSession() {\n\t\tSession session = new Session();\n\t\tput...
[ "0.75671345", "0.7005629", "0.6811433", "0.6611273", "0.6500064", "0.6464639", "0.63371885", "0.632238", "0.62109125", "0.6170711", "0.6145204", "0.61164176", "0.61164176", "0.60577184", "0.6045055", "0.604322", "0.5997764", "0.5904641", "0.5891836", "0.5880943", "0.58580416"...
0.79174155
0
Retrieves representation of an instance of conf.session.ws.rest.SessionResource
@GET @Produces(MediaType.APPLICATION_XML) public String getXml() { //TODO return proper representation object throw new UnsupportedOperationException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SessionResource() {\n }", "public SessionsResource() {\n\t\tsuper();\n\t\tLOG.trace(\"Start SessionsResource#SessionsResource()\");\n\t\tsetValidator(new SessionResourceValidator(this));\n\t\tLOG.trace(\"Complete SessionsResource#SessionsResource()\");\n\t}", "@Path(\"/{id}\")\n @GET\n public R...
[ "0.6656597", "0.63648486", "0.6024317", "0.5922351", "0.5906995", "0.58016634", "0.5523171", "0.55105436", "0.5493368", "0.54368985", "0.54316384", "0.5424018", "0.5408188", "0.5395608", "0.53614813", "0.5340999", "0.5339911", "0.53376836", "0.5334158", "0.53291327", "0.53183...
0.0
-1
PUT method for updating or creating an instance of SessionResource
@PUT @Consumes(MediaType.APPLICATION_XML) public void putXml(String content) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"{id}\", method = RequestMethod.PUT)\n public Session update(@PathVariable Long id, @RequestBody Session session) {\n //TODO: Add validation that all attributes are passed in, otherwise return a 400 bad payload\n Session existingSession = sessionRepository.getOne(id);\n ...
[ "0.7482309", "0.5959329", "0.57845265", "0.5723506", "0.56736434", "0.56480575", "0.5563414", "0.55518013", "0.53917325", "0.53904724", "0.5378593", "0.53732556", "0.53570825", "0.5329498", "0.53209466", "0.53021014", "0.5298487", "0.52953416", "0.52930695", "0.52791756", "0....
0.0
-1
This question is on the trickier side and using hashmap we will use o(n) space but we can do it in o(1) lets see Lets take a list 1>2>3 Lets create copy of the list and attach to the list i.e 1 2 3 null \ / \ / \ / 1 2 3 This way we will be able to resolve random pointers easily for eg we random pointer of 1 is 3 i.e head.random then to set for duplicate list we just have to do head.next.random=head.random.next Finally break the list into two different list keeping in minf duplicate list.next will reach null first
public RandomListNode copyRandomList(RandomListNode head) { RandomListNode curr=head; while(curr!=null) { RandomListNode temp=new RandomListNode(curr.label); temp.next=curr.next; curr.next=temp; curr=curr.next.next; } curr=head; while(curr!=null) { if(curr.random!=null)//Any pointer kept as random can point to null so make sure that we check this scenario to avoid run time error curr.next.random=curr.random.next; curr=curr.next.next; } curr=head; RandomListNode root=head.next; RandomListNode head2=head.next; while(root.next!=null) { curr.next=curr.next.next; curr=curr.next; root.next=root.next.next; root=root.next; } return head2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Node copyRandomList(Node head) {\n\t \n\t Node root = head;\n\t Map<Node, Node> map = new HashMap<>();\n\t \n\t\twhile( root != null ){\n\t\t\tNode newNode = new Node(root.val);\n\t\t\tmap.put( root, newNode );\n\t\t\troot = root.next;\n\t\t}\n\t \n\t\troot = head;\n\t\tNode node = new...
[ "0.75019324", "0.72948414", "0.71601576", "0.71527654", "0.7148385", "0.71377003", "0.7087124", "0.69704485", "0.6851057", "0.671573", "0.6713767", "0.6550145", "0.6532063", "0.65253615", "0.6430812", "0.6386549", "0.63864666", "0.6358568", "0.6279159", "0.62769747", "0.61794...
0.70347494
7
Test if the method, getStatus, will give false or not.
@Test public void initialiseShouldGetFalseForStatus() { Task task = new Task("Test"); Assertions.assertFalse(task.getStatus()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getStatus();", "boolean getStatus();", "boolean getStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boo...
[ "0.75921303", "0.75921303", "0.75921303", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", ...
0.0
-1
Test if the method, getStatus, will return true after running setStatusDone method.
@Test public void setStatusDone_shouldReturnTrueForStatus() { Task task = new Task("Test"); task.setStatusDone(); Assertions.assertTrue(task.getStatus()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDone(){\n return status;\n }", "public boolean getStatus() {\n return this.isDone;\n }", "public boolean checkComplete(){\n return Status;\n }", "public void doIt() {\n status = true;\n }", "private void getStatus() {\n\t\t\n\t}", "boolean hasStatu...
[ "0.69850147", "0.69669515", "0.68891037", "0.6804191", "0.6797834", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", ...
0.7350396
0
Test if toString method give correct String format.
@Test public void toString_shouldReturnInCorrectFormat() { Task task = new Task("Test"); String expected = "[N] Test"; Assertions.assertEquals(expected, task.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testToString() {\n\t\tassertEquals(\"Proper string format\", basic.toString(), \"5, 5\");\n\t}", "@Test\n\tpublic void testToString_True() {\n\n\t\tString result = \"\";\n\t\tresult = \"\\n*************Title: \" + book1.getTitle();\n\t\tresult += \"\\n*************Author: \" + book1.getAutho...
[ "0.7506598", "0.73452795", "0.70283955", "0.6987147", "0.6976576", "0.69523096", "0.684596", "0.68291056", "0.6808609", "0.6791182", "0.6788457", "0.6761791", "0.6735267", "0.67259175", "0.66906077", "0.6680025", "0.66695005", "0.66536987", "0.663833", "0.6622688", "0.658259"...
0.70323956
2
Cleans out the promisesxml directory by removing any empty paths.
public static void removeEmptyPathsOnClient() { final File libRoot = JSurePreferencesUtility.getJSureXMLDirectory(); if (libRoot != null) { FileUtility.deleteEmptySubDirectories(libRoot); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void clean(Path path) {\n }", "public void clearPaths() {\n _thePaths.clear();\n }", "private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\...
[ "0.6485812", "0.63754493", "0.6364128", "0.6327717", "0.6312406", "0.6249859", "0.62042433", "0.6121603", "0.6050401", "0.60426307", "0.6028437", "0.5997356", "0.5956276", "0.59164387", "0.5911308", "0.58798", "0.58653945", "0.58244413", "0.5823233", "0.5768402", "0.576451", ...
0.61533964
7
Merges any possible JSure release updates to local edits. All XML diff files in the workspace are updated.
public static void mergeJSureToLocal() { final File fluidRoot = PromisesXMLParser.getFluidXMLDir(); final File wsRoot = JSurePreferencesUtility.getJSureXMLDirectory(); mergeJSureToLocalHelper(wsRoot, fluidRoot); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateWorkspace()\n {\n workspace.update();\n }", "private boolean updateRepChanges(boolean sync) {\r\n\t\t\r\n\t\ttry {\t\t\t\t\r\n\t\t\t// get repository header since we need count of versions \r\n\t\t\t// i.e. headVersionNum\r\n\t\t\tString status = \"Status: [ACTION - Update Reposito...
[ "0.5619757", "0.54713535", "0.54400307", "0.53430283", "0.5141686", "0.5135254", "0.5068331", "0.5060666", "0.493513", "0.48794138", "0.4866046", "0.48478293", "0.48366377", "0.48292074", "0.48222426", "0.48136508", "0.47952408", "0.47642687", "0.47596398", "0.47382373", "0.4...
0.6132463
0
Merges the passed XML diff file into the JSure codebase (for subsequent release). Warning: This method only works if the tool user is running from source code in a metaEclipse.
public static void mergeLocalToJSure(String relativePathToFile) { final File fluidRoot = PromisesXMLParser.getFluidXMLDir(); final File wsRoot = JSurePreferencesUtility.getJSureXMLDirectory(); final File jsure = new File(fluidRoot, relativePathToFile); final File local = new File(wsRoot, relativePathToFile); boolean fileExistsOnDisk = local.isFile() && local.exists(); if (!fileExistsOnDisk) { SLLogger.getLogger().log(Level.WARNING, I18N.err(239, local), new Exception()); return; // Nothing to do } PromisesXMLMerge.mergeLocalXMLIntoJSureXML(local, jsure); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private InputStream merge(File srcFile, File deltaFile) throws IOException {\n \t\tInputStream result = null;\n \t\ttry {\n \t\t\tFileInputStream srcStream = new FileInputStream(srcFile);\n \t\t\tFileInputStream deltaStream = new FileInputStream(deltaFile);\n \t\t\tInputStream[] inputStreamArray = { srcStream, del...
[ "0.59318584", "0.5264834", "0.5150561", "0.4905033", "0.49007496", "0.48681125", "0.48628274", "0.47964022", "0.47496134", "0.47018078", "0.46341044", "0.459416", "0.4592874", "0.4556843", "0.45177826", "0.44913992", "0.44759935", "0.446668", "0.4465896", "0.4457476", "0.4450...
0.4669871
10
Rewrites a JSure release promises XML file incrementing its release version. This method may be used to update the file format after a structural change. If the passed file doesn't exist this method does nothing. Warning: This method only works if the tool user is running from source code in a metaEclipse.
public static void rewriteJSure(String relativePathToFile) { final File fluidRoot = PromisesXMLParser.getFluidXMLDir(); final File jsure = new File(fluidRoot, relativePathToFile); PromisesXMLMerge.rewriteJSureXML(jsure, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeXMLFile() throws IOException {\n File orig = new File(RunnerClass.homedir + \"launch4j.xml\");\n File custom = new File(RunnerClass.homedir + \"launch4j2.xml\");\n BufferedReader br = new BufferedReader(new FileReader(orig));\n PrintWriter pw = new PrintWriter(new File...
[ "0.61416686", "0.5342051", "0.51015365", "0.50924045", "0.5055962", "0.49931535", "0.48619604", "0.4849162", "0.48406455", "0.48245016", "0.48216337", "0.48090902", "0.4769631", "0.47405654", "0.47270042", "0.47156247", "0.4709333", "0.46710783", "0.46686816", "0.4663805", "0...
0.5400634
1
Performs a mock RESTful call to the backend to retrieve universities
private void performMockSearch(String url, long expectedStatusCode, long expectedSize, String expectedMessageBody) { RestTemplate restTemplate = new RestTemplate(); try { URI uri = new URI(url); ResponseEntity<String> result = restTemplate.getForEntity(uri, String.class); // verify request succeed Assert.assertEquals(expectedStatusCode, result.getStatusCodeValue()); try { JsonNode root = mapper.readTree(result.getBody()); Assert.assertEquals( expectedSize, root.size()); Assert.assertEquals(expectedMessageBody, result.getBody()); } catch(IOException ie) { Assert.fail(ie.getMessage()); } } catch (URISyntaxException e) { Assert.fail(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getUniversities() {\n ProgressDialog dialog = new ProgressDialog(this, \"Caricamento...\");\n application.databaseCall(\"universities.php\", UNIVERSITY_SELECTION_TAG, dialog);\n }", "@Override\n\tpublic List<UniversityDTO> getUniversities() throws DatabaseException {\n\t\t\n\t\t con...
[ "0.6569714", "0.6111635", "0.5996116", "0.5698981", "0.5678052", "0.56582135", "0.5611867", "0.5551277", "0.5510853", "0.5501258", "0.54924244", "0.54198116", "0.53923094", "0.5337417", "0.53216094", "0.5303114", "0.52951866", "0.5293021", "0.52837443", "0.52815115", "0.52800...
0.0
-1
Created by DNS1 on 08.06.2017.
public interface RadiocarbonService { @GET("/search/filter_radiocarbons") Observable<List<RadiocarbonDate>> getRadiocarbons(@Query("name") String name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n ...
[ "0.5724169", "0.55928624", "0.557632", "0.5508457", "0.54673535", "0.54673535", "0.54673535", "0.54673535", "0.54673535", "0.54673535", "0.54673535", "0.54321826", "0.54115885", "0.54069066", "0.5396923", "0.5377873", "0.53695256", "0.5359563", "0.5351041", "0.53383344", "0.5...
0.0
-1
that takes an MessageListDto object as an input and saves the underlying messages into DB
void save(MessageListDto messages);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void save(List<VSTPMsg> vstpMsgList) {\n vstpMsgRepository.save(vstpMsgList);\n }", "public int insertChatMsg(List<Message> list) {\n\t\tConnection conn = getConnection();\n\t\tint result = 0;\n\t\tfor (Message msg : list) {\n\t\t\tresult = cd.insertChatMsg(conn, msg);\n\t\t\tif (result == 0) {\...
[ "0.6991485", "0.6077334", "0.607236", "0.58694595", "0.586409", "0.57651675", "0.5743956", "0.5737177", "0.5724037", "0.56728756", "0.56637925", "0.5628871", "0.56145877", "0.5528841", "0.5528613", "0.54951686", "0.5491342", "0.54830444", "0.5455203", "0.54416794", "0.5433459...
0.8657627
0
////////Evaluacion Plan de Vida
public void ingresarEvalPlanVida() throws SQLException { if (vistaEvaPlanVid.getTxtCedula().getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Ingrese primero cédula y presione 'Enter'", "Ingrese Valores", JOptionPane.ERROR_MESSAGE); } else { if (vistaEvaPlanVid.getDtcFecha().getDate() == null) { JOptionPane.showMessageDialog(null, "Ingrese Fecha", "Ingrese Valores", JOptionPane.WARNING_MESSAGE); } else { if (vistaEvaPlanVid.getDtcFechaEval().getDate() == null) { JOptionPane.showMessageDialog(null, "Ingrese Fecha de Evaluación", "Ingrese Valores", JOptionPane.WARNING_MESSAGE); } else { evalPlModelDB.setVictima_codigo(Integer.parseInt(vistaEvaPlanVid.getTxtCodigo().getText())); evalPlModelDB.setPersonal_codigo(evalPlModelDB.verifiUserP(personal_cod)); evalPlModelDB.setEvaluacion_fecha(obtenerFecha(vistaEvaPlanVid.getDtcFecha())); evalPlModelDB.setEvaluacion_proxima(obtenerFecha(vistaEvaPlanVid.getDtcFechaEval())); if (evalPlModelDB.IngresarEvaluacionPlaVida()) { JOptionPane.showMessageDialog(null, "A continuación presione el botón guardar para completar esta sección"); vistaEvaPlanVid.getBtnObjetivoGeneral().setEnabled(true); vistaEvaPlanVid.getBtnObjetivosEspecificos().setEnabled(true); vistaEvaPlanVid.getBtnGuradrarDesa().setEnabled(true); vistaEvaPlanVid.getBtnGuradar().setEnabled(false); } else { JOptionPane.showMessageDialog(null, "Error al continuar, vuelva a intentar"); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void evaluar(int resistencia, int capacidad, int velocidad) {\n\t\t\n\t}", "public static void getValuationSlot() {\n float locX = M.evaluateLoc.x;\n float locY = M.evaluateLoc.y;\n M.lastZoneValuation = M.evaluateLoc.distanceTo(M.finalMove) * M.moveVectorStr; //Desire t...
[ "0.6896048", "0.6282481", "0.6175715", "0.6107869", "0.60494226", "0.5985174", "0.5979718", "0.5968486", "0.5933097", "0.58599514", "0.5849375", "0.5824645", "0.57977", "0.57596666", "0.5757355", "0.5737904", "0.5728989", "0.5694938", "0.5693111", "0.5654098", "0.5640067", ...
0.6096943
4
Created by tom on 8/3/2016.
public interface RoleRepository extends CrudRepository<Role, Integer> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Overri...
[ "0.5961992", "0.5868568", "0.58043575", "0.57891333", "0.5737685", "0.57094485", "0.56713843", "0.56538063", "0.56515217", "0.56515217", "0.56249934", "0.56013", "0.55799294", "0.55684227", "0.5554764", "0.5544746", "0.55144364", "0.55007493", "0.55002356", "0.55002356", "0.5...
0.0
-1
If the array is empty or the index is not in array range return the original array
public static int[] removeTheElement(int[] arr, int index) { if (arr == null || index < 0 || index >= arr.length) { return arr; } // Create another array of size one less int[] anotherArray = new int[arr.length - 1]; // Copy the elements except the index // from original array to the other array for (int i = 0, k = 0; i < arr.length; i++) { // if the index is // the removal element index if (i == index) { continue; } // if the index is not // the removal element index anotherArray[k++] = arr[i]; } // return the resultant array return anotherArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IArray getArrayCurrent() throws InvalidRangeException;", "public static float[] copyOfRange(float[] original, int from, int to)\r\n\t{\r\n\t\tif (from > to)\r\n\t\t\tthrow new IllegalArgumentException(\"The initial index is after \" +\r\n\t\t\t\t\t\"the final index.\");\r\n\t\tfloat[] newArray = new float[to - f...
[ "0.618459", "0.5903051", "0.5814686", "0.5814456", "0.57772106", "0.57552797", "0.5499583", "0.54958236", "0.5491764", "0.5456074", "0.54551536", "0.5452803", "0.54402924", "0.54381895", "0.54039264", "0.5373255", "0.536544", "0.53427947", "0.53260595", "0.5322232", "0.532139...
0.48185995
93
TODO(sebright): Replace StatsContext with TagContext, and then this cast won't be necessary.
@Override void record(StatsContext tags, MeasureMap measurementValues) { statsManager.record((StatsContextImpl) tags, measurementValues); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CTX_Context getContext();", "com.google.protobuf.ByteString getContext();", "Context getContext();", "@java.lang.Override public int getContextValue() {\n return context_;\n }", "@java.lang.Override public int getContextValue() {\n return context_;\n }", "java.lang.String getContext();", "C...
[ "0.55868757", "0.55178016", "0.55115294", "0.5479952", "0.5438738", "0.5402518", "0.5364209", "0.5364209", "0.5362992", "0.52427393", "0.5233737", "0.52074873", "0.5172227", "0.51477623", "0.51272136", "0.5117224", "0.510919", "0.5095947", "0.50869733", "0.50554967", "0.50409...
0.45326534
78
the offsetsForTime call needs a partition that exists else it can block forever
public static BrokerCompatibilityCheck create(final Map<String, Object> streamsConfig, final Set<String> topicNames) { if (topicNames.isEmpty()) { throw new KsqlException("Unable to check broker compatibility against a broker without any topics"); } final Map<String, Object> consumerConfigs = new StreamsConfig(streamsConfig) .getConsumerConfigs("__ksql_compatibility_check", "ksql_server"); // remove this otherwise it will try and instantiate the StreamsPartitionAssignor consumerConfigs.remove("partition.assignment.strategy"); final KafkaConsumer<String, String> consumer = new KafkaConsumer<>(consumerConfigs, new StringDeserializer(), new StringDeserializer()); return new BrokerCompatibilityCheck(consumer, new TopicPartition(topicNames.iterator().next(), 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<TopicAndPartition, Long> getOffsets() {\n Map<TopicAndPartition, Long> returnOffsetsMap = new HashMap<>();\n\n for (String topic : topicList) {\n\n Map<TopicAndPartition, Long> resMap = dao.getOffsets(groupid, topic);\n if (!resMap.isEmpty()) {\n\n Map<...
[ "0.6147972", "0.6043465", "0.56288934", "0.5369917", "0.5362013", "0.5354984", "0.52950406", "0.52340406", "0.52193624", "0.5130767", "0.5116505", "0.5079216", "0.50323635", "0.50115955", "0.49976948", "0.49921256", "0.48620024", "0.48611784", "0.48469898", "0.48414284", "0.4...
0.0
-1
Check if the used brokers have version 0.10.1.x or higher. Note during an upgrade this check may pass or fail depending on which broker is the leader for the partition, i.e, if an old broker is the leader the check would fail. If a new broker is the leader it will pass. This is only a temporary situation and will naturally rectify itself.
void checkCompatibility() throws StreamsException { try { consumer.offsetsForTimes(Collections.singletonMap(topicPartition, 0L)); } catch (final UnsupportedVersionException e) { throw new KsqlException("The kafka brokers are incompatible with. " + "KSQL requires broker versions >= 0.10.1.x"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasOldVersionNumber() {\n return (getVersionNumber() < CURRENT_VERSION_NO);\n }", "public boolean upgrades(Version version) {\n return platform.map(version::compareTo).orElse(0) < 0;\n }", "@Override\n\tpublic boolean getCheckOlderVersion()\n\t{\n\t\treturn false;\n\t}", "p...
[ "0.6529191", "0.6486774", "0.6131628", "0.6075813", "0.6044963", "0.60423714", "0.60091764", "0.59849936", "0.59849936", "0.59730023", "0.58843356", "0.58841515", "0.587788", "0.5822817", "0.58142453", "0.5807369", "0.57635367", "0.5752579", "0.5746982", "0.5715474", "0.57135...
0.6200709
2
Get the current session
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); // Invalidate the session session.invalidate(); // Redirect the user to the login page response.sendRedirect("Login"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Session getCurrentSession();", "Session getCurrentSession();", "public String getSession() {\n return session;\n }", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,...
[ "0.83053285", "0.83053285", "0.8068643", "0.80437994", "0.803164", "0.7945229", "0.7919536", "0.77921015", "0.776479", "0.7687001", "0.76770586", "0.76734704", "0.76734704", "0.76714545", "0.7652687", "0.7597095", "0.75847477", "0.7576359", "0.755017", "0.7546516", "0.7498326...
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.id
public Long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String inventoryItemId() {\n return this.innerProperties() == null ? null : this.innerProperties().inventoryItemId();\n }", "public Number getInventoryItemId() {\n return (Number)getAttributeInternal(INVENTORYITEMID);\n }", "public Number getInventoryItemId() {\n return (Numbe...
[ "0.61989367", "0.56734973", "0.56734973", "0.5605727", "0.5582979", "0.5549767", "0.55185056", "0.54987425", "0.5464569", "0.5460688", "0.54025716", "0.5392813", "0.53654003", "0.5348929", "0.53326285", "0.53326285", "0.53326285", "0.53326285", "0.53070384", "0.5294364", "0.5...
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.id
public void setId(Long id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setInventory(int inventory){\r\n inventoryNumber += inventory;\r\n }", "public void setsId(Integer sId) {\n this.sId = sId;\n }", "public void setInventoryItemId(Number value) {\n setAttributeInternal(INVENTORYITEMID, value);\n }", "public void setInventoryItemId(Num...
[ "0.5627424", "0.5513178", "0.55074334", "0.55074334", "0.5466007", "0.54631555", "0.54064864", "0.53999203", "0.53721243", "0.53309184", "0.5328978", "0.5328978", "0.5267262", "0.52604395", "0.52419764", "0.5216643", "0.5160987", "0.51452965", "0.51452965", "0.51073104", "0.5...
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.snacks_info_id
public Long getSnacksInfoId() { return snacksInfoId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSnacksInfoId(Long snacksInfoId) {\n this.snacksInfoId = snacksInfoId;\n }", "public String getInfoPkid() {\n return infoPkid;\n }", "java.lang.String getDataInfoId();", "public java.lang.String getInfoId() {\n return infoId;\n }", "public long getShopBasketId();...
[ "0.64461225", "0.6382099", "0.58960485", "0.58576405", "0.55108523", "0.54062355", "0.5348676", "0.5275919", "0.5275919", "0.5275919", "0.5275919", "0.527567", "0.5274254", "0.52291214", "0.5228345", "0.52258074", "0.52258074", "0.52258074", "0.52258074", "0.52036864", "0.515...
0.7393922
0
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.snacks_info_id
public void setSnacksInfoId(Long snacksInfoId) { this.snacksInfoId = snacksInfoId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getSnacksInfoId() {\n return snacksInfoId;\n }", "public void setInfoPkid(String infoPkid) {\n this.infoPkid = infoPkid == null ? null : infoPkid.trim();\n }", "public void setInfoId(java.lang.String infoId) {\n this.infoId = infoId;\n }", "public Builder setSnId(int...
[ "0.6808763", "0.5721883", "0.5338838", "0.53045523", "0.53045523", "0.53045523", "0.53045523", "0.5257053", "0.51966965", "0.5166445", "0.5142891", "0.49948058", "0.4964125", "0.49247992", "0.48728994", "0.48607445", "0.48489958", "0.4837016", "0.48365226", "0.48351964", "0.4...
0.7357007
0
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.quantity
public Integer getQuantity() { return quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getQuantity() {\n return this.quantity;\n }", "public Integer getQuantity() {\r\n return this.quantity;\r\n }", "public Integer getQuantity() {\n return this.quantity;\n }", "@Override\n\tpublic int getNoofQuantity() {\n\t String sql=\"SELECT SUM(quantity) FROM suppli...
[ "0.6888039", "0.6869323", "0.68669695", "0.6803984", "0.6695879", "0.66547745", "0.6602455", "0.6584102", "0.6558731", "0.65557694", "0.65557694", "0.65557694", "0.65557694", "0.65557694", "0.6545207", "0.6539934", "0.65381324", "0.6535116", "0.65276015", "0.65259504", "0.651...
0.6773432
4
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.quantity
public void setQuantity(Integer quantity) { this.quantity = quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int quantity) {\r\n this.quantity = quantity;...
[ "0.68641686", "0.68641686", "0.68641686", "0.6825052", "0.6803291", "0.6772514", "0.67591757", "0.6750462", "0.6750462", "0.6742993", "0.66965497", "0.6691084", "0.66152483", "0.65829855", "0.6553533", "0.65339047", "0.6359784", "0.63165575", "0.6307378", "0.62914723", "0.622...
0.6745209
9
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.receive_time
public Date getReceiveTime() { return receiveTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getReceiveTime() {\n return receiveTime;\n }", "public Date getReceiveTime() {\r\n return receiveTime;\r\n }", "public long getReceiveTimeL() {\n\t\treturn Long.parseLong(receiveTime);\n\t}", "public java.sql.Date getReceiveDate () {\r\n\t\treturn receiveDate;\r\n\t}", "public voi...
[ "0.66115385", "0.6575475", "0.61791867", "0.58444273", "0.5691323", "0.56633264", "0.5622417", "0.557084", "0.5568241", "0.5551549", "0.5404838", "0.5401532", "0.54002124", "0.5347978", "0.52856165", "0.52856165", "0.52824664", "0.527855", "0.5250315", "0.5238911", "0.5236861...
0.65464604
2
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.receive_time
public void setReceiveTime(Date receiveTime) { this.receiveTime = receiveTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReceiveTime(Date receiveTime) {\n this.receiveTime = receiveTime;\n }", "public void setReceiveTime(Date receiveTime) {\r\n this.receiveTime = receiveTime;\r\n }", "public void setReceiveDate (java.sql.Date receiveDate) {\r\n\t\tthis.receiveDate = receiveDate;\r\n\t}", "public Da...
[ "0.6780583", "0.6756326", "0.59828633", "0.56861293", "0.56580585", "0.56092876", "0.55643", "0.5522273", "0.5415515", "0.53838277", "0.53746456", "0.53604", "0.53415596", "0.5294321", "0.5264244", "0.51285154", "0.49901593", "0.49788228", "0.49481234", "0.49430475", "0.49207...
0.67010486
2
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.deleted
public Byte getDeleted() { return deleted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getDeleted() {\n return deleted;\n }", "public Long deleted() {\n return this.deleted;\n }", "public Integer getIsdeleted() {\n return isdeleted;\n }", "public Integer getIsDeleted() {\n return isDeleted;\n }", "public java.lang.Boolean getDeleted();",...
[ "0.6651239", "0.6633179", "0.6414577", "0.6268867", "0.6222504", "0.6210904", "0.61728626", "0.6166923", "0.6166923", "0.61435395", "0.61435395", "0.61435395", "0.61435395", "0.6088394", "0.6058042", "0.60321856", "0.5997703", "0.5997703", "0.59792674", "0.5966518", "0.593858...
0.6114874
13
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.deleted
public void setDeleted(Byte deleted) { this.deleted = deleted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDeleted(Integer deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(java.lang.Boolean deleted);", "public void setIsdeleted(Integer isdeleted) {\n this.isdeleted = isdeleted;\n }", "public void setDeleted(boolean deleted);", "public void setDeleted(Boolean ...
[ "0.62542105", "0.6136145", "0.61116165", "0.6068621", "0.6016291", "0.6016291", "0.6016291", "0.6016291", "0.6016291", "0.59933054", "0.5982472", "0.5958655", "0.59503955", "0.5893895", "0.5888073", "0.5878588", "0.5864083", "0.5813749", "0.5754476", "0.57443726", "0.57423145...
0.5938841
13
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.update_time
public Date getUpdateTime() { return updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdateti...
[ "0.6917626", "0.6917626", "0.68105626", "0.6808815", "0.6808815", "0.6808333", "0.6763876", "0.6763876", "0.65933025", "0.65698653", "0.655637", "0.6530119", "0.6516303", "0.6484625", "0.6484625", "0.6462945", "0.6462945", "0.6462945", "0.64616215", "0.6460251", "0.6454581", ...
0.610271
96
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.update_time
public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }", "public void set...
[ "0.66784245", "0.66784245", "0.6452078", "0.64210343", "0.64210343", "0.63630694", "0.62050575", "0.6197819", "0.6197259", "0.6189378", "0.61137027", "0.6027614", "0.6027614", "0.6027614", "0.6027614", "0.59785455", "0.5975395", "0.59640205", "0.59640205", "0.59640205", "0.59...
0.59593123
60
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.create_time
public Date getCreateTime() { return createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCreatetime() {\n return createtime;\n }", "public Integer getCreateTime() {\r\n return createTime;\r\n }", "public Integer getCreateTime() {\n return createTime;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreate_t...
[ "0.6591621", "0.65437096", "0.6521659", "0.6468533", "0.6468533", "0.6414042", "0.6388565", "0.6388565", "0.6352692", "0.6351124", "0.6345387", "0.63277596", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.631...
0.6209033
97
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.create_time
public void setCreateTime(Date createTime) { this.createTime = createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ ...
[ "0.6368124", "0.6368124", "0.61569726", "0.6125718", "0.6125718", "0.6125718", "0.6120668", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6072463", "0.605671", "0.605671", "0.6039038", "0.6037871", "0.59803313", "...
0.0
-1
Creates new form AreaOfRectangleGUI
public AreaOfRectangleGUI() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AREA createAREA();", "public RectangleProgram(){\r\n //Esto metodos los heredamos de JFrame este es el constructor\r\n\t\tsetTitle(\"Area and Perimeter of a Rectangle\");\r\n\t\tsetSize(ANCHO, ALTO);\r\n\t\tsetVisible(true);\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE); //La aplicacion sale cuan...
[ "0.72790354", "0.7026607", "0.6925131", "0.68662673", "0.67656213", "0.6510648", "0.64141136", "0.6337476", "0.63138396", "0.6184099", "0.6160847", "0.61563176", "0.61434025", "0.6119546", "0.60635287", "0.60635287", "0.6045832", "0.6009875", "0.60076773", "0.592283", "0.5904...
0.84203637
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); titleLabel = new javax.swing.JLabel(); lenLabel = new javax.swing.JLabel(); widLabel = new javax.swing.JLabel(); widthInput = new javax.swing.JTextField(); lengthInput = new javax.swing.JTextField(); calcButton = new javax.swing.JButton(); outputLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(255, 255, 255)); setForeground(new java.awt.Color(255, 255, 255)); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); titleLabel.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); titleLabel.setText("Area of a Rectangle"); lenLabel.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N lenLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); lenLabel.setText("Length:"); widLabel.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N widLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); widLabel.setText("Width:"); widthInput.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N lengthInput.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N calcButton.setText("Calculate"); calcButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { calcButtonActionPerformed(evt); } }); outputLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(titleLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(105, 105, 105) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(calcButton, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(widLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(27, 27, 27) .addComponent(widthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(lenLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(93, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(outputLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(203, Short.MAX_VALUE) .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(92, 92, 92))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(33, 33, 33) .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(48, 48, 48) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(lenLabel) .addGap(66, 66, 66) .addComponent(widLabel)) .addComponent(widthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(35, 35, 35) .addComponent(calcButton, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(26, 26, 26) .addComponent(outputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(40, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(127, 127, 127) .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(255, Short.MAX_VALUE))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.731952", "0.72909003", "0.72909003", "0.72909003", "0.72862417", "0.7248404", "0.7213685", "0.72086793", "0.7195972", "0.71903807", "0.71843296", "0.7158833", "0.71475875", "0.70933676", "0.7081167", "0.7056787", "0.69876975", "0.6977383", "0.6955115", "0.6953839", "0.6945...
0.0
-1
Constructor for this instance
public ImageLevel(Context context, AttributeSet attr) { super(context, attr); Resources res = getResources(); // Acquiring image dimension from resources mThumbnailWidth = (int)res.getDimension(R.dimen.thumbnailWidth); mThumbnailHeight = (int)res.getDimension(R.dimen.thumbnailHeight); mMemberLevel = MemberLevel.MemberLevels.eMemberLevelBase; mCurrentImage = new ImageView(getContext()); mCurrentImage.setScaleType(ImageView.ScaleType.FIT_CENTER); mCurrentImage.setMaxWidth(mThumbnailWidth); mCurrentImage.setMaxHeight(mThumbnailHeight); // Acquiring first image from resource mBackImage = ((BitmapDrawable)res.getDrawable(R.drawable.smiley)).getBitmap(); if (mBackImage != null) { Log.v(LOG_TAG, "Drawing image."); drawThumbnail(); } else { Log.e(LOG_TAG, "Initial bitmap not found"); } addView(mCurrentImage , new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public PSRelation()\n {\n }", "public Coche() {\n super();\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public CyanSus() {\n\n }", "public Chick() {\n\t}", "public Trening() {\n }"...
[ "0.79906523", "0.7493084", "0.6989801", "0.6831124", "0.6699213", "0.6697316", "0.669265", "0.6677111", "0.66439754", "0.6640215", "0.6634273", "0.66274804", "0.6616414", "0.6586076", "0.6572645", "0.6570536", "0.65601873", "0.65578437", "0.65565705", "0.65557057", "0.654874"...
0.0
-1
Sets the member level and redraw the thumbnail
public void setMemberlLevel(MemberLevel.MemberLevels mMemberlLevel) { this.mMemberLevel = mMemberlLevel; drawThumbnail(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setLevel(int level) {\n if (level > 1) {\n this.level = level;\n scaleUp();\n percentageScaling();\n }\n }", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "public void setLevel(int newlevel)\n {\n ...
[ "0.6387171", "0.6030628", "0.59556633", "0.594402", "0.59098524", "0.5878118", "0.58560926", "0.58541095", "0.5843083", "0.5808969", "0.5794599", "0.5777209", "0.5766106", "0.57629234", "0.57020485", "0.56914794", "0.5685639", "0.5674342", "0.5674342", "0.5613483", "0.5592099...
0.7736676
0
Sets the background image and call redraw
public void setBackgroundImage(String imagePath) { try { Context context = this.getContext(); if (context != null) { FileInputStream wFile = new FileInputStream(imagePath); BufferedInputStream wBuffer = new BufferedInputStream(wFile); mBackImage = BitmapFactory.decodeStream(wBuffer); if (wFile != null) { wFile.close(); } if (wBuffer != null) { wBuffer.close(); } } if (mBackImage != null) { drawThumbnail(); } } catch(FileNotFoundException e) { Log.e(LOG_TAG, "The file '" + imagePath + "' does not exists."); } catch(Exception e) { Log.e(LOG_TAG, e.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setBackground() throws IOException{\n\t\tBufferedImage backgroundBufferedImage = ImageLoader.getBufferedImage(backgroundImagePath);\n\t\tmainWindow.setBackgroundImage(backgroundBufferedImage);\n\t}", "@Override\r\n public void paintComponent(Graphics g) {\r\n\r\n //Paint background...
[ "0.747725", "0.7080215", "0.7039537", "0.7029211", "0.7010016", "0.69933283", "0.6966123", "0.6954248", "0.694392", "0.69387907", "0.69107205", "0.677011", "0.6668946", "0.66537654", "0.66485155", "0.66392195", "0.6623627", "0.65445435", "0.6532458", "0.6491358", "0.64880455"...
0.6479666
22
Draws the image with the border.
private void drawThumbnail() { int wCurrentWidth = mBackImage.getWidth(); int wCurrentHeight = mBackImage.getHeight(); float scaleWidth = ((float) mThumbnailWidth) / wCurrentWidth; float scaleHeight = ((float) mThumbnailHeight) / wCurrentHeight; Matrix matrix = new Matrix(); matrix.postScale(scaleWidth, scaleHeight); // create the new Bitmap object Bitmap resizedBitmap = Bitmap.createBitmap(mBackImage, 0, 0 , wCurrentWidth, wCurrentHeight, matrix, true); Bitmap output = Bitmap.createBitmap(resizedBitmap.getWidth()+(2*cmColorPadding+2*cmBorderPadding), resizedBitmap.getHeight()+(2*cmColorPadding+2*cmBorderPadding), Config.ARGB_8888); Canvas canvas = new Canvas(output); final int wRectBorderLeft = 0; final int wRectColorLeft = wRectBorderLeft + cmBorderPadding; final int wRectThumbnailLeft = wRectColorLeft + cmColorPadding; final int wRectBorderTop = 0; final int wRectColorTop = wRectBorderTop + cmBorderPadding; final int wRectThumbnailTop = wRectColorTop + cmColorPadding; final int wRectThumbnailRight = wRectThumbnailLeft + resizedBitmap.getWidth(); final int wRectColorRight = wRectThumbnailRight + cmColorPadding; final int wRectBorderRight = wRectColorRight + cmBorderPadding; final int wRectThumbnailBottom = wRectThumbnailTop + resizedBitmap.getHeight(); final int wRectColorBottom = wRectThumbnailBottom + cmColorPadding; final int wRectBorderBottom = wRectColorBottom + cmBorderPadding; final int wThumbColor = 0xff424242; final int wBorderColor = 0xffBBBBBB; final Paint paint = new Paint(); final Rect wThumbRectangle = new Rect(wRectThumbnailLeft, wRectThumbnailTop, wRectThumbnailRight, wRectThumbnailBottom); final Rect wColorRectangle = new Rect(wRectColorLeft, wRectColorTop, wRectColorRight, wRectColorBottom); final Rect wBorderRectangle = new Rect(wRectBorderLeft, wRectBorderTop, wRectBorderRight, wRectBorderBottom); final RectF wThumbRoundRectangle = new RectF(wThumbRectangle); final RectF wColorRoundRectangle = new RectF(wColorRectangle); final RectF wBorderRoundRectangle = new RectF(wBorderRectangle); final float roundPx = 3.0f; paint.setAntiAlias(true); canvas.drawARGB(0, 0, 0, 0); paint.setColor(wBorderColor); canvas.drawRoundRect(wBorderRoundRectangle, roundPx, roundPx, paint); paint.setColor(getLevelColor()); canvas.drawRoundRect(wColorRoundRectangle, roundPx, roundPx, paint); paint.setColor(wThumbColor); canvas.drawRoundRect(wThumbRoundRectangle, roundPx, roundPx, paint); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN)); canvas.drawBitmap(resizedBitmap, null, wThumbRectangle, paint); BitmapDrawable bmd = new BitmapDrawable(output); mCurrentImage.setImageDrawable(bmd); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void draw() {\n Graphics2D g2 = (Graphics2D) image.getGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);\n\n AffineTra...
[ "0.74285966", "0.6978348", "0.67234933", "0.6569498", "0.65264046", "0.6491752", "0.6457904", "0.6456192", "0.6420626", "0.6367051", "0.631931", "0.63074565", "0.6297087", "0.6266909", "0.62623835", "0.6260337", "0.6250485", "0.6242693", "0.6196692", "0.61924106", "0.61866754...
0.58901656
43
TODO Autogenerated method stub
public static void main(String[] args) { String[] strs = {"abc","cba","aaa","aas","saa"}; System.out.println(anagrams(strs)); }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
/ Sources: DND: Elevator: Flap: Aileron: Rudder: See ailerons Slat: Spoiler:
public void startup() { neutral(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String sourceHelp() {\n\treturn\n\" sf@HOSTNAME:PORTNUMBER - a serial forwarder\\n\" +\n\" serial@SERIALPORT:BAUDRATE - a mote connected to a serial port\\n\" +\n\" (using TOSBase protocol)\\n\" +\n\" network@HOSTNAME:PORTNUMBER - a mote whose s...
[ "0.5720252", "0.5136458", "0.50919265", "0.5075193", "0.5057099", "0.5032238", "0.49975657", "0.49799502", "0.49694577", "0.49273974", "0.492036", "0.49197355", "0.4916502", "0.49148566", "0.49025157", "0.49009246", "0.48863333", "0.4863715", "0.4863658", "0.48629946", "0.485...
0.0
-1
Produce a sequence [start..end)
public static int[] range(int start, int end) { int sz = end - start; int[] result = new int[sz]; for (int i = 0; i < sz; i++) result[i] = start + i; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[] range(int start, int end) {\n int size = end - start;\n int[] result = new int[size];\n for (int i = 0; i < size; i++) {\n result[i] = start + i;\n }\n return result;\n }", "public IRubyObject subseq(long beg, long len) {\n if (beg < 0 ...
[ "0.657333", "0.62421364", "0.6208041", "0.6129728", "0.6120763", "0.6119246", "0.6040709", "0.6008991", "0.5986253", "0.5980836", "0.5963292", "0.59006727", "0.5890341", "0.5885607", "0.58084244", "0.5801253", "0.5752453", "0.5712136", "0.56339467", "0.5625254", "0.5602767", ...
0.65726316
1
Produce a sequence [start..end) incrementing by step
public static int[] range(int start, int end, int step) { int sz = (end - start) / step; int[] result = new int[sz]; for (int i = 0; i < sz; i++) result[i] = start + (i * step); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int start(int i);", "int stepsToGo();", "public static int[] range(int start, int end, int step) {\n int size = (end - start) / step;\n int[] result = new int[size];\n for (int i = 0; i < size; i++) {\n result[i] = start + (i * step);\n }\n return r...
[ "0.58164746", "0.5626008", "0.55599463", "0.5479498", "0.5458121", "0.53801787", "0.53502893", "0.5335004", "0.53279155", "0.5317905", "0.52157605", "0.5207281", "0.52070004", "0.5185423", "0.5144062", "0.51377946", "0.51322746", "0.5126923", "0.51210636", "0.5119446", "0.510...
0.5515931
3
Created by Igor Goryainov skype glotemz on 02.07.2017 20:58.
public interface CurrentWeatherContract { interface View extends BaseView { void updateView(List<ForecastDay> forecastDays); } interface Presenter { void updateForecast(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic vo...
[ "0.5902926", "0.57833284", "0.56838024", "0.56779844", "0.56657135", "0.563391", "0.563391", "0.5589963", "0.5575732", "0.5543418", "0.5509325", "0.55033016", "0.54958284", "0.54620296", "0.54594624", "0.5447966", "0.5429957", "0.53917754", "0.5386303", "0.5377153", "0.537080...
0.0
-1
Reads all orders from the database
@Override public List<Order> readAll() { try (Connection connection = JDBCUtils.getInstance().getConnection(); Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery("SELECT o.customer_id, oi.order_id, " + "GROUP_CONCAT(i.item_id, ',', i.name, ',', i.value, ',', oi.quantity SEPARATOR ';') items " + "FROM orders o " + "INNER JOIN orders_items oi " + "ON o.order_id = oi.order_id " + "INNER JOIN items i " + "ON oi.item_id = i.item_id " + "GROUP BY oi.order_id");) { List<Order> orders = new ArrayList<>(); while (resultSet.next()) { orders.add(modelFromResultSet(resultSet)); } return orders; } catch (SQLException e) { LOGGER.debug(e); LOGGER.error(e.getMessage()); } return new ArrayList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t...
[ "0.8472977", "0.7506615", "0.7335814", "0.7248528", "0.721665", "0.7208971", "0.71584755", "0.71020865", "0.70948046", "0.7042555", "0.7024504", "0.69974774", "0.68542635", "0.6845802", "0.6820321", "0.6766826", "0.6754319", "0.6749545", "0.67444754", "0.6703548", "0.6670398"...
0.7742875
1
Fetches newest Order entity from data source.
public Order readLatest() { try (Connection connection = JDBCUtils.getInstance().getConnection(); Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery("SELECT o.customer_id, oi.order_id, " + "GROUP_CONCAT(i.item_id, ',', i.name, ',', i.value, ',', oi.quantity SEPARATOR ';') items " + "FROM orders o " + "INNER JOIN orders_items oi " + "ON o.order_id = oi.order_id " + "INNER JOIN items i " + "ON oi.item_id = i.item_id " + "GROUP BY oi.order_id " + "ORDER BY o.order_id DESC LIMIT 1");) { resultSet.next(); return modelFromResultSet(resultSet); } catch (Exception e) { LOGGER.debug(e); LOGGER.error(e.getMessage()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private OrderEntity getCurrentOrder(String orderId) {\n\t\tOrderEntity entity = new OrderEntity();\n\t\t//TODO get current order data from oracle\n\t\t\n\t\treturn entity;\n\t}", "public Order getOrderById(long orderId);", "public JSONObject fetchOrder(long orderId) throws Exception;", "@Override\n\tpublic O...
[ "0.62238467", "0.616382", "0.6109416", "0.6012004", "0.6010053", "0.5994661", "0.5977374", "0.59437054", "0.590623", "0.5832948", "0.5775178", "0.57516104", "0.57430494", "0.5742369", "0.5736795", "0.56776595", "0.56624097", "0.5650173", "0.563731", "0.5623343", "0.56135285",...
0.65348315
0
Fetches newest Order entity from data source.
@Override public Order create(Order order) { try (Connection connection = JDBCUtils.getInstance().getConnection(); Statement statement = connection.createStatement();) { statement.executeUpdate(String.format("INSERT INTO orders(customer_id) values(%d)", order.getCustomer().getId())); HashMap<Item, Long> items = order.getItems(); for (Entry<Item, Long> entry : items.entrySet()) { statement.executeUpdate(String.format("INSERT INTO orders_items(order_id, item_id, quantity) " + "values(last_insert_id(), %d, %d)", entry.getKey().getId(), entry.getValue())); } return readLatest(); } catch (Exception e) { LOGGER.debug(e); LOGGER.error(e.getMessage()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Order readLatest() {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();\r\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT o.customer_id, oi.order_id, \"\r\n\t\t\t\t\t\t+ \"GROUP_CONCAT(i.item_id, ',', i.n...
[ "0.65353245", "0.62217385", "0.616156", "0.610812", "0.60105693", "0.6010509", "0.5993875", "0.59761435", "0.5943742", "0.59045964", "0.58327043", "0.577337", "0.5749196", "0.57421637", "0.57408404", "0.5736043", "0.56765556", "0.5661542", "0.56509477", "0.5637112", "0.562243...
0.53171533
48
Creates an order in the database.
@Override public Order update(Order order) { try (Connection connection = JDBCUtils.getInstance().getConnection(); Statement statement = connection.createStatement();) { statement.executeUpdate(String.format("UPDATE orders " + "SET customer_id = %d WHERE order_id = %d ", order.getCustomer().getId(), order.getId())); return readOrder(order.getId()); } catch (Exception e) { LOGGER.debug(e); LOGGER.error(e.getMessage()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}", "void create(Order order);", "public void create(Order order) {\n order_dao.create(order);\n }", "public void create(Order order) {\n\t\torderDao.create(order);\n\t}", "@Override\n public Order create(Order or...
[ "0.783669", "0.77181125", "0.7698991", "0.74531186", "0.73931664", "0.7143362", "0.701171", "0.7001771", "0.69523996", "0.6921208", "0.687653", "0.68594503", "0.6856352", "0.68113786", "0.676439", "0.6735427", "0.6669064", "0.66597426", "0.6609391", "0.6551732", "0.6534431", ...
0.0
-1
Updates a order in the database.
@Override public Order modelFromResultSet(ResultSet resultSet) throws SQLException { // build customer Long customerId = resultSet.getLong("customer_id"); Customer customer = new Customer(customerId); // build items String[] itemArray = resultSet.getString("items").split(";"); HashMap<Item, Long> itemMap = new HashMap<>(); Arrays.stream(itemArray) .map(s -> s.split(",")) .forEach(s -> itemMap.put( new Item(Long.parseLong(s[0]), s[1], Double.parseDouble(s[2])), Long.parseLong(s[3]))); HashMap<Item, Long> sortedItemMap = itemMap.entrySet() .stream() .sorted(Comparator.comparingLong(e -> e.getKey().getId())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (left, right) -> left, LinkedHashMap::new)); // sort map after ordering issue from ORDER_BY clause // build order Long orderId = resultSet.getLong("order_id"); Order order = new Order(orderId, customer, sortedItemMap); return order; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update(Order order) {\n order_dao.update(order);\n }", "public void update(Order order) {\n\t\torderDao.update(order);\n\t}", "void update(Order order);", "@Override\n\tpublic void updateOrder(Orders order) throws SQLException {\n\t\tConnection conn = null;\n PreparedStatement st...
[ "0.808927", "0.78133863", "0.77477", "0.7666203", "0.7655034", "0.7483377", "0.7370987", "0.7359643", "0.7234305", "0.7221844", "0.71188027", "0.71153677", "0.70807284", "0.7058469", "0.70296186", "0.70214176", "0.69822586", "0.691523", "0.6856237", "0.6819372", "0.673958", ...
0.0
-1
Upon successful authentication, generate a token. The 'auth' passed to successfulAuthentication() is the current authenticated user.
@Override protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException, ServletException { String authString = String.format("{\"auth\": \"%s\"", false); String tokenString = String.format(",\"jwt_token\": \"%s\"", null); String reason = String.format(",\"reason\": \"%s\"}", "Username or Password incorrect"); response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); // response.setStatus(HttpServletResponse.SC_OK); response.getWriter().write(authString + tokenString + reason); // Add token to header // response.addHeader(jwtConfig.getHeader(), jwtConfig.getPrefix() + token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void successfulAuthentication(HttpServletRequest req,\n\t\t\tHttpServletResponse res, FilterChain chain, Authentication auth)\n\t\t\tthrows IOException, ServletException {\n\t\tString userName = ((User) auth.getPrincipal()).getUsername();\n\n\t\tString token = Jwts\n\t\t\t\t.builder()\n\t\t\...
[ "0.6357908", "0.6346716", "0.6291053", "0.6289441", "0.6225882", "0.62124527", "0.5899652", "0.5880833", "0.5858633", "0.5845787", "0.5810407", "0.5798386", "0.5773718", "0.5757359", "0.57445616", "0.5731337", "0.5695207", "0.564143", "0.5530609", "0.5508767", "0.5488323", ...
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.7885466", "0.75500387", "0.7497769", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", ...
0.0
-1
But google don't allow to rewrite 'from'
public void sendFromTo(String from, String emailTo, String subject, String message) { try { MimeMessage mimeMessage = mailSender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, false, "utf-8"); mimeMessage.setContent(message, "text/html; charset=UTF-8"); helper.setFrom(from); helper.setTo(emailTo); helper.setSubject(subject); mailSender.send(mimeMessage); } catch (MessagingException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void from(String from) {\n }", "public void setFrom(String from) {\r\n\t\tthis.from= from;\r\n\t}", "public void setFrom(String from) {\n this.from = from;\n }", "public void set_from(String from2) {\n\t\tthis.from=from2;\n\t}", "public void from(IETeam from);", "public...
[ "0.6180079", "0.58204037", "0.5815124", "0.5586796", "0.5570646", "0.5417687", "0.5307741", "0.5298553", "0.5269536", "0.51961255", "0.5170121", "0.51674706", "0.5164166", "0.5135603", "0.5128083", "0.51050174", "0.50518066", "0.5042989", "0.5021695", "0.5008969", "0.5008053"...
0.0
-1
You may also change texts, positions and more by editing directly the method generatePrinterFriendlyVersion() below
@RequestMapping(value = "/printer-friendly-version", method = {RequestMethod.GET}) public void get( HttpServletResponse response, HttpSession session, @RequestParam(value = "fileId") String fileId ) throws IOException, RestException { // Locate document. This document should not continue if the file was not found. if (!Files.exists(Application.getTempFolderPath().resolve(fileId))) { // Return "Not Found" code. response.setStatus(404); return; } byte[] fileContent = Files.readAllBytes(Application.getTempFolderPath().resolve(fileId)); // Check if doc already has a verification code registered on storage. String verificationCode = StorageMock.getVerificationCode(session, fileId); if (verificationCode == null) { // If not, generate and register it. verificationCode = AlphaCode.generate(); StorageMock.setVerificationCode(session, fileId, verificationCode); } // Generate the printer-friendly version. byte[] pfvContent = generatePrinterFriendlyVersion(fileContent, verificationCode); // Return printer-friendly version as a downloadable file. response.setHeader("Content-Disposition", "attachment; filename=printer-friendly.pdf"); OutputStream outStream = response.getOutputStream(); org.apache.commons.io.IOUtils.write(pfvContent, outStream); outStream.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void printVersion() {\n \n // print the version\n System.out.println(\"arara \".concat(AraraConstants.VERSION).concat(\" - \").concat(localization.getMessage(\"Header_Slogan\")));\n System.out.println(\"Copyright (c) \".concat(AraraConstants.COPYRIGHTYEAR).concat(\", Paulo Roberto M...
[ "0.6934058", "0.6682224", "0.6314741", "0.6181839", "0.58833945", "0.5862534", "0.5814397", "0.5786707", "0.5782517", "0.5746949", "0.5740773", "0.5732828", "0.57203835", "0.5708868", "0.56664234", "0.5645834", "0.56286716", "0.56124103", "0.5610143", "0.5593508", "0.5580148"...
0.0
-1
ShowUserMessage.showUserMessage(activity ,"Server Connection Problem!");
public void onConnectionError() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showMessage(String string) {\n\n }", "public void alertConnectionError(){\n\t\tthis.alert(\"ERROR\",\"Server Connection Error\\nTo adjust server settings go to:\\nGame->Settings\",AlertType.ERROR);\n\t}", "@Override\n\tpublic void connectionFailed(String message) {\n\t\tToast.makeText(this,...
[ "0.65209186", "0.651689", "0.64431334", "0.64303553", "0.6411853", "0.63892275", "0.6377957", "0.63688034", "0.6366407", "0.6342688", "0.6342688", "0.6282399", "0.6263701", "0.624432", "0.624432", "0.6235416", "0.6225591", "0.621535", "0.6212014", "0.61872375", "0.6165151", ...
0.0
-1
/ShowUserMessage.showUserMessage(activity ,"Please connect to internet!");
public void internetConnectionProble() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showNetErrorMessage() {\n showMessage(R.string.ic_net_error_tipinfo);\n }", "private void ShowNoInternetConnection(){\n StopWhaitSpinner();\n //There was an error show error message\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder....
[ "0.66216606", "0.66069865", "0.64546674", "0.64262676", "0.6367588", "0.6317956", "0.62898874", "0.62861323", "0.62826717", "0.62709635", "0.625535", "0.6230665", "0.6213937", "0.61465883", "0.6140704", "0.6122773", "0.61051357", "0.61045796", "0.60985214", "0.60985214", "0.6...
0.0
-1
Check if we have write permission
public static boolean verifyStoragePermissions(Activity activity) { int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); if (permission != PackageManager.PERMISSION_GRANTED) { // We don't have permission so prompt the user ActivityCompat.requestPermissions( activity, PERMISSIONS_STORAGE, REQUEST_EXTERNAL_STORAGE ); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isWritePermissionGranted();", "boolean isWriteAccess();", "boolean canWrite();", "int getPermissionWrite();", "public boolean isWriteable();", "private boolean isWriteStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n ...
[ "0.91002184", "0.8837875", "0.80668896", "0.8025014", "0.7775498", "0.7744576", "0.75648856", "0.75482327", "0.7270773", "0.726773", "0.72160375", "0.7176295", "0.70081687", "0.6936205", "0.68871886", "0.68650013", "0.6816225", "0.6807067", "0.6791372", "0.6704709", "0.668791...
0.0
-1
Because app crashes sometimes without the try>catch
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { Log.d("Paul", "delete file"); File file = new File(Environment.getExternalStorageDirectory().getPath(), getString(R.string.temp_file_name)); try { // if file exists in memory if (file.exists()) { file.delete(); Log.d("Paul", "file deleted"); } } catch (Exception e) { Log.d("Paul","Some error happened?"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void ...
[ "0.65973586", "0.64118135", "0.64118135", "0.6326946", "0.626575", "0.62397975", "0.61915046", "0.6138393", "0.60739344", "0.6046012", "0.6038076", "0.6023205", "0.6019273", "0.6009754", "0.6009754", "0.6009754", "0.6009754", "0.6009754", "0.59337205", "0.5912302", "0.5895690...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Map<Integer,String> hm=new LinkedHashMap<>(); hm.put(1,"Jack"); hm.put(2,"Peter"); hm.put(3,"Sam"); hm.put(4,"Bruce"); System.out.println("Map:"+hm); hm.put(2,"Wayne"); System.out.println("\nAfter Changing An element in the Map:\n"+hm); hm.remove(2); System.out.println("\nAfter removing an element from the Map:\n"+hm); }
{ "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
Created by User on 026 26.09.17.
public interface SoundCloudService { String CLIENT_ID = "5f016c08c2201881c4217afd5f52e065"; String SOUND_ClOUD_API = "http://api.soundcloud.com/"; @GET("resolve.json") Observable<Track> getTrackInfo(@Query("url") String url, @Query("client_id") String clientId); @GET("resolve.json") Observable<Playlist> getPlaylistInfo(@Query("url") String url, @Query("client_id") String clientId); @GET("i1/tracks/{id}/streams") Observable<DownloadLink> getLink(@Path("id") String trackId, @Query("client_id") String clientId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70814_o() { return true; }", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "pub...
[ "0.55773175", "0.55519056", "0.55075026", "0.5491372", "0.5488768", "0.5460749", "0.54598373", "0.53832114", "0.53523356", "0.5342318", "0.5341038", "0.5338769", "0.53363407", "0.53363407", "0.5287217", "0.528288", "0.52772063", "0.52742004", "0.5273862", "0.5264445", "0.5264...
0.0
-1
Metodo que muestra un listado de los proyectos de la empresa
@Override public List<Proyecto> listarProyectos() { return proyectoRepo.findAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "public List<NotaDeCredito> procesar();", "public List<Proveed...
[ "0.68400615", "0.6785549", "0.67171955", "0.6713209", "0.6712668", "0.6688696", "0.66544783", "0.66216457", "0.6600783", "0.6543498", "0.6527925", "0.6519326", "0.65116584", "0.6488694", "0.64784354", "0.6465668", "0.64644945", "0.6461568", "0.6458391", "0.63949096", "0.63318...
0.73127615
0
Metodo para guardar un nuevo proyecto
@Override public void altaProyecto(Proyecto proyecto) { proyectoRepo.save(proyecto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void guardar() {\r\n\t\t\r\n\t\tmanejadorArchivos.guardar(palabras);\r\n\t\t\r\n\t}", "public void guardar(Modelo modelo) throws SipsaExcepcion;", "public void registrarProyecto(Proyecto proyecto) {\r\n\t\tproyectoServ.validarRegistro(proyecto);\r\n\t}", "public void InsertarProceso(Proceso nuevo) {\n...
[ "0.6678984", "0.64921296", "0.63293636", "0.63256073", "0.6312837", "0.624969", "0.62289834", "0.62096816", "0.6191984", "0.6181147", "0.61537516", "0.614642", "0.60783035", "0.60335994", "0.60180444", "0.60065466", "0.5986395", "0.5985504", "0.5909898", "0.58924145", "0.5882...
0.6717545
0
ChessBoard board = ChessBoard.withDefaultPieceSetup(); System.out.println(ChessConsoleUtils.boardToString(board));
public static void main(String[] args) { ConsoleChessGui gui = new ConsoleChessGui(); GameController gameController = new GameController(gui); gameController.run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayBoard(){\r\n System.out.println(board.toString());\r\n }", "public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }", "public static void printBoard() {\n int separator...
[ "0.7763352", "0.757483", "0.7244557", "0.72361994", "0.71542615", "0.7110761", "0.71063465", "0.7086097", "0.70438296", "0.70226705", "0.7002536", "0.6964183", "0.695147", "0.6938701", "0.69326484", "0.6924349", "0.6899696", "0.6879735", "0.6855731", "0.6809086", "0.68090457"...
0.0
-1
Interface for receipt scanner
public interface ReceiptScanService { /** * Return a {@link Receipt} object from imagePath * @param imagePath an absolute file path for image * @return {@link Receipt} */ public Receipt getReceiptFromImage(String imagePath); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}", "public interface ScannerFunctions extends Printer{\n void scan();\n}", "public TerminalScanReceiver() {\n\t super(StorageLevel.MEMORY_ONLY());\n\t }", "public interface BarcodeCapturedListener {\n\n /**\n * Will receive the barcode as a str...
[ "0.6556108", "0.6105841", "0.5963759", "0.59067965", "0.58955735", "0.58081216", "0.57976615", "0.57479554", "0.57196224", "0.5683611", "0.56543565", "0.55804616", "0.5573915", "0.5558001", "0.55157316", "0.5486704", "0.54863805", "0.5484833", "0.5467558", "0.54572237", "0.54...
0.58421767
5
Created by Administrator on 2015/8/24.
public interface OnAreasListener extends IErrorListener { void OnAreasSuccess(List<AreasBean> areasBeanList); @Override void OnNetError(); @Override void OnRequestFail(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@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\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Ove...
[ "0.6287937", "0.6045146", "0.6031465", "0.59820646", "0.5965484", "0.5951325", "0.5925396", "0.5912248", "0.5848837", "0.5838046", "0.5833955", "0.5822667", "0.5822667", "0.5818667", "0.58096564", "0.58096564", "0.5807582", "0.5790255", "0.5776626", "0.576232", "0.57620853", ...
0.0
-1
items within the room Create a room described "description". Initially, it has no exits. "description" is something like "a kitchen" or "an open court yard".
public Room(String description) { this.description = description; items = new ArrayList<>(); exits = new HashMap<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathro...
[ "0.69533986", "0.6779655", "0.6490897", "0.64851695", "0.64583945", "0.6386655", "0.63339126", "0.62671", "0.61064243", "0.608861", "0.6076432", "0.6002834", "0.5995647", "0.59844464", "0.59795284", "0.5965877", "0.5950731", "0.59453195", "0.59438366", "0.59269404", "0.590244...
0.73110163
0
Adds an item into a room's ArrayList of items.
public void addItem(String name,String description, int weight, boolean key) { items.add(new Item(name,description,weight,key)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n if (winner(item)) {\n ...
[ "0.79137594", "0.75455856", "0.75455856", "0.7452719", "0.74387425", "0.74076897", "0.7404734", "0.73640466", "0.7341031", "0.73239887", "0.7293481", "0.72783774", "0.72734994", "0.72533655", "0.71067274", "0.7106385", "0.71005315", "0.71003276", "0.7083023", "0.70674044", "0...
0.0
-1
Removes an item from a room's ArrayList of items.
public void removeItem(int n) { items.remove(n); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeRoomItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = currentRoom.getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's it...
[ "0.70182717", "0.6961992", "0.6821198", "0.67318535", "0.67195123", "0.67159206", "0.6715581", "0.6695189", "0.66786003", "0.6629739", "0.66012454", "0.6597204", "0.65816855", "0.6580486", "0.6577888", "0.65570736", "0.6535793", "0.6403388", "0.63920885", "0.63783795", "0.636...
0.5814644
73
Removes an item into a room's ArrayList of items, and places it into the players inventory Searches by name, prints based on the results.
public void takeItem(String name, Player player) { int i=items.size()-1; while(i>=0){ if(items.get(i).getName().equals(name)) { player.addItem(items.get(i)); System.out.println("You take the "+items.get(i).getName()+"!"); items.remove(i); return; } i--; } System.out.println("Action failed. Review your input and try again!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n ...
[ "0.7334055", "0.72122395", "0.7135339", "0.7121764", "0.70497304", "0.69823575", "0.69513977", "0.6897426", "0.66826713", "0.6424184", "0.64216125", "0.6420704", "0.64183754", "0.6416889", "0.6416624", "0.6380373", "0.63629365", "0.62989604", "0.62747324", "0.62688845", "0.62...
0.7017703
5
Returns a room's item ArrayList
public ArrayList<Item> getItems() { return items; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Item> getRoomItems() {\n return (roomItems);\n }", "public ArrayList getRooms();", "public List<Room> getRooms(){\n ArrayList<Room> returnedList = (ArrayList<Room>) rooms;\n return (ArrayList<Room>) returnedList.clone();\n }", "public ArrayList<Room> getRooms() {\n ...
[ "0.8303385", "0.77727836", "0.72751373", "0.71930516", "0.7122392", "0.70594585", "0.703678", "0.69818425", "0.6964283", "0.6960588", "0.6917166", "0.67895246", "0.6768357", "0.6761752", "0.6758163", "0.6753135", "0.67236733", "0.6712764", "0.6695086", "0.6690632", "0.6599176...
0.6337884
39
Define an exit from this room.
public void setExit(String direction, Room neighbor) { exits.put(direction, neighbor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onAgentExit(Event event, Agent agent, Cell cell, Direction dir) {\r\n }", "public Direction getExit(){\n\t\t\treturn exit;\n\t\t}", "public Room getExit(String direction) \n {\n return exits.get(direction);\n }", "public Room getExit(String direction) \n {\n ...
[ "0.7060786", "0.7039888", "0.6702058", "0.6702058", "0.6702058", "0.6670439", "0.6611962", "0.6611962", "0.65165126", "0.6495489", "0.6478507", "0.6478507", "0.6459517", "0.6443124", "0.6428666", "0.6402384", "0.6395064", "0.63472205", "0.6346814", "0.6346814", "0.6322985", ...
0.6548538
9
Return a description of the room in the form: You are in the kitchen. Exits: north west
public String getLongDescription() { return "You are " + description + ".\n" + getExitString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void look()\n {\n System.out.println(currentRoom.getLongDescription()); \n }", "public String getRoomName() {\n switch (description) {\n case \"You are standing outside Hogwarts School of Witchcraft and\\n\"\n + \"Wizardry, near the Whomping Willow. You are se...
[ "0.7409442", "0.70712507", "0.7051148", "0.70414865", "0.70176214", "0.7008048", "0.6868975", "0.68373036", "0.6752918", "0.6700176", "0.66552716", "0.66203636", "0.65976334", "0.65721697", "0.6441252", "0.6424398", "0.64153403", "0.64084864", "0.6326824", "0.62255883", "0.62...
0.58966786
50
Return a string describing the room's exits, for example "Exits: north west".
private String getExitString() { String returnString = "Exits:"; Set<String> keys = exits.keySet(); for(String exit : keys) { returnString += " " + exit; } return returnString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getExitString()\n {\n return (\"\\nSaída(s):\\n \" + roomExits.keySet());\n }", "public String getExitString() \n {\n String returnString = \"Exits: \";\n Set<String> keys = exits.keySet();\n \n for(String exit : keys) {\n returnString += \" \" +...
[ "0.85942936", "0.78177303", "0.77811915", "0.77630043", "0.709361", "0.657508", "0.63397545", "0.6324325", "0.62927604", "0.62016934", "0.6191224", "0.6133171", "0.6128506", "0.61148196", "0.61130494", "0.60675", "0.6053382", "0.6025673", "0.60179067", "0.60129267", "0.600164...
0.77418494
5
Return the room's description
public Room getExit(String direction) { return exits.get(direction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRoomDescription() {\n\treturn this.description;\n\t\n}", "public String getDesc() {\n ListIterator<Item> roomContents = contents.listIterator();\n String contentString = \"\";\n while (roomContents.hasNext()) {\n contentString\n = contentString ...
[ "0.8764031", "0.8128785", "0.76508415", "0.74902046", "0.7329728", "0.7037558", "0.70375293", "0.7031782", "0.700187", "0.69447786", "0.6943758", "0.69363475", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524",...
0.0
-1
Prints out which items are within a room. No return or parameter values.
public void printItems() { if (getItems().size()==0){ System.out.println("There are no items in this room."); } else{ System.out.print("The item(s) in this room are: "); int i=0; while(i<getItems().size()){ if(i<getItems().size()-1){ System.out.print(getItems().get(i).getName()+", "); } else{ System.out.println(getItems().get(i).getName()+"."); } i++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i <...
[ "0.81599957", "0.7428836", "0.68305725", "0.6738367", "0.67150116", "0.6657891", "0.6634443", "0.66262144", "0.65718013", "0.64732265", "0.6465732", "0.64261216", "0.64232993", "0.64127034", "0.63997394", "0.6274639", "0.6263678", "0.61974096", "0.61733353", "0.61642724", "0....
0.759324
1
returns true if a sponsor name is contained within the SponsorSystem
public boolean containsKey(String sponsorName) { return this.containsKey(sponsorName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasOriginName();", "boolean containsStudentWith(String name);", "boolean hasBusinessName();", "boolean hasHasInstitutionName();", "public boolean containsSponsored(){\n for(int i=0; i<flightSponsored.size(); i++){\n if(flightSponsored.get(i).booleanValue()){\n retur...
[ "0.665353", "0.6406481", "0.63618827", "0.63167036", "0.6294984", "0.6275359", "0.6275359", "0.62684834", "0.62113893", "0.62055886", "0.6196074", "0.6196074", "0.6194259", "0.61330044", "0.61286443", "0.59882337", "0.5983769", "0.5981538", "0.5973038", "0.5973038", "0.597303...
0.7262949
0
adds or updates a sponsor with a rate if the rate is less than 0 or greater than 0.1, then an InvalidRateException will be thrown OR if a sponsor's rate was lower than their previous, then the a LowerRateException will be thrown
public void updateRate(String sponsorName, Double newRate) throws LowerRateException, InvalidRateException { if (newRate < 0.0 || newRate > 0.1) { throw new InvalidRateException(newRate); } else if (sponsors.containsKey(sponsorName)) { if (newRate < sponsors.get(sponsorName)) { throw new LowerRateException(sponsors.get(sponsorName), newRate); } } else { sponsors.put(sponsorName, newRate); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void updateRate(Rates rates) {\n\t\tsession.saveOrUpdate(rates);\r\n\t\tsession.beginTransaction().commit();\r\n\t}", "public void setRate(int rate) { this.rate = rate; }", "public void setRate(double newRate) {\n this.rate = newRate;\n }", "@Override\n public RateDTO updat...
[ "0.5893323", "0.573364", "0.5704228", "0.5693531", "0.55495876", "0.5487735", "0.5444346", "0.54205006", "0.54205006", "0.54042375", "0.53851455", "0.530337", "0.52134526", "0.5211501", "0.5101872", "0.5100901", "0.5100016", "0.50964034", "0.5090265", "0.5081881", "0.5081401"...
0.7963271
0
finds the total rate of the sponsor rates for a single page
public double calculateRate(String url) { double totalRate = 0.0; for (String sponsor : sponsors.keySet()) { if (url.contains(sponsor)) { totalRate = sponsors.get(sponsor) + totalRate; } } return totalRate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getAmountPage();", "@Query(\"select count(s)*1./(select count(s1)*1. from Sponsorship s1) from Sponsorship s where s.isActive='1'\")\n\tDouble ratioOfActiveSponsorships();", "public double getRate( ) {\nreturn monthlyInterestRate * 100.0 * MONTHS;\n}", "double getRate();", "public void sendeRate(Strin...
[ "0.572549", "0.55178183", "0.5505089", "0.54617673", "0.5327735", "0.53162533", "0.5314013", "0.52569634", "0.5253922", "0.5224232", "0.5206575", "0.5193806", "0.5186117", "0.51422405", "0.5138887", "0.5133107", "0.51319855", "0.51273936", "0.51155704", "0.5106056", "0.504178...
0.6571555
0
Compresses the given InputStream using the LZ78 algorithm into the given OutputStream. The latter is closed automatically.
public static void compress(InputStream fins, OutputStream outs) { int value = 1; byte[] pattern = new byte[0]; byte[] byteArray = new byte[8192]; boolean isEmpty = true; Map<Byte, byte[]> dictionary = new TreeMap<>(); boolean patternAlreadyExist; int numberOfBytesRead; try { // While the end of file is not reached. while ((numberOfBytesRead = fins.read(byteArray)) != -1) { for (int i = 0; i < numberOfBytesRead; i++) { //Compress the stream if the dictionary size exceeds 127, // and construct a new dictionary if (dictionary.size() == Byte.MAX_VALUE) { if (!isEmpty) { dictionary.put((byte) value, pattern); } compressStream(dictionary, outs); dictionary.clear(); value = 1; } // Read pattern corresponding to an array of bytes. byte[] temp = Util.mergeBytes(pattern, byteArray[i]); pattern = temp; patternAlreadyExist = doesPatternExist(dictionary, pattern); // Add the pattern to the dictionary if its doesn't exist. if (!patternAlreadyExist) { dictionary.put((byte) value, pattern.clone()); value++; pattern = new byte[0]; isEmpty = true; // If it already exists, read the next byte in the IS } else { isEmpty = false; continue; } } } // Insert the pattern in the dictionary if the end of the file is // reached and the pattern already exist. if (!isEmpty) { dictionary.put((byte) value, pattern.clone()); } compressStream(dictionary, outs); outs.close(); } catch (IOException e) { System.err.println("An error happened while decompressing."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void compress(BitInputStream in, BitOutputStream out){\n\n\t\t\tint[] counts = readForCounts(in);\n\t\t\tHuffNode root = makeTree(counts);\n\t\t\tMap<Integer, String> codings = makeCodingsFromTree(root);\n\t\t\twriter(root, out);\n\t\t\tin.reset();\n\t\t\twriteCompressedBits(in, codings, out);\n\t\t\tout.cl...
[ "0.54416233", "0.5251867", "0.52410597", "0.522758", "0.5207178", "0.5152998", "0.51497424", "0.5121275", "0.51033217", "0.50728077", "0.5056724", "0.50348747", "0.49788108", "0.4880499", "0.48206297", "0.4794419", "0.47834048", "0.47755384", "0.4739403", "0.46958232", "0.461...
0.50937974
9
Decompresses the specified InputStream to the specified OutputStream
public static void decompress(InputStream src, OutputStream dst) { int key = 1; byte[] byteKey = new byte[1]; byte[] byteValue = new byte[1]; Map<Integer, byte[]> dictionary = new TreeMap<>(); try { // While the end of the file src not reached, read byte. while (src.read(byteKey) != -1) { // Decompress the stream if the dictionary size exceeds 127 and // construct a new dictionary if (dictionary.size() == Byte.MAX_VALUE) { decompressStream(dictionary, dst); dictionary.clear(); key = 1; } // Get the key int result = Util.byteToInt(byteKey[0]); // Cet the associated value and put it in the dictionary. src.read(byteValue); if (result == 0) { dictionary.put(key, byteValue.clone()); key++; } else if (result > 0) { byte[] val = dictionary.get(result); byte[] buf = Util.mergeBytes(val, byteValue.clone()); dictionary.put(key, buf.clone()); key++; } } decompressStream(dictionary, dst); dst.close(); } catch (IOException e) { System.err.println("An error happened while decompressing."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void decompressStream(Map<Integer, byte[]> dictionary,\n OutputStream os) {\n byte[] byteStream = new byte[0];\n\n for (Integer key : dictionary.keySet()) {\n byteStream = Util.mergeBytes(byteStream,\n dictionary.get(key).clone());\...
[ "0.6090576", "0.60360944", "0.5630376", "0.5437569", "0.54205805", "0.53784376", "0.52875316", "0.5249872", "0.5243826", "0.5232434", "0.5199877", "0.5198482", "0.5143272", "0.5140261", "0.5118318", "0.5110028", "0.5090728", "0.5088063", "0.50798625", "0.5070719", "0.5058566"...
0.60557926
1
Writes a compressed stream from the dictionary in the specified OutputStream
private static void compressStream(Map<Byte, byte[]> dictionary, OutputStream outs) throws IOException { int current_pos = 0; byte[] byteStream = new byte[dictionary.size()*2]; boolean patternExistTwice = false; for (Byte key : dictionary.keySet()) { patternExistTwice = doesPatternExistTwice(dictionary, dictionary.get(key)); // If the pattern already exists twice in the dictionary then it is // definitely the end of the dictionary if (patternExistTwice && key == dictionary.size()) { if (dictionary.get(key).length == 1) { byteStream[current_pos] = 0; current_pos++; } else { int realKey = getKeyOfSubstring(dictionary, dictionary.get(key)); byteStream[current_pos] = (byte) realKey; current_pos++; } byteStream[current_pos] = Util.getLastByte(dictionary.get(key)); current_pos++; break; } // Write Node number following by last byte of the corresponding // value. else { if (dictionary.get(key).length == 1) { byteStream[current_pos] = 0; current_pos++; } else { int realKey = getKeyOfSubstring(dictionary, dictionary.get(key)); byteStream[current_pos] = (byte) realKey; current_pos++; } byteStream[current_pos] = Util.getLastByte(dictionary.get(key)); current_pos++; } } outs.write(byteStream); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void decompressStream(Map<Integer, byte[]> dictionary,\n OutputStream os) {\n byte[] byteStream = new byte[0];\n\n for (Integer key : dictionary.keySet()) {\n byteStream = Util.mergeBytes(byteStream,\n dictionary.get(key).clone());\...
[ "0.73940897", "0.60040486", "0.58882195", "0.5808854", "0.57207006", "0.5713312", "0.56944084", "0.5693622", "0.56874335", "0.56710434", "0.5633956", "0.56325126", "0.5594517", "0.55152637", "0.5506172", "0.54795563", "0.5479", "0.54743725", "0.54609346", "0.5460746", "0.5453...
0.69536823
1
method that writes a decompressed stream from the dictionary in the specified output stream
static void decompressStream(Map<Integer, byte[]> dictionary, OutputStream os) { byte[] byteStream = new byte[0]; for (Integer key : dictionary.keySet()) { byteStream = Util.mergeBytes(byteStream, dictionary.get(key).clone()); } try { os.write(byteStream); } catch (IOException e) { System.err.println("An error happened while decompressing."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void compressStream(Map<Byte, byte[]> dictionary,\n OutputStream outs) throws IOException {\n int current_pos = 0;\n byte[] byteStream = new byte[dictionary.size()*2];\n boolean patternExistTwice = false;\n for (Byte key : dictionary....
[ "0.6819097", "0.6304836", "0.59920615", "0.59663683", "0.56838506", "0.5452847", "0.5442336", "0.5380184", "0.5347241", "0.5316983", "0.531577", "0.5279829", "0.5237204", "0.52350926", "0.52323556", "0.50925505", "0.5048893", "0.5038364", "0.50307935", "0.5027249", "0.5008307...
0.772299
0
Checks if the specified pattern exists in the specified map.
private static boolean doesPatternExist(Map<Byte, byte[]> haystack, byte[] needle) { if (needle == null) return false; for (Byte key : haystack.keySet()) { if (Arrays.equals(haystack.get(key), needle)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean patternExists(String pattern, String text, int times) {\r\n\t\t// YOUR CODE HERE\r\n\t\treturn false; // Dummy return\r\n\t}", "int containsMatchingPattern(Set<String> values, String pattern, boolean matchPrefix) {\n return memoizer.matches(values, pattern, matchPrefix, () -> {\n ...
[ "0.62626714", "0.600169", "0.5977116", "0.5904085", "0.5867728", "0.57886636", "0.5719876", "0.57095104", "0.5696635", "0.56861854", "0.5669463", "0.56480396", "0.55687356", "0.55129063", "0.5455652", "0.53972405", "0.53929454", "0.5392933", "0.53778225", "0.53617686", "0.534...
0.6832052
0
Checks if the specified pattern exists twice in the specified map
private static boolean doesPatternExistTwice(Map<Byte, byte[]> haystack, byte[] needle) { int twice = 0; for (Byte key : haystack.keySet()) { if (Arrays.equals(haystack.get(key), needle)) { twice++; if (twice == 2) return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean doesPatternExist(Map<Byte, byte[]> haystack,\n byte[] needle) {\n if (needle == null)\n return false;\n for (Byte key : haystack.keySet()) {\n if (Arrays.equals(haystack.get(key), needle)) {\n retur...
[ "0.6756062", "0.61588675", "0.6063222", "0.5773838", "0.5731595", "0.57125217", "0.5626181", "0.56152815", "0.5592174", "0.55077785", "0.53918123", "0.53658366", "0.5310836", "0.52936983", "0.524978", "0.5226287", "0.521356", "0.5204793", "0.51906097", "0.51513433", "0.514157...
0.7586849
0
Return the key of the specified pattern in the specified map.
private static int getKeyOfSubstring(Map<Byte, byte[]> haystack, byte[] needle) { int key = 0; byte[] array = Arrays.copyOfRange(needle, 0, needle.length-1); for (Byte b : haystack.keySet()) { if (Arrays.equals(haystack.get(b), array)) { key = b; break; } } return key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Hashtable<K, V> getPattern(String pattern);", "Set<String> getKeysMatchingPattern(String pattern);", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "private st...
[ "0.6088297", "0.58559704", "0.5817884", "0.5817884", "0.5817884", "0.5817884", "0.5817884", "0.5817884", "0.58054185", "0.55300266", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", ...
0.56272626
9
CFG productions are: nonterminal > terminal E > +int | int | int | T T > stringT | e Where e = epsilon (empty), int = a digit, string = a character.
static boolean E() { int save = next; if (E1()) return true; next = save; if (E2()) return true; next = save; if (E3()) return true; next = save; if (E4()) return true; next = save; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tmakeCFG(\"E -> T + T\\n \"\n\t\t\t\t+ \"E -> T - T\\n \"\n\t\t\t\t+ \"T -> F * F\\n \"\n\t\t\t\t+ \"T -> F / F\\n\", \"E\");\n\t\t\n\t\t\n//\t\tNontermianlSymbol procedure = new NontermianlSymbol(\"procedure\");\n//\t\tNontermianlSymbol subprocedure = new Nonterm...
[ "0.63953924", "0.62925506", "0.6283732", "0.60000116", "0.58460975", "0.5777156", "0.5754054", "0.5628791", "0.553867", "0.54181534", "0.5400931", "0.5258614", "0.52132595", "0.52066666", "0.5172261", "0.51666605", "0.5159205", "0.5153125", "0.51226026", "0.5122595", "0.51218...
0.0
-1
Adds the individual to the archive.
public void add(SearchItemIndividual si) { if (!archive.containsKey(si.toString())) { archive.put(si.toString(), (SearchItemIndividual)si.clone()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IbeisIndividual addIndividual(String name) throws IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException, IndividualNameAlreadyExistsException;", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\",...
[ "0.6140651", "0.5816305", "0.5778771", "0.56244075", "0.5619937", "0.56142503", "0.5581189", "0.55698574", "0.55576694", "0.55311215", "0.5506317", "0.5503125", "0.5492404", "0.54737496", "0.5465625", "0.5453313", "0.5453105", "0.5448014", "0.5441592", "0.54195386", "0.541656...
0.6790777
0
Returns the size of the archive
public int size() { return archive.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getArchiveSize() {\n return archiveSize;\n }", "public int getArchiveSize() {\r\n\t\treturn archiveSize;\r\n\t}", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public long size() {\n return this.filePage.getSizeInfile();\n }", "public long size() {\n ...
[ "0.83577687", "0.82420665", "0.73721206", "0.7249796", "0.72303724", "0.7181563", "0.71794", "0.71794", "0.71158195", "0.7112781", "0.70966274", "0.7089495", "0.70738775", "0.7061761", "0.7024309", "0.70182306", "0.6997339", "0.69888324", "0.69779193", "0.69779193", "0.697791...
0.83496433
1
Enforce test preparation implementation.
public void before(Scenario scenario) { logger.trace("Initializing Test-Framework for : " + scenario.getName()); if (scenario.getSourceTagNames().contains("@disabled-" + ParameterMap.getParamBrowserType())) { throw new AssumptionViolatedException(String.format("The feature %s is disabled on browser " + "type : %s", scenario.getName(), ParameterMap.getParamBrowserType())); } if (scenario.getSourceTagNames().contains("@disabled")) { throw new AssumptionViolatedException( String.format("The feature %s is disabled %s", scenario.getName(), ParameterMap.getParamBrowserType())); } TestDataCore.addToConfigStore("scenario", scenario); TestDataCore.addToConfigStore("profile", new QAUserProfile(scenario.getName())); if (ParameterMap.getParamAPIClearHeadersBeforeScenario()) { TestDataCore.removeFromDataStore("headers"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void prepare(TestCase testCase) {\n }", "@BeforeAll\n public void prepare() {\n }", "protected void runBeforeTest() {}", "@Before\r\n\tpublic void setup() {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}", "@Before\n\tpublic void set...
[ "0.71348476", "0.7059436", "0.67294395", "0.6672606", "0.66230637", "0.66115075", "0.66064125", "0.66064125", "0.66064125", "0.65813583", "0.6580224", "0.6564334", "0.6538987", "0.65187854", "0.6469486", "0.6426423", "0.6418944", "0.64081156", "0.63853806", "0.63648564", "0.6...
0.0
-1
Toast.makeText(getApplicationContext(), "Barcode scanner started", Toast.LENGTH_SHORT).show();
private void initialiseDetectorsAndSources() { barcodeDetector = new BarcodeDetector.Builder(this) .setBarcodeFormats(Barcode.QR_CODE) .build(); cameraSource = new CameraSource.Builder(this, barcodeDetector) .setRequestedPreviewSize(1920, 1080) .setAutoFocusEnabled(true) //you should add this feature .build(); surfaceView.getHolder().addCallback(new SurfaceHolder.Callback() { @Override public void surfaceCreated(SurfaceHolder holder) { try { if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED) { cameraSource.start(surfaceView.getHolder()); Toast.makeText(getApplicationContext(), "Camera started", Toast.LENGTH_LONG).show(); } else { ActivityCompat.requestPermissions(RideCycle.this, new String[]{Manifest.permission.CAMERA}, REQUEST_CAMERA_PERMISSION); } } catch (IOException e) { e.printStackTrace(); } } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } @Override public void surfaceDestroyed(SurfaceHolder holder) { cameraSource.stop(); } }); barcodeDetector.setProcessor(new Detector.Processor<Barcode>() { @Override public void release() { Toast.makeText(getApplicationContext(), "To prevent memory leaks barcode scanner has been stopped", Toast.LENGTH_SHORT).show(); } @Override public void receiveDetections(Detector.Detections<Barcode> detections) { final SparseArray<Barcode> barcodes = detections.getDetectedItems(); if (barcodes.size() != 0) { txtBarcodeValue.post(new Runnable() { @Override public void run() { if (barcodes.valueAt(0).email != null) { txtBarcodeValue.removeCallbacks(null); intentData = barcodes.valueAt(0).email.address; txtBarcodeValue.setText(intentData); isEmail = true; // btnAction.setText("ADD CONTENT TO THE MAIL"); } else { isEmail = false; // btnAction.setText("LAUNCH URL"); intentData = barcodes.valueAt(0).displayValue; txtBarcodeValue.setText("Cycle id: " + intentData); } } }); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n String scanNumText = result.getText();\n Toast.makeText(ItemScan.this, scanNumText, Toast.LENGTH_SHORT).show();\n Intent intent = getIntent();\n intent.putExtra(\"Barcode...
[ "0.7346528", "0.7239791", "0.7131363", "0.6809939", "0.67773855", "0.67739815", "0.676739", "0.6644014", "0.6593225", "0.659102", "0.65490246", "0.64963", "0.6420349", "0.635273", "0.6342018", "0.630615", "0.63038", "0.6275574", "0.6267865", "0.6247499", "0.62030315", "0.61...
0.5730135
71